How to calculate indefinite integral?
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I hope you den help me. I am doing my math homework and I want to check the answer in Matlab. However, I checked that the answer, that is given by Matlab, is wrong. Here is an example of what I wrote:
>> syms x >> int(sin(2*x-3), x) >> ans = sin(x-3/2)^2
But the correct answer is -cos(3-2x)/2 + C So maybe you can tell me what I do wrong because I am new in Matlab so it is quite hard. Thank you very much for your help!
Best regards, Don
0 comentarios
Respuestas (2)
Brendan Hamm
el 3 de Mzo. de 2015
Editada: Brendan Hamm
el 4 de Mzo. de 2015
First off the answer is -cos(2*x-3)/2 + C. The two statements are equivalent up to a constant. Using the half angle identity:
sin(u)^2 = 1/2 - 1/2*cos(2*u)
let u = x -3/2
sin(x-3/2)^2 + C = 1/2 - 1/2*cos(2*(x-3/2)) + C
sin(x-3/2)^2 + C = -1/2*cos(2*x-3) + D
0 comentarios
Sean de Wolski
el 4 de Mzo. de 2015
Both answers are right, just simplified differently:
syms x
mupad_answer = int(sin(2*x-3), x)
your_answer = -cos(3-2*x)/2;
isequal(simplify(diff(your_answer)),simplify(diff(mupad_answer)))
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!