I need some help here. It's regarding question 5a. I am pretty lost as i've got no clue regarding how I should use the boundary conditions(i would've known if they weren't derivatives)

I need some help here. It's regarding question 5a. I am pretty lost as i've got no clue regarding how I should use the boundary conditions(i would've known if they weren't derivatives)

Copyright © 2021 JogjaFile Inc.
The method is to assume $u(x,t)=X(x)T(t)$. In this case, $$ \frac{X''}{X} = \mu = \frac{T''}{T}-1,\\ X'(0)=X'(1)=0. $$ where $\mu$ is a separation parameter. It turns out that $\mu \le 0$ must hold because $\mu > 0$ forces $$ X(x) = A\cosh(\sqrt{\mu}x)+B\sinh(\sqrt{\mu}x) $$ which cannot satisfy $X'(0)=X'(1)=0$ for $\mu > 0$ unless $A=B=0$. So it is convenient to replace $\mu$ with $-\lambda$, knowing that $\lambda \ge 0$ must hold.
(a) The general solution $X$ is $$ X(x) = A\cos(\sqrt{\lambda}x)+B\sin(\sqrt{\lambda}x). $$ And $B=0$ because $X'(0)=0$. So $X(x)=A\cos(\sqrt{\lambda}x)$. The condition $X'(1)=0$ requires $\sin(\sqrt{\lambda})=0$, or $$ X(x) = A\cos(\sqrt{\lambda}x),\;\;\; \lambda=n^{2}\pi^{2},\; n=0,1,2,3,\cdots. $$ The solutions $T_{n}$ corresponding to $X_{n}=\cos(n\pi x)$ are solutions of $$ -n^{2}\pi^{2}= \frac{T_{n}''}{T_{n}}-1,\\ T_{n}''+(n^{2}\pi^{2}-1)T_{n}=0. $$ The solution $T_{0}$ is $$ T_{0}(t) = C\cosh(t)+D\sinh(t). $$ For $n \ge 1$, the solutions are $$ T_{n}(t)=C\cos(\sqrt{n^{2}\pi^{2}-1}\,t)+D\sin(\sqrt{n^{2}\pi^{2}-1}\,t). $$ The general solution for (a) is $$ C_{0}\cosh(t)+D_{0}\sinh(t)+\sum_{n=1}^{\infty}\{(C_{n}\cos(\sqrt{n^{2}\pi^{2}-1}\,t)+D_{n}\sin(\sqrt{n^{2}\pi^{2}-1}\,t)\}\cos(n\pi x). $$
(b) You want $u_{t}(x,0)=0$, which forces $D_{n}=0$ for $n=0,1,2,3,\cdots$ in order to have $T_{n}'(0)=0$. The final condition $u(x,0)=1+\cos(\pi x)$ is satisfied by choosing $C_{n}$ so that $$ C_{0}+C_{1}\cos(\pi x)+C_{2}\cos(2\pi x)+C_{1}\cos(2\pi x)+\cdots = 1+\cos(\pi x). $$ That dictates that $C_{0}=1$, $C_{1}=1$ and $C_{n}=0$ for $n \ge 2$. The solution for (c) becomes $$ u(x,t)=\cosh(t)+\cos(\sqrt{\pi^{2}-1}\,t)\cos(\pi x). $$
Check the Answer for (b): It's always good to check the final answer. First, $$ u_{x}(x,t) = -\cos(\sqrt{\pi^{2}-1}\,t)\sin(\pi x),\\ u_{x}(0,t) = 0,\;\; u_{x}(1,t)=0. $$ Clearly $u(x,0) = 1+\cos(\pi x)$ and $$ u_{t}(x,t) = \sinh(t)-\sqrt{\pi^{2}-1}\sin(\sqrt{\pi^{2}-1}\,t)\cos(\pi x),\\ u_{t}(x,0) = 0. $$ Finally, check that $u$ satisfies the original PDE: $$ \begin{align} u_{xx} & =-\pi^{2}\cos(\sqrt{\pi^{2}-1}t)\cos(\pi x),\\ u_{tt}-u & = \cosh(t)-(\pi^{2}-1)\cos(\sqrt{\pi^{2}-1}t)\cos(\pi x) \\ & - \cosh(t)-\cos(\sqrt{\pi^{2}-1}t)\cos(\pi x) \\ & = -\pi^{2}\cos(\sqrt{\pi^{2}-1}t)\cos(\pi x). \end{align} $$ Therefore, $$ u_{xx} = u_{tt}-u. $$