MATLAB: Solving integrals with Matlab

integrationMATLABnumerical integration

% Numerical Integration
f(x)=int(sym('7+1/sqrt(1-x^2)',1/2,0))
I am stuck on this calculus problem. It is numerical integration, how do i write a code for this problem?It gives me error and i don't know what i am doing incorrectly.
The problem is f(x)= integral sign(7+1/sqrt(1-x^2)). Upper bound of integral sign is 1/2 and lower bound of integral sign is 0.

Best Answer

  • syms x
    int( 7 + 1/sqrt(1-x^2), x, 0, 1/2 )