
# Homework 8

Please answer the following questions in complete sentences in a typed manuscript and submit the solution on blackboard by on April 25th at noon. Submissions will be accepted and graded at any point before the final exam is given, however, any submissions turned in after April 25th cannot be guaranteed to be graded before the final exam.

## Problem 0: Homework checklist

• Please identify anyone, whether or not they are in the class, with whom you discussed your homework. This problem is worth 1 point, but on a multiplicative scale.

• Make sure you have included your source-code and prepared your solution according to the most recent Piazza note on homework submissions.

## Problem 1: (Ascher and Greif, Problem 16.5)

Consider the ODE with $b \gg 1$.

1. Apply the stretching transformation $t = \tau b$ to obtain the equivalent ODE And show the relationship between $\vy(t)$ and $\vz(\tau)$.

2. Show that applying the forward Euler method to the ODE for $\vy$ in $t$ with step size $h_t$ is equivalent to applying the same method to the ODE for $\vz$ in $\tau$ with step size $h_{\tau}$ that satisfies $h_t = b h_\tau$.

## Problem 2: (Ascher and Greif, Example 16.20)

Consider the following system that describes the behavior of two masses in the presence of a third mass of (small) size. The masses are $\mu = 0.012277471$ and $\hat{\mu} = 1-\mu$ (earth and sun): The initial conditions are Let $T = 17.1$.

1. Implement a 4th order RK method for this problem.

2. Show what happens for $1000$, $5000$ and $10000$, $50000$, $100000$ steps. Discuss any interesting observations.

3. (Not required) Use a standard integration software package such as ode45 or an equivalent to look at the result.

## Problem 3: (Gautschi Machine Exercise 5.5)

Newton's equations for the motion of a particle on a planar orbit (with eccentricity $\eps$, $0 < \eps < 1$) are

1. Verify that the solution can be written in the form of
2. Write a program to solve the nonlinear equation at each step using Newton's method and plot the exact solution for $\eps = 0.3, 0.5, 0.7$.
3. Write a forward and backwards Euler solver for this problem.
4. Evaluate the error with $N = 50, 120, 200, 500,$ and $1000$ time-steps using the same values of $\eps$.