quad_trapz Function

public function quad_trapz(f, a, b, h_in) result(Int)

Approximates the integral: using the trapezoidal rule on a linearly spaced set of points.

Arguments

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

Function to be integrated

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

independent variable

Return Value real

dependent variable

real, intent(in) :: a

Lower limit of integration

real, intent(in) :: b

Upper limit of integration

real, intent(in) :: h_in

Approximated size of the intervals used by the trapezoidal rule.

Return Value real

Numerical approximation to the integral


Called by

proc~~quad_trapz~~CalledByGraph proc~quad_trapz quad_trapz proc~quad quad proc~quad->proc~quad_trapz program~test_integrals test_integrals program~test_integrals->proc~quad