Approximates the integral: using some integration method 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. |
||||||||||||||||
| character(len=*) | :: | method |
Method of integration to be used, can be either "Trapezoidal" or "Simpson" |
|||||||||||||||||
Numerical approximation to the integral