Module for finite difference calculus
Approximate the derivative of a function using finite differences
Returns the derivative of y with respect to x at point x(i) using a second order finite difference scheme x: array of x values y: array of y values i: index of the point at which the derivative is computed (must be between 1 and size(x)) returns: the derivative of y with respect to x at point x(i)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | y(:) | |||
real(kind=real64), | intent(in) | :: | x(:) | |||
integer, | intent(in) | :: | i |
Returns the derivative of y with respect to x at all points using a second order finite difference scheme x: array of x values y: array of y values returns: the derivative of y with respect to x at all points
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | y(:) | |||
real(kind=real64), | intent(in) | :: | x(:) |
Approximate the second derivative of a function using finite differences
Returns the second derivative of y with respect to x at point x(i) using a second order finite difference scheme x: array of x values y: array of y values i: index of the point at which the derivative is computed (must be between 1 and size(x)) returns: the second derivative of y with respect to x at point x(i)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | y(:) | |||
real(kind=real64), | intent(in) | :: | x(:) | |||
integer, | intent(in) | :: | i |
Returns the second derivative of y with respect to x at all points using a second order finite difference scheme x: array of x values y: array of y values returns: the second derivative of y with respect to x at all points
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | y(:) | |||
real(kind=real64), | intent(in) | :: | x(:) |
Returns the integral of f with respect to x using integrated Taylor expansion f: array of f values x: array of x values returns: the integral of f with respect to x
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | f(:) | |||
real(kind=real64), | intent(in) | :: | x(:) |
Returns the integral of f with respect to x using integrated Taylor expansion f: array of f values x: array of x values returns: the integral of f with respect to x
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | f(:) | |||
real(kind=real64), | intent(in) | :: | x(:) |