my.newt2.0: The Newton-Raphson Algorithm Function

Description Usage Arguments Value Examples

View source: R/my.newt2.0.R

Description

The Newton-Raphson Algorithm Function

Usage

1
my.newt2.0(x0, f, delta = 1e-04, epsilon = 1e-12, range = c(0, 2 * pi))

Arguments

x0

a numeric value for initializing x, the angle of rotation (in radians)

f

a function that takes one input, x, and plugs it into the equation for s12t

delta

a numeric value for the increment in our derivative approximation (h)

epsilon

a numeric value for how close our root approximation is to zero

range

a vector of two numeric values, the range of x in radians

Value

a plot of s12t vs x with the Newton-Raphson approximations shown and a list of numeric values, the true roots, where s12t=0.

Examples

1
my.newt2.0(x0=1, delta=0.000001, f=function(x) x^2, range=c(0, pi/2))

yut4916/MATH5793YUT documentation built on Dec. 23, 2021, 8:21 p.m.