1. ## Heat equation

Hello,

it is
$\displaystyle \frac{\partial u}{\partial t} = k*\frac{\partial^2 u}{\partial x^2}$ (as known as heat equation)

Show that

$\displaystyle \frac{\partial^2 u}{\partial x^2} \approx \frac{u(t,x_{i+1})-2u(t,x_i) + u(t,x_{i-1})}{h^2}$

Anyone knows how to show this?

Best Regards,
Rapha

2. Originally Posted by Rapha
Show that

$\displaystyle \frac{\partial^2 u}{\partial x^2} \approx \frac{u(t,x_{i+1})-2u(t,x_i) + u(t,x_{i-1})}{h^2}$

Anyone knows how to show this?
For any twice differentiable function $\displaystyle f$, you have the asymptotic expansion: $\displaystyle f(x+h)=f(x)+f'(x)h+\frac{f''(x)}{2}h^2+o(h^2)$, and (substituting $\displaystyle -h$ for $\displaystyle h$): $\displaystyle f(x-h)=f(x)-f'(x)h+\frac{f''(x)}{2}h^2+o(h^2)$. Sum these expansions, and you get:
$\displaystyle f(x+h)+f(x-h)=2f(x)+f''(x)h^2+o(h^2)$,
and finally:
$\displaystyle f''(x)=\lim_{h\to 0}\frac{f(x+h)-2f(x)+f(x-h)}{h^2}$.

3. Originally Posted by Rapha
Hello,

it is
$\displaystyle \frac{\partial u}{\partial t} = k*\frac{\partial^2 u}{\partial x^2}$ (as known as heat equation)

Show that

$\displaystyle \frac{\partial^2 u}{\partial x^2} \approx \frac{u(t,x_{i+1})-2u(t,x_i) + u(t,x_{i-1})}{h^2}$

Anyone knows how to show this?

Best Regards,
Rapha
This is a forward difference approximation.

Read this: Solution of the Diffusion Equation by Finite Differences

4. Hi

thank you Laurent,

thank you mr fantastic