Symbolic integration vs numerical integration

1 次查看(过去 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 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by