Dirichlet Initial-boundary-value problem

25 Views Asked by At

I'm currently solving an initial-boundary-value problem with Dirichlet boundary values, and are stuck on one part that I can't say what is wrong and right.

I got the following PDE

$$\begin{cases}\partial_t u(t,x)=\partial_x^2u(t,x), 0<x< \pi, 0<t\\ u(0,x)=1\\ u(t,x)=0, 0<t, x \in \partial D \end{cases}$$

Im solving this using Fourier series.

I start by fixing $t$ and writing as a Fourier series

$$u_t= \sum_j \hat{u}_t(j)sin(jx)$$

I then fixing $j$ and solving the ODE in $t$. Here is the part i don't know which is correct. Following two ways to solve is correct to me, me according to the course literature the first is correct. May someone understand why the second is not correct?

$\textbf{First method:}$

Writing the ODE, and apply time-derivative to sin(jx)

$$\partial_t \hat{u}_t(j)sin(jx)=\partial_x^2 \hat{u}_t(j) sin(jx)$$

$$\Rightarrow \partial_t \hat{u}_t(j)=-j^2 \hat{u}_t(j)$$

$\textbf{Second method:}$

Using the definition of what a eigenfunction is, that says $\nabla^2u=-\lambda u$, $\nabla^2$ denotes Laplace.

This would lead to

$$\partial_t \hat{u}_t(j)sin(jx)=\partial_x^2 \hat{u}_t(j) sin(jx)$$

$$\Rightarrow \partial_t \hat{u}_t(j)=-\lambda \hat{u}_t(j) $$

Would someone let me know what is correct, because to me both is correct, but the correct answer according the book is the first one.