Solve this heat equation using separation of variables and Fourier Series

284 Views Asked by At

I'm working on a practice question and just a little confused at some parts, would greatly appreciate some help.

Here is the question:

$ \frac{\partial u}{\partial t} = K \frac{\partial^2 u}{\partial x^2}$

in the domain $0 \le x \le L$ with boundary conditions $ > \frac{\partial u}{\partial x} = 0$ at $x = 0, L$, and initial conditions $u = \frac{200x}{L}$ for $0 \le x \le \frac{L}{2}$

and $u = 200(1-\frac{x}{L}) $ for $\frac{L}{2} \le x \le L$ Give the first 3 terms of the solution explicitly.

Here is what I have:

Using the separation of variables method, I get to my two ODEs:

$T'-kKT=0$ and $X''-kX=0$

Considering the different cases of $k$, the positive yields the trivial solution. For $k = 0$, then:

$\implies X''=0 \implies X=Ax+B$ for some constants $A$ and $B$. The boundary conditions $X'(0) = 0 = X'(L) \implies A = 0$, so B is arbitrary.

Similarly, $ T' = 0 \implies T = C_a$, so $U = BC_a = C$ is just some constant? I'm not quite sure with to do with this.

In the $k < 0$ case, I get to $\lambda = \frac{n \pi}{L}$ and the general solution: $$u(x,t) = \sum_{n=1}^\infty A_n \cos(\frac{n \pi x}{L}) e^{-(\frac{n \pi }{L})^2Kt}$$ ($n$ starting at $1$ because $n \ne 0$ from our assumptions on $\lambda$.)

By the initial conditions ($t=0$) then, $$f(x) = \sum_{n=1}^\infty A_n \cos(\frac{n \pi x}{L})$$

Now multiplying both sides by $\cos(\frac{n \pi x}{L})$ and integrating over the interval:

$$\int_0^L \cos(\frac{n \pi x}{L}) f(x) dx = \sum_{n=1}^\infty A_n \int_0^L \cos(\frac{m \pi x}{L}) \cos(\frac{n \pi x}{L})dx$$

Now some have suggested to me that I can pull out $A_0$ since when $m,n = 0$ then the RHS becomes $A_n L$, but can one do this, given that the series starts at $1$ and $n$ can't be $0$? I'm a bit confused here. Also for the $k=0$ solution, this is just some arbitrary constant. Is there a way to figure out what this constant is?

Any help would be greatly appreciated!

1

There are 1 best solutions below

3
On

The eigenfunctions $X_{n}$ that you found are correct: $X_{n}=\cos(n\pi x/L)$ for $n \ge 1$ and $X_{0}=1$, which you can write as $X_{n}=\cos(n\pi x/L)$ for $n \ge 0$. And $X_{n}''=-(n\pi/L)^{2}X_{n}$. The corresponding time solutions are $T_{n}(t)=e^{-Kn^{2}\pi^{2}t/L^{2}}$.The general solution is $$ u(x,t) = \sum_{n=0}^{\infty}A_{n}T_{n}(t)X_{n}(x). $$ What remains is to find constants $A_{n}$ to match the initial condition: $$ \sum_{n=0}^{\infty} A_{n}X_{n}(x) = \sum_{n=0}^{\infty}A_{n}T_{n}(0)A_{n}(x) = u(x,0) = \left\{\begin{array}{ll} 200\frac{x}{L} & 0 \le x \le \frac{L}{2} \\ 200\left(1-\frac{x}{L}\right) & \frac{L}{2} \le x \le L \end{array}\right. . $$ Automatically $\int_{0}^{L}X_{n}(x)X_{m}(x)\,dx=0$ for $n,m \ge 0$ with $n\ne m$. That's how you get the Fourier conditions for the coefficients $A_{n}$: $$ A_{n}\int_{0}^{L}X_{n}(x)X_{n}(x)\,dx = \int_{0}^{L/2}200\frac{x}{L}X_{n}(x)\,dx+ \int_{L/2}^{L}200\left(1-\frac{x}{L}\right)X_{n}(x)\,dx. $$