Integration showing wrong answer
2 views (last 30 days)
Show older comments
Accepted Answer
Star Strider
on 20 Jun 2019
It is the correct result, although it may not be the one you were anticipaiting.
Try this:
syms x
f(x) = sin(x)+2*cos(x)
intf = int(f)
simplifiedResult = simplify(intf, 'Steps', 100)
producing:
f(x) =
2*cos(x) + sin(x)
intf(x) =
-2*cos(x/2)*(cos(x/2) - 2*sin(x/2))
simplifiedResult(x) =
2*sin(x) - cos(x) - 1
0 Comments
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox 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!