Question: Evaluating a sum


 

pde1 := k*(diff(u(x, t), x, x)) = diff(u(x, t), t)

k*(diff(diff(u(x, t), x), x)) = diff(u(x, t), t)

(1)

iv1 := u(0, t) = 0, u(L, t) = 0, u(x, 0) = 2;

u(0, t) = 0, u(L, t) = 0, u(x, 0) = 2

(2)

pdsolve([pde1, iv1], u(x, t))

u(x, t) = Sum(-4*(-1+(-1)^(_Z4*csgn(1/L)))*sin(Pi*_Z4*x/L)*exp(-Pi^2*_Z4^2*k*t/L^2)/(Pi*_Z4), _Z4 = 1 .. infinity)

(3)

subs(`~`[_Z4] = n, %)

u(x, t) = Sum(-4*(-1+(-1)^(_Z4*csgn(1/L)))*sin(Pi*_Z4*x/L)*exp(-Pi^2*_Z4^2*k*t/L^2)/(Pi*_Z4), _Z4 = 1 .. infinity)

(4)

``

 
"I would like to replace the symbol _Z4~ with the letter n. I tried with the subs command, but I could not. Can anyone help"?"" ""


 

Download evaluate_a_sum.mw

Please Wait...