How can I solve this problem in the matlab program ?
3 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/467235/image.png)
采纳的回答
Daniel Catton
2020-12-21
I believe your maths is incorrect and that is the first problem.
You get your derivitive of u as du = -4x.dx which is correct. Substituting this into the equation would give you:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/467430/image.png)
With this in mind, you also don't need to substitute u into the matlab script as it is only required for computation by hand (for integration by substitution you would normally select u yourself). Thus, you can get the script:
syms x
f = int(x*exp(-x^2))
which outputs the correct answer.
Hope this helps!
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!