2.2.6 Problem 5 (iiI=i)

2.2.6.1 second order linear constant coeff
2.2.6.2 second order kovacic
2.2.6.3 SSolved using second order ode arccos transformation
2.2.6.4 Maple
2.2.6.5 Mathematica
2.2.6.6 Sympy

Internal problem ID [19690]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 4. Autonomous systems. Exercises at page 69
Problem number : 5 (iiI=i)
Date solved : Thursday, December 11, 2025 at 01:42:33 PM
CAS classification : [[_2nd_order, _missing_x]]

2.2.6.1 second order linear constant coeff

0.057 (sec)

\begin{align*} x^{\prime \prime }-4 x^{\prime }+5 x&=0 \\ \end{align*}
Entering second order linear constant coefficient ode solver

This is second order with constant coefficients homogeneous ODE. In standard form the ODE is

\[ A x''(t) + B x'(t) + C x(t) = 0 \]
Where in the above \(A=1, B=-4, C=5\). Let the solution be \(x=e^{\lambda t}\). Substituting this into the ODE gives
\[ \lambda ^{2} {\mathrm e}^{t \lambda }-4 \lambda \,{\mathrm e}^{t \lambda }+5 \,{\mathrm e}^{t \lambda } = 0 \tag {1} \]
Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda t}\) gives
\[ \lambda ^{2}-4 \lambda +5 = 0 \tag {2} \]
Equation (2) is the characteristic equation of the ODE. Its roots determine the general solution form.Using the quadratic formula
\[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \]
Substituting \(A=1, B=-4, C=5\) into the above gives
\begin{align*} \lambda _{1,2} &= \frac {4}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {-4^2 - (4) \left (1\right )\left (5\right )}\\ &= 2 \pm i \end{align*}

Hence

\begin{align*} \lambda _1 &= 2 + i\\ \lambda _2 &= 2 - i \end{align*}

Which simplifies to

\begin{align*} \lambda _1 &= 2+i \\ \lambda _2 &= 2-i \\ \end{align*}
Since roots are complex conjugate of each others, then let the roots be
\[ \lambda _{1,2} = \alpha \pm i \beta \]
Where \(\alpha =2\) and \(\beta =1\). Therefore the final solution, when using Euler relation, can be written as
\[ x = e^{\alpha t} \left ( c_1 \cos (\beta t) + c_2 \sin (\beta t) \right ) \]
Which becomes
\[ x = e^{2 t}\left (c_1 \cos \left (t \right )+c_2 \sin \left (t \right )\right ) \]

Summary of solutions found

\begin{align*} x &= {\mathrm e}^{2 t} \left (c_1 \cos \left (t \right )+c_2 \sin \left (t \right )\right ) \\ \end{align*}
Figure 2.56: Slope field \(x^{\prime \prime }-4 x^{\prime }+5 x = 0\)
2.2.6.2 second order kovacic

0.085 (sec)

\begin{align*} x^{\prime \prime }-4 x^{\prime }+5 x&=0 \\ \end{align*}
Entering kovacic solverWriting the ode as
\begin{align*} x^{\prime \prime }-4 x^{\prime }+5 x &= 0 \tag {1} \\ A x^{\prime \prime } + B x^{\prime } + C x &= 0 \tag {2} \end{align*}

Comparing (1) and (2) shows that

\begin{align*} A &= 1 \\ B &= -4\tag {3} \\ C &= 5 \end{align*}

Applying the Liouville transformation on the dependent variable gives

\begin{align*} z(t) &= x e^{\int \frac {B}{2 A} \,dt} \end{align*}

Then (2) becomes

\begin{align*} z''(t) = r z(t)\tag {4} \end{align*}

Where \(r\) is given by

\begin{align*} r &= \frac {s}{t}\tag {5} \\ &= \frac {2 A B' - 2 B A' + B^2 - 4 A C}{4 A^2} \end{align*}

Substituting the values of \(A,B,C\) from (3) in the above and simplifying gives

\begin{align*} r &= \frac {-1}{1}\tag {6} \end{align*}

Comparing the above to (5) shows that

\begin{align*} s &= -1\\ t &= 1 \end{align*}

Therefore eq. (4) becomes

\begin{align*} z''(t) &= -z \left (t \right ) \tag {7} \end{align*}

Equation (7) is now solved. After finding \(z(t)\) then \(x\) is found using the inverse transformation

\begin{align*} x &= z \left (t \right ) e^{-\int \frac {B}{2 A} \,dt} \end{align*}

The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases depending on the order of poles of \(r\) and the order of \(r\) at \(\infty \). The following table summarizes these cases.

Case

Allowed pole order for \(r\)

Allowed value for \(\mathcal {O}(\infty )\)

1

\(\left \{ 0,1,2,4,6,8,\cdots \right \} \)

\(\left \{ \cdots ,-6,-4,-2,0,2,3,4,5,6,\cdots \right \} \)

2

Need to have at least one pole that is either order \(2\) or odd order greater than \(2\). Any other pole order is allowed as long as the above condition is satisfied. Hence the following set of pole orders are all allowed. \(\{1,2\}\),\(\{1,3\}\),\(\{2\}\),\(\{3\}\),\(\{3,4\}\),\(\{1,2,5\}\).

no condition

3

\(\left \{ 1,2\right \} \)

\(\left \{ 2,3,4,5,6,7,\cdots \right \} \)

Table 2.14: Necessary conditions for each Kovacic case

The order of \(r\) at \(\infty \) is the degree of \(t\) minus the degree of \(s\). Therefore

\begin{align*} O\left (\infty \right ) &= \text {deg}(t) - \text {deg}(s) \\ &= 0 - 0 \\ &= 0 \end{align*}

There are no poles in \(r\). Therefore the set of poles \(\Gamma \) is empty. Since there is no odd order pole larger than \(2\) and the order at \(\infty \) is \(0\) then the necessary conditions for case one are met. Therefore

\begin{align*} L &= [1] \end{align*}

Since \(r = -1\) is not a function of \(t\), then there is no need run Kovacic algorithm to obtain a solution for transformed ode \(z''=r z\) as one solution is

\[ z_1(t) = \cos \left (t \right ) \]
Using the above, the solution for the original ode can now be found. The first solution to the original ode in \(x\) is found from
\begin{align*} x_1 &= z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,dt} \\ &= z_1 e^{ -\int \frac {1}{2} \frac {-4}{1} \,dt} \\ &= z_1 e^{2 t} \\ &= z_1 \left ({\mathrm e}^{2 t}\right ) \\ \end{align*}
Which simplifies to
\[ x_1 = {\mathrm e}^{2 t} \cos \left (t \right ) \]
The second solution \(x_2\) to the original ode is found using reduction of order
\[ x_2 = x_1 \int \frac { e^{\int -\frac {B}{A} \,dt}}{x_1^2} \,dt \]
Substituting gives
\begin{align*} x_2 &= x_1 \int \frac { e^{\int -\frac {-4}{1} \,dt}}{\left (x_1\right )^2} \,dt \\ &= x_1 \int \frac { e^{4 t}}{\left (x_1\right )^2} \,dt \\ &= x_1 \left (\tan \left (t \right )\right ) \\ \end{align*}
Therefore the solution is
\begin{align*} x &= c_1 x_1 + c_2 x_2 \\ &= c_1 \left ({\mathrm e}^{2 t} \cos \left (t \right )\right ) + c_2 \left ({\mathrm e}^{2 t} \cos \left (t \right )\left (\tan \left (t \right )\right )\right ) \\ \end{align*}

Summary of solutions found

\begin{align*} x &= c_1 \,{\mathrm e}^{2 t} \cos \left (t \right )+c_2 \,{\mathrm e}^{2 t} \sin \left (t \right ) \\ \end{align*}
Figure 2.57: Slope field \(x^{\prime \prime }-4 x^{\prime }+5 x = 0\)
2.2.6.3 SSolved using second order ode arccos transformation

3.650 (sec)

\begin{align*} x^{\prime \prime }-4 x^{\prime }+5 x&=0 \\ \end{align*}

Applying change of variable \(t = \arccos \left (\tau \right )\) to the above ode results in the following new ode

\[ -\left (\frac {d^{2}}{d \tau ^{2}}x \left (\tau \right )\right ) \tau ^{2}+4 \left (\frac {d}{d \tau }x \left (\tau \right )\right ) \sqrt {-\tau ^{2}+1}-\left (\frac {d}{d \tau }x \left (\tau \right )\right ) \tau +\frac {d^{2}}{d \tau ^{2}}x \left (\tau \right )+5 x \left (\tau \right ) = 0 \]
Which is now solved for \(x \left (\tau \right )\). Entering kovacic solverWriting the ode as
\begin{align*} \left (-\tau ^{2}+1\right ) \left (\frac {d^{2}}{d \tau ^{2}}x \left (\tau \right )\right )+\left (4 \sqrt {-\tau ^{2}+1}-\tau \right ) \left (\frac {d}{d \tau }x \left (\tau \right )\right )+5 x \left (\tau \right ) &= 0 \tag {1} \\ A \frac {d^{2}}{d \tau ^{2}}x \left (\tau \right ) + B \frac {d}{d \tau }x \left (\tau \right ) + C x \left (\tau \right ) &= 0 \tag {2} \end{align*}

Comparing (1) and (2) shows that

\begin{align*} A &= -\tau ^{2}+1 \\ B &= 4 \sqrt {-\tau ^{2}+1}-\tau \tag {3} \\ C &= 5 \end{align*}

Applying the Liouville transformation on the dependent variable gives

\begin{align*} z(\tau ) &= x \left (\tau \right ) e^{\int \frac {B}{2 A} \,d\tau } \end{align*}

Then (2) becomes

\begin{align*} z''(\tau ) = r z(\tau )\tag {4} \end{align*}

Where \(r\) is given by

\begin{align*} r &= \frac {s}{t}\tag {5} \\ &= \frac {2 A B' - 2 B A' + B^2 - 4 A C}{4 A^2} \end{align*}

Substituting the values of \(A,B,C\) from (3) in the above and simplifying gives

\begin{align*} r &= \frac {3 \tau ^{2}-6}{4 \left (\tau ^{2}-1\right )^{2}}\tag {6} \end{align*}

Comparing the above to (5) shows that

\begin{align*} s &= 3 \tau ^{2}-6\\ t &= 4 \left (\tau ^{2}-1\right )^{2} \end{align*}

Therefore eq. (4) becomes

\begin{align*} z''(\tau ) &= \left ( \frac {3 \tau ^{2}-6}{4 \left (\tau ^{2}-1\right )^{2}}\right ) z(\tau )\tag {7} \end{align*}

Equation (7) is now solved. After finding \(z(\tau )\) then \(x \left (\tau \right )\) is found using the inverse transformation

\begin{align*} x \left (\tau \right ) &= z \left (\tau \right ) e^{-\int \frac {B}{2 A} \,d\tau } \end{align*}

The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases depending on the order of poles of \(r\) and the order of \(r\) at \(\infty \). The following table summarizes these cases.

Case

Allowed pole order for \(r\)

Allowed value for \(\mathcal {O}(\infty )\)

1

\(\left \{ 0,1,2,4,6,8,\cdots \right \} \)

\(\left \{ \cdots ,-6,-4,-2,0,2,3,4,5,6,\cdots \right \} \)

2

Need to have at least one pole that is either order \(2\) or odd order greater than \(2\). Any other pole order is allowed as long as the above condition is satisfied. Hence the following set of pole orders are all allowed. \(\{1,2\}\),\(\{1,3\}\),\(\{2\}\),\(\{3\}\),\(\{3,4\}\),\(\{1,2,5\}\).

no condition

3

\(\left \{ 1,2\right \} \)

\(\left \{ 2,3,4,5,6,7,\cdots \right \} \)

Table 2.15: Necessary conditions for each Kovacic case

The order of \(r\) at \(\infty \) is the degree of \(t\) minus the degree of \(s\). Therefore

\begin{align*} O\left (\infty \right ) &= \text {deg}(t) - \text {deg}(s) \\ &= 4 - 2 \\ &= 2 \end{align*}

The poles of \(r\) in eq. (7) and the order of each pole are determined by solving for the roots of \(t=4 \left (\tau ^{2}-1\right )^{2}\). There is a pole at \(\tau =1\) of order \(2\). There is a pole at \(\tau =-1\) of order \(2\). Since there is no odd order pole larger than \(2\) and the order at \(\infty \) is \(2\) then the necessary conditions for case one are met. Since there is a pole of order \(2\) then necessary conditions for case two are met. Since pole order is not larger than \(2\) and the order at \(\infty \) is \(2\) then the necessary conditions for case three are met. Therefore

\begin{align*} L &= [1, 2, 4, 6, 12] \end{align*}

Attempting to find a solution using case \(n=1\).

Looking at poles of order 2. The partial fractions decomposition of \(r\) is

