# Solving PDE with Separation of Variables

I have done a few of these now but I'm stuck at this one

$$\begin{array}{} u_{xx}=u_{tt}+2u_t \\ u(0,t)= u(\pi,t)= 0 \\ u(x,0)=0, \, u_t(x,0)=\sin ^3x \\ \end{array}$$ for $0<x< \pi$ and $t>0$.

So I rewrite $u(x,t)=X(x)T(t)$, plug it in and separate the variables. That gives me

$$\frac{X''(x)}{X}=\frac{T''(t)}{T(t)}+2\frac{T'(t)}{T(t)}=- \lambda$$ which leads me to these two ODEs $$T''(t) +2 T'(t)+ \lambda T(t) = 0 \\ X''(x)+\lambda X(x) = 0$$ These I can solve but I am a little bit confused how to combine the Boundary- and Initial conditions for it. Should I just solve these and put them together and then check the conditons or can i do it simultaneously? What about $\lambda$, do I get different solutions depending on the sign? Can anyone show me how I should begin with this?

EDIT:

Ok so I took some advice from below and got to this:

For $\lambda≤0$ there is only the trivial solution (got that from the boundary conditions), so consider $\lambda>0$. We then write $\lambda=\omega^2$ and that would give me the solution

$$X(x)=A\cos(\omega x)+ B\sin(\omega x)$$ And from the boundry conditions I would end up with

$$X(x)=B \sin(nx), \, for\, n=1,2,3,...$$

Now what? What is $B$?

As a general rule, first pay attention to the variable whose boundary conditions are homogeneous. Here, the variable that you may consider first is $x$. Since

$$\begin{array}{} u(0,t)=X(0)T(t)=0 & \to X(0)=0 \\ u(\pi,t)=X(\pi)T(t)=0 & \to X(\pi)=0 \\ \end{array}$$

and hence you should start by first solving the following eigen-value problem

$$\begin{array}{} X''+ \lambda X =0 \\ X(0)=0 \\ X(\pi)=0 \\ \end{array}$$

The solution to this eigen-value problem will be

$$\begin{array}{} X(x)=\sin(nx), & n=1,2,3,... \\ \lambda=n^2 \\ \end{array}$$

and hence the differential equation for $T(t)$ will be

$$T''(t) + 2 T'(t) + n^2 T(t) = 0$$

and the solution to this ODE is

$$T(t)=A_n e^{-t} \cos(\sqrt{n^2-1}t) + B_n e^{-t} \sin(\sqrt{n^2-1}t)$$

and hence

$$u(x,t)=\sum_{n=0}^{\infty} \left( A_n e^{-t} \cos(\sqrt{n^2-1}t) + B_n e^{-t} \sin(\sqrt{n^2-1}t) \right) \sin(nx)$$

and the derivative of $u(x,t)$ with respective to time will be

$$u_t(x,t) = \sum_{n=0}^{\infty} \left( A_n e^{-t} \left( -\cos(\sqrt{n^2-1}t)+ \sqrt{n^2-1} \sin(\sqrt{n^2-1}t) \right) \\ \qquad \qquad \qquad \qquad \quad + B_n e^{-t} \left( -\sin(\sqrt{n^2-1}t)+ \sqrt{n^2-1} \cos(\sqrt{n^2-1}t) \right) \right) \sin(nx)$$

and finally applying the intial conditions will lead you to

$$\begin{array}{} u(x,0)=\sum_{n=0}^{\infty} A_n \sin(nx) = 0 \to & A_n=0 \end{array}$$

$$\begin{array}{} u_t(x,0) = \sum_{n=0}^{\infty} B_n \sqrt{n^2-1} \sin(nx) \end{array} = \sin^3(x)$$

and I just leave finding the coefficients $B_n$ for you. :)

• OK I took some advice added that to my question above, maybe you can take a look? Im not really sure what you mean when you say that I should construct that series. I should point out that I'm just a few weeks into these course, so everything about these orthogonal functions isn't THAT clear at the moment. I am however pretty comfortable with Fourier series and how to use them. – user269620 Dec 6 '15 at 13:56
• @Danny: See the updated answer. Also, you can choose $B$ as what as you like! The simplest case is $B=1$ – H. R. Dec 6 '15 at 14:06
• I think that your method is a little bit too advanced for me, the book has some different approach at these problems. They solve $X(x)$ and then move over to $T(t)$ and uses Fourier series to solve that. I think we will arrive to your method with eigen-functions in a few weeks. – user269620 Dec 6 '15 at 14:13
• @Danny: OK! :) Think in the way you feel relaxed! :) Are you OK with your problem now or I should explain in some easy language for you! :) – H. R. Dec 6 '15 at 14:14
• OK, I will write the whole solution for you, in some proper time. I should go now. :) – H. R. Dec 6 '15 at 14:34