- 1.
- If y(x) is a three times differentiable function, prove that
where
yk = y(kh). Hint: Use Taylor series, of course.
Here, we just make the substitutions
After making the substitutions and cancelling everything out, you end
up with a remainder
- 2.
- If y(x) is a four times differentiable function, prove that
This is very similar to the previous problem, except that one expands
one step further.
After making all the cancellations, one ends up with a remainder like
- 3.
- Derive a second order finite difference for yk' with variable
step size using yk+1, yk, and yk-1. To do this, find
coefficients A1, A2 and A3 such that
where
h1 = xk+1-xk and
h2 = xk-xk-1. Use Taylor series
again. Expect the A's will depend upon the h's. You can check
your answer by seeing if you recover the usual centered difference
formula when h1=h2.
First, we need to expand yk+1 and yk-1.
Next, we need to set up the linear system that eliminate terms with
yk, yk' and yk''.
If we solve this system, we find that
- 4.
- [Based on KC 8.9: 1]
Solve the two point boundary value problem
using the shooting method with the secant rule.
See matlab m-file and diary for this one. I implemented a system for
y and
because I knew I would need it
for the next problem. One can see that the secant
method finds a correct value of y'(0) (0.17978) in a few steps, so
that y(1) is 3 to 5 digits of precision. Of course, one could
continue the process to gain whatever precision one needs.
- 5.
- [Based on KC 8.9: 1]
Solve the two point boundary value problem
using the shooting method with Newton's Method.
This is the same as the previous problem with similar results except
we use Newton's method.
- 6.
- [Based on KC 8.9: 1]
Solve the two point boundary value problem
using finite differences. Note that the differential equation in
this problem is different from the previous two.
For this problem, we set up a linear system by writing out each
derivative and second derivative as a second order finite difference.
Then, we solve the linear system using Gaussian elimination. The
matlab diary and m files are posted on the web.