\[ r = \frac {9}{16 \left (\tau -1\right )}-\frac {9}{16 \left (\tau +1\right )}-\frac {3}{16 \left (\tau +1\right )^{2}}-\frac {3}{16 \left (\tau -1\right )^{2}} \]
For the pole at \(\tau =1\) let \(b\) be the coefficient of \(\frac {1}{ \left (\tau -1\right )^{2}}\) in the partial fractions decomposition of \(r\) given above. Therefore \(b=-{\frac {3}{16}}\). Hence
\begin{alignat*}{2} [\sqrt r]_c &= 0 \\ \alpha _c^{+} &= \frac {1}{2} + \sqrt {1+4 b} &&= {\frac {3}{4}}\\ \alpha _c^{-} &= \frac {1}{2} - \sqrt {1+4 b} &&= {\frac {1}{4}} \end{alignat*}

For the pole at \(\tau =-1\) let \(b\) be the coefficient of \(\frac {1}{ \left (\tau +1\right )^{2}}\) in the partial fractions decomposition of \(r\) given above. Therefore \(b=-{\frac {3}{16}}\). Hence

\begin{alignat*}{2} [\sqrt r]_c &= 0 \\ \alpha _c^{+} &= \frac {1}{2} + \sqrt {1+4 b} &&= {\frac {3}{4}}\\ \alpha _c^{-} &= \frac {1}{2} - \sqrt {1+4 b} &&= {\frac {1}{4}} \end{alignat*}

Since the order of \(r\) at \(\infty \) is 2 then \([\sqrt r]_\infty =0\). Let \(b\) be the coefficient of \(\frac {1}{\tau ^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). which can be found by dividing the leading coefficient of \(s\) by the leading coefficient of \(t\) from

\begin{alignat*}{2} r &= \frac {s}{t} &&= \frac {3 \tau ^{2}-6}{4 \left (\tau ^{2}-1\right )^{2}} \end{alignat*}

Since the \(\text {gcd}(s,t)=1\). This gives \(b={\frac {3}{4}}\). Hence

\begin{alignat*}{2} [\sqrt r]_\infty &= 0 \\ \alpha _{\infty }^{+} &= \frac {1}{2} + \sqrt {1+4 b} &&= {\frac {3}{2}}\\ \alpha _{\infty }^{-} &= \frac {1}{2} - \sqrt {1+4 b} &&= -{\frac {1}{2}} \end{alignat*}

The following table summarizes the findings so far for poles and for the order of \(r\) at \(\infty \) where \(r\) is

\[ r=\frac {3 \tau ^{2}-6}{4 \left (\tau ^{2}-1\right )^{2}} \]

pole \(c\) location pole order \([\sqrt r]_c\) \(\alpha _c^{+}\) \(\alpha _c^{-}\)
\(1\) \(2\) \(0\) \(\frac {3}{4}\) \(\frac {1}{4}\)
\(-1\) \(2\) \(0\) \(\frac {3}{4}\) \(\frac {1}{4}\)

Order of \(r\) at \(\infty \) \([\sqrt r]_\infty \) \(\alpha _\infty ^{+}\) \(\alpha _\infty ^{-}\)
\(2\) \(0\) \(\frac {3}{2}\) \(-{\frac {1}{2}}\)

Now that the all \([\sqrt r]_c\) and its associated \(\alpha _c^{\pm }\) have been determined for all the poles in the set \(\Gamma \) and \([\sqrt r]_\infty \) and its associated \(\alpha _\infty ^{\pm }\) have also been found, the next step is to determine possible non negative integer \(d\) from these using

\begin{align*} d &= \alpha _\infty ^{s(\infty )} - \sum _{c \in \Gamma } \alpha _c^{s(c)} \end{align*}

Where \(s(c)\) is either \(+\) or \(-\) and \(s(\infty )\) is the sign of \(\alpha _\infty ^{\pm }\). This is done by trial over all set of families \(s=(s(c))_{c \in \Gamma \cup {\infty }}\) until such \(d\) is found to work in finding candidate \(\omega \). Trying \(\alpha _\infty ^{+} = {\frac {3}{2}}\) then

\begin{align*} d &= \alpha _\infty ^{+} - \left ( \alpha _{c_1}^{+}+\alpha _{c_2}^{+} \right ) \\ &= {\frac {3}{2}} - \left ( {\frac {3}{2}} \right ) \\ &= 0 \end{align*}

Since \(d\) an integer and \(d \geq 0\) then it can be used to find \(\omega \) using

\begin{align*} \omega &= \sum _{c \in \Gamma } \left ( s(c) [\sqrt r]_c + \frac {\alpha _c^{s(c)}}{\tau -c} \right ) + s(\infty ) [\sqrt r]_\infty \end{align*}

Substituting the above values in the above results in

\begin{align*} \omega &= \left ( (+) [\sqrt r]_{c_1} + \frac { \alpha _{c_1}^{+} }{\tau - c_1}\right )+\left ( (+) [\sqrt r]_{c_2} + \frac { \alpha _{c_2}^{+} }{\tau - c_2}\right ) + (+) [\sqrt r]_\infty \\ &= \frac {3}{4 \left (\tau -1\right )}+\frac {3}{4 \left (\tau +1\right )} + \left ( 0 \right ) \\ &= \frac {3}{4 \left (\tau -1\right )}+\frac {3}{4 \left (\tau +1\right )}\\ &= \frac {3 \tau }{2 \tau ^{2}-2} \end{align*}

Now that \(\omega \) is determined, the next step is find a corresponding minimal polynomial \(p(\tau )\) of degree \(d=0\) to solve the ode. The polynomial \(p(\tau )\) needs to satisfy the equation

\begin{align*} p'' + 2 \omega p' + \left ( \omega ' +\omega ^2 -r\right ) p = 0 \tag {1A} \end{align*}

