What could be going wrong with my Newton's method?

In summary, the conversation involved using Newton's method to approximate the intersection points of two graphs, f=x^2 and g=cosx. The person had trouble with their initial guesses, which were too far from the root. To ensure convergence, the distance between the guess and the root has to be less than 2\delta/M, where |f'(x)| \geq \delta > 0 and |f''(x)| \leq M for all x \epsilon [a,b] in the interval [a,b] being considered. It was also suggested to find when the function changes from positive to negative or vice versa to determine the interval for a more accurate guess.
  • #1
robierob
11
0
so I was helping my friend today and ran into a problem.

the problem was to use Newtons method to approx. the intersection points of two graphs.

f=x^2
g=cosx

so I subtracted f-g, found the derivative and pluged in some guesses.

Except all of my guesses just blew upwards in values instead of zooming in on a point. what's the deal?

Rob
 
Physics news on Phys.org
  • #2
Your guesses were too far from the root. To ensure convergence, the distance between your initial guess and the root has to be less than [itex] 2 \delta \over M [/itex] where

[tex]|f'(x)| \geq \delta > 0[/tex]

[tex]|f''(x)| \leq M[/tex]

for all [itex]x \epsilon [a,b][/itex] in the interval [itex][a,b][/itex] you're considering
 
Last edited:
  • #3
Your totally right. Thats one tight interval to make a guess for though. I was only about .2 away from a working guess. Thanks
 
  • #4
Hi Robierob,

When u compute f(x)-g(x), u should get x² - cos x on which u can apply Newton's method. Actually u can ensure that your guess is not far from the actual root by finding when your function changes from positive to negative or vice versa. There will be a root when the function changes sign provided that it is continuous for the interval where the root lies. For example, there is a root between x=a and x=b when a and b are consecutive and f(a) f(b) < 0. U can deduce the values of a and b by substitution and use a starting value between a and b for your approximation. That should help u arrive at your root quickly.
 

1. What is Newton's method?

Newton's method is an iterative mathematical technique used to find the roots of a given equation. It is also known as the Newton-Raphson method and is based on the idea of using the derivative of a function to approximate the roots.

2. How does Newton's method work?

Newton's method starts with an initial guess for the root of the equation and then uses the derivative of the function at that point to find the next approximation. This process is repeated until the desired level of accuracy is achieved.

3. What are the advantages of using Newton's method?

One advantage of Newton's method is that it can converge quickly to the root of an equation, especially when the initial guess is close to the actual root. It is also a relatively simple and straightforward method to implement.

4. Are there any limitations to using Newton's method?

Yes, Newton's method has some limitations. It may fail to converge if the initial guess is not close enough to the root or if the function has multiple roots. It also requires knowledge of the derivative of the function, which may not always be readily available.

5. In what fields is Newton's method commonly used?

Newton's method is commonly used in various fields of science and engineering, including physics, economics, and computer science. It is particularly useful for solving complex equations and optimization problems.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
14
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Differential Equations
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
Back
Top