matrixDE - Maple Help

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 $X\text{'}\left(t\right)=A\left(t\right)X\left(t\right)+B\left(t\right)$ ; 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 $X'\left(t\right)=A\left(t\right)X\left(t\right)+B\left(t\right)$. 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].
 • The command returns a pair $\left[S\left(t\right),P\left(t\right)\right]$ with $S\left(t\right)$, which is an $n$ by $n$ matrix, and $P\left(t\right)$, which is an $n$ by $1$ vector. If you want the result expressed using Matrix instead, then use convert/Matrix on S(t).
 A particular solution of the system can be then written in the form $F\left(t\right)=S\left(t\right)\mathrm{C0}+P\left(t\right)$ where $\mathrm{C0}$ is $n$ by $1$ and $F\left(0\right)=\mathrm{C0}+P\left(0\right)$. If B is zero then P will also be zero.
 • If a system is expressed in terms of equations, dsolve can be used instead.

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$

Nonconstant homogeneous system

 > $A≔\mathrm{Matrix}\left(2,2,\left[1,{t}^{2},t,1\right]\right)$
 ${A}{≔}\left[\begin{array}{cc}{1}& {{t}}^{{2}}\\ {t}& {1}\end{array}\right]$ (1)
 > $\mathrm{sol}≔\mathrm{matrixDE}\left(A,t\right)$
 ${\mathrm{sol}}{≔}\left[\left[\begin{array}{cc}{{ⅇ}}^{{t}}{}{{t}}^{{3}}{{2}}}{}{\mathrm{BesselI}}{}\left(\frac{{3}}{{5}}{,}\frac{{2}{}{{t}}^{{5}}{{2}}}}{{5}}\right)& {{ⅇ}}^{{t}}{}{{t}}^{{3}}{{2}}}{}{\mathrm{BesselK}}{}\left(\frac{{3}}{{5}}{,}\frac{{2}{}{{t}}^{{5}}{{2}}}}{{5}}\right)\\ {{ⅇ}}^{{t}}{}{\mathrm{BesselI}}{}\left({-}\frac{{2}}{{5}}{,}\frac{{2}{}{{t}}^{{5}}{{2}}}}{{5}}\right){}{t}& {-}{{ⅇ}}^{{t}}{}{\mathrm{BesselK}}{}\left(\frac{{2}}{{5}}{,}\frac{{2}{}{{t}}^{{5}}{{2}}}}{{5}}\right){}{t}\end{array}\right]{,}\left[\begin{array}{cc}{0}& {0}\end{array}\right]\right]$ (2)

Matrix of arbitrary coefficients

 > $C≔\mathrm{Matrix}\left(2,1\right):$

Verification of solution

 > $F≔\mathrm{evalm}\left(\mathrm{sol}\left[1\right]\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&*\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}C+\mathrm{sol}\left[2\right]\right):$$\mathrm{rh}≔\mathrm{evalm}\left(A\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&*\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}F\right):$
 > $\mathrm{simplify}\left(\mathrm{normal}\left(\mathrm{diff}\left(F\left[1,1\right],t\right)-\mathrm{rh}\left[1,1\right]\right),\mathrm{symbolic}\right)$
 ${0}$ (3)
 > $\mathrm{simplify}\left(\mathrm{normal}\left(\mathrm{diff}\left(F\left[2,1\right],t\right)-\mathrm{rh}\left[2,1\right]\right),\mathrm{symbolic}\right)$
 ${0}$ (4)

