Lab 7 - Lab 7 Lab 7 Solving Nonlinear Equations using the...

• Lab Report
• 6
• 100% (16) 16 out of 16 people found this document helpful

This preview shows pages 1–2. Sign up to view the full content.

Lab 7 Lab 7: Solving Nonlinear Equations using the Newton-Raphson Method Background Suppose we want to solve the equation f(x) = 0. Let x o be an initial guess for the solution. The Newton-Raphson method uses this initial guess to iterate to a “better” solution as follows: x 1 = x 0 – f(x o )/f’(x o ) The updated guess, x 1 , can then be used to iterate to an even “better” solution as follows: x 2 = x 1 – f(x 1 )/f’(x 1 ) This pattern continues so that the new guess depends on the previous guess as follows: x n+1 = x n – f(x n )/f’(x n ) The iterative algorithm runs until |f(x n )| < ε (some small specified value) or until the number of iterations exceeds some specified value indicating that the algorithm doesn’t appear to be converging. So, the algorithm works as follows: 1. Make an initial guess, x 1 2. Is │f(x 1 )│ < ε? That is, is the guess close enough to a solution? If yes, finish. If not, go to step 3. 3. Iterate to a new guess using the Newton-Raphson algorithm. 4. Is │f(x n+1 )│ < ε? If yes, finish. If not, return to step 3 unless the number of iterations exceeds some specified maximum. The Newton-Raphson method is very useful in solving both single equations and systems of non-linear equations. In this lab, we will be applying to algorithm to find solutions to single equations only. Note: Do not use symbolic expressions in any of your scripts for this lab. Part A Suppose we want to estimate the fifth root of 80.5. This is equivalent to solving the equation f(x) = x 5 – 80.5 = 0. A decent initial guess might be 2.5 since 2 5 = 32 and 3 5 = 243.

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern