Newton Function

public function Newton(f, df, x0, err_x, err_f, max_iter) result(x)

Solves the scalar non-linear equation: using Newton's method.

Arguments

Type IntentOptional Attributes Name
public function f(x) result(y)

function defining the non-linear equation

Arguments
Type IntentOptional Attributes Name
real, intent(in) :: x

independent variable

Return Value real

dependent variable

public function df(x) result(y)

derivative of function

Arguments
Type IntentOptional Attributes Name
real, intent(in) :: x

independent variable

Return Value real

dependent variable

real, intent(in) :: x0

initial aproximation to the solution

real, intent(in) :: err_x

admisible error in the solution

real, intent(in) :: err_f

admisible error in the equation

integer, intent(in) :: max_iter

maximum number of iterations

Return Value real

numerical aproximation to the solution


Called by

proc~~newton~~CalledByGraph proc~newton Newton program~test_non_linear_solvers test_non_linear_solvers program~test_non_linear_solvers->proc~newton