Instructions

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 1

APSC 607: Project 2
Submit date, time and method: 09/27/17 5pm (EST) electronically (i.e. email)
You need to submit a report (pdf format) and the individual matlab files. Please compress all the matlab
files into one file before you send them.
Important general comments:
1) Be careful to make sure that when you use material you didn’t generate yourself to include
references. Failure to do so is consider plagiarism and will result in a reduction of the final grade by
50% !!!
2) Do not use “breaks” in your MATLAB functions. These are bad coding practices that make code
illegible and I will subtract half the points on the MATLAB component if you use “breaks” or other
ways to terminate a loop before exiting the loop.
Task
Write in Matlab functions to calculate the integral of the following functions using the composite
midpoint rule, trapezoidal rule and Simpson’s rule.
a)
0
2
e2xsin(3x)dx
b)
0
21
x+4dx
Choose h and n carefully.
What h and n do you need to use for the final result to approximate the analytic solution to
within 10-4, 10-8.
What is the best tolerance level I can reach? What h and n were needed to reach this tolerance
level? What happens if I make h smaller?
Would an adaptive scheme be useful for either of these integrals? What if integral boundaries
were moved?
BONUS points: Implement adaptive composite Simpson’s rule and repeat prior questions.
What to turn in
Turn in all the MATLAB code that you wrote to reach the final solution. Also turn in a report
describing the methods, your results and discuss your findings.

Navigation menu