1.8 problem 8

1.8.1 Solving as second order integrable as is ode
1.8.2 Solving as second order ode missing y ode
1.8.3 Solving as second order ode non constant coeff transformation on B ode
1.8.4 Solving as type second_order_integrable_as_is (not using ABC version)
1.8.5 Solving using Kovacic algorithm
1.8.6 Solving as exact linear second order ode ode
1.8.7 Maple step by step solution

Internal problem ID [12424]
Internal file name [OUTPUT/11077_Monday_October_16_2023_09_47_15_PM_7666333/index.tex]

Book: DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section: Chapter 8. Differential equations. Exercises page 595
Problem number: 8.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "kovacic", "exact linear second order ode", "second_order_integrable_as_is", "second_order_ode_missing_y", "second_order_ode_non_constant_coeff_transformation_on_B"

Maple gives the following as the ode type

[[_2nd_order, _missing_y]]

\[ \boxed {y^{\prime \prime }+\frac {2 y^{\prime }}{x}=0} \]

1.8.1 Solving as second order integrable as is ode

Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (y^{\prime \prime } x +2 y^{\prime }\right )d x &= 0 \\ y^{\prime } x +y = c_{1} \end {align*}

Which is now solved for \(y\). In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= \frac {-y +c_{1}}{x} \end {align*}

Where \(f(x)=\frac {1}{x}\) and \(g(y)=-y +c_{1}\). Integrating both sides gives \begin{align*} \frac {1}{-y +c_{1}} \,dy &= \frac {1}{x} \,d x \\ \int { \frac {1}{-y +c_{1}} \,dy} &= \int {\frac {1}{x} \,d x} \\ -\ln \left (y -c_{1} \right )&=\ln \left (x \right )+c_{2} \\ \end{align*} Raising both side to exponential gives \begin {align*} \frac {1}{y -c_{1}} &= {\mathrm e}^{\ln \left (x \right )+c_{2}} \end {align*}

Which simplifies to \begin {align*} \frac {1}{y -c_{1}} &= c_{3} x \end {align*}

Which simplifies to \[ y = \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \] Verified OK.

1.8.2 Solving as second order ode missing y ode

This is second order ode with missing dependent variable \(y\). Let \begin {align*} p(x) &= y^{\prime } \end {align*}

Then \begin {align*} p'(x) &= y^{\prime \prime } \end {align*}

Hence the ode becomes \begin {align*} p^{\prime }\left (x \right ) x +2 p \left (x \right ) = 0 \end {align*}

Which is now solve for \(p(x)\) as first order ode. In canonical form the ODE is \begin {align*} p' &= F(x,p)\\ &= f( x) g(p)\\ &= -\frac {2 p}{x} \end {align*}

Where \(f(x)=-\frac {2}{x}\) and \(g(p)=p\). Integrating both sides gives \begin {align*} \frac {1}{p} \,dp &= -\frac {2}{x} \,d x\\ \int { \frac {1}{p} \,dp} &= \int {-\frac {2}{x} \,d x}\\ \ln \left (p \right )&=-2 \ln \left (x \right )+c_{1}\\ p&={\mathrm e}^{-2 \ln \left (x \right )+c_{1}}\\ &=\frac {c_{1}}{x^{2}} \end {align*}

Since \(p=y^{\prime }\) then the new first order ode to solve is \begin {align*} y^{\prime } = \frac {c_{1}}{x^{2}} \end {align*}

Integrating both sides gives \begin {align*} y &= \int { \frac {c_{1}}{x^{2}}\,\mathop {\mathrm {d}x}}\\ &= -\frac {c_{1}}{x}+c_{2} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {c_{1}}{x}+c_{2} \\ \end{align*}

Verification of solutions

\[ y = -\frac {c_{1}}{x}+c_{2} \] Verified OK.

1.8.3 Solving as second order ode non constant coeff transformation on B ode

Given an ode of the form \begin {align*} A y^{\prime \prime } + B y^{\prime } + C y &= F(x) \end {align*}

This method reduces the order ode the ODE by one by applying the transformation \begin {align*} y&= B v \end {align*}

This results in \begin {align*} y' &=B' v+ v' B \\ y'' &=B'' v+ B' v' +v'' B + v' B' \\ &=v'' B+2 v'+ B'+B'' v \end {align*}

