Math 2280-002 Second MAPLE Assignment Numerical Approximations

advertisement
Math 2280-002
Second MAPLE Assignment
Numerical Approximations
Due February 1, 2013 (before 11:59 pm)
Begin by downloading this document and opening it in Maple. A shortcut is to use the
"open URL" option in the "File" menu item.
http://www.math.utah.edu/~kocs/maplehw2.mw
You may find it useful to modify the implementation of Euler's method discussed in
class. This worksheet is available online at
http://www.math.utah.edu/~kocs/EulersMethod.mw
Submission Instructions: Create your document so that we can re-generate your
answers by using the Edit/Execute/Worksheet menu option . Before you submit your .
mw solution file on CANVAS, remove all Maple output using the menu option
Edit/Remove Output/From Worksheet. If you're worried that your file may become
corrupted during submission and we won't be able to regenerate your answers, you
may also submit a .pdf or .ps printout which includes all the output, in addition to the
.mw file.
Maple Formatting instructions: Here's some general formatting guidelines if you
choose to use Maple:
When creating your Maple document, choose the "document" format as opposed to
the "worksheet" format.
Remember to only do mathematical computations inside of Math execution groups
Use a header. In Text mode, and using the text formatting tools at the top of the
window, type (4) separate lines with your name; your student number; your Math
2280 section and Professor; and the date. Right justify these lines. Below this
header, and centered, write "Maple Project 2, Math 2280".
For each problem, copy the number and problem from this assignment file into
your new file. You can copy/paste from window to window, or you can retype the
questions.
Remember the key is readability. Every time you initialize a new variable or group of
variables write a short comment explaining what the variables represent.
>
>
At each new step in the process, describe what you are doing in either a comment or a
text paragraph. After completing the computations for each problem, answer the
question (using complete sentences) in "Text" mode.
Consider the initial value problem
,
.
1 ) The point of this problem is to compare various numerical methods of
approximating the solution to this IVP on the interval
.
1a) Find the solution to the initial value problem. Verify that the solution has the
property that
.
1b) Write an algorithm in Maple that uses Euler's method with step size
to
approximate the solution on the interval
. (Notice that , the number of
steps, is 10 here.) Your for loop should be written so that Maple only prints out the
approximate value of the solution at
. Use Maple to compute the error. (Recall
that error = actual value - approximate value.)
1c) Repeat (1a) with step size
1d) Repeat (1a) with step size
(or
(or
). Again, compute the error.
). Compute the error.
1e) When using Euler's method, we know that
where is some positive constant that depends on our initial value problem and the
chosen interval. Based on your work above, what would you guess to be in this case?
1f) Using Euler's method over the interval
, you would need over 100,000
steps to approximate to 5 decimal places! Let's see how much more efficient the
improved Euler's method and the Runge-Kutta method are in comparison. Do not
show any work for (1f).
1g) Using the improved Euler's method over the interval
, how many steps
are needed to approximate to 5 decimal places? You only need to find the smallest
power of 10 that works for . In other words, try = 1 0 , = 1 0 0 , =1000, etc. until you
find an that works. Justify your answer by writing an algorithm in Maple that uses
the improved Euler's method to print out an approximation to that is correct up to 5
decimal places.
1h) Using the Runge-Kutta method over the interval
, how many steps are
needed to approximate to 5 decimal places? Justify your answer by writing an
algorithm in Maple that uses the Runge-Kutta method to print out an approximation
to that is correct up to 5 decimal places.
2 ) Consider the IVP
,
.
This problem and its solution could be modeling a drag problem for a parachutist who
drops out of a helicopter at time and immediately pulls his ripcord. In this model, we
measure positive distance in the downwards direction; the acceleration of gravity is
and the drag of the parachute adds the deceleration term
.
2a) What is the terminal velocity in this model? Notice that the "slope function"
is a decreasing function of for
, that its value is
when
, and that its limit as
is
. Thus the slope function has exactly one
root and you can find it with the Maple (algebraic)"solve" command. Don't expect a
nice integer value for the terminal velocity. Since the extra term increases the drag
from the previous model, the new terminal velocity should be smaller than it was
originally.
2b) This is a differential equation which does NOT have an elementary solution.
Use Runge-Kutta with step sizes
and
to estimate the solution values
at
and
seconds. Based on a comparison of the estimated values at these
two values, how confident are you either one (or both) of them provides a good
estimate for the actual values
and
? Explain your reasoning.
2c) Based on your work in part (2b), what percent of the terminal velocity is
attained at
seconds and at
seconds?
Download