Let

\begin{align*} p(\tau ) &= 1\tag {2A} \end{align*}

Substituting the above in eq. (1A) gives

\begin{align*} \left (0\right ) + 2 \left (\frac {3}{4 \left (\tau -1\right )}+\frac {3}{4 \left (\tau +1\right )}\right ) \left (0\right ) + \left ( \left (-\frac {3}{4 \left (\tau -1\right )^{2}}-\frac {3}{4 \left (\tau +1\right )^{2}}\right ) + \left (\frac {3}{4 \left (\tau -1\right )}+\frac {3}{4 \left (\tau +1\right )}\right )^2 - \left (\frac {3 \tau ^{2}-6}{4 \left (\tau ^{2}-1\right )^{2}}\right ) \right ) &= 0\\ 0 = 0 \end{align*}

The equation is satisfied since both sides are zero. Therefore the first solution to the ode \(z'' = r z\) is

\begin{align*} z_1(\tau ) &= p e^{ \int \omega \,d\tau } \\ &= {\mathrm e}^{\int \left (\frac {3}{4 \left (\tau -1\right )}+\frac {3}{4 \left (\tau +1\right )}\right )d \tau }\\ &= \left (\tau ^{2}-1\right )^{{3}/{4}} \end{align*}

The first solution to the original ode in \(x \left (\tau \right )\) is found from

