2.3.2.3 second order kovacic

\[\begin {aligned} x^{\prime \prime }-x&={\mathrm e}^{t}\\ x \left (0\right ) &= 0\\ x^{\prime }\left (0\right ) &= 1\\ \end {aligned}\]

Entering kovacic solverWriting the ode as

\begin{align*} x^{\prime \prime }-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 &= 0\tag {3} \\ C &= -1 \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.19: 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) = {\mathrm e}^{-t} \]

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} \end{align*}

Since \(B=0\) then the above reduces to

\begin{gather*} \begin {aligned} x_1 &= z_1 \\ &= {\mathrm e}^{-t} \end {aligned} \end{gather*}

Which simplifies to

\begin{align*} x_1 &= {\mathrm e}^{-t} \end{align*}

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 \]

Since \(B=0\) then the above becomes

\begin{align*} x_2 &= x_1 \int \frac {1}{x_1^2} \,dt \\ &= {\mathrm e}^{-t}\int \frac {1}{{\mathrm e}^{-2 t}} \,dt\\ &= \frac {{\mathrm e}^{t}}{2} \end{align*}

Therefore the solution is

\begin{align*} x &= c_1 x_1 + c_2 x_2 \\ &= c_1\left ({\mathrm e}^{-t}\right ) + c_2\left (\frac {{\mathrm e}^{t}}{2}\right ) \end{align*}

This is second order nonhomogeneous ODE. Let the solution be

\begin{align*} x &= x_h + x_p \end{align*}

Where \(x_h\) is the solution to the homogeneous ODE

\begin{align*} A x''(t) + B x'(t) + C x(t) &= 0 \end{align*}

And \(x_p\) is a particular solution to the nonhomogeneous ODE

\begin{align*} A x''(t) + B x'(t) + C x(t) &= f(t) \end{align*}

\(x_h\) is the solution to

\begin{align*} x^{\prime \prime }-x = 0 \end{align*}

The homogeneous solution is found using the Kovacic algorithm which results in

\begin{align*} x_h &= c_1 \,{\mathrm e}^{-t}+\frac {c_2 \,{\mathrm e}^{t}}{2} \end{align*}

The particular solution \(x_p\) can be found using either the method of undetermined coefficients or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on \(t\) as well. Let

\begin{align*} x_p(t) &= u_1 x_1 + u_2 x_2\tag {1} \end{align*}

Where \(u_1,u_2\) to be determined, and \(x_1,x_2\) are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as

\begin{gather*} \begin {aligned} x_1 &= {\mathrm e}^{-t}\\ x_2 &= \frac {{\mathrm e}^{t}}{2} \end {aligned} \end{gather*}

In the Variation of parameters \(u_1,u_2\) are found using

\begin{align*} u_1 &= -\int \frac {x_2 f(t)}{a W(t)}\tag {2} \\ u_2 &= \int \frac {x_1 f(t)}{a W(t)}\tag {3} \\ \end{align*}

Where \(W(t)\) is the Wronskian and \(a\) is the coefficient in front of \(x''\) in the given ODE. The Wronskian is given by \(W= \begin {vmatrix} x_1 & x_{2} \\ x_{1}^{\prime } & x_{2}^{\prime } \end {vmatrix} \). Hence

\[ W = \begin {vmatrix} {\mathrm e}^{-t} & \frac {{\mathrm e}^{t}}{2} \\ \frac {d}{dt}\left ({\mathrm e}^{-t}\right ) & \frac {d}{dt}\left (\frac {{\mathrm e}^{t}}{2}\right ) \end {vmatrix} \]

Which gives

\[ W = \begin {vmatrix} {\mathrm e}^{-t} & \frac {{\mathrm e}^{t}}{2} \\ -{\mathrm e}^{-t} & \frac {{\mathrm e}^{t}}{2} \end {vmatrix} \]

Therefore

\begin{align*} W &= \left ({\mathrm e}^{-t}\right )\left (\frac {{\mathrm e}^{t}}{2}\right ) - \left (\frac {{\mathrm e}^{t}}{2}\right )\left (-{\mathrm e}^{-t}\right ) \end{align*}

Which simplifies to

\begin{align*} W &= {\mathrm e}^{-t} {\mathrm e}^{t} \end{align*}

Which simplifies to

\begin{align*} W &= 1 \end{align*}

Therefore Eq. (2) becomes

\begin{align*} u_1 &= -\int \frac {\frac {{\mathrm e}^{2 t}}{2}}{1}\,dt \end{align*}

Which simplifies to

\begin{align*} u_1 &= - \int \frac {{\mathrm e}^{2 t}}{2}d t \end{align*}

Hence

\begin{align*} u_1 &= -\frac {{\mathrm e}^{2 t}}{4} \end{align*}

And Eq. (3) becomes

\begin{align*} u_2 &= \int \frac {{\mathrm e}^{-t} {\mathrm e}^{t}}{1}\,dt \end{align*}

Which simplifies to

\begin{align*} u_2 &= \int 1d t \end{align*}

Hence

\begin{align*} u_2 &= t \end{align*}

Therefore the particular solution, from equation (1) is

\begin{align*} x_p(t) &= -\frac {{\mathrm e}^{2 t} {\mathrm e}^{-t}}{4}+\frac {t \,{\mathrm e}^{t}}{2} \end{align*}

Which simplifies to

\begin{align*} x_p(t) &= \frac {\left (2 t -1\right ) {\mathrm e}^{t}}{4} \end{align*}

Therefore the general solution is

\begin{gather*} \begin {aligned} x &= x_h + x_p \\ &= \left (c_1 \,{\mathrm e}^{-t}+\frac {c_2 \,{\mathrm e}^{t}}{2}\right ) + \left (\frac {\left (2 t -1\right ) {\mathrm e}^{t}}{4}\right ) \end {aligned} \end{gather*}

Applying the initial conditions \([x \left (0\right ) = 0, x^{\prime }\left (0\right ) = 1]\), the solution becomes

\begin{align*} x &= -\frac {{\mathrm e}^{-t}}{4}+\frac {{\mathrm e}^{t} \left (t +\frac {1}{2}\right )}{2} \\ \end{align*}
\(x = -\frac {{\mathrm e}^{-t}}{4}+\frac {{\mathrm e}^{t} \left (t +\frac {1}{2}\right )}{2}\) Direction field