Numerical Assignment Midterm 2B
You may work with one other person to develop and run the software you use to complete this
assignment. You must write up your own report.
Use the Euler, Improved Euler, and Runge-Kutta methods with a computer system (MATLAB
recommended) to solve approximately the following ODE and to obtain an approximation of the
indicated solution value. Use step sizes of
h ? 0.5, 0.1, 0.05,0.01, 0.005,0.001,0.0005,0.0001,0.00005,0.00001 or as close to these values as possible.
Looking at what happens as h?0 , what is your best numerical estimate of the exact solution?
[Hint: my value is 8.23434]. Using this result, compute and plot the error as a function of h for
each of the methods. From your results, what can you conclude about the relative accuracy of the
2 2 1
‘ 1, (0) 0, (2) ?
y ? x ? y ? y ? y ?
The textbook has listings of MATLAB code for the three methods. Type them into MATLAB and run
them to get your test results. Be sure to modify the function f appropriately for this assignment.
You should create several MATLAB files, each containing one MATLAB function.
1) f.m – containing the function f (text pp. 124 – but modify it for this assignment)
2) euler.m – containing the function euler (text pp. 124)
3) impeuler.m – containing the function impeuler (text pp. 134)
4) rk.m – containing the function rk (text pp. 145)
Then invoke each numerical solver as follows:
[X,Y]=euler(0,0,2,2/h); [or “impeuler”, or “rk”]
The last MATLAB statement will display the computed estimate for y(2). Note that MATLAB is case
Write a report (MS Word document) containing your test results, analysis, and conclusion. It
should also include a listing of your code and acknowledgement of your software “coding buddy”.
If you need help getting MATLAB to work for you, I recommend that you go either to the
engineering lab on the second floor of North Classroom, or the math lab on the fourth floor of
North Classroom (NC4009). In both places there are staff who can help you. If you get stuck,
PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET AN AMAZING DISCOUNT 🙂
Top-quality papers guaranteed
100% original papers
We sell only unique pieces of writing completed according to your demands.
We use security encryption to keep your personal data protected.
We can give your money back if something goes wrong with your order.
Enjoy the free features we offer to everyone
Get a free title page formatted according to the specifics of your particular style.
Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.
Don’t pay extra for a list of references that perfectly fits your academic needs.
24/7 support assistance
Ask us a question anytime you need to—we don’t charge extra for supporting you!
Calculate how much your essay costs
What we are popular for
- English 101
- Business Studies