Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The polynomial f(x)=230x^4 +18x^3 +9x^2 221x9, (E) has two real roots, one in [1

ID: 3167976 • Letter: T

Question

The polynomial

f(x)=230x^4 +18x^3 +9x^2 221x9, (E)

has two real roots, one in [1,0] (p = 0.0406592883) and the other one in [0,1] (p = 0.962396622)

1. Use the tangent lines to the curve of y = f (x) on [1, 1] to explain why the sequence generated by the Newton’s method with p0=0.5 converges to the root in [1,0].

Newton’s method with p0=0.5 generated with code:

This is Newtons Method

Input the function F(x) in terms of x

230*x^4 + 18*x^3 + 9*x^2 -221*x - 9

Input the derivative of F(x) in terms of x

920*x^3 + 54*x^2 + 18*x - 221

Input initial approximation

0.5

Input tolerance

10^-5

Input maximum number of iterations - no decimal point

1000

Newtons Method

I   P                 F(P)

1   -7.05089820e-01    2.0183630e+02

2   -3.23791114e-01    6.5418427e+01

3   -6.46031310e-02    5.3140071e+00

4   -4.06861512e-02    5.9556165e-03

5   -4.06592883e-02    6.5571477e-09

6   -4.06592883e-02    1.7763568e-15

Approximate solution = -4.0659288316e-02

with F(P) = 1.7763568394e-15

Number of iterations = 6

Tolerance = 1.0000000000e-05

Explanation / Answer

clc;
clear all;
%x0 initial guess
f=@(x)230*x^4 + 18*x^3 + 9*x^2 -221*x - 9;%f function
fp=@(x)920*x^3 + 54*x^2 + 18*x - 221;% fp derivative of f
tol=10^(-5);%tol tolerence
%N max iterations
%     f = inline(f);
%     fp = inline(fp);
x0=0.5;
n=0;
err=0.1;
p(1)=x0;
N=100;
while (abs(err>tol)& (n<=N))
   
y1=x0-(f(x0)/fp(x0));%Newton method

err=abs((y1-x0)); %erorr

% if abs(erorr<1e-3)
% break
%end
n=1+n;
x0=y1;
p(n+1)=x0;

end
disp('num_iter          p_value                F(p)')
disp('_______________________________________________________________________________')
for i=1:n
fprintf('%d %20f %20f ',i ,p(i),f(p(i)))
end
p(end)
f(p(end))
n

num_iter          p_value                F(p)
_______________________________________________________________________________
1                  0.500000               -100.625000
2                 -0.705090                201.836304
3                 -0.323791                 65.418427
4                 -0.064603                  5.314007
5                 -0.040686                  0.005956
6                 -0.040659                  0.000000

ans =

   -0.0407


ans =

1.7764e-015


n =

     6

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote