一道关于int与integral的积分问题。
18 views (last 30 days)
Show older comments
求的数值积分
file:///C:/Users/LianmXu/AppData/Local/Temp/ksohtml/wps8A36.tmp.png
然而用int与integral的积分结果相差太多了,如下
syms x
f=exp(sin(x).^3);s=int(f,x,0,x);
s1=subs(s,x,pi)
s1 =
pi
s2 =
5.1370
请指导啊!谢谢啦。
0 Comments
Accepted Answer
bulexel
on 12 Nov 2022
楼主的代入是有问题的。你这样代入相当于exp(sin(pi)^3)的0至pi 的积分,应该
syms x t
f=exp(sin(x).^3);
s=int(f,x,0,t)
s1=subs(s,t,pi)
vpa(s1)
或者直接
s=vpa(int(f,x,0,pi))
0 Comments
More Answers (0)
See Also
Categories
Find more on Calculus 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!