You are on page 1of 3

Libyan Academy

SCHOOL OF ENGINEERING AND APPLIED SCIENCES


Applied Numerical Methods GME610 Fall-2020

Assainment #3

Write a program in MATLAB to find the root of the following polynomial by Newton‐Raphson Method:

𝑓(𝑥) = 𝑥 3 + 5𝑥 2 − 𝑥 − 6

Use any initial guess you like for the solution.

Show results as a table.

Solution:

Step 1: First of all, a function done to estimate the initial guess:

The chosen initial guess was is 0.8. because the intersection with the x-axis is around 1 +or- 0.2.
Ali A. Abukhzam 1
Step 2: The computer program was based on the following flow chart:

Input data: fx, tol

Plot x vs. fx & input x(1) & Obtain fx’

Delta = -f(x)/df(x)

X = x+delta
No

If |delta|<= tol

Solution obtained root = x(i)

Yes

End

Ali A. Abukhzam 2
Results:

Note: The full program code is attached as .m file.

Ali A. Abukhzam 3

You might also like