\begin{align*} x_1 &= z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,d\tau } \\ &= z_1 e^{ -\int \frac {1}{2} \frac {4 \sqrt {-\tau ^{2}+1}-\tau }{-\tau ^{2}+1} \,d\tau } \\ &= z_1 e^{-2 \arcsin \left (\tau \right )-\frac {\ln \left (\tau -1\right )}{4}-\frac {\ln \left (\tau +1\right )}{4}} \\ &= z_1 \left (\frac {{\mathrm e}^{-2 \arcsin \left (\tau \right )}}{\left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}}\right ) \\ \end{align*}
Which simplifies to
\[ x_1 = \frac {{\mathrm e}^{-2 \arcsin \left (\tau \right )} \left (\tau ^{2}-1\right )^{{3}/{4}}}{\left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}} \]
The second solution \(x_2\) to the original ode is found using reduction of order
\[ x_2 = x_1 \int \frac { e^{\int -\frac {B}{A} \,d\tau }}{x_1^2} \,d\tau \]
Substituting gives
\begin{align*} x_2 &= x_1 \int \frac { e^{\int -\frac {4 \sqrt {-\tau ^{2}+1}-\tau }{-\tau ^{2}+1} \,d\tau }}{\left (x_1\right )^2} \,d\tau \\ &= x_1 \int \frac { e^{-4 \arcsin \left (\tau \right )-\frac {\ln \left (\tau -1\right )}{2}-\frac {\ln \left (\tau +1\right )}{2}}}{\left (x_1\right )^2} \,d\tau \\ &= x_1 \left (-\frac {\left (\tau +1\right )^{{3}/{2}} \left (\tau -1\right )^{{3}/{2}} \tau \,{\mathrm e}^{-4 \arcsin \left (\tau \right )-\frac {\ln \left (\tau -1\right )}{2}-\frac {\ln \left (\tau +1\right )}{2}} {\mathrm e}^{4 \arcsin \left (\tau \right )}}{\left (\tau ^{2}-1\right )^{{3}/{2}}}\right ) \\ \end{align*}
Therefore the solution is
\begin{align*} x \left (\tau \right ) &= c_1 x_1 + c_2 x_2 \\ &= c_1 \left (\frac {{\mathrm e}^{-2 \arcsin \left (\tau \right )} \left (\tau ^{2}-1\right )^{{3}/{4}}}{\left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}}\right ) + c_2 \left (\frac {{\mathrm e}^{-2 \arcsin \left (\tau \right )} \left (\tau ^{2}-1\right )^{{3}/{4}}}{\left (\tau -1\right )^{{1}/{4}} \left (\tau +1\right )^{{1}/{4}}}\left (-\frac {\left (\tau +1\right )^{{3}/{2}} \left (\tau -1\right )^{{3}/{2}} \tau \,{\mathrm e}^{-4 \arcsin \left (\tau \right )-\frac {\ln \left (\tau -1\right )}{2}-\frac {\ln \left (\tau +1\right )}{2}} {\mathrm e}^{4 \arcsin \left (\tau \right )}}{\left (\tau ^{2}-1\right )^{{3}/{2}}}\right )\right ) \\ \end{align*}
Applying change of variable \(\tau = \cos \left (t \right )\) to the solutions above gives
\begin{align*} x &= \frac {c_1 \,{\mathrm e}^{-2 \arcsin \left (\cos \left (t \right )\right )} \left (\cos \left (t \right )^{2}-1\right )^{{3}/{4}}}{\left (\cos \left (t \right )-1\right )^{{1}/{4}} \left (\cos \left (t \right )+1\right )^{{1}/{4}}}-\frac {c_2 \cos \left (t \right ) \left (\cos \left (t \right )-1\right )^{{3}/{4}} \left (\cos \left (t \right )+1\right )^{{3}/{4}} {\mathrm e}^{-2 \arcsin \left (\cos \left (t \right )\right )}}{\left (\cos \left (t \right )^{2}-1\right )^{{3}/{4}}} \\ \end{align*}
Figure 2.58: Slope field \(x^{\prime \prime }-4 x^{\prime }+5 x = 0\)
2.2.6.4 Maple. Time used: 0.000 (sec). Leaf size: 18
ode:=diff(diff(x(t),t),t)-4*diff(x(t),t)+5*x(t) = 0; 
dsolve(ode,x(t), singsol=all);
 
\[ x = {\mathrm e}^{2 t} \left (c_1 \sin \left (t \right )+c_2 \cos \left (t \right )\right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
<- constant coefficients successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d t^{2}}x \left (t \right )-4 \frac {d}{d t}x \left (t \right )+5 x \left (t \right )=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d^{2}}{d t^{2}}x \left (t \right ) \\ \bullet & {} & \textrm {Characteristic polynomial of ODE}\hspace {3pt} \\ {} & {} & r^{2}-4 r +5=0 \\ \bullet & {} & \textrm {Use quadratic formula to solve for}\hspace {3pt} r \\ {} & {} & r =\frac {4\pm \left (\sqrt {-4}\right )}{2} \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (2-\mathrm {I}, 2+\mathrm {I}\right ) \\ \bullet & {} & \textrm {1st solution of the ODE}\hspace {3pt} \\ {} & {} & x_{1}\left (t \right )={\mathrm e}^{2 t} \cos \left (t \right ) \\ \bullet & {} & \textrm {2nd solution of the ODE}\hspace {3pt} \\ {} & {} & x_{2}\left (t \right )={\mathrm e}^{2 t} \sin \left (t \right ) \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & x \left (t \right )=\mathit {C1} x_{1}\left (t \right )+\mathit {C2} x_{2}\left (t \right ) \\ \bullet & {} & \textrm {Substitute in solutions}\hspace {3pt} \\ {} & {} & x \left (t \right )=\mathit {C1} \,{\mathrm e}^{2 t} \cos \left (t \right )+\mathit {C2} \,{\mathrm e}^{2 t} \sin \left (t \right ) \end {array} \]
2.2.6.5 Mathematica. Time used: 0.011 (sec). Leaf size: 22
ode=D[x[t],{t,2}]-4*D[x[t],t]+5*x[t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to e^{2 t} (c_2 \cos (t)+c_1 \sin (t)) \end{align*}
2.2.6.6 Sympy. Time used: 0.089 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(5*x(t) - 4*Derivative(x(t), t) + Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (C_{1} \sin {\left (t \right )} + C_{2} \cos {\left (t \right )}\right ) e^{2 t} \]