# Fall 2012 MATH 151-8xx MATLAB Project 2

Introduction:

Today in lab, you will learn a formula for the equation of the line tangent to f at the point where x=a. Suppose there is a solution to the equation f(x)=0 near a (which we will now call x0 to avoid confusion below). In most cases, we can get an approximate solution (x1) by setting the tangent line equal to 0 and solving, then finding the tangent line at x1 and solving (=0) to create x2, and so on. To illustrate this, open the file EngrMath/Stewart/c03/sc/s230X01.m in Matlab and examine the 3 graphs produced.

Rather than re-calculating the equation of the tangent line each time, we can instead relabel the solution by letting a be xn and calling the solution xn+1. The resulting formula is called Newton's Method for solving equations:
xn+1 = xn - f(xn) / f '(xn)

Description
1. Students will work in their assigned teams on this assignment.
2. Assignment Objectives:
• Creating Functions in Matlab (Gilat pp220-226)
• Anonymous Functions (Gilat pp230-232)
• While Loops (Gilat pp195-198)
• Approximating Solutions to Equations in Matlab (Gilat pp 295-298)***NOTE: This should ONLY be used if you want to check your answers!
3. ALSO RECALL:
• Plotting Graphs (Gilat pp134-148)