Unformatted text preview: HOMEWORK ASSIGNMENT 6
EGM 3344
Numerical Integration of Functions Concepts
Problems from Chapra book chapters 17 through 19
Approach
Comments
Matlab
Do all parts. Part (f) is single application Simpson’s 3/8 rule.
Matlab
For part (c), use the combination of the trapezoidal and
Simpson’s rules that will produce the most accurate solution.
Matlab
Matlab
Review section 18.2 in the book for how to calculate a for
Romberg integration. Note that s is the desired value of a .
Report t for each part given that the analytical solution for the
integral is 41.17107385.
Matlab
Use the finite difference equations in Figs. 19.3 through 19.5.
Matlab
Only use one application of Richardson’s extrapolation.
Matlab
Your Matlab program should do the following:
1) Take x and y values as inputs.
2) Spline fit the data points using the builtin Matlab function
spline to find the piecewise polynomial coefficients.
3) Calculate the piecewise polynominal coefficients for the first
derivative of the spline function
4) Use the first derivative piecewise polynominal coefficients to
calculate the first derivative of the spline curve at the original x
values using the builtin Matlab function ppval.
Matlab
Use the builtin Matlab function gradient with a step size of
25. Problem
17.2
17.5
17.6
18.3 19.1
19.4
19.9 19.11
Answers 17.2
(a) 3.500167731
(b) 1.99320, t = 42.88%
(c) n = 2, 2.96303, t = 15.35%
n = 4, 3.3437, t = 4.47%
(d) 3.28427, t = 6.17%
(e) 3.47059, t = 0.84%
(f) 3.388365, t = 3.19%
17.5
(a) 0.79124
(b) 0.79284,
(c) 0.791282, t = 0.2022%
t = 0.0052% 2
17.6
(a) 2.666667
(b) 2, t = 25%
(c) 2.666667, t = 0%
18.3
(a) 41.21305531, a = 0.3579%, t = 0.1020%
(b) 39.6075058, t = 3.8%
(c) quad solution 41.17107385090233, t = 1.1e8%
quadl solution 41.17107466800178, t = 2e6%
19.1 19.4
D = 0.70539
19.9
True derivative values =
0.3012 0.4979 0.4484 0.1348 0.0274 Spline fit derivative values =
0.5873 0.4952 0.4496 0.1286 0.0581 1.1600 0.9200 0.6800 0.4400 0.3200 0.0096 0.0096 0.0072 0.0048 19.11
Velocity =
1.2800 Acceleration =
0.0048 0.0072 ...
View
Full Document
 Spring '09
 RAPHAELHAFTKA
 Derivative, builtin Matlab function

Click to edit the document details