Approximates the integral: using the trapezoidal rule on a linearly spaced set of points.
| Type | Intent | Optional | Attributes | Name | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public function f(x) result(y)Function to be integrated Arguments
Return Value realdependent 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. |
||||||||||||||||
Numerical approximation to the integral