And now the original ode becomes \begin {align*} A\left ( v'' B+2v'B'+ B'' v\right )+B\left ( B'v+ v' B\right ) +CBv & =0\\ ABv'' +\left ( 2AB'+B^{2}\right ) v'+\left (AB''+BB'+CB\right ) v & =0 \tag {1} \end {align*}

If the term \(AB''+BB'+CB\) is zero, then this method works and can be used to solve \[ ABv''+\left ( 2AB' +B^{2}\right ) v'=0 \] By Using \(u=v'\) which reduces the order of the above ode to one. The new ode is \[ ABu'+\left ( 2AB'+B^{2}\right ) u=0 \] The above ode is first order ode which is solved for \(u\). Now a new ode \(v'=u\) is solved for \(v\) as first order ode. Then the final solution is obtain from \(y=Bv\).

This method works only if the term \(AB''+BB'+CB\) is zero. The given ODE shows that \begin {align*} A &= x\\ B &= 2\\ C &= 0\\ F &= 0 \end {align*}

The above shows that for this ode \begin {align*} AB''+BB'+CB &= \left (x\right ) \left (0\right ) + \left (2\right ) \left (0\right ) + \left (0\right ) \left (2\right ) \\ &=0 \end {align*}

Hence the ode in \(v\) given in (1) now simplifies to \begin {align*} 2 x v'' +\left ( 4\right ) v' & =0 \end {align*}

Now by applying \(v'=u\) the above becomes \begin {align*} 2 x u^{\prime }\left (x \right )+4 u \left (x \right ) = 0 \end {align*}

Which is now solved for \(u\). In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= -\frac {2 u}{x} \end {align*}

Where \(f(x)=-\frac {2}{x}\) and \(g(u)=u\). Integrating both sides gives \begin {align*} \frac {1}{u} \,du &= -\frac {2}{x} \,d x\\ \int { \frac {1}{u} \,du} &= \int {-\frac {2}{x} \,d x}\\ \ln \left (u \right )&=-2 \ln \left (x \right )+c_{1}\\ u&={\mathrm e}^{-2 \ln \left (x \right )+c_{1}}\\ &=\frac {c_{1}}{x^{2}} \end {align*}

The ode for \(v\) now becomes \begin {align*} v' &= u\\ &=\frac {c_{1}}{x^{2}} \end {align*}

Which is now solved for \(v\). Integrating both sides gives \begin {align*} v \left (x \right ) &= \int { \frac {c_{1}}{x^{2}}\,\mathop {\mathrm {d}x}}\\ &= -\frac {c_{1}}{x}+c_{2} \end {align*}

Therefore the solution is \begin {align*} y(x) &= B v\\ &= \left (2\right ) \left (-\frac {c_{1}}{x}+c_{2}\right ) \\ &= -\frac {2 c_{1}}{x}+2 c_{2} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {2 c_{1}}{x}+2 c_{2} \\ \end{align*}

Verification of solutions

\[ y = -\frac {2 c_{1}}{x}+2 c_{2} \] Verified OK.

1.8.4 Solving as type second_order_integrable_as_is (not using ABC version)

Writing the ode as \[ y^{\prime \prime } x +2 y^{\prime } = 0 \] Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (y^{\prime \prime } x +2 y^{\prime }\right )d x &= 0 \\ y^{\prime } x +y = c_{1} \end {align*}

Which is now solved for \(y\). In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= \frac {-y +c_{1}}{x} \end {align*}

Where \(f(x)=\frac {1}{x}\) and \(g(y)=-y +c_{1}\). Integrating both sides gives \begin{align*} \frac {1}{-y +c_{1}} \,dy &= \frac {1}{x} \,d x \\ \int { \frac {1}{-y +c_{1}} \,dy} &= \int {\frac {1}{x} \,d x} \\ -\ln \left (y -c_{1} \right )&=\ln \left (x \right )+c_{2} \\ \end{align*} Raising both side to exponential gives \begin {align*} \frac {1}{y -c_{1}} &= {\mathrm e}^{\ln \left (x \right )+c_{2}} \end {align*}

Which simplifies to \begin {align*} \frac {1}{y -c_{1}} &= c_{3} x \end {align*}

Which simplifies to \[ y = \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \] Verified OK.

1.8.5 Solving using Kovacic algorithm

Writing the ode as \begin {align*} y^{\prime \prime } x +2 y^{\prime } &= 0 \tag {1} \\ A y^{\prime \prime } + B y^{\prime } + C y &= 0 \tag {2} \end {align*}

Comparing (1) and (2) shows that \begin {align*} A &= x \\ B &= 2\tag {3} \\ C &= 0 \end {align*}

Applying the Liouville transformation on the dependent variable gives \begin {align*} z(x) &= y e^{\int \frac {B}{2 A} \,dx} \end {align*}

Then (2) becomes \begin {align*} z''(x) = r z(x)\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 {0}{1}\tag {6} \end {align*}

Comparing the above to (5) shows that \begin {align*} s &= 0\\ t &= 1 \end {align*}

Therefore eq. (4) becomes \begin {align*} z''(x) &= 0 \tag {7} \end {align*}

Equation (7) is now solved. After finding \(z(x)\) then \(y\) is found using the inverse transformation \begin {align*} y &= z \left (x \right ) e^{-\int \frac {B}{2 A} \,dx} \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 5: 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 - -\infty \\ &= \infty \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 \(infinity\) then the necessary conditions for case one are met. Therefore \begin {align*} L &= [1] \end {align*}

Since \(r = 0\) is not a function of \(x\), then there is no need run Kovacic algorithm to obtain a solution for transformed ode \(z''=r z\) as one solution is \[ z_1(x) = 1 \] Using the above, the solution for the original ode can now be found. The first solution to the original ode in \(y\) is found from \begin{align*} y_1 &= z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,dx} \\ &= z_1 e^{ -\int \frac {1}{2} \frac {2}{x} \,dx} \\ &= z_1 e^{-\ln \left (x \right )} \\ &= z_1 \left (\frac {1}{x}\right ) \\ \end{align*} Which simplifies to \[ y_1 = \frac {1}{x} \] The second solution \(y_2\) to the original ode is found using reduction of order \[ y_2 = y_1 \int \frac { e^{\int -\frac {B}{A} \,dx}}{y_1^2} \,dx \] Substituting gives \begin{align*} y_2 &= y_1 \int \frac { e^{\int -\frac {2}{x} \,dx}}{\left (y_1\right )^2} \,dx \\ &= y_1 \int \frac { e^{-2 \ln \left (x \right )}}{\left (y_1\right )^2} \,dx \\ &= y_1 \left (x\right ) \\ \end{align*} Therefore the solution is

\begin{align*} y &= c_{1} y_1 + c_{2} y_2 \\ &= c_{1} \left (\frac {1}{x}\right ) + c_{2} \left (\frac {1}{x}\left (x\right )\right ) \\ \end{align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {c_{1}}{x}+c_{2} \\ \end{align*}

Verification of solutions

\[ y = \frac {c_{1}}{x}+c_{2} \] Verified OK.

1.8.6 Solving as exact linear second order ode ode

An ode of the form \begin {align*} p \left (x \right ) y^{\prime \prime }+q \left (x \right ) y^{\prime }+r \left (x \right ) y&=s \left (x \right ) \end {align*}

is exact if \begin {align*} p''(x) - q'(x) + r(x) &= 0 \tag {1} \end {align*}

For the given ode we have \begin {align*} p(x) &= x\\ q(x) &= 2\\ r(x) &= 0\\ s(x) &= 0 \end {align*}

Hence \begin {align*} p''(x) &= 0\\ q'(x) &= 0 \end {align*}

Therefore (1) becomes \begin {align*} 0- \left (0\right ) + \left (0\right )&=0 \end {align*}

Hence the ode is exact. Since we now know the ode is exact, it can be written as \begin {align*} \left (p \left (x \right ) y^{\prime }+\left (q \left (x \right )-p^{\prime }\left (x \right )\right ) y\right )' &= s(x) \end {align*}

Integrating gives \begin {align*} p \left (x \right ) y^{\prime }+\left (q \left (x \right )-p^{\prime }\left (x \right )\right ) y&=\int {s \left (x \right )\, dx} \end {align*}

Substituting the above values for \(p,q,r,s\) gives \begin {align*} y^{\prime } x +y&=c_{1} \end {align*}

We now have a first order ode to solve which is \begin {align*} y^{\prime } x +y = c_{1} \end {align*}

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= \frac {-y +c_{1}}{x} \end {align*}

Where \(f(x)=\frac {1}{x}\) and \(g(y)=-y +c_{1}\). Integrating both sides gives \begin{align*} \frac {1}{-y +c_{1}} \,dy &= \frac {1}{x} \,d x \\ \int { \frac {1}{-y +c_{1}} \,dy} &= \int {\frac {1}{x} \,d x} \\ -\ln \left (y -c_{1} \right )&=\ln \left (x \right )+c_{2} \\ \end{align*} Raising both side to exponential gives \begin {align*} \frac {1}{y -c_{1}} &= {\mathrm e}^{\ln \left (x \right )+c_{2}} \end {align*}

Which simplifies to \begin {align*} \frac {1}{y -c_{1}} &= c_{3} x \end {align*}

Which simplifies to \[ y = \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (c_{3} {\mathrm e}^{c_{2}} x c_{1} +1\right ) {\mathrm e}^{-c_{2}}}{c_{3} x} \] Verified OK.

1.8.7 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime \prime } x +2 y^{\prime }=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & y^{\prime \prime } \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & y^{\prime \prime }=-\frac {2 y^{\prime }}{x} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\hspace {3pt} \\ {} & {} & y^{\prime \prime }+\frac {2 y^{\prime }}{x}=0 \\ \bullet & {} & \textrm {Multiply by denominators of the ODE}\hspace {3pt} \\ {} & {} & y^{\prime \prime } x +2 y^{\prime }=0 \\ \bullet & {} & \textrm {Make a change of variables}\hspace {3pt} \\ {} & {} & t =\ln \left (x \right ) \\ \square & {} & \textrm {Substitute the change of variables back into the ODE}\hspace {3pt} \\ {} & \circ & \textrm {Calculate the}\hspace {3pt} \hspace {3pt}\textrm {1st}\hspace {3pt} \hspace {3pt}\textrm {derivative of}\hspace {3pt} \hspace {3pt}\textrm {y}\hspace {3pt} \hspace {3pt}\textrm {with respect to}\hspace {3pt} \hspace {3pt}\textrm {x}\hspace {3pt} \hspace {3pt}\textrm {, using the chain rule}\hspace {3pt} \\ {} & {} & y^{\prime }=\left (\frac {d}{d t}y \left (t \right )\right ) t^{\prime }\left (x \right ) \\ {} & \circ & \textrm {Compute derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {\frac {d}{d t}y \left (t \right )}{x} \\ {} & \circ & \textrm {Calculate the}\hspace {3pt} \hspace {3pt}\textrm {2nd}\hspace {3pt} \hspace {3pt}\textrm {derivative of}\hspace {3pt} \hspace {3pt}\textrm {y}\hspace {3pt} \hspace {3pt}\textrm {with respect to}\hspace {3pt} \hspace {3pt}\textrm {x}\hspace {3pt} \hspace {3pt}\textrm {, using the chain rule}\hspace {3pt} \\ {} & {} & y^{\prime \prime }=\left (\frac {d^{2}}{d t^{2}}y \left (t \right )\right ) {t^{\prime }\left (x \right )}^{2}+t^{\prime \prime }\left (x \right ) \left (\frac {d}{d t}y \left (t \right )\right ) \\ {} & \circ & \textrm {Compute derivative}\hspace {3pt} \\ {} & {} & y^{\prime \prime }=\frac {\frac {d^{2}}{d t^{2}}y \left (t \right )}{x^{2}}-\frac {\frac {d}{d t}y \left (t \right )}{x^{2}} \\ & {} & \textrm {Substitute the change of variables back into the ODE}\hspace {3pt} \\ {} & {} & \left (\frac {\frac {d^{2}}{d t^{2}}y \left (t \right )}{x^{2}}-\frac {\frac {d}{d t}y \left (t \right )}{x^{2}}\right ) x +\frac {2 \left (\frac {d}{d t}y \left (t \right )\right )}{x}=0 \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & \frac {\frac {d^{2}}{d t^{2}}y \left (t \right )+\frac {d}{d t}y \left (t \right )}{x}=0 \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d t^{2}}y \left (t \right )=-\frac {d}{d t}y \left (t \right ) \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (t \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d t^{2}}y \left (t \right )+\frac {d}{d t}y \left (t \right )=0 \\ \bullet & {} & \textrm {Characteristic polynomial of ODE}\hspace {3pt} \\ {} & {} & r^{2}+r =0 \\ \bullet & {} & \textrm {Factor the characteristic polynomial}\hspace {3pt} \\ {} & {} & r \left (r +1\right )=0 \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (-1, 0\right ) \\ \bullet & {} & \textrm {1st solution of the ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (t \right )={\mathrm e}^{-t} \\ \bullet & {} & \textrm {2nd solution of the ODE}\hspace {3pt} \\ {} & {} & y_{2}\left (t \right )=1 \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & y \left (t \right )=c_{1} y_{1}\left (t \right )+c_{2} y_{2}\left (t \right ) \\ \bullet & {} & \textrm {Substitute in solutions}\hspace {3pt} \\ {} & {} & y \left (t \right )=c_{1} {\mathrm e}^{-t}+c_{2} \\ \bullet & {} & \textrm {Change variables back using}\hspace {3pt} t =\ln \left (x \right ) \\ {} & {} & y=\frac {c_{1}}{x}+c_{2} \end {array} \]

Maple trace

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

Solution by Maple

Time used: 0.0 (sec). Leaf size: 11

dsolve(diff(y(x),x$2)+2/x*diff(y(x),x)=0,y(x), singsol=all)
 

\[ y \left (x \right ) = c_{1} +\frac {c_{2}}{x} \]

Solution by Mathematica

Time used: 0.018 (sec). Leaf size: 15

DSolve[y''[x]+2/x*y'[x]==0,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to c_2-\frac {c_1}{x} \]