My int function is returning the function back instead of an integral
이전 댓글 표시
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
Walter Roberson
2018년 3월 17일
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
2018년 3월 17일
Walter Roberson
2018년 3월 17일
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
2018년 3월 17일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!