Derivative is calculated 2 different ways.
Show older comments
I used the code syms x ((x^2)+4)^2*(2*x^3-1)^3 diff(ans)
This is an improper result-- but if I use syms x ((x^2)+4)^2*(2*x^3-1)^3 expand(ans) diff(ans)
It works fine.
Even more frustratingly, when I name the function anything, my workaround with "expand" no longer works. I can only do it as expand(ans). Any explanation of why? My whole class is having an issue with this problem and I am the only one who has been able to get MATLAB to get the correct answer-- but I don't know why.
Accepted Answer
More Answers (0)
Categories
Find more on Code Performance 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!