Version:

Last Modified: January 12, 2018

Solves an *n*^{th} order, homogeneous linear differential equation with solutions in numeric form.

Vector of coefficients of the different derivatives of a function *x*(*t*), starting with the coefficient of the lowest order term. The node assumes the coefficient of the highest order derivative to be equal to 1.

Vector of the initial values of the variables.

The components of **initial values** correspond to the components of **x**.

Start time for solving the differential equations.

**Default: **0

End time for solving the differential equations.

**Default: **1

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

Interval, in seconds, between the times at which this node evaluates the model and updates the model output.

**Default: **0.1

Points of time at which the node solves the differential equations. The method yields equidistant time steps between **start time** and **end time**.

Values of the variables over time. Each row of **x** contains the values evaluated at a particular time and each column contains a history of a particular value over time.

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

Consider the *n*-order linear homogeneous differential equation:

${x}^{\left(n\right)}+{a}_{n-1}{x}^{(n-1)}+\dots +{a}_{1}{x}^{\left(1\right)}+{a}_{0}x=0$

with the following initial conditions:

$x\left(0\right)={x}_{00}\phantom{\rule{0ex}{0ex}}{x}^{\left(1\right)}\left(0\right)={x}_{10}\phantom{\rule{0ex}{0ex}}\vdots \phantom{\rule{0ex}{0ex}}{x}^{(n-1)}\left(0\right)={x}_{(n-1)0}$

where

*a*is the constant coefficient of the differential equation*n*is the highest order of the differential equation*0*is the start time of the ODE solver.*x*_{00}represents the value of*x*(*t*) when*t*=0.*x*_{(n-1)0}represents the (*n*-1)^{th}derivative of*x*(*t*) when*t*= 0.

To solve the differential equation, let $x={e}^{\lambda t}$, leading to:

${\lambda}^{n}+{a}_{n-1}{\lambda}^{n-1}+\dots +{a}_{1}\lambda +{a}_{0}=0$

The
*n* zeros of the above equation determine the structure of the solution of the ODE. If we have
*n* distinct complex zeros
${\lambda}_{1},\dots {,\lambda}_{n}$, the general solution of the
*n*-order differential equation can be expressed by

$x\left(t\right)={\beta}_{1}{e}^{{\lambda}_{1}t}+\dots +{\beta}_{n}{e}^{{\lambda}_{n}t}$

where
${\beta}_{1},\dots ,{\beta}_{n}$ are arbitrary constants and can be determined by the initial condition (*t* = 0).

When *t* = 0,

$x\left(0\right)={\beta}_{1}+\dots +{\beta}_{n}\phantom{\rule{0ex}{0ex}}{x}^{\left(1\right)}\left(0\right)={\beta}_{1}{\lambda}_{1}+\dots +{\beta}_{n}{\lambda}_{n}\phantom{\rule{0ex}{0ex}}\vdots \phantom{\rule{0ex}{0ex}}{x}^{(n-1)}\left(0\right)={\beta}_{1}{{\lambda}_{1}}^{n-1}+\dots +{\beta}_{n}{{\lambda}_{n}}^{n-1}$

To solve the differential equation *x*'' - 3*x*' + 2*x* = 0 with the initial conditions of *x*(0) = 2 and *x*'(0) = 3, enter **A** = [2, -3] and **initial values** = [2, 3].

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application