Nonhomogeneous system of two variables with constant coefficients

 > $A≔\mathrm{Matrix}\left(2,2,\left[1,1,0,1\right]\right);$$B≔\mathrm{Matrix}\left(2,1,\left[{t}^{k},{t}^{l}\right]\right)$
 ${A}{≔}\left[\begin{array}{cc}{1}& {1}\\ {0}& {1}\end{array}\right]$
 ${B}{≔}\left[\begin{array}{c}{{t}}^{{k}}\\ {{t}}^{{l}}\end{array}\right]$ (5)
 > $\mathrm{sol}≔\mathrm{matrixDE}\left(A,B,t\right)$
 ${\mathrm{sol}}{≔}\left[\left[\begin{array}{cc}{{ⅇ}}^{{t}}& {{ⅇ}}^{{t}}{}{t}\\ {0}& {{ⅇ}}^{{t}}\end{array}\right]{,}\left[\begin{array}{cc}\frac{{-}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{l}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{k}{}{l}{+}{k}{}{{t}}^{\frac{{l}}{{2}}{+}{1}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{{ⅇ}}^{\frac{{t}}{{2}}}{+}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{k}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{k}}{{2}}{,}\frac{{k}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{l}{-}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{l}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{k}{-}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{l}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{l}{+}{{t}}^{{l}{+}{1}}{}{k}{}{l}{+}{{t}}^{\frac{{l}}{{2}}{+}{1}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{{ⅇ}}^{\frac{{t}}{{2}}}{+}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{k}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{k}}{{2}}{,}\frac{{k}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){-}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{l}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){+}{{t}}^{{l}{+}{1}}{}{k}{+}{{t}}^{{l}{+}{1}}{}{l}{+}{{t}}^{{l}{+}{1}}}{\left({k}{+}{1}\right){}\left({l}{+}{1}\right)}& \frac{{-}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{l}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{+}{1}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{{l}}^{{2}}{+}{{t}}^{\frac{{l}}{{2}}{+}{1}}{}{{ⅇ}}^{\frac{{t}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{+}{1}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{l}{+}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{k}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{k}}{{2}}{+}{1}{,}\frac{{k}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{l}{-}{2}{}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{l}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{+}{1}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{l}{+}{{t}}^{{l}{+}{1}}{}{{l}}^{{2}}{-}{{t}}^{{l}{+}{1}}{}{l}{}{t}{+}{{t}}^{\frac{{l}}{{2}}{+}{1}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){}{{ⅇ}}^{\frac{{t}}{{2}}}{+}{{t}}^{\frac{{l}}{{2}}{+}{1}}{}{{ⅇ}}^{\frac{{t}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{+}{1}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){+}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{k}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{k}}{{2}}{+}{1}{,}\frac{{k}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){-}{{ⅇ}}^{\frac{{t}}{{2}}}{}{{t}}^{\frac{{l}}{{2}}}{}{\mathrm{WhittakerM}}{}\left(\frac{{l}}{{2}}{+}{1}{,}\frac{{l}}{{2}}{+}\frac{{1}}{{2}}{,}{t}\right){-}{{t}}^{{k}}{}{l}{}{t}{+}{2}{}{{t}}^{{l}{+}{1}}{}{l}{-}{{t}}^{{l}{+}{1}}{}{t}{-}{{t}}^{{k}}{}{t}{+}{{t}}^{{l}{+}{1}}}{\left({l}{+}{1}\right){}{t}}\end{array}\right]\right]$ (6)

Verification of solution

 > $F≔\mathrm{evalm}\left(\mathrm{sol}\left[1\right]\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&*\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}C+\mathrm{sol}\left[2\right]\right):$$\mathrm{rh}≔\mathrm{evalm}\left(A\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&*\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}F+B\right):$
 > $\mathrm{simplify}\left(\mathrm{normal}\left(\mathrm{diff}\left(F\left[1,1\right],t\right)-\mathrm{rh}\left[1,1\right]\right),\mathrm{symbolic}\right)$
 ${0}$ (7)
 > $\mathrm{simplify}\left(\mathrm{normal}\left(\mathrm{diff}\left(F\left[2,1\right],t\right)-\mathrm{rh}\left[2,1\right]\right),\mathrm{symbolic}\right)$
 ${0}$ (8)

Nonconstant homogeneous system with unknown coefficients

 > $A≔\mathrm{Matrix}\left(2,2,\left[1,0,1,f\left(t\right)\right]\right)$
 ${A}{≔}\left[\begin{array}{cc}{1}& {0}\\ {1}& {f}{}\left({t}\right)\end{array}\right]$ (9)
 > $\mathrm{sol}≔\mathrm{matrixDE}\left(A,t\right)$
 ${\mathrm{sol}}{≔}\left[\left[\begin{array}{c}{-}{f}{}\left({t}\right){}{\mathrm{DESol}}{}\left(\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right){-}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right)\right){}{f}{}\left({t}\right){-}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right){-}{\mathrm{_Y}}{}\left({t}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right)\right){+}{f}{}\left({t}\right){}{\mathrm{_Y}}{}\left({t}\right)\right\}{,}\left\{{\mathrm{_Y}}{}\left({t}\right)\right\}\right){+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{DESol}}{}\left(\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right){-}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right)\right){}{f}{}\left({t}\right){-}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right){-}{\mathrm{_Y}}{}\left({t}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right)\right){+}{f}{}\left({t}\right){}{\mathrm{_Y}}{}\left({t}\right)\right\}{,}\left\{{\mathrm{_Y}}{}\left({t}\right)\right\}\right)\\ {\mathrm{DESol}}{}\left(\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right){-}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right)\right){}{f}{}\left({t}\right){-}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_Y}}{}\left({t}\right){-}{\mathrm{_Y}}{}\left({t}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right)\right){+}{f}{}\left({t}\right){}{\mathrm{_Y}}{}\left({t}\right)\right\}{,}\left\{{\mathrm{_Y}}{}\left({t}\right)\right\}\right)\end{array}\right]{,}\left[\begin{array}{cc}{0}& {0}\end{array}\right]\right]$ (10)

