Question

In: Advanced Math

Apply Newton’s method and the modified method to the equation f(x) = 1−cos(x−5) to approximate the...

Apply Newton’s method and the modified method to the equation f(x) = 1−cos(x−5) to approximate the a double root 5. Compare the results and demonstrate the superiority of the modified method. Numerically identify the rates of convergence of both the methods.

Solutions

Expert Solution

The iterative scheme for the Newton Raphson method is given below :

provided

The code for Newton Raphson method is attached below.

%Newton Raphson Method%%%%%%%%%%%%%%%%%%
clear all;
syms x;
f=1-cos(x-5); %Enter the Function here
g=diff(f); %The Derivative of the Function
n=input('Enter the number of decimal places:');
epsilon = 5*10^-(n+1);
x0 = input('Enter the intial approximation:');
for i=1:100
f0=vpa(subs(f,x,x0)); %Calculating the value of function at x0
f0_der=vpa(subs(g,x,x0)); %Calculating the value of function derivative at x0
y=x0-f0/f0_der; % The Formula
err=abs(y-x0);
if err<epsilon %checking the amount of error at each iteration
break
end
x0=y;
end
y = y - rem(y,10^-n); %Displaying upto required decimal places
fprintf('The Root is : %f \n',y);
fprintf('No. of Iterations : %d\n',i);

Output

Enter the number of decimal places:5
Enter the intial approximation:4.5
The Root is : 4.999990
No. of Iterations : 17

The iterative scheme for Modified Newton method is

where

The code for the Modified Newton scheme is attached below.

%%Modified Newton method%%%%%%%%
clear all;
syms x;
f=1-cos(x-5); %Enter the Function here
g=diff(f); %The Derivative of the Function
u=f/g;
v=diff(u);
n=input('Enter the number of decimal places:');
epsilon = 5*10^-(n+1);
x0 = input('Enter the intial approximation:');
for i=1:100
f0=vpa(subs(f,x,x0)); %Calculating the value of function at x0
f0_der=vpa(subs(g,x,x0)); %Calculating the value of function derivative at x0
u0=vpa(subs(u,x,x0));
u0_der=vpa(subs(v,x,x0));
y=x0-u0/u0_der; % The Formula
err=abs(y-x0);
if err<epsilon %checking the amount of error at each iteration
break
end
x0=y;
end
y = y - rem(y,10^-n); %Displaying upto required decimal places
fprintf('The Root is : %f \n',y);
fprintf('No. of Iterations : %d\n',i);

Output

modifiednewton_raphson
Enter the number of decimal places:5
Enter the intial approximation:4.5
The Root is : 4.999990
No. of Iterations : 3

Comparison and Superiority

Comparing the both methods, we can see the number of iteration for Modified Newton Scheme is 3 which is less than the number of iteration for Newton Raphson scheme ,17.

Rate of Convergence

For the rate of convergence, I am hereby attaching an image file below.


Related Solutions

Use Newton’s Method to approximate the value of x where f(x) = x3 + 10x2 +...
Use Newton’s Method to approximate the value of x where f(x) = x3 + 10x2 + 15x – 2 has a local maximum. Give the value accurate to 3 decimal places.
Take one step of Newton’s method to approximate a solution to the complex equation z ^5...
Take one step of Newton’s method to approximate a solution to the complex equation z ^5 − 1 = 0, with z0 = i. Simplify your result to identify the real and imaginary parts of your approximation. What is the nearest actual root?
find f'(x) 1. f(x)=3sinx-secx+5 _______ 2. f(x)=e^xcot(3x) _______ 3. f(x)= cos^5(3x-1) _______
find f'(x) 1. f(x)=3sinx-secx+5 _______ 2. f(x)=e^xcot(3x) _______ 3. f(x)= cos^5(3x-1) _______
Study the roots of the nonlinear equation f(x) = cos(x) + (1 /(1 + e^2x)) both...
Study the roots of the nonlinear equation f(x) = cos(x) + (1 /(1 + e^2x)) both theoretically and numerically. (a) Plot f(x) on the interval x ∈ [−15, 15] and describe the overall behaviour of the function as well as the number and location of its roots. Use the “zoom” feature of Matlab’s plotting window (or change the axis limits) in order to ensure that you are identifying all roots – you may have to increase your plotting point density...
f(r,?) f(x,y) r(cos(?)) = x r(cos(2?)) = ? r(cos(3?)) = x3-3xy2/x2+y2 r(cos(4?)) = ? r(cos(5?)) =...
f(r,?) f(x,y) r(cos(?)) = x r(cos(2?)) = ? r(cos(3?)) = x3-3xy2/x2+y2 r(cos(4?)) = ? r(cos(5?)) = ? Please complete this table. I am having trouble converting functions from polar to cartesian in the three dimensional plane. I understand that x=rcos(?) and y=rsin(?) and r2 = x2 + y2 , but I am having trouble understanding how to apply these functions.
Numerical Analysis: Apply Newton’s method to find the roots of polynomial P(x) = x^3 + 3x^2...
Numerical Analysis: Apply Newton’s method to find the roots of polynomial P(x) = x^3 + 3x^2 − 2x + 1. Find the convergence rate.
a. (5 Marks) 1 1 cos(x)cos(y) = -cos(x-y) + -cos(x + y) 1 l sin(x)sin(y) =...
a. 1 1 cos(x)cos(y) = -cos(x-y) + -cos(x + y) 1 l sin(x)sin(y) = -cos(x-y)--cos(x+ y) 1 l sin(x)cos(y) =—sin(x-y) +-sin(x + y) A DSB-FC (double sideband-full carrier) signal s(t) is given by, s(t) = n cos(2rr/cf)+ cos(2«-/mt)cos(2«-fct) What is the numeric value for the AM index of modulation, m, fors(f) ?
1. If we have to f(x) = x^5, then: a. determine the equation of the function...
1. If we have to f(x) = x^5, then: a. determine the equation of the function g(x), which takes f(x), stretches it vertically by a factor of 3, then reflects it horizontally, and then moves it 2 units up. b. Graph g(x)
f(x) = ((x − 1)^2) e^x How easy would it be to apply the Bisection Method...
f(x) = ((x − 1)^2) e^x How easy would it be to apply the Bisection Method compared to Newton's method and modified Newton's method to the function f(x)? Explain.
consider f(x) = ln(x) use polynomial degree of 5!!! a) Approximate f(0.9) and f(1.1) b) Use...
consider f(x) = ln(x) use polynomial degree of 5!!! a) Approximate f(0.9) and f(1.1) b) Use Taylor remainder to find an error formula for Taylor polynomial. Give error bounds for each of the two approximations in (a). Which of the two approximations in part (a) is closer to correct value? c) Compare an actual error in each case with error bound in part (b).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT