next up previous
Next: Runge-Kutta Up: Assignment 4: Initial-value problems Previous: Assignment 4: Initial-value problems

Taylor methods

1.
Pick up the Maple worksheet named hw4_help.mws from the class web page and read through it. I demonstrates how to use Maple arrays; you should also read the section about arrays in the Maple Learning Guide in the lab. It also defines a new Maple procedure named plotarray that is useful for displaying the results of a numerical IVP solution. In future assignments you will be writing Maple procedures, so you might want to note in passing what a procedure definition looks like.

2.
Make a copy of this worksheet before you modify it so that you can revert to a known state if things get funny.

3.
Modify the worksheet to halve the step size (set n:=40)and see what the effect is on the accuracy of the answer.

4.
Modify the worksheet to solve Exercise 3d on page 188. To check the accuracy of your answer, use the analytic solution in exercise 4d. This exercise is for your own benefit; you do not need to turn in the result.

5.
Starting again with a clean copy of the worksheet, modify it so that it uses the second order Taylor method. To do this you will need a functional operator that evaluates f'(t, y(t)) (see page 184). The Functional Operator Handout explains how to do that; it is also available from the web page (it's called functional_demo.mws). Use a step size of 0.1 (n:=20).

6.
When your implementation works, take a minute to clean up the worksheet: delete unnecessary section, suppress the output of trivial operations (by replacing ; with :), and add text sections that explain what you have done. Alternatively, feel free to write things on the printout.

7.
Do Exercise 10 on page 189 and plot the results. Hint: the answer should look like a damped oscillation.


next up previous
Next: Runge-Kutta Up: Assignment 4: Initial-value problems Previous: Assignment 4: Initial-value problems
Allen B. Downey
1998-10-07