Newton_Raphson: Function To Compute One Dimensional Root(or Zero)

Description Usage Arguments Examples

View source: R/Newton_Raphson.R

Description

This function computes the roots or zero of a real-valued function using Newton Raphson method.

Usage

1
Newton_Raphson(func, x0 = 1, epsilon = 1e-07, n = 300)

Arguments

func

the function for which the root is computed.

x0

*optional* an initial value

n

*optional* the number of iteration. Default value: 300

eps

*optional* the precision. Default value: 1/10000000

Examples

1
2
target_func1 <- function(x) {x^3 + 3*x^2 + 8*x - 10}
Newton_Raphson(func = target_func1, x0 = 10)

wasabi1989/NewtonRaphson documentation built on Nov. 14, 2019, 12:18 a.m.