Description Usage Arguments Value Author(s) References Examples
Finds roots of univariate functions by modifying the usual Newton-Raphson method by decreasing the step sizes when necessary.
1 | damped.newton(fun, derf, x0, eps, maxit = 20, damp = seq(0, 40),silent=TRUE)
|
fun |
a function for which the root is searched. |
derf |
a function which is the first derivative of the function to be solved. |
x0 |
a numeric value to be used to start the algorithm. |
eps |
a numeric value to be considered as the tolerance for convergence of the algorithm. |
maxit |
a numeric value which denotes maximum number of iterations to be consumed. |
damp |
a vector beginning from zero and increasing by one unit to decrease the step sizes. |
silent |
a logical statement which decides whether the iterations should be printed. |
Returns a numeric result of the root.
Ozgur Asar, Ozlem Ilk
Bose, K. S. (2008). Numeric Computing in Fortran. Alpha Science.
Conte, S. D., de Boor, C. (1980). Elementary Numerical Analysis: An Algorithmic Approach, third edition. New York: McGraw-Hill Publications.
Ilk, O. (2011). R Yazilimina Giris [Introduction to R Language]. ODTU Yayincilik [METU Press].
1 2 3 |
Iteration: 1 ; Result= 1.318883
Iteration: 2 ; Result= 0.8868571
Iteration: 3 ; Result= 0.6656977
Iteration: 4 ; Result= 0.6085951
Iteration: 5 ; Result= 0.6054324
Iteration: 6 ; Result= 0.6054234
Solution: 0.6054234
[1] 0.6054234
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.