CS211 Lab Policy:
Instructions:
For this lab you must design and create a program that finds a root of an equation using a method known as the secant method. Store your final solution in a file called lab10.m. Please follow the following steps:
The secant method for finding a root of an equation:
The secant method for finding a root of an equation is similar to the Newton-Raphson method, but it does not require an exact equation for the derivative of the equation. Instead, it approximates the derivative using points along the curve. As you read the following description, refer to the figure below. Starting from an initial guess value for a root, the slope of the curve tells us which direction to move towards the x axis. We can approximate the slope of the curve by using another point along the curve that is a small distance away from the guess. From these points, we can form two equations for the slope of the tangent line:
Now set these two equations for the tangent's slope equal to each other and solve for the "NewGuess" value:
If the above equation is repeatedly calculated, each "new guess" value will get closer and closer to a root value.
![]()
![]()
Turn-in:
Submit your lab10.m file.
References: (none)