MCS 471: Solution to Project Five, 2 November 2005
Below is an outline for a possible solution to the project. The computations were done on a sun workstation using MATLAB.
Solution to Assignment One
We run the MATLAB script kepler.m. This script generated the data to answer to two questions.
res_23 = 3.0417e-04
res_45 = 1.6399e-05
Comparing the norms of the residuals shows that ode45
is ten times more accurate than ode23 for this problem.
steps_23 = 18
steps_45 = 61
The length of the vectors on return show that ode45 takes more
than 3 times as many steps than ode23 to compute y(2*pi).
Solution to Assignment Two
Using the functions cork.m and cork1.m, the script sol_two.m generates the plots and data to answer the questions of this assignment:
Looking at the plot of the trajectory, we interpret the slope of x(t) at t=t* as the velocity. As this velocity is larger than one, solving for t in x(t) = L, leads to a minor shift in t as L increases.
x(0) = 0, x'(0) = 1.0e-4: |x(t*) - L| = 9.9861e-04
x(0) = 1.0e-4, x'(0) = 0: |x(t*) - L| = 5.0083e-04
Looking at the overshoot error, we observe that error is almost
twice as much when changing the initial velocity, compared to
changing the initial position.
Comparing the plots of the position x(t) and velocity v(t) around t = 0, we see that v(t) grows faster than x(t). We conclude that the problem is more sensitive to changes in initial velocity than to changes in initial position.
Solution to Assignment Three
We use the script sol_three.m to produce the plots and data.
v =
-8.0000e-01 6.0000e-01
6.0000e-01 8.0000e-01
d =
-1 0
0 2
Computing c = v\xzero' gives
c = 5.0000e+00 -3.5527e-16which shows that xzero = [-4 3] is five times the first eigenvector with the corresponding negative eigenvalue -1.
As the general solution to this linear system is a linear combination of the eigenvectors times exp(lambda*t), the solution will diverge when some eigenvalues are positive, unless the starting vector has no component in the direction of eigenvectors with positive eigenvalues.
Even as the solution to a linear system with positive eigenvalues (or eigenvalues with positive real part) converges, the solution is extremely sensitive to changes in the initial conditions.