Symbolic integration vs numerical integration
3 次查看(过去 30 天)
显示 更早的评论
I am trying to plot the Scorer function, which looks like this
M=1.2;
lambda=0.332;
alpha=1;
beta=1;
omega=0.1;
eta0=-i*omega/((i*alpha*lambda)^(2/3));
tan=0:0.1:20;
for j=1:length(tan)
Gi2(j)=-(airy(2,tan(j))*integral(@(n) airy(n),100,tan(j))-airy(tan(j))*integral(@(n) airy(2,n),eta0,tan(j)));
end
plot(abs(Gi2),tan)
I need to compute the derivatives of this function, so I tried to define the integrals symbolically as follows
syms lu
syms n
Gi(lu) = -(airy(2,lu)*int(airy(n),100,lu)-airy(lu)*int(airy(2,n),eta0,lu));
plot(abs(Gi(tan)),tan)
But it doesn't work. Both results are far from being the same. What am I doing wrong?
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!