Class ODE1stOrder
- java.lang.Object
-
- dev.nm.analysis.differentialequation.ode.ivp.problem.ODE1stOrder
-
- Direct Known Subclasses:
ODE1stOrderWith2ndDerivative
public class ODE1stOrder extends Object
A first order ordinary differential equation (ODE) initial value problem (IVP) takes the following form. \[ y' = f(x, y) \\ y(x_0) = y_0 \] where y0 is known, and the solution of the problem is y(x) for the integrating interval [x0, x1].
-
-
Constructor Summary
Constructors Constructor Description ODE1stOrder(DerivativeFunction dy, Vector y0, double x0, double x1)
Constructs a first order ODE with the given vector-valued function and its initial values.ODE1stOrder(ODE ode)
Reduces a high order ODE to a system of first order ODEs.ODE1stOrder(RealScalarFunction[] Y, double[] y0, double x0, double x1)
Constructs a system of first order ODEs {Yi} with their initial values {yi0}.ODE1stOrder(RealVectorFunction F, Vector y0, double x0, double x1)
Constructs a first order ODE with the given vector-valued function and its initial values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DerivativeFunction
convertToDerivativeFunction(RealVectorFunction F, int dimension)
Converts the given vector function to a first order derivative function.int
dimension()
Gets the dimension of y.DerivativeFunction
dy()
Gets the first order derivative function.double
x0()
Gets the start point of the integrating interval [x0, x1].double
x1()
Gets the end point of the integrating interval [x0, x1].Vector
y0()
Gets the initial value of y, that is, y0.
-
-
-
Constructor Detail
-
ODE1stOrder
public ODE1stOrder(DerivativeFunction dy, Vector y0, double x0, double x1)
Constructs a first order ODE with the given vector-valued function and its initial values.- Parameters:
dy
- the first order derivative function y' = F(x, y)y0
- y0x0
- the start point of the integrating interval [x0, x1]x1
- the end point of the integrating interval [x0, x1]
-
ODE1stOrder
public ODE1stOrder(RealScalarFunction[] Y, double[] y0, double x0, double x1)
Constructs a system of first order ODEs {Yi} with their initial values {yi0}. \[ y_1' = Y_1(x, y_1, y_2, y_3, ...), y_1(0) = y_{10}\\ y_2' = Y_2(x, y_1, y_2, y_3, ...), y_2(0) = y_{20}\\ y_3' = Y_3(x, y_1, y_2, y_3, ...), y_3(0) = y_{30}\\ ... \]- Parameters:
Y
- the differentials, {Yi}y0
- the initial values, {yi(0)}x0
- the start point of the integrating interval [x0, x1]x1
- the end point of the integrating interval [x0, x1]
-
ODE1stOrder
public ODE1stOrder(RealVectorFunction F, Vector y0, double x0, double x1)
Constructs a first order ODE with the given vector-valued function and its initial values.- Parameters:
F
- F(x, y) = y'y0
- y0x0
- the start point of the integrating interval [x0, x1]x1
- the end point of the integrating interval [x0, x1]
-
ODE1stOrder
public ODE1stOrder(ODE ode)
Reduces a high order ODE to a system of first order ODEs.- Parameters:
ode
- the high order ODE- See Also:
- Wikipedia: Reduction to a first order system
-
-
Method Detail
-
convertToDerivativeFunction
public static DerivativeFunction convertToDerivativeFunction(RealVectorFunction F, int dimension)
Converts the given vector function to a first order derivative function.- Parameters:
F
- the vector-valued function F(x, y1, ..., yn)dimension
- the dimension of the derivative function- Returns:
- the converted first order derivative function
-
dy
public DerivativeFunction dy()
Gets the first order derivative function.- Returns:
- the first order derivative function
-
dimension
public int dimension()
Gets the dimension of y.- Returns:
- the dimension of y
-
y0
public Vector y0()
Gets the initial value of y, that is, y0.- Returns:
- y0
-
x0
public double x0()
Gets the start point of the integrating interval [x0, x1].- Returns:
- x0
-
x1
public double x1()
Gets the end point of the integrating interval [x0, x1].- Returns:
- x1
-
-