My int function is returning the function back instead of an integral
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 17 de Mzo. de 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
el 17 de Mzo. de 2018
Walter Roberson
el 17 de Mzo. de 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
el 17 de Mzo. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Numerical Integration and Differentiation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!