DEtools[matrixDE] - find solutions of a linear system of ODEs in matrix form
|
Calling Sequence
|
|
matrixDE(A, B, t, method=matrixexp)
matrixDE(A, B, t, solution=solntype)
|
|
Parameters
|
|
A, B
|
-
|
coefficients of a system ; if B not specified, then assumed to be a zero vector
|
t
|
-
|
independent variable of the system
|
method=matrixexp
|
-
|
(optional) matrix exponentials
|
solution=solntype
|
-
|
(optional) where solution=polynomial or solution=rational
|
|
|
|
|
Description
|
|
•
|
The matrixDE command solves a system of linear ODEs of the form . If B is not specified then it is assumed to be the zero vector.
|
•
|
An option of the form method = matrixexp can be specified to use matrix exponentials (in the case of constant coefficients).
|
•
|
An option of the form solution = polynomial or solution = rational can be specified to search for polynomial or rational solution. In this case, the function invokes LinearFunctionalSystems[PolynomialSolution] or LinearFunctionalSystems[RationalSolution].
|
•
|
If a system is expressed in terms of equations, dsolve can be used instead.
|
|
|
Examples
|
|
>
|
|
Nonconstant homogeneous system
>
|
|
| (1) |
>
|
|
| (2) |
Matrix of arbitrary coefficients
>
|
|
Verification of solution
>
|
![F := evalm(`&*`(sol[1], C)+sol[2])](/support/helpjp/helpview.aspx?si=8695/file01350/math177.png)
|
>
|
|
| (3) |
>
|
|
| (4) |
Nonhomogeneous system of two variables with constant coefficients
>
|
![A := Matrix(2, 2, [1, 1, 0, 1])](/support/helpjp/helpview.aspx?si=8695/file01350/math198.png)
|
| (5) |
>
|
|

| (6) |
Verification of solution
>
|
![F := evalm(`&*`(sol[1], C)+sol[2])](/support/helpjp/helpview.aspx?si=8695/file01350/math218.png)
|
>
|
|
| (7) |
>
|
|
| (8) |
Nonconstant homogeneous system with unknown coefficients
>
|
|
| (9) |
>
|
|
![sol := [matrix([[-f(t)*DESol({diff(_Y(t), `$`(t, 2))-(diff(_Y(t), t))*f(t)-(diff(_Y(t), t))-_Y(t)*(diff(f(t), t))+_Y(t)*f(t)}, {_Y(t)})+diff(DESol({diff(_Y(t), `$`(t, 2))-(diff(_Y(t), t))*f(t)-(diff(_Y(t), t))-_Y(t)*(diff(f(t), t))+_Y(t)*f(t)}, {_Y(t)}), t)], [DESol({diff(_Y(t), `$`(t, 2))-(diff(_Y(t), t))*f(t)-(diff(_Y(t), t))-_Y(t)*(diff(f(t), t))+_Y(t)*f(t)}, {_Y(t)})]]), vector([0, 0])]](/support/helpjp/helpview.aspx?si=8695/file01350/math249.png)
| (10) |
General nonhomogeneous system of two variables with constant coefficients
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|

| (13) |
>
|
|

| (14) |
Finding a polynomial solution
>
|
|
| (15) |
>
|
|
| (16) |
|
|