Derivative is calculated 2 different ways.
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Code Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!