Warning: Explicit integral could not be found.

1 次查看(过去 30 天)
Hi Could someone please help with this integration:
syms teta h t z n;
f=exp((-n^2*pi^2*t)/h^2)*cos(0.8*n*pi)*cos(n*pi)*(1/2-z/h);
f1=symsum(f,-n,n);
q=exp(-(tan(teta)^2-(z+03*h)^2)/4*t)*(1+2*f1);
q1=int(q,z,-h/2,h/2);
q3=int((exp(-1/4*t)/t)*q1,t,1,10)
q2=(1/(2*h))*q3;
Warning: Explicit integral could not be found.
q3 =
int((pi^(1/2)*(erf((5*h*(-t)^(1/2))/4) - erf(7/4*h*(-t)^(1/2)))*(exp((2778046668940015*n^2*t)/(281474976710656*h^2)) + cos(pi*n)*cos((4*pi*n)/5) + 2*n*cos(pi*n)*cos((4*pi*n)/5)))/((-t)^(3/2)*exp(t/4)*exp((t*tan(teta)^2)/4)*exp((2778046668940015*n^2*t)/(281474976710656*h^2))), t = 1..10)

采纳的回答

Walter Roberson
Walter Roberson 2011-11-20
In your symsum, because you did not specify which variable to sum with respect to, symsum will use symvar to determine the summation variable. The rules for symvar will end up choosing z as the summation variable. As you later integrate with respect to z, it seems unlikely that you intended to get rid of the z through the symsum step.
I recommend that you specify the summation variable specifically; it would go as the second parameter, before the summation range.
  2 个评论
Rayanne
Rayanne 2011-11-20
Thanks, I haven't notice this. But now I'm getting the warning since the first integral in function of z.
#syms teta h t z n;
#f=exp((-n^2*pi^2*t)/h^2)*cos(0.8*n*pi)*cos(n*pi)*(1/2-z/h);
#f1=symsum(f,n,-8,8);
#q=exp(-(tan(teta)^2-(z+03*h)^2)/4*t)*(1+2*f1);
#q1=int(q,z,-h/2,h/2);
#q3=int((exp(-1/4*t)/t)*q1,t,1,10)
#q2=(1/(2*h))*q3;
Walter Roberson
Walter Roberson 2011-11-21
Please do not put those '#' characters in: I have to edit them out when I go to work with the code.
Please recheck the 'q' line. Why is there a 03*h ? Should that be 0.3 ?
Even with the above change, the integrals are proving difficult to work with. q1 is coming out with sqrt(-t) in multiple places, and as t is positive, that requires working over the complex plane.

请先登录,再进行评论。

更多回答(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