My int function is returning the function back instead of an integral
Show older comments
I have this function
f = (sin(2*r^2)*(16*r^4 + 1)^(1/2))/(r^2 + z^2)^(3/2)
but when I try to integrate it
int(f,r,[0 10])
it returns the function back:
ans =
int((sin(2*r^2)*(16*r^4 + 1)^(1/2))/(r^2 + z^2)^(3/2), r, 0, 10)
How do I find the integral?
4 Comments
Walter Roberson
on 17 Mar 2018
Could you confirm that you have sin(2*r^2) where r is in the range 0 to 10 and r is in radians ? So at the end of the range you would be calculating sin(200 radians) ?
Marc Adams
on 17 Mar 2018
Walter Roberson
on 17 Mar 2018
What is the units of r then? If it is degrees then you need to convert degrees to radians for use in the sin() call. (Actually, it would have to be in square root of degrees, since you are using r^2)
Your function does not appear to be linear if r were rescaled to be from 0 to 10*pi/180 or sqrt(10*pi/180)
Marc Adams
on 17 Mar 2018
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!