Solution to Problem 9.3

© 2002 by Karl Hahn
KCT logo (click for Home Page)

Step 1: Get the equation into the form of  f(y) = 0.  Our situation is that we know what x is and we need to find what the corresponding y is to solve Kepler's equation. Newton-Raphson is a method for finding where a function crosses zero. So we need to get it into a form where finding where some function of y crosses zero gives us the solution for where  y - e sin(y)  is equal to x.

You're starting out with

   x  =  y  -  E sin(y)
where e is a constant. So just subtract the right-hand side from the left, and you have
   f(y)  =  x  -  y  +  E sin(y)  =  0
Now if you find the y that makes  f(y)  be zero, you have a solution.

Step 2: Find the derivative of  f(y).  You must assume x to be a constant. Why? Because the problem is that x is given -- hence it is a constant. So taking the derivative of  f(y)  with respect to y, you get

   f'(y)  =  -1  +  E cos(y)  =  E cos(y)  -  1

Step 3: Set up the Newton-Raphson formula. That is

   yn+1  =  yn  -
   f(yn)
        
  f'(yn)
So you put in the  f(y)  and the  f'(y)  you got in the previous steps.

   yn+1  =  yn  -
  x - yn + E sin(yn)
                    
    E cos(yn)  -  1
That completes the setup part. All that's left is to...

Step 4: Iterate the formula with the numbers given. That was with  E = 0.2  and  x = 0.5 , using  y0 = 0.  I get

   y0    =    0.000000000000000
   y1    =    0.625000000000000
   y2    =    0.615474486571046
   y3    =    0.615468169492719
   y4    =    0.615468169489965
   y5    =    0.615468169489965
After just five iterations, it has converged to within the resolution of my calculator. How well does y5 work in the original equation getting back  x = 0.5  when we plug in the numbers? Let's see.
   sin(0.615468169489965)                 =  0.577340847449826

   0.3 sin(0.615468169489965)             =  0.115468169489965

   0.615468169489965 - 0.115468169489965  =  0.500000000000000


Return to Midterm Practice Exam

You can email me by clicking this button:

  Use your own emailer     Use form