Solve Point P Coordinates Using Newton's Method

physstudent1
Messages
267
Reaction score
1

Homework Statement




Find the coordinates to two decimal places of the point P in Figure 9 where the tangent line to y=cosx passes through the origin.

the image is the graph of y=cosx P intersects the graph at around pi.


Homework Equations





The Attempt at a Solution



I don't know how to attempt this, I just know I have to use Newton's method somehow I tired doing x-(f(x))/(f'(x)) but then I have a divide by zero error I'm not sure what to do.
 
Physics news on Phys.org
anyone?
 
Try a guess that isn't x=0.
 
Last edited:
I guessed 2pi/3 and Newton's method converged onto 1.5708 = x I'm not sure if this is correct
 
Sounds like you did Newton's method on the wrong function. Think more carefully about the function you wish to find the zero of. You are given two points: (0,0) and (P,cos(P)) and a slope -sin(P). The line is of the form f(X)=-sin(P)*x, and the curve is of the form y=cos(x), and you want the curves to meet at X=P. How can you turn this information into something solvable by Newton's Method?

Also, be careful about your initial guess. If you choose it badly, you will converge to the wrong zero. I'm not sure your current guess will find you the right P.
 
Last edited:
I second jhicks. What function are you attempting to apply Newton's method to?
 
would it work to try to solve it by doing

cos(x)+sin(x)x =0
for the function I try to use Newton's method for?
 
You have to make the tangent line pass through the origin. Applying Newton's method to y=cos(x) yields the point at which cos(x)=0, which is not what you want.
 
would 3pi/4 be a better guess for the zero on the graph they look lke they meet around the miniumum of the graph and one cycle takes 2pi so this would be around pi wouldn't it?
 
  • #10
physstudent1 said:
would it work to try to solve it by doing

cos(x)+sin(x)x =0
for the function I try to use Newton's method for?

That's correct, but it looks like you are guessing that this is the correct equation rather than deriving this.
 
  • #11
no its not a guess even though it may seem it I got it because the point I'm trying to find is where the two functions intersect which would be where they're equal cos(x)=-sin(p)x so then I put it into a form where I could find a zero cos(x)+sin(p)x then using information that jhick's supplied that I did not realize at the point of intersection P will = X
 
  • #12
physstudent1 said:
would 3pi/4 be a better guess for the zero on the graph they look lke they meet around the miniumum of the graph and one cycle takes 2pi so this would be around pi wouldn't it?

Does this initial guess converge to a value, and if so, does this value satisfy the original problem? If so, you have a solution.
 
  • #13
physstudent1 said:
no its not a guess even though it may seem it I got it because the point I'm trying to find is where the two functions intersect which would be where they're equal cos(x)=-sin(p)x so then I put it into a form where I could find a zero cos(x)+sin(p)x then using information that jhick's supplied that I did not realize at the point of intersection P will = X

So don't phrase it as a guess. This reasoning is good.
 
  • #14
sorry, didn't mean to so for Newton's method my setup is

cos(x)+sin(x)x-(cos(x)+sin(x)x)/(-sin(x)+cos(x)x+sin(x))
 
  • #15
If x_n is the nth estimate of x, then the next estimate by Newton's method is

x_{n+1} = x_n - f(x_n)/f'(x_n)

You're setup is equivalent to

x_{n+1} = f(x_n) - f(x_n)/f'(x_n)

which is not the same as Newton's method.
 
  • #16
ah i see my mistake now thanks I began with an initial guess of Pi and it stopped at around 2.7986
 
Back
Top