# ODE Linear (System » Symbolic) (G Dataflow)

Solves an n-dimension linear system of differential equations with solutions in symbolic form.

## A

An n-by-n matrix that describes the linear system.

Requirements for Input Matrices

This node works properly for almost all cases of real matrices that have repeated eigenvalues, complex conjugate eigenvalues, and so on. The exception is the case of a singular eigenvector matrix, that is, a matrix in which the eigenvectors do not span the whole space. If the eigenvector matrix is singular, this node returns an error of -23016.

## initial values

Vector of the initial values of the variables.

## error in

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.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## formula

Solution of the linear system. The vector elements in the solution are separated by carriage return.

## error out

Error information.

The node produces this output 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.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

## Algorithm for Solving a System of Linear Differential Equation

Linear systems can be described by

$\frac{dx\left(t\right)}{dt}=Ax\left(t\right)\phantom{\rule{0ex}{0ex}}x\left(0\right)={x}_{0}$

where

• x(t) is a vector
• A is an n-by-n real matrix.

This node solves the linear system by the determination of the eigenvalues and eigenvectors of A. Let S be the set of all eigenvectors spanning the whole n-dimensional space. The transformation y(t) = Sx(t) yields:

$\frac{dy\left(t\right)}{dt}=SA{S}^{-1}y\left(t\right)\phantom{\rule{0ex}{0ex}}y\left(0\right)=S{x}_{0}$

The matrix SAS-1 has diagonal form. The solution x(t) can be determined by back-transformation: x(t) = S-1y(t).

To solve the following system of linear differential equations:

$\left[\begin{array}{c}\frac{d{x}_{1}\left(t\right)}{dt}\\ \frac{d{x}_{2}\left(t\right)}{dt}\\ \frac{d{x}_{3}\left(t\right)}{dt}\\ \frac{d{x}_{4}\left(t\right)}{dt}\end{array}\right]=\left[\begin{array}{cccc}-7& -6& 4& -1\\ -6& 2& 1& -2\\ 4& 1& 0& 2\\ -1& -2& 2& -7\end{array}\right]\left[\begin{array}{c}{\begin{array}{c}x\end{array}}_{1}\left(t\right)\\ {\begin{array}{c}x\end{array}}_{2}\left(t\right)\\ {\begin{array}{c}x\end{array}}_{3}\left(t\right)\\ {\begin{array}{c}x\end{array}}_{4}\left(t\right)\end{array}\right]$

with x1(0) = 1, x2(0) = 2, x3(0) = 3, and x4(0) = 4.

Enter the following values:

• A: [-7, -6, 4, 1; -6, 2, 1, -2; 4, 1, 0, 2; -1, -2, 2, -7]
• initial values: [1, 2, 3, 4]
• start time: 0.00
• end time: 1.00

The solution of this equation is as follows:

$+1.62{e}^{\left(-12.46t\right)}-1.28{e}^{\left(-6.30t\right)}+0.63{e}^{\left(1.34t\right)}+0.04{e}^{\left(5.42t\right)}\phantom{\rule{0ex}{0ex}}+0.84{e}^{\left(-12.46t\right)}-0.29{e}^{\left(-6.30t\right)}+1.51{e}^{\left(1.34t\right)}+0.06{e}^{\left(5.42t\right)}\phantom{\rule{0ex}{0ex}}-0.73{e}^{\left(-12.46t\right)}+0.01{e}^{\left(-6.30t\right)}+3.69{e}^{\left(1.34t\right)}+0.02{e}^{\left(5.42t\right)}\phantom{\rule{0ex}{0ex}}+0.87{e}^{\left(-12.46t\right)}+2.67{e}^{\left(-6.30t\right)}+0.45{e}^{\left(1.34t\right)}+0.01{e}^{\left(5.42t\right)}$

The following illustration shows the four components of the solution of the linear differential equation:

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices

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