module for computing integrals
Aproximates the integral of the function given a set of points: using the trapezoidal rule. The points do not need to be linearly spaced along the integration domain.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | x(0:) |
Array containing the abscissas of the points |
||
| real, | intent(in) | :: | y(0:) |
Array containing the ordinates of the points |
Numerical aproximation to the integral
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
Approximates the integral: using Simpson's 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
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