I PDE Heat Equation Solution with Homogenous Boundary Conditions | PF Discussion

  • I
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Heat Pde
member 428835
Hi PF!

I'm wondering if my solution is correct. The PDE is ##h_t = h_{zz}## subject to ##h_z(0,t)=0##, ##h(1,t)=-1##, and let's not worry about the initial condition now. To solve I want homogenous boundary conditions, so let's set ##v = h+1##. Then we have the following: ##v_t = v_{zz}## subject to ##v_z(0,t)=0##, ##v(1,t)=0##. To solve take separation of variables where ##v = T(t)Z(z) \implies T'/T= Z''/Z = -\lambda \implies Z''+\lambda Z = 0##. Guess ##Z = A \cos \sqrt{\lambda} z+B\sin \sqrt{\lambda} z##. Then ##Z'(0)=0 \implies B=0##. Thus ##Z = \cos \sqrt{\lambda} z##. ##Z(1)=0 \implies \cos \sqrt{\lambda} = 0 \implies \sqrt{\lambda} = \pi/2+n\pi:n\in0,1,2...##. Thus, ##Z = \cos((\pi/2+n\pi)z)##. Yet this doesn't look right. Any ideas?
 
Physics news on Phys.org
joshmccraney said:
this doesn't look right
In what way?
 
$$\sqrt{\lambda}=(2n-1)\frac{\pi}{2}\tag{n=1,2,3,...}$$
 
haruspex said:
In what way?
I was looking for a solution that worked much better with the initial condition I am working with (square wave ##h(z,0) = 1/2 - \sum 2/(\pi n) \sin(n \pi /2) \cos(n \pi z/2)##). The issue is, if I use $$Z=\cos((\pi/2+n\pi)z)\implies\\ T = \exp(-(\pi/2+ n\pi)^2t) \implies\\ h(z,0) = -1 + \sum A_n \left( \cos(n\pi z)\cos(\pi/2z)-\sin(n\pi z)\sin(\pi/2z) \right) \implies \\ -1 + \sum A_n \left( \cos(n\pi z)\cos(\pi/2z)-\sin(n\pi z)\sin(\pi/2z) \right) = 1/2 - \sum 2/(\pi n) \sin(n \pi /2) \cos(n \pi z/2)$$ which doesn't seem to work. However, if I make the ansatz based on the initial condition I can see that a good guess is ##A_n Z = 2/(\pi n) \sin(n \pi /2) \cos(n \pi z/2)##. Then I can superimpose the exponential ##\exp(\lambda_1 t)## and try this guess at the PDE, ultimately giving $$h(z,t) = 1/2 - \sum 2/(\pi n) \sin[n \pi /2] \cos[n \pi z/2] \exp[-n^2 \pi^2 t/4]:n\in 1,2,3...$$ which works out perfectly. But the question remains: why did the first method fail?
 
Hint: ##\sin(\pi n/2) = 0## for odd n.
 
Orodruin said:
Hint: ##\sin(\pi n/2) = 0## for odd n.
So, the first method doesn't fail.
 
I think matching the Fourier coefficients for ##A_n## fails since the constants prior to the sum are unequal: ##1/2\neq-1##. However, after more thinking of the problem, I reformulated the initial condition so this works. I'd specify further if anyone is actually interested but I doubt the details would be of interest. Thank you all for your help and input!
 

Similar threads

Back
Top