0% found this document useful (0 votes)
39 views

(Modified) Secant Method: Machine Problem 2.1

The document provides instructions for creating two MATLAB function files. The first is to use the secant method to find the root of a given function. It should take in initial guess, perturbation factor, desired tolerance and output the approximated root. The second is to use Simpson's 1/3 rule to numerically integrate another given function over a range to determine the distance traveled by a bungee jumper in 3 seconds. It should take in the function, limits, number of segments and output the integral value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

(Modified) Secant Method: Machine Problem 2.1

The document provides instructions for creating two MATLAB function files. The first is to use the secant method to find the root of a given function. It should take in initial guess, perturbation factor, desired tolerance and output the approximated root. The second is to use Simpson's 1/3 rule to numerically integrate another given function over a range to determine the distance traveled by a bungee jumper in 3 seconds. It should take in the function, limits, number of segments and output the integral value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MACHINE PROBLEM 2.

1
Name
(Modified) Secant Method
Make a function file that solves the given function below given a value for x.

9.81
9.81(0.25)
tanh ( 4
) 36
0.25

Create a function file that determines the approximated root of the given function above. The function file must
invoke the previously made function file that contains the given function.
Input Arguments: (function, initial guess, perturbation factor, desired tolerance)
Output Arguments: approximated root of function
Note: There should also be screen output of the iteration number, value of approximated root and tolerance after every
iteration
Use the following input values to test the code:
Initial guess: 140
Perturbation factor: 0.000001
Desired tolerance: 0.05
Simpsons 1/3 Rule
Make a function file that solves the given function below given a value for t.

() =

9.81(68.1)
9.81(0.25)
(
)
0.25
68.1

Determine the distance travelled by a free-falling bungee jumper in the first 3 seconds if his velocity is given by the
function above.
Create a function file that can numerically integrate the given function using Simpson's 1/3 Rule. The function file must
invoke the previously made function file that contains the given function. Note that you may only use an even number of
segments and the minimum number of segments is 2. You cannot use the formula for the Composite Simpson's 1/3 Rule
in your code. The formula you may use per segment is
= ( )
Output: Approximate value of definite integral
Inputs: function
lower limit "a"
upper limit "b"
number of segments "n"

(0 ) + 4(1 ) + (2 )
6

You might also like