﻿RungeKutta45OdeSolver.Solve(Func<Double, DoubleVector, DoubleVector>, DoubleVector, DoubleVector) Method # RungeKutta45OdeSolverSolve(FuncDouble, DoubleVector, DoubleVector, DoubleVector, DoubleVector) Method

Solves the given initial value problem of ordinary differential equation of the form y' = f(t,y)

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4 Syntax
```public RungeKutta45OdeSolverSolution<DoubleMatrix> Solve(
Func<double, DoubleVector, DoubleVector> odeFunction,
DoubleVector timeSpan,
DoubleVector y0
)```

#### Parameters

odeFunction  FuncDouble, DoubleVector, DoubleVector
A delegate which evaluates the right hand side of the differential equations.
timeSpan  DoubleVector
A vector specifying the interval if integration [t0, tf]. The solver imposes intitial conditions at t0 and integrates from t0 to tf If the timeSpan vector contains two elements, the solver returns the solution evaluated at every integration step. If the timeSpan vector contains more than two points the solver returns the solution evaluated at the given points. The time values must be in order, either increasing or decreasing.
y0  DoubleVector
Initial value for problem. It is the value of the unknown function y at the initial time value timeSpan.

#### Return Value

RungeKutta45OdeSolverSolutionDoubleMatrix
The solution as a key-value pair. The Key value is a vector of time values, and the Value is a matrix of state values. The ith row of the Value matrix is the state corresponding to the ith time value in the Key vector. See Also