MATLAB: Warning: Explicit integral could not be found.

explicit integral

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)

Best Answer

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.