Solution verification heat equation which $u(0,x)=x$

fourier analysisheat equationpartial differential equationssolution-verificationsturm-liouville

Problem statement

Given

\begin{gather}
u_{t}=u_{xx},\\u(t,0)=u(t,2\pi),\\u_{t}(t,0)=u_{t}(t,2\pi),\\u(0,x)=x
\end{gather}

find $u$.

Attempt at solution

$$u(t,x)=T(t)X(x)$$
therefore,
$$\frac{T'}{T}=\frac{X''}{X}=\lambda.$$

We see according the 2nd and 3rd condition that the function we look for must be periodic.
So it cannot be of the form $X=ce^{kx}$ or $X=kx+B$ whereas k isn't $0$.
if $y=B$, the 2nd and 3rd conditions apply, and then: $u_{xx}=0$. which is still correct, therefore:
$B=X$. which leads to that there is no a linear solution, as no fixed solution equals $x$.
So we are left with $cos$, $sin$ solutions.
For any $\phi_n$, 2nd and 3rd conditions apply. So we shall now find $T$.
$T$ must be in the form $T=ce^{kt}$.
Now let's search solution for $X$, it can't be based upon $cos$ function as they are even, therefore we're left with $sin$ functions :
$$\int cos(nx)xdx=\frac{(-2nπcos(2nπ)+sin(2nπ))}{n^{2}}=-\frac{2π}{n}.$$
Therefore ,$$X=-\sum_{n\notin\mathbb{Z}}\frac{2\pi\sin(nx)}{n}.$$
And thus,
$$u(x,t)=Ce^{kt}\left(\sum_{n\notin\mathbb{Z}}\frac{2\pi\sin(nx)}{n}\right).$$

Best Answer

It is interesting that your initial condition does not satisfy the endpoint conditions. But, that's okay. To have the desired periodicity in $x$, you can use $$ u(t,x) = \sum_{n=-\infty}^{\infty}a_n(t)e^{inx}. $$ This solution satisfies the requirements of periodicity. In order for this to be a full solution, you'll need $u_t=u_{xx}$, which leads to $$ a_n'(t) = -n^2a_n(t) \implies a_n(t) = C_ne^{-n^2 t}. $$ The constants $C_n$ are determined by the initial condition $u(0,x)=x$: $$ x = \sum_{n=-\infty}^{\infty}a_n(0)e^{inx}=\sum_{n=-\infty}^{\infty}C_n e^{inx}. \\ C_n = \frac{1}{2\pi}\int_{0}^{2\pi}xe^{-inx}dx. $$

Related Question