Results 1 to 8 of 8

Math Help - Newton's Method question.

  1. #1
    Newbie
    Joined
    Oct 2010
    Posts
    21

    Newton's Method question.

    I don't know which initial xsub1 value works best for the problem below, can anyone help me? In other words, how would one start the problem?

    Use Newton's method to find the absolute maximum value of the function f(x) = x sin x, 0 ≤ x ≤ pi, correct to six decimal places.

    I took the derivative of the function and got sin x+xcosx. Then I took the derivative again and called the new function g(x) and got 2cosx-xsinx.

    Thanks for your help and effort
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Dec 2009
    Posts
    3,120
    Thanks
    1
    Quote Originally Posted by ioke09 View Post
    I don't know which initial xsub1 value works best for the problem below, can anyone help me? In other words, how would one start the problem?

    Use Newton's method to find the absolute maximum value of the function f(x) = x sin x, 0 ≤ x ≤ pi, correct to six decimal places.

    I took the derivative of the function and got sin x+xcosx. Then I took the derivative again and called the new function g(x) and got 2cosx-xsinx.

    Thanks for your help and effort
    You need to solve for sinx+xcosx=0.
    (the 2nd derivative being <0 verifies that the turning point is a local maximum,
    however you need to ensure the point you choose is to the right of the 2nd derivative =0).

    Sinx=0 if x=0 or {\pi}

    Both sinx and x are positive or zero from x=0 to {\pi}

    hence the graph rises to a maximum and falls to zero.

    You could simply choose x=2 as an alternative to \frac{\pi}{2}
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Oct 2010
    Posts
    21
    Would this be how you would start the next step? I'm not sure how to do Newton's method with trig functions.

    xsub1= 2

    xsub2= xsub1 - f(xsub1)/f'(xsub1)=
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Dec 2009
    Posts
    3,120
    Thanks
    1
    Quote Originally Posted by ioke09 View Post
    Would this be how you would start the next step? I'm not sure how to do Newton's method with trig functions.

    xsub1= 2

    xsub2= xsub1 - f(xsub1)/f'(xsub1)=
    Yes,

    once you have your initial function set up as f(x)=0,
    the Newton-Raphson method will "home in" on the zero,
    where the graph crosses the x-axis.

    So you take the first derivative and use the iterative formula
    as you would for non-trigonometric functions also.

    However, because the function may cross the x-axis repeatedly,
    it is important that you be quite careful in your choice of initial approximation
    to the root of f(x)=0, to avoid jumping to a different part of the graph
    on the subsequent iterations.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor chisigma's Avatar
    Joined
    Mar 2009
    From
    near Piacenza (Italy)
    Posts
    2,162
    Thanks
    5
    Quote Originally Posted by ioke09 View Post
    I don't know which initial xsub1 value works best for the problem below, can anyone help me? In other words, how would one start the problem?

    Use Newton's method to find the absolute maximum value of the function f(x) = x sin x, 0 ≤ x ≤ pi, correct to six decimal places.

    I took the derivative of the function and got sin x+xcosx. Then I took the derivative again and called the new function g(x) and got 2cosx-xsinx.

    Thanks for your help and effort
    The maximum corresponds to the solution of the equation f^{'} (x)= x\ \cos x + \sin x =0 and the Newton Raphson method allows You to find with the iterations...

    \displaystyle \Delta_{n} = x_{n+1} - x_{n} = - \frac{f^{'} (x_{n})}{f^{''} (x_{n})} = \varphi (x_{n}) (1)

    ... starting from an appropriate value x_{1}. The function \displaystyle \varphi(x)= \frac{x\ \cos x+ \sin x}{x\ \sin x - 2\ \cos x} is illustrated here...



    There is only one 'attractive fixed point' for x_{0} \sim 2 but the initial point x_{1} must be selected with care if You want the convergence. Pratically the condition for convergence is done by |\varphi (x_{1})| < |2\ (x_{0} - x)| as indicated by the 'red line' in the figure...

    Kind regards

    \chi \sigma
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Oct 2010
    Posts
    21
    I chose xsub1=2, but the function never really converges as I don't get iterations with the same exact result rounded to a few decimal places.

    Does anyone know if a better number to pick is something greater than pi/2?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor
    Joined
    Dec 2009
    Posts
    3,120
    Thanks
    1
    Quote Originally Posted by ioke09 View Post
    I chose xsub1=2, but the function never really converges as I don't get iterations with the same exact result rounded to a few decimal places.

    Does anyone know if a better number to pick is something greater than pi/2?
    Did you get x_2=2.029\;?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor chisigma's Avatar
    Joined
    Mar 2009
    From
    near Piacenza (Italy)
    Posts
    2,162
    Thanks
    5
    Quote Originally Posted by ioke09 View Post
    I chose xsub1=2, but the function never really converges as I don't get iterations with the same exact result rounded to a few decimal places.

    Does anyone know if a better number to pick is something greater than pi/2?
    According to my computer the sequence obtained be recursive relation...

    \displaystyle x_{n+1} = x_{n} + \frac{x_{n}\ \cos x_{n} + \sin x_{n}}{x_{n}\ \sin x_{n} - 2\ \cos x_{n}} (1)

    ... starting from x_{1}=2 is...

    x_{1} = 2

    x_{2} = 2.02904828059...

    x_{3} = 2.02875786608...

    x_{4} = 2.02875783811...

    ... and for n>4 the result, in 12 decimals, is always the same...

    Kind regards

    \chi \sigma
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Newton's method
    Posted in the Calculus Forum
    Replies: 4
    Last Post: October 26th 2010, 08:19 PM
  2. Newton's method
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: October 17th 2009, 01:46 PM
  3. Newton's Method
    Posted in the Calculus Forum
    Replies: 1
    Last Post: October 15th 2009, 09:03 PM
  4. Newton method help
    Posted in the Calculus Forum
    Replies: 1
    Last Post: May 21st 2008, 10:00 PM
  5. Newton's Method
    Posted in the Calculus Forum
    Replies: 8
    Last Post: April 15th 2007, 10:38 PM

Search Tags


/mathhelpforum @mathhelpforum