Newton Raphson’s method
Mostrar comentarios más antiguos
Write down the Matlab /C ++ routine for Newton Raphson’s method for the following problems
cos(x) + 2 sin(x) + x^2, for initial guess as 0
1 comentario
Aslam Ali
el 6 de Ag. de 2020
Respuestas (1)
Alan Stevens
el 6 de Ag. de 2020
0 votos
If we set f(x) = cos(x) + 2sin(x) + x^2, then the question is asking for the value of x that makes f(x) = 0. Newton-Raphson is an iterative process that proceeds as follows:
Starting with an intial guess, x1, for x (here you are told to set x1 = 0) find the n+1'th iteration vaue from the n'th iteration value from:
x(n+1) = x(n) - f(x(n))/f`(x(n)) where f`(x) is df/dx. Here: f`(x) = -sin(x) + 2cos(x) + 2x
I hope that helps.
1 comentario
Aslam Ali
el 6 de Ag. de 2020
Categorías
Más información sobre Newton-Raphson Method en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!