General nonhomogeneous system of two variables with constant coefficients

 > $A≔\mathrm{Matrix}\left(2,2,\left[a,b,c,d\right]\right)$
 ${A}{≔}\left[\begin{array}{cc}{a}& {b}\\ {c}& {d}\end{array}\right]$ (11)
 > $B≔\mathrm{Matrix}\left(2,1,\left[f\left(t\right),g\left(t\right)\right]\right)$
 ${B}{≔}\left[\begin{array}{c}{f}{}\left({t}\right)\\ {g}{}\left({t}\right)\end{array}\right]$ (12)
 > $\mathrm{sol}≔\mathrm{matrixDE}\left(A,B,t\right)$
 ${\mathrm{sol}}{≔}\left[\left[\begin{array}{cc}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}& {{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\\ {-}\frac{{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}\left({-}{d}{+}{a}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right)}{{2}{}{b}}& \frac{{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}\left({d}{-}{a}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right)}{{2}{}{b}}\end{array}\right]{,}\left[\begin{array}{cc}\frac{\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{{-}\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{-}\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}}{\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}}& {-}\frac{{2}{}{{ⅇ}}^{\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{g}{}\left({t}\right){}{b}{-}{2}{}{{ⅇ}}^{\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{f}{}\left({t}\right){}{d}{-}{2}{}{{ⅇ}}^{{-}\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{g}{}\left({t}\right){}{b}{+}{2}{}{{ⅇ}}^{{-}\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{f}{}\left({t}\right){}{d}{+}{2}{}{{ⅇ}}^{\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right)\right){-}{2}{}{{ⅇ}}^{{-}\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right)\right){-}\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{{-}\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}{+}\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{{-}\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{a}{-}\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{{-}\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{d}{-}\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}{-}\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{a}{+}\left({\int }\left({-}{f}{}\left({t}\right){}{d}{+}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({t}\right){+}{b}{}{g}{}\left({t}\right)\right){}{{ⅇ}}^{\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right){}{{ⅇ}}^{{-}\frac{\left({-}{a}{-}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{}{d}{+}{2}{}{f}{}\left({t}\right){}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}}{{2}{}{b}{}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}}\end{array}\right]\right]$ (13)
 > $\mathrm{sol}≔\mathrm{matrixDE}\left(A,t,\mathrm{method}=\mathrm{matrixexp}\right)$
 ${\mathrm{sol}}{≔}\left[\left[\begin{array}{cc}\frac{\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}{}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}{+}{a}{}{{ⅇ}}^{\frac{\left({a}{+}{d}{+}\sqrt{{{a}}^{{2}}{-}{2}{}{a}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2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}\right){}{t}}{{2}}}}{{2}{}\sqrt{{{a}}^{{2}}{-}{2}{}{a}{}{d}{+}{4}{}{b}{}{c}{+}{{d}}^{{2}}}}\end{array}\right]{,}\left[\begin{array}{cc}{0}& {0}\end{array}\right]\right]$ (14)

Finding a polynomial solution

 > $M≔\mathrm{Matrix}\left(6,6,\left[0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,2,2x,0,0,1,0,{x}^{2},0,2x,0,0,1,0,{x}^{2},-2,0,0,0\right]\right)$
 ${M}{≔}\left[\begin{array}{cccccc}{0}& {1}& {0}& {0}& {0}& {0}\\ {0}& {0}& {1}& {1}& {0}& {0}\\ {0}& {0}& {0}& {0}& {1}& {0}\\ {2}& {2}{}{x}& {0}& {0}& {1}& {0}\\ {{x}}^{{2}}& {0}& {2}{}{x}& {0}& {0}& {1}\\ {0}& {{x}}^{{2}}& {-2}& {0}& {0}& {0}\end{array}\right]$ (15)
 > $\mathrm{sol}≔\mathrm{matrixDE}\left(M,x,\mathrm{solution}=\mathrm{polynomial}\right)$
 ${\mathrm{sol}}{≔}\left[\left[\begin{array}{cccccc}{0}& {1}& {x}& {0}& {0}& {0}\\ {0}& {0}& {1}& {0}& {0}& {0}\\ {1}& {-}{x}& {-}{{x}}^{{2}}& {0}& {0}& {0}\\ {-1}& {x}& {{x}}^{{2}}& {0}& {0}& {0}\\ {0}& {-1}& {-}{2}{}{x}& {0}& {0}& {0}\\ {-}{2}{}{x}& {{x}}^{{2}}& {{x}}^{{3}}{-}{2}& {0}& {0}& {0}\end{array}\right]{,}\left[\begin{array}{cccccc}{0}& {0}& {0}& {0}& {0}& {0}\end{array}\right]\right]$ (16)