Use Newton’s method to solve the equation0 =12+14x2−xsin(x)−12cos(2x),withx0=π2.Iterate using Newton’s method until an accuracy of 10−3is obtained. Explain why the resultseems unusual for Newton’s method.

Respuesta :

Answer:

given function is

[tex]f(x)=12+14x^2-xsin(x)-12cos(2x)[/tex]

[tex]x_{0} =\pi ^2[/tex]

formula for newton's method is

[tex]x_{n+1} =x_{n} -f(x_{n})/f'(x_{n} )[/tex]

so derivative of function is

[tex]f'(x)=28x-sin(x)-xcos(x)+24sin(2x)[/tex]

now put values and solve

or you can also use MATLAB code to solve

i.e

function p= newton(x)

e=0.001;

for i=1:100

    if abs(d(x))>e

       if abs(k(x))>0

  xm=x-(k(x)/d(x));

  x=xm;

       else

       end

        break;

   end

end

    disp(x)

 disp(k(x))

return;