Class 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].
    See Also:
    Wikipedia: Ordinary differential equation
    • 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 - y0
        x0 - 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 - y0
        x0 - the start point of the integrating interval [x0, x1]
        x1 - the end point of the integrating interval [x0, x1]
    • 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