Homework 1 (Due 6 pm, Friday, Apr 8, 2016)ΒΆ

Please submit your homework to your git repo by 6 pm, Fri, Apr 8 2016.

  1. Setup an account from Bitbucket and clone the course repo from the remote Bitbucket repository to your local machine (see the sections in Git Version Control System – Managing Your Coursework).

    1. Generate and edit a file named bio.txt which includes the following information:
    • name, your major, email
    • shool year
    • research interests
    • advisor’s name (if any)
    • experience in ODEs and PDEs: (1. a lot, 2. somewhat, 3. none)
    • experience in numerical/computational ODEs and PDEs: (1. a lot, 2. somewhat, 3. none)
    • experience with MATLAB (1. a lot, 2. somewhat, 3. none)
    • do you have MATLAB installed on your local machine? (yes/no)
    • if the previous answer is no, do you have an access to a machine that has MATLAB installed? (yes/no)
    1. Check-in (or make a commit) bio.txt with a comment:

      “my first check in to my own repo on mm/dd/yy as part of homework 1”.

    2. After a successful check-in of bio.txt, modify it by adding a new line on your OS and computer:

    • types of OS and machine for the class
    1. Check-in the updated bio.txt to the repo again.
  2. Modify the example MATLAB code in Example: the Euler’s Methods to solve the IVP using the forward Euler’s method:

    \begin{equation}
  \left \{
  \begin{array}{lll}
  && \frac{du}{dt} = \sqrt{u(t)} \nonumber \\
  && u(1) = 0.25.
  \end{array}
  \right.
  \end{equation}

    Note that this has a unique exact solution u_{exact}(t) = \frac{t^2}{4} over [1,\infty]. Please evolve your numerical solution until the maximum time t_{max} = 5 is reached using four different time step sizes, \Delta t = 1, 0.5, 0.25,
0.125. Your grid discretization of t^n over [1,t_{max}] will be such that t^0 = 1, and t^n = t^0 + n\Delta t, n=0, \dots, N.

    1. Plot each of the four cases over [1,t_{max}] = [1, 5] along with the exact solution.

    2. Measure the L_1 error ||E^N||_1 defined by

      ||E^N||_1 = \Delta t \sum_{n=1}^{N} | u_{exact}(t^n) - U^n|,

      where N is given by \Delta t = \frac{5 - 1}{N}. Plot the error convergence rates by plotting ||E^n||_1 versus N in log-log scales (use MATLAB’s loglog command).