Internal problem ID [1092]
Internal file name [OUTPUT/1093_Sunday_June_05_2022_02_02_27_AM_46177798/index.tex
]
Book: Elementary differential equations with boundary value problems. William F. Trench.
Brooks/Cole 2001
Section: Chapter 5 linear second order equations. Section 5.1 Homogeneous linear equations. Page
203
Problem number: 4.
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_change_of_variable_on_y_method_1", "linear_second_order_ode_solved_by_an_integrating_factor"
Maple gives the following as the ode type
[[_2nd_order, _exact, _linear, _homogeneous]]
\[ \boxed {\left (x^{2}-1\right ) y^{\prime \prime }+4 x y^{\prime }+2 y=0} \] With initial conditions \begin {align*} [y \left (0\right ) = -5, y^{\prime }\left (0\right ) = 1] \end {align*}
This is a linear ODE. In canonical form it is written as \begin {align*} y^{\prime \prime } + p(x)y^{\prime } + q(x) y &= F \end {align*}
Where here \begin {align*} p(x) &=\frac {4 x}{x^{2}-1}\\ q(x) &=\frac {2}{x^{2}-1}\\ F &=0 \end {align*}
Hence the ode is \begin {align*} y^{\prime \prime }+\frac {4 x y^{\prime }}{x^{2}-1}+\frac {2 y}{x^{2}-1} = 0 \end {align*}
The domain of \(p(x)=\frac {4 x}{x^{2}-1}\) is \[
\{-\infty \le x <-1, -1
The ode satisfies this form \[ y^{\prime \prime }+p \left (x \right ) y^{\prime }+\frac {\left (p \left (x \right )^{2}+p^{\prime }\left (x \right )\right ) y}{2} = f \left (x \right ) \] Where \( p(x) = \frac {4 x}{x^{2}-1}\). Therefore, there is an integrating factor given by
\begin {align*} M(x) &= e^{\frac {1}{2} \int p \, dx} \\ &= e^{ \int \frac {4 x}{x^{2}-1} \, dx} \\ &= x^{2}-1 \end {align*}
Multiplying both sides of the ODE by the integrating factor \(M(x)\) makes the left side of
the ODE a complete differential \begin{align*}
\left ( M(x) y \right )'' &= 0 \\
\left ( \left (x^{2}-1\right ) y \right )'' &= 0 \\
\end{align*} Integrating once gives \[ \left ( \left (x^{2}-1\right ) y \right )' = c_{1} \] Integrating again gives \[ \left ( \left (x^{2}-1\right ) y \right ) = c_{1} x +c_{2} \]
Hence the solution is \begin{align*}
y &= \frac {c_{1} x +c_{2}}{x^{2}-1} \\
\end{align*} Or \[
y = \frac {c_{1} x}{x^{2}-1}+\frac {c_{2}}{x^{2}-1}
\] Initial conditions are used to solve for the constants of
integration.
Looking at the above solution \begin {align*} y = \frac {c_{1} x}{x^{2}-1}+\frac {c_{2}}{x^{2}-1} \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(y = -5\) and \(x = 0\) in the above gives
\begin {align*} -5 = -c_{2}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} y^{\prime } = -\frac {2 c_{1} x^{2}}{\left (x^{2}-1\right )^{2}}+\frac {c_{1}}{x^{2}-1}-\frac {2 c_{2} x}{\left (x^{2}-1\right )^{2}} \end {align*}
substituting \(y^{\prime } = 1\) and \(x = 0\) in the above gives \begin {align*} 1 = -c_{1}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=-1\\ c_{2}&=5 \end {align*}
Substituting these values back in above solution results in \begin {align*} y = -\frac {x -5}{x^{2}-1} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= -\frac {x -5}{x^{2}-1} \\
\end{align*} Verification of solutions
\[
y = -\frac {x -5}{x^{2}-1}
\] Verified OK. In normal form the given ode is written as \begin {align*} y^{\prime \prime }+p \left (x \right ) y^{\prime }+q \left (x \right ) y&=0 \tag {2} \end {align*}
Where \begin {align*} p \left (x \right )&=\frac {4 x}{x^{2}-1}\\ q \left (x \right )&=\frac {2}{x^{2}-1} \end {align*}
Calculating the Liouville ode invariant \(Q\) given by \begin {align*} Q &= q - \frac {p'}{2}- \frac {p^2}{4} \\ &= \frac {2}{x^{2}-1} - \frac {\left (\frac {4 x}{x^{2}-1}\right )'}{2}- \frac {\left (\frac {4 x}{x^{2}-1}\right )^2}{4} \\ &= \frac {2}{x^{2}-1} - \frac {\left (\frac {4}{x^{2}-1}-\frac {8 x^{2}}{\left (x^{2}-1\right )^{2}}\right )}{2}- \frac {\left (\frac {16 x^{2}}{\left (x^{2}-1\right )^{2}}\right )}{4} \\ &= \frac {2}{x^{2}-1} - \left (\frac {2}{x^{2}-1}-\frac {4 x^{2}}{\left (x^{2}-1\right )^{2}}\right )-\frac {4 x^{2}}{\left (x^{2}-1\right )^{2}}\\ &= 0 \end {align*}
Since the Liouville ode invariant does not depend on the independent variable \(x\) then the
transformation \begin {align*} y = v \left (x \right ) z \left (x \right )\tag {3} \end {align*}
is used to change the original ode to a constant coefficients ode in \(v\). In (3) the term \(z \left (x \right )\) is given
by \begin {align*} z \left (x \right )&={\mathrm e}^{-\left (\int \frac {p \left (x \right )}{2}d x \right )}\\ &= e^{-\int \frac {\frac {4 x}{x^{2}-1}}{2} }\\ &= \frac {1}{x^{2}-1}\tag {5} \end {align*}
Hence (3) becomes \begin {align*} y = \frac {v \left (x \right )}{x^{2}-1}\tag {4} \end {align*}
Applying this change of variable to the original ode results in \begin {align*} v^{\prime \prime }\left (x \right ) = 0 \end {align*}
Which is now solved for \(v \left (x \right )\) Integrating twice gives the solution \[ v \left (x \right )= c_{1} x + c_{2} \] Now that \(v \left (x \right )\) is known, then
\begin {align*} y&= v \left (x \right ) z \left (x \right )\\ &= \left (c_{1} x +c_{2}\right ) \left (z \left (x \right )\right )\tag {7} \end {align*}
But from (5) \begin {align*} z \left (x \right )&= \frac {1}{x^{2}-1} \end {align*}
Hence (7) becomes \begin {align*} y = \frac {c_{1} x +c_{2}}{x^{2}-1} \end {align*}
Initial conditions are used to solve for the constants of integration.
Looking at the above solution \begin {align*} y = \frac {c_{1} x +c_{2}}{x^{2}-1} \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(y = -5\) and \(x = 0\) in the above gives
\begin {align*} -5 = -c_{2}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} y^{\prime } = \frac {c_{1}}{x^{2}-1}-\frac {2 \left (c_{1} x +c_{2} \right ) x}{\left (x^{2}-1\right )^{2}} \end {align*}
substituting \(y^{\prime } = 1\) and \(x = 0\) in the above gives \begin {align*} 1 = -c_{1}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=-1\\ c_{2}&=5 \end {align*}
Substituting these values back in above solution results in \begin {align*} y = -\frac {x -5}{x^{2}-1} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= -\frac {x -5}{x^{2}-1} \\
\end{align*} Verification of solutions
\[
y = -\frac {x -5}{x^{2}-1}
\] Verified OK. Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (\left (x^{2}-1\right ) y^{\prime \prime }+4 x y^{\prime }+2 y\right )d x &= 0 \\ 2 y x +\left (x^{2}-1\right ) y^{\prime } = c_{1} \end {align*}
Which is now solved for \(y\).
Entering Linear first order ODE solver. In canonical form a linear first order is
\begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}
Where here \begin {align*} p(x) &=\frac {2 x}{x^{2}-1}\\ q(x) &=\frac {c_{1}}{x^{2}-1} \end {align*}
Hence the ode is \begin {align*} y^{\prime }+\frac {2 x y}{x^{2}-1} = \frac {c_{1}}{x^{2}-1} \end {align*}
The integrating factor \(\mu \) is \begin{align*}
\mu &= {\mathrm e}^{\int \frac {2 x}{x^{2}-1}d x} \\
&= {\mathrm e}^{\ln \left (x -1\right )+\ln \left (x +1\right )} \\
\end{align*} Which simplifies to \[
\mu = x^{2}-1
\] The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_{1}}{x^{2}-1}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\left (x^{2}-1\right ) y\right ) &= \left (x^{2}-1\right ) \left (\frac {c_{1}}{x^{2}-1}\right )\\ \mathrm {d} \left (\left (x^{2}-1\right ) y\right ) &= c_{1}\, \mathrm {d} x \end {align*}
Integrating gives \begin {align*} \left (x^{2}-1\right ) y &= \int {c_{1}\,\mathrm {d} x}\\ \left (x^{2}-1\right ) y &= c_{1} x + c_{2} \end {align*}
Dividing both sides by the integrating factor \(\mu =x^{2}-1\) results in \begin {align*} y &= \frac {c_{1} x}{x^{2}-1}+\frac {c_{2}}{x^{2}-1} \end {align*}
which simplifies to \begin {align*} y &= \frac {c_{1} x +c_{2}}{x^{2}-1} \end {align*}
Initial conditions are used to solve for the constants of integration.
Looking at the above solution \begin {align*} y = \frac {c_{1} x +c_{2}}{x^{2}-1} \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(y = -5\) and \(x = 0\) in the above gives
\begin {align*} -5 = -c_{2}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} y^{\prime } = \frac {c_{1}}{x^{2}-1}-\frac {2 \left (c_{1} x +c_{2} \right ) x}{\left (x^{2}-1\right )^{2}} \end {align*}
substituting \(y^{\prime } = 1\) and \(x = 0\) in the above gives \begin {align*} 1 = -c_{1}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=-1\\ c_{2}&=5 \end {align*}
Substituting these values back in above solution results in \begin {align*} y = -\frac {x -5}{x^{2}-1} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= -\frac {x -5}{x^{2}-1} \\
\end{align*} Verification of solutions
\[
y = -\frac {x -5}{x^{2}-1}
\] Verified OK. Writing the ode as \[
\left (x^{2}-1\right ) y^{\prime \prime }+4 x y^{\prime }+2 y = 0
\] Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (\left (x^{2}-1\right ) y^{\prime \prime }+4 x y^{\prime }+2 y\right )d x &= 0 \\ -y^{\prime }+2 y x +y^{\prime } x^{2} = c_{1} \end {align*}
Which is now solved for \(y\).
Entering Linear first order ODE solver. In canonical form a linear first order is
\begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}
Where here \begin {align*} p(x) &=\frac {2 x}{x^{2}-1}\\ q(x) &=\frac {c_{1}}{x^{2}-1} \end {align*}
Hence the ode is \begin {align*} y^{\prime }+\frac {2 x y}{x^{2}-1} = \frac {c_{1}}{x^{2}-1} \end {align*}
The integrating factor \(\mu \) is \begin{align*}
\mu &= {\mathrm e}^{\int \frac {2 x}{x^{2}-1}d x} \\
&= {\mathrm e}^{\ln \left (x -1\right )+\ln \left (x +1\right )} \\
\end{align*} Which simplifies to \[
\mu = x^{2}-1
\] The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_{1}}{x^{2}-1}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\left (x^{2}-1\right ) y\right ) &= \left (x^{2}-1\right ) \left (\frac {c_{1}}{x^{2}-1}\right )\\ \mathrm {d} \left (\left (x^{2}-1\right ) y\right ) &= c_{1}\, \mathrm {d} x \end {align*}
Integrating gives \begin {align*} \left (x^{2}-1\right ) y &= \int {c_{1}\,\mathrm {d} x}\\ \left (x^{2}-1\right ) y &= c_{1} x + c_{2} \end {align*}
Dividing both sides by the integrating factor \(\mu =x^{2}-1\) results in \begin {align*} y &= \frac {c_{1} x}{x^{2}-1}+\frac {c_{2}}{x^{2}-1} \end {align*}
which simplifies to \begin {align*} y &= \frac {c_{1} x +c_{2}}{x^{2}-1} \end {align*}
Initial conditions are used to solve for the constants of integration.
Looking at the above solution \begin {align*} y = \frac {c_{1} x +c_{2}}{x^{2}-1} \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(y = -5\) and \(x = 0\) in the above gives
\begin {align*} -5 = -c_{2}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} y^{\prime } = \frac {c_{1}}{x^{2}-1}-\frac {2 \left (c_{1} x +c_{2} \right ) x}{\left (x^{2}-1\right )^{2}} \end {align*}
substituting \(y^{\prime } = 1\) and \(x = 0\) in the above gives \begin {align*} 1 = -c_{1}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=-1\\ c_{2}&=5 \end {align*}
Substituting these values back in above solution results in \begin {align*} y = -\frac {x -5}{x^{2}-1} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= -\frac {x -5}{x^{2}-1} \\
\end{align*} Verification of solutions
\[
y = -\frac {x -5}{x^{2}-1}
\] Verified OK. Writing the ode as \begin {align*} \left (x^{2}-1\right ) y^{\prime \prime }+4 x y^{\prime }+2 y &= 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^{2}-1 \\ B &= 4 x\tag {3} \\ C &= 2 \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 \} \) 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 {4 x}{x^{2}-1} \,dx} \\
&= z_1 e^{-\ln \left (x -1\right )-\ln \left (x +1\right )} \\
&= z_1 \left (\frac {1}{x^{2}-1}\right ) \\
\end{align*} Which simplifies to \[
y_1 = \frac {1}{x^{2}-1}
\]
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 {4 x}{x^{2}-1} \,dx}}{\left (y_1\right )^2} \,dx \\
&= y_1 \int \frac { e^{-2 \ln \left (x -1\right )-2 \ln \left (x +1\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^{2}-1}\right ) + c_{2} \left (\frac {1}{x^{2}-1}\left (x\right )\right ) \\
\end{align*} Initial conditions are used to solve for the constants of integration.
Looking at the above solution \begin {align*} y = \frac {c_{1}}{x^{2}-1}+\frac {c_{2} x}{x^{2}-1} \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(y = -5\) and \(x = 0\) in the above gives
\begin {align*} -5 = -c_{1}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} y^{\prime } = -\frac {2 c_{1} x}{\left (x^{2}-1\right )^{2}}+\frac {c_{2}}{x^{2}-1}-\frac {2 c_{2} x^{2}}{\left (x^{2}-1\right )^{2}} \end {align*}
substituting \(y^{\prime } = 1\) and \(x = 0\) in the above gives \begin {align*} 1 = -c_{2}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=5\\ c_{2}&=-1 \end {align*}
Substituting these values back in above solution results in \begin {align*} y = -\frac {x -5}{x^{2}-1} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= -\frac {x -5}{x^{2}-1} \\
\end{align*} Verification of solutions
\[
y = -\frac {x -5}{x^{2}-1}
\] Verified OK. 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^{2}-1\\ q(x) &= 4 x\\ r(x) &= 2\\ s(x) &= 0 \end {align*}
Hence \begin {align*} p''(x) &= 2\\ q'(x) &= 4 \end {align*}
Therefore (1) becomes \begin {align*} 2- \left (4\right ) + \left (2\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*} 2 y x +\left (x^{2}-1\right ) y^{\prime }&=c_{1} \end {align*}
We now have a first order ode to solve which is \begin {align*} 2 y x +\left (x^{2}-1\right ) y^{\prime } = c_{1} \end {align*}
Entering Linear first order ODE solver. In canonical form a linear first order is
\begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}
Where here \begin {align*} p(x) &=\frac {2 x}{x^{2}-1}\\ q(x) &=\frac {c_{1}}{x^{2}-1} \end {align*}
Hence the ode is \begin {align*} y^{\prime }+\frac {2 x y}{x^{2}-1} = \frac {c_{1}}{x^{2}-1} \end {align*}
The integrating factor \(\mu \) is \begin{align*}
\mu &= {\mathrm e}^{\int \frac {2 x}{x^{2}-1}d x} \\
&= {\mathrm e}^{\ln \left (x -1\right )+\ln \left (x +1\right )} \\
\end{align*} Which simplifies to \[
\mu = x^{2}-1
\] The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_{1}}{x^{2}-1}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\left (x^{2}-1\right ) y\right ) &= \left (x^{2}-1\right ) \left (\frac {c_{1}}{x^{2}-1}\right )\\ \mathrm {d} \left (\left (x^{2}-1\right ) y\right ) &= c_{1}\, \mathrm {d} x \end {align*}
Integrating gives \begin {align*} \left (x^{2}-1\right ) y &= \int {c_{1}\,\mathrm {d} x}\\ \left (x^{2}-1\right ) y &= c_{1} x + c_{2} \end {align*}
Dividing both sides by the integrating factor \(\mu =x^{2}-1\) results in \begin {align*} y &= \frac {c_{1} x}{x^{2}-1}+\frac {c_{2}}{x^{2}-1} \end {align*}
which simplifies to \begin {align*} y &= \frac {c_{1} x +c_{2}}{x^{2}-1} \end {align*}
Initial conditions are used to solve for the constants of integration.
Looking at the above solution \begin {align*} y = \frac {c_{1} x +c_{2}}{x^{2}-1} \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(y = -5\) and \(x = 0\) in the above gives
\begin {align*} -5 = -c_{2}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} y^{\prime } = \frac {c_{1}}{x^{2}-1}-\frac {2 \left (c_{1} x +c_{2} \right ) x}{\left (x^{2}-1\right )^{2}} \end {align*}
substituting \(y^{\prime } = 1\) and \(x = 0\) in the above gives \begin {align*} 1 = -c_{1}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=-1\\ c_{2}&=5 \end {align*}
Substituting these values back in above solution results in \begin {align*} y = -\frac {x -5}{x^{2}-1} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= -\frac {x -5}{x^{2}-1} \\
\end{align*} Verification of solutions
\[
y = -\frac {x -5}{x^{2}-1}
\] Verified OK. \[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [\left (x^{2}-1\right ) \left (\frac {d}{d x}y^{\prime }\right )+4 x y^{\prime }+2 y=0, y \left (0\right )=-5, y^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{x \hiderel {=}0\right \}}}}=1\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d}{d x}y^{\prime } \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=-\frac {4 x y^{\prime }}{x^{2}-1}-\frac {2 y}{x^{2}-1} \\ \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} \\ {} & {} & \frac {d}{d x}y^{\prime }+\frac {4 x y^{\prime }}{x^{2}-1}+\frac {2 y}{x^{2}-1}=0 \\ \square & {} & \textrm {Check to see if}\hspace {3pt} x_{0}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & \circ & \textrm {Define functions}\hspace {3pt} \\ {} & {} & \left [P_{2}\left (x \right )=\frac {4 x}{x^{2}-1}, P_{3}\left (x \right )=\frac {2}{x^{2}-1}\right ] \\ {} & \circ & \left (x +1\right )\cdot P_{2}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =-1 \\ {} & {} & \left (\left (x +1\right )\cdot P_{2}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}-1}}}=2 \\ {} & \circ & \left (x +1\right )^{2}\cdot P_{3}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =-1 \\ {} & {} & \left (\left (x +1\right )^{2}\cdot P_{3}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}-1}}}=0 \\ {} & \circ & x =-1\textrm {is a regular singular point}\hspace {3pt} \\ & {} & \textrm {Check to see if}\hspace {3pt} x_{0}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & {} & x_{0}=-1 \\ \bullet & {} & \textrm {Multiply by denominators}\hspace {3pt} \\ {} & {} & \left (x^{2}-1\right ) \left (\frac {d}{d x}y^{\prime }\right )+4 x y^{\prime }+2 y=0 \\ \bullet & {} & \textrm {Change variables using}\hspace {3pt} x =u -1\hspace {3pt}\textrm {so that the regular singular point is at}\hspace {3pt} u =0 \\ {} & {} & \left (u^{2}-2 u \right ) \left (\frac {d}{d u}\frac {d}{d u}y \left (u \right )\right )+\left (4 u -4\right ) \left (\frac {d}{d u}y \left (u \right )\right )+2 y \left (u \right )=0 \\ \bullet & {} & \textrm {Assume series solution for}\hspace {3pt} y \left (u \right ) \\ {} & {} & y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k +r} \\ \square & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & \circ & \textrm {Convert}\hspace {3pt} u^{m}\cdot \left (\frac {d}{d u}y \left (u \right )\right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =0..1 \\ {} & {} & u^{m}\cdot \left (\frac {d}{d u}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (k +r \right ) u^{k +r -1+m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1-m \\ {} & {} & u^{m}\cdot \left (\frac {d}{d u}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =-1+m}{\sum }}a_{k +1-m} \left (k +1-m +r \right ) u^{k +r} \\ {} & \circ & \textrm {Convert}\hspace {3pt} u^{m}\cdot \left (\frac {d}{d u}\frac {d}{d u}y \left (u \right )\right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =1..2 \\ {} & {} & u^{m}\cdot \left (\frac {d}{d u}\frac {d}{d u}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (k +r \right ) \left (k +r -1\right ) u^{k +r -2+m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +2-m \\ {} & {} & u^{m}\cdot \left (\frac {d}{d u}\frac {d}{d u}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =-2+m}{\sum }}a_{k +2-m} \left (k +2-m +r \right ) \left (k +1-m +r \right ) u^{k +r} \\ & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & {} & -2 a_{0} r \left (1+r \right ) u^{-1+r}+\left (\moverset {\infty }{\munderset {k =0}{\sum }}\left (-2 a_{k +1} \left (k +r +1\right ) \left (k +r +2\right )+a_{k} \left (k +r +2\right ) \left (k +r +1\right )\right ) u^{k +r}\right )=0 \\ \bullet & {} & a_{0}\textrm {cannot be 0 by assumption, giving the indicial equation}\hspace {3pt} \\ {} & {} & -2 r \left (1+r \right )=0 \\ \bullet & {} & \textrm {Values of r that satisfy the indicial equation}\hspace {3pt} \\ {} & {} & r \in \left \{-1, 0\right \} \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & \left (k +r +2\right ) \left (k +r +1\right ) \left (-2 a_{k +1}+a_{k}\right )=0 \\ \bullet & {} & \textrm {Recursion relation that defines series solution to ODE}\hspace {3pt} \\ {} & {} & a_{k +1}=\frac {a_{k}}{2} \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =-1 \\ {} & {} & a_{k +1}=\frac {a_{k}}{2} \\ \bullet & {} & \textrm {Solution for}\hspace {3pt} r =-1 \\ {} & {} & \left [y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k -1}, a_{k +1}=\frac {a_{k}}{2}\right ] \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =x +1 \\ {} & {} & \left [y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (x +1\right )^{k -1}, a_{k +1}=\frac {a_{k}}{2}\right ] \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =0 \\ {} & {} & a_{k +1}=\frac {a_{k}}{2} \\ \bullet & {} & \textrm {Solution for}\hspace {3pt} r =0 \\ {} & {} & \left [y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k}, a_{k +1}=\frac {a_{k}}{2}\right ] \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =x +1 \\ {} & {} & \left [y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (x +1\right )^{k}, a_{k +1}=\frac {a_{k}}{2}\right ] \\ \bullet & {} & \textrm {Combine solutions and rename parameters}\hspace {3pt} \\ {} & {} & \left [y=\left (\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (x +1\right )^{k -1}\right )+\left (\moverset {\infty }{\munderset {k =0}{\sum }}b_{k} \left (x +1\right )^{k}\right ), a_{k +1}=\frac {a_{k}}{2}, b_{k +1}=\frac {b_{k}}{2}\right ] \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 0.016 (sec). Leaf size: 17
\[
y \left (x \right ) = \frac {-x +5}{x^{2}-1}
\]
✓ Solution by Mathematica
Time used: 0.024 (sec). Leaf size: 18
\[
y(x)\to \frac {5-x}{x^2-1}
\]
8.6.2 Solving as linear second order ode solved by an integrating factor ode
8.6.3 Solving as second order change of variable on y method 1 ode
8.6.4 Solving as second order integrable as is ode
8.6.5 Solving as type second_order_integrable_as_is (not using ABC version)
8.6.6 Solving using Kovacic algorithm
8.6.7 Solving as exact linear second order ode ode
8.6.8 Maple step by step solution
`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
trying a symmetry of the form [xi=0, eta=F(x)]
<- linear_1 successful`
dsolve([(x^2-1)*diff(y(x),x$2)+4*x*diff(y(x),x)+2*y(x)=0,y(0) = -5, D(y)(0) = 1],y(x), singsol=all)
DSolve[{(x^2-1)*y''[x]+4*x*y'[x]+2*y[x]==0,{y[0]==-5,y'[0]==1}},y[x],x,IncludeSingularSolutions -> True]