一道关于int与integral的积分问题。
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
zhishang
am 12 Nov. 2022
Beantwortet: bulexel
am 12 Nov. 2022
求的数值积分
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 Kommentare
Akzeptierte Antwort
bulexel
am 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!