Linear system for a heat problem

Suppose we wish to solve the heat problem

$$u_t = 5u_{xx}, \: u(0,t)=0, \: u(1,t) = 2, u(x,0) = 2x^2,$$

using a numerical approximation obtained by discretizing the interval $[0,1]$ into 5 equal pieces to replace the PDE with a system of ODEs involving functions denoted $u_i(t)$.

  1. Write down the system of ODEs that you need to solve, together with initial conditions on the functions.
  2. Draw a picture of your discretization of the interval $[0,1]$ and indicate exactly how specific function values $u(x,t)$ are related to approximating values $u_i(t)$.

Comments

  • (1) The difference quotient for $u_t = 5u_{xx}$ is

    $$u_t = 5u_{xx} = 5u_{xx} \approx 5\frac{u(x_i + h, t) - 2u(x_i, t) + u(x_i-h)}{h^2}.$$

    Hence, our system of equations is

    $$u_i'(t) = 5\frac{u_{i+1}(t) - 2u_i(t) + u_{i-1}(t)}{\left(\frac{1-0}{5}\right)^2}.$$

    for $i = 1, 2, 3, 4$ with

    $$u_i(0) = 2(\frac{i}{5})^2.$$

    (2)


  • @AbS Can you write each equation out individually? There's only 4 of them and, if you think carefully about the boundary conditions, I think you'll find some distinctions between them.

  • @mark Sure.

    $$u_1'(t) = 125\left(u_2(t)-2u_1(t)\right),$$

    $$u_2'(t) = 125\left(u_3(t)-2u_2(t) + u_1(t)\right),$$

    $$u_3'(t) = 125\left(u_4(t)-2u_3(t) + u_2(t)\right),$$

    and

    $$u_4'(t) = 125\left(2-2u_4(t) + u_3(t)\right).$$

Sign In or Register to comment.