ES272
Laboratory Activity # 9
The force on a sailboat mast can be represented by the following function:
f(z) = 200\left(\frac{z}{7+z}\right)e^{-2.5z/D}
(z=the elevation above the deck; D=the height of the mast)
The total force F exerted on the mast can be determined by integrating this
function over the height of the mast:
F = \int_0^D f(z)dz
- Use multiple application Simpson's 1/3 rule to compute F for the case where
D=30. Use step size of h=0.01.
- Compare your result with the result of MATLAB built-in function \"integral\" .
ALGORITHM:
Step 1: Enter the parameters (D, h).
Step 2: Define the function to be integrated.
Step 3: Define the evaluation points.
Step 4: Apply multiple application Simpson 1/3 rule formula and print the
result on the screen.
Step 5: Print the result on the screen using the Matlab function \"integral\" .
I = (b-a)\frac{f(x_0) + 4\sum_{i=1,3,5}^{n-1} f(x_i) + 2\sum_{i=2,4,6}^{n-2} f(x_i) + f(x_n)}{3n}