Solving Heat Equation IBVP

fourier seriesheat equationpartial differential equations

I have a hard time understanding how to proceed with the third condition of the following IBVP:
\begin{cases}
u_t = u_{xx}, \ x\in (0, 2), \ t>0 \\[6pt]
u(x, 0) = x, \ x \in [0, 2] &(i)\\[6pt]
u(0, t) = 0, \ t>0 &(ii)\\[6pt]
u_x(2, t) = 0, \ t>0 &(iii)\\[6pt]
\end{cases}

I am solving this by the method of separation of variables (looking for a solution in the form $u(x, t) = X(x)T(t)$). After dividing it into two ODE-s, for the first one I have a solution in the form of $X(x) = c_1\sin px + c_2 \cos px$, where $p$ is the square root of the negative eigenvalue $\lambda = -p^2$, as it is the only one that produces a non-trivial solution.

After plugging in the second condition, I obtained $c_1 = 0$. From the third condition it follows that $\cos 2p = 0$ and $p = \frac{\pi}{4} + \frac{\pi k}{2}$. Hence, $X(x) = c_2\cos((\frac{\pi}{4} + \frac{\pi k}{2})x)$

Assuming everything above is correct, the final solution will be in the form $$u(x,t) = \sum_{mn=1}^\infty c_n\cos\left((\frac{\pi}{4} + \frac{\pi k}{2})x\right)e^{-(\frac{\pi}{4} + \frac{\pi k}{2})^2t}$$

I am looking for a hint on how to continue from here. Do I need to find $c_m$ as the cosine coefficients of the Fourier series of $x$ from 0 to 2 or do I need to perform further reductions, as the cosine part does not match the one in the series?

Thank you.

Best Answer

How did you get $c_1=0$? The boundary conditions are

$$ X(0) = X'(2) = 0 $$

Since $X(0) = c_2$ this would imply $c_2=0$, so you're left with

$$ X(x) = \sin(px) \implies X'(2) = p\cos(2p) = 0 $$

$\cos$ is zero at odd multiples of $\pi/2$, so we have

$$ 2p = \frac{(2n+1)\pi}{2} \implies p = \frac{(2n+1)\pi}{4} $$

and the general solution is

$$ u(x,t) = \sum_{n=0}^\infty c_n\exp\left[-\left(\frac{(2n+1)\pi}{4} \right)^2t\right]\sin\left(\frac{(2n+1)\pi}{4}x\right) $$

From the initial condition

$$ u(x,0) = x = \sum_{n=0}^\infty c_n\sin\left(\frac{(2n+1)\pi}{4}x\right) $$

Using orthogonality we can determine

$$ c_n = \frac{\int_0^2 x \sin\left(\frac{(2n+1)\pi}{4}x\right)\ dx}{\int_0^2 \sin^2\left(\frac{(2n+1)\pi}{4}x\right)\ dx} $$

The result is similar to a Fourier series, but not a conventional one. Here's a similar answer where I went a bit further on orthogonality.

Related Question