# Thread: exact solution to heat equation

1. ## exact solution to heat equation

Hey everyone, I need a little help with this question.

Relevant equations:

$\displaystyle T(x,t)= \sum\limits_{i=1}^{\infty} B_i e^{-(i^2 \pi^2kt)} sin(i \pi x)$

$\displaystyle T(0,t) = T(1,t) = 0$

$\displaystyle T(x,0) = sin(\pi x)$

$\displaystyle \alpha = \frac{k \Delta t}{(\Delta x)^2}$

The question:

Let $\displaystyle N=20$ and $\displaystyle \alpha = \frac{1}{4}$, given the initial condition $\displaystyle T(x,0) = sin(\pi x)$, what is the exact solution at points on the grid?

So I have worked out $\displaystyle \Delta x = \frac{1}{N} = \frac{1}{20}$ and $\displaystyle k \Delta t = \frac{(\Delta x)^2}{4}=0.000625$, and then worked out $\displaystyle B_i = 1$.

I am just unsure what the exact solution is, since I don't know k.

Can someone help me with the exact solution.

Thanks

2. Am I supposed to find $\displaystyle T_j^n$ which gives the exact solution at points on the grid, and that $\displaystyle j \Delta x = x$ and $\displaystyle n \Delta t = t$. I can't find what $\displaystyle T_j^n$ is.

All I have is:

$\displaystyle T_j^{n+1} = \frac{k \Delta t}{(\Delta x)^2} T_{j+1}^n + (1-2\frac{k \Delta t}{(\Delta x)^2}) T_j^n +\frac{k \Delta t}{(\Delta x)^2}T_{j-1}^n$, $\displaystyle j=1,2,...,N-1$ where $\displaystyle N=20$.

I still need some help.

Thanks

3. how would I evaluate:

$\displaystyle T_j^{n}$, $\displaystyle j=1,2,...,N-1$ where $\displaystyle N=20$.

I know I need to use:

$\displaystyle T_0^n = T_N^n = 0$ for all n

and

$\displaystyle T_j^{n+1} = \frac{k \Delta t}{(\Delta x)^2} T_{j+1}^n + (1-2\frac{k \Delta t}{(\Delta x)^2}) T_j^n +\frac{k \Delta t}{(\Delta x)^2}T_{j-1}^n$

but I can't seem to get much.