How to calculate indefinite integral?
Ältere Kommentare anzeigen
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
Antworten (2)
Brendan Hamm
am 3 Mär. 2015
Bearbeitet: Brendan Hamm
am 4 Mär. 2015
1 Stimme
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
Sean de Wolski
am 4 Mär. 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)))
Kategorien
Mehr zu Assumptions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!