Q BgQuestion:

Scholar
Karma Points: 204
Respect (100%):
posted by  Tilly on 11/23/2008 10:04:19 AM  |  status: Live  

*** NEWTON"S METHOD ***

Course Textbook Chapter Problem
Calculus N/A N/A N/A
Question Details:
 
Use Newton's method to find the absolute maximum value of the function f(x) = xsin(x),
0 ≤ xπ, correct to six decimal places.
 

These are the steps that they gave, but I don't understand them. Why did the change it to g(x) and what does that mean?
 
f(x) = xsinx ) f(x) = sinx+xcosx. f(x) exists for all x, so to find the maximum of f, we can examine the zeros of f. From the graph of f, we see that a good choice for x1 is x1 = 2. Use g(x) = sinx+xcosx and g(x) = 2cosx xsinx to obtain x2  2.029048, x3  2.028758  x4. Now we have f(0) = 0, f() = 0, and f(2.028758)  1.819706, so 1.819706 is the absolute maximum value of f correct to six decimal places.
Bonus Point Alert! Earn +4 additional karma points for helping this annual member.

AAnswers:

Answer Question
Oracle
Karma Points: 6,798
posted by Bart_Boy on 11/23/2008 10:36:23 AM  |  status: Live
Asker's Rating: Lifesaver   
Tilly's comment:
"Thanks!"
Response Details:
Newton's method is perhaps the best known method for finding successively better approximations to the zeros (or roots) of a real-valued function.

The idea of the method is as follows: one starts with an initial guess which is reasonably close to the true root, then the function is approximated by its tangent line (which can be computed using the tools of calculus), and one computes the x-intercept of this tangent line (which is easily done with elementary algebra). This x-intercept will typically be a better approximation to the function's root than the original guess, and the method can be iterated.


We start the process off with some arbitrary initial value x0. (The closer to the zero, the better. But, in the absence of any intuition about where the zero might lie, a "guess and check" method might narrow the possibilities to a reasonably small interval by appealing to the intermediate value theorem.)  We perform iterations of the recursive sequence x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}\,\!.  The method will usually converge, provided this initial guess is close enough to the unknown zero. Furthermore, for a zero of multiplicity 1, the convergence is at least quadratic in a neighborhood of the zero, which intuitively means that the number of correct digits roughly at least doubles in every step.

In this problem they wanted to find the roots of f ' (x).  They called this g (x) for use with Newton's method, to avoid confusion in the method between f '(x) which would have been f(x) and its derivative.

The switch to g(x) is not really important.
g(x) = sinx + x cosx
Then, to approximate the root, they find
g'(x) = 2cosx - x sinx

And use Newton's method with these functions.
Oracle
Karma Points: 18,350
posted by Bpanda on 11/23/2008 10:57:36 AM  |  status: Live
Asker's Rating: Lifesaver   
Tilly's comment:
"Thanks!"
Response Details:
 
 
 
 
In our case the problem of finding the absolute maximum value of the function f(x) = xsin(x)  is equivalent of finding the solution to f ' (x) = 0
 
 
then they suppose a function  g  where :  
 
The function to use in Newton's Method is then  g(x)  = 0  with derivative 
 
With an initial guess of  x1 = 2 ,  the sequence given by newtons method is:
 
then again x2 will be the new guess
 
.....
 
................With only a few iterations one can obtain a solution accurate to a few decimal places
 
hope this helps
 
 
 
 
 
 
 
 
 
 
You Don't Mess with the Panda
Oracle
Karma Points: 25,567
(adu)
posted by velixy on 11/23/2008 11:05:14 AM  |  status: Live
Asker's Rating: Not Helpful   
Response Details:
I SOLVED THIS PROBLEM BEFORE
 
http://qaboard.cramster.com/-topic-5-409565-cpi0.aspx
 
 
 f(x) = xsin(x),
 f ' (x) = sin(x) + xcos(x)
 
 
Newton's method
x0= given  ; initial guess
xn+1 = xn -f(xn) / f '(xn)
 
 

clear all;

x(1) =3;

n=5;

disp (' x')

disp ('~~~~~~~~~~~~~~~~~~~~~')

for i=1:(n+1)

x(i+1) = x(i) - ( x(i)*sin(x(i)) ) / ( sin(x(i))+ x(i)*cos(x(i)) ) ;

fprintf('%15.7f\n',x(i) )

end
 
 
 
HOW TO WORK
 
>> newton101
       x
~~~~~~~~~~~~~~~~~~~~~
      3.0000000
      3.1496576
      3.1416131
      3.1415927
      3.1415927

    
ADU
Answer Question
Ask New Question

Join Cramster's Community

Cramster.com brings together students, educators and subject enthusiasts in an online study community. With around-the-clock expert help and a community of over 100,000 knowledgeable members, you can find the help you need, whenever you need it. Join for free today » How Cramster is different from tutoring »