public class ChangeOfVariable extends Object implements Integrator
| Constructor and Description |
|---|
ChangeOfVariable(SubstitutionRule change,
Integrator integrator)
Construct an integrator that uses change of variable to do integration.
|
| Modifier and Type | Method and Description |
|---|---|
UnivariateRealFunction |
fdx(UnivariateRealFunction f)
Get the integrand in the "transformed" integral, g(t) = f(x(t)) * x'(t).
|
double |
getPrecision()
Get the convergence threshold.
|
double |
integrate(UnivariateRealFunction f,
double a,
double b)
Integrate function f from a to b,
\[
\int_a^b\! f(x)\, dx
\]
|
public ChangeOfVariable(SubstitutionRule change, Integrator integrator)
change - the substitution formulaintegrator - the integrator.
If there is a singularity at an endpoint, the integrator should use an open formula such as Midpoint;
otherwise, use an integrator with a closed formula such as Trapezoidal.public double integrate(UnivariateRealFunction f, double a, double b)
Integratorintegrate in interface Integratorf - a univariate functiona - the lower limitb - the upper limitpublic UnivariateRealFunction fdx(UnivariateRealFunction f)
f - the integrand in the original integralpublic double getPrecision()
IntegratorIterativeIntegrator,
the integral is considered converged if the relative error of two successive sums is less than the threshold.getPrecision in interface IntegratorCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.