# Question on PDE solving using Variable separable.

I am trying to solve the equation $u_t + 2u_x = u_{xx}$ , with initial conditions subject to the boundary conditions $u(0, t) = 0,u(l, t) = 0$, and the initial condition $u(x, t) = xexp(x)$.

I assume the solution of the form $u(x,t) =X(x)T(t).$

I get two equations $\frac{T'}{T} = k$ and $\frac{X'' - 2X'}{X} = k.$

Solving for T we get $T(t) = Aexp(kt)$

Solving for $X(t) = c'_1[exp(\sqrt{1+k})x] +c'_2[exp(-\sqrt{1+k})x]$

$u(x,t) = XT = exp(kt)(c_1[exp(\sqrt{1+k})x] +c_2[exp(-\sqrt{1+k})x)]$

When I proceed with using the initial conditions by simple substitution I get $c_1+c_2 = 0$, which yields $u(x,t) = 0$.

How do I proceed? Please give me hint.

Thanks

• Shouldn't there be an $x$ in your $X$ ode? – ziggurism Oct 14 '16 at 18:06
• Oh maybe that second $x$ is supposed to be a subscript for a second derivative? – ziggurism Oct 14 '16 at 18:07
• that was a mistake I have corrected it. – ANUPAM BISHT Oct 14 '16 at 18:16
• Is your original PDE meant to have any second derivative? – ziggurism Oct 14 '16 at 18:18
• I have Corrected Now. – ANUPAM BISHT Oct 14 '16 at 18:19

The nontrivial solutions to the $X$ eigenvalue equation $k X + 2 X' - X'' = 0$ with $X(0)=0$, $X(\ell) = 0$ are $$X(x) = e^x \sin(n \pi x/\ell), \; k = -1 - n^2 \pi^2/\ell^2$$ for positive integers $n$. Thus you should get $$u(x,t) = \sum_{n=1}^\infty c_n e^{x - (1 + n^2 \pi^2/\ell^2) t} \sin(n \pi x/\ell)$$ The $c_n$ must then be determined to satisfy your initial condition (Hint: Fourier series).
• That was $u(l,t) = 0$ – ANUPAM BISHT Oct 14 '16 at 18:38
• Ah, it looked like a $1$. I'll edit. – Robert Israel Oct 14 '16 at 19:56
\begin{align} \varphi\pars{x,t} & = \sum_{k\ \in\ \Omega}A_{k}\pars{t}\sin\pars{kx}\,,\qquad \Omega \equiv \braces{k \in \mathbb{R}\ \mid\ k = n\,{\pi \over \ell}\,,\ n = 1,2,3,\ldots}\label{1}\tag{1} \end{align} Expression \eqref{1}, for $\ds{\varphi\pars{x,t}}$, already satisfies the boundary conditions $\ds{\pars{~\varphi\pars{0,t} = \varphi\pars{\ell,t} = 0\,,\ \forall\ t~}}$. Moreover, \begin{align} \sum_{q\ \in\ \Omega}\braces{\totald{A_{q}\pars{t}}{t} + q^{2}}\sin\pars{qx} = 0 \end{align} Multiply both sides by $\ds{\left.\sin\pars{kx}\right\vert_{\ k\ \in\ \Omega}}$ and integrate over $\ds{\pars{0,\ell}}$. It leads to $$0 = \totald{A_{k}\pars{t}}{t} + k^{2}A_{k}\pars{t}\implies A_{k}\pars{t} = A_{k}\pars{0}\expo{-k^{2}t}$$
$\ds{\varphi\pars{x,t}}$ is reduced to: \begin{align} \varphi\pars{x,t} & = \sum_{k\ \in\ \Omega}A_{k}\pars{0}\expo{-k^{2}t}\sin\pars{kx}\implies x = \varphi\pars{x,0} = \sum_{k\ \in\ \Omega}A_{k}\pars{0}\sin\pars{kx} \\[5mm] \implies \int_{0}^{\ell}x\sin\pars{kx}\,\dd x & = \sum_{q\ \in\ \Omega} A_{q}\pars{0}\int_{0}^{\ell}\sin\pars{kx}\sin\pars{qx}\,\dd x = {\ell \over 2}\,A_{k}\pars{0} \\[5mm] \implies A_{k}\pars{0} & = {2 \over \ell}\int_{0}^{\ell}x\sin\pars{kx}\,\dd x = \pars{-1}^{n + 1}\,{2 \over n\pi/\ell}\,,\qquad k = n\,{\pi \over \ell} \end{align}
Then, $$\varphi\pars{x,t} = {2\ell \over \pi}\sum_{n = 1}^{\infty}{\pars{-1}^{n + 1} \over n}\, \sin\pars{{n\pi \over \ell}\,x} \exp\pars{-\bracks{n\,{\pi \over \ell}}^{2}t}$$ and $$\bbx{% \mrm{u}\pars{x,t} = {2\ell \over \pi}\,\expo{x - t} \sum_{n = 1}^{\infty}{\pars{-1}^{n + 1} \over n}\, \sin\pars{{n\pi \over \ell}\,x}\exp\pars{-\bracks{n\,{\pi \over \ell}}^{2}t}}$$