Quiz 2 Solutions

  1. Statement: Suppose we wish to solve the heat problem $$u_t = 3u_{xx}, \: u(0,t)=4, \: u(2,t) = 0, u(x,0) = 4-x^2,$$ using a numerical approximation obtained by discretizing the interval $[0,2]$ into 4 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,2]$ and indicate exactly how specific function values $u(x,t)$ are related to approximating values $u_i(t)$.
    Solution: I think I'd like to draw the picture first, since it helps me understand the equations:
    So, we want equations for each $u_i'$ where $i=1,2,3$. Since, $$u_t(x_i,t) = 3u_{xx}(x_i,t) \approx 3\frac{u(x_{i+1},t)-2u(x_i,t)+u(x_{i-1},t)}{(1/2)^2},$$ we get (after replacing $u(x_i,t)$ with $u_i(t)$), $$u_i'(t) = 3\frac{u_{i+1}(t) - 2u_i(t) + u_{i-1}}{(1/2)^2}.$$ Writing that out for $i=1,2,3$ and taking the boundary condition into account, we get $$\begin{aligned} u_1'(t) &= 3\frac{u_{2}(t) - 2u_1(t) + 4}{(1/2)^2}, \: u_1(0) = 4-(1/2)^2, \\ u_2'(t) &= 3\frac{u_{3}(t) - 2u_2(t) + u_1(t)}{(1/2)^2}, \: u_2(0) = 4-(1)^2, \\ u_3'(t) &= 3\frac{- 2u_3(t) + u_2(t)}{(1/2)^2}, \: u_3(0) = 4-(3/2)^2. \end{aligned}$$
  2. Let's try to solve the heat problem on the unit disk: $$u_t = \Delta u, \: u(1,t) = 0, \: u(r,0) = 2r^2(1-r^2),$$ where the problem is described in terms of polar coordinates. To do so:
    1. Express your solution as an infinite series involving Bessel functions with unknown coefficients $c_n$.
    2. Write out the first three terms of the series explicitly with numerically computed values of $c_1$, $c_2$, and $c_3$.
    3. Plot the graph of a higher precision approximation to the radial temperature profile at time $t=0.04$.
    4. Write down the temperature at the center of the disk at time $t=0.05$ to 4 digits of precision.
    Of course, we're encouraged to use this web page.
    Let's write these out in order.
    1. According to the formula at the bottom of the web page, the solution is $$u(t,r) = \sum_{n=1}^{\infty} c_n e^{-z_n^2 t} F_n(r),$$ where $F_n(r) = J_0(z_nr)/\|J_0(z_nr)\|$ is is the normalized Bessel function scaled by its $n^{\text{th}}$ root.
    2. Reading the coefficients off from here and the roots from here, we find that $$u(t,r) \approx 0.1898 e^{-2.4048^2t}F_1(r) - 0.1665 e^{-5.52^2} F_2(r) + 0.04864 e^{-8.6537^2}F_3(r) + \cdots$$
    3. I guess the solution looks like so:
    4. Finally, to 4 digits of precision, we have $u(0.05,0)=0.2423$.