2.1.33 Problem 33
Internal
problem
ID
[10392]
Book
:
Second
order
enumerated
odes
Section
:
section
1
Problem
number
:
33
Date
solved
:
Monday, December 08, 2025 at 08:43:35 PM
CAS
classification
:
[[_2nd_order, _missing_y]]
2.1.33.1 second order linear constant coeff
0.154 (sec)
\begin{align*}
y^{\prime \prime }+y^{\prime }&=x +1 \\
\end{align*}
Entering second order linear constant coefficient ode solver This is second order non-homogeneous
ODE. In standard form the ODE is \[ A y''(x) + B y'(x) + C y(x) = f(x) \]
Where \(A=1, B=1, C=0, f(x)=x +1\) . Let the solution be \[ y = y_h + y_p \]
Where \(y_h\) is the solution to the
homogeneous ODE \begin{align*} A y''(x) + B y'(x) + C y(x) &= 0 \end{align*}
And \(y_p\) is a particular solution to the non-homogeneous ODE
\begin{align*} A y''(x) + B y'(x) + C y(x) &= f(x) \end{align*}
Where \(y_h\) is the solution to
\[
y^{\prime \prime }+y^{\prime } = 0
\]
This is second order with constant coefficients homogeneous ODE. In standard form the
ODE is
\[ A y''(x) + B y'(x) + C y(x) = 0 \]
Where in the above \(A=1, B=1, C=0\) . Let the solution be \(y=e^{\lambda x}\) . Substituting this into the ODE
gives \[ \lambda ^{2} {\mathrm e}^{x \lambda }+\lambda \,{\mathrm e}^{x \lambda } = 0 \tag {1} \]
Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda x}\)
gives \[ \lambda ^{2}+\lambda = 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=1, C=0\) into the above gives
\begin{align*} \lambda _{1,2} &= \frac {-1}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {1^2 - (4) \left (1\right )\left (0\right )}\\ &= -{\frac {1}{2}} \pm {\frac {1}{2}} \end{align*}
Hence
\begin{align*}
\lambda _1 &= -{\frac {1}{2}} + {\frac {1}{2}} \\
\lambda _2 &= -{\frac {1}{2}} - {\frac {1}{2}} \\
\end{align*}
Which simplifies to \begin{align*}
\lambda _1 &= 0 \\
\lambda _2 &= -1 \\
\end{align*}
Since roots are distinct, then the solution is \begin{align*}
y &= c_1 e^{\lambda _1 x} + c_2 e^{\lambda _2 x} \\
y &= c_1 e^{\left (0\right )x} +c_2 e^{\left (-1\right )x} \\
\end{align*}
Or \[
y =c_1 +{\mathrm e}^{-x} c_2
\]
Therefore the
homogeneous solution \(y_h\) is \[
y_h = c_1 +{\mathrm e}^{-x} c_2
\]
The particular solution is now found using the method of
undetermined coefficients. Looking at the RHS of the ode, which is \[ x +1 \]
Shows that the
corresponding undetermined set of the basis functions (UC_set) for the trial solution is \[ [\{1, x\}] \]
While
the set of the basis functions for the homogeneous solution found earlier is \[ \{1, {\mathrm e}^{-x}\} \]
Since
\(1\) is duplicated in the UC_set, then this basis is multiplied by extra \(x\) . The UC_set
becomes \[ [\{x, x^{2}\}] \]
Since there was duplication between the basis functions in the UC_set and the
basis functions of the homogeneous solution, the trial solution is a linear combination
of all the basis function in the above updated UC_set. \[
y_p = A_{2} x^{2}+A_{1} x
\]
The unknowns \(\{A_{1}, A_{2}\}\) are found
by substituting the above trial solution \(y_p\) into the ODE and comparing coefficients.
Substituting the trial solution into the ODE and simplifying gives \[
2 x A_{2}+A_{1}+2 A_{2} = x +1
\]
Solving for the
unknowns by comparing coefficients results in \[ \left [A_{1} = 0, A_{2} = {\frac {1}{2}}\right ] \]
Substituting the above back in the
above trial solution \(y_p\) , gives the particular solution \[
y_p = \frac {x^{2}}{2}
\]
Therefore the general solution is
\begin{align*}
y &= y_h + y_p \\
&= \left (c_1 +{\mathrm e}^{-x} c_2\right ) + \left (\frac {x^{2}}{2}\right ) \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= \frac {x^{2}}{2}+c_1 +{\mathrm e}^{-x} c_2 \\
\end{align*}
Figure 2.75: Slope field \(y^{\prime \prime }+y^{\prime } = x +1\)
2.1.33.2 second order linear exact ode
0.184 (sec)
\begin{align*}
y^{\prime \prime }+y^{\prime }&=x +1 \\
\end{align*}
Entering second order linear exact ode solver 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) &= 1\\ q(x) &= 1\\ r(x) &= 0\\ s(x) &= x +1 \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 }+y&=\int {x +1\, dx} \end{align*}
We now have a first order ode to solve which is
\begin{align*} y^{\prime }+y = \frac {1}{2} x^{2}+x +c_1 \end{align*}
Entering first order ode linear solver In canonical form a linear first order is
\begin{align*} y^{\prime } + q(x)y &= p(x) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(x) &=1\\ p(x) &=\frac {1}{2} x^{2}+x +c_1 \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int 1d x}\\ &= {\mathrm e}^{x} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {1}{2} x^{2}+x +c_1\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left ({\mathrm e}^{x} y\right ) &= \left ({\mathrm e}^{x}\right ) \left (\frac {1}{2} x^{2}+x +c_1\right ) \\
\mathrm {d} \left ({\mathrm e}^{x} y\right ) &= \left (\left (\frac {1}{2} x^{2}+x +c_1 \right ) {\mathrm e}^{x}\right )\, \mathrm {d} x \\
\end{align*}
Integrating gives \begin{align*} {\mathrm e}^{x} y&= \int {\left (\frac {1}{2} x^{2}+x +c_1 \right ) {\mathrm e}^{x} \,dx} \\ &=\frac {{\mathrm e}^{x} \left (x^{2}+2 c_1 \right )}{2} + c_2 \end{align*}
Dividing throughout by the integrating factor \({\mathrm e}^{x}\) gives the final solution
\[ y = \frac {x^{2}}{2}+c_1 +{\mathrm e}^{-x} c_2 \]
Summary of solutions found
\begin{align*}
y &= \frac {x^{2}}{2}+c_1 +{\mathrm e}^{-x} c_2 \\
\end{align*}
Figure 2.76: Slope field \(y^{\prime \prime }+y^{\prime } = x +1\)
2.1.33.3 second order ode missing y
0.236 (sec)
\begin{align*}
y^{\prime \prime }+y^{\prime }&=x +1 \\
\end{align*}
Entering second order ode missing \(y\) solver This is second order ode with missing dependent
variable \(y\) . Let \begin{align*} u(x) &= y^{\prime } \end{align*}
Then
\begin{align*} u'(x) &= y^{\prime \prime } \end{align*}
Hence the ode becomes
\begin{align*} u^{\prime }\left (x \right )+u \left (x \right )-x -1 = 0 \end{align*}
Which is now solved for \(u(x)\) as first order ode.
Entering first order ode linear solver In canonical form a linear first order is
\begin{align*} u^{\prime }\left (x \right ) + q(x)u \left (x \right ) &= p(x) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(x) &=1\\ p(x) &=x +1 \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int 1d x}\\ &= {\mathrm e}^{x} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu u\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu u\right ) &= \left (\mu \right ) \left (x +1\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (u \,{\mathrm e}^{x}\right ) &= \left ({\mathrm e}^{x}\right ) \left (x +1\right ) \\
\mathrm {d} \left (u \,{\mathrm e}^{x}\right ) &= \left (\left (x +1\right ) {\mathrm e}^{x}\right )\, \mathrm {d} x \\
\end{align*}
Integrating gives \begin{align*} u \,{\mathrm e}^{x}&= \int {\left (x +1\right ) {\mathrm e}^{x} \,dx} \\ &={\mathrm e}^{x} x + c_1 \end{align*}
Dividing throughout by the integrating factor \({\mathrm e}^{x}\) gives the final solution
\[ u \left (x \right ) = x +{\mathrm e}^{-x} c_1 \]
In summary, these are the
solution found for \(y\) \begin{align*}
u \left (x \right ) &= x +{\mathrm e}^{-x} c_1 \\
\end{align*}
For solution \(u \left (x \right ) = x +{\mathrm e}^{-x} c_1\) , since \(u=y^{\prime }\) then we now have a new first order ode to solve which is
\begin{align*} y^{\prime } = x +{\mathrm e}^{-x} c_1 \end{align*}
Entering first order ode quadrature solver Since the ode has the form \(y^{\prime }=f(x)\) , then we only need to
integrate \(f(x)\) .
\begin{align*} \int {dy} &= \int {x +{\mathrm e}^{-x} c_1\, dx}\\ y &= \frac {x^{2}}{2}-{\mathrm e}^{-x} c_1 + c_2 \end{align*}
In summary, these are the solution found for \((y)\)
\begin{align*}
y &= \frac {x^{2}}{2}-{\mathrm e}^{-x} c_1 +c_2 \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= \frac {x^{2}}{2}-{\mathrm e}^{-x} c_1 +c_2 \\
\end{align*}
Figure 2.77: Slope field \(y^{\prime \prime }+y^{\prime } = x +1\)
2.1.33.4 second order integrable as is
0.079 (sec)
\begin{align*}
y^{\prime \prime }+y^{\prime }&=x +1 \\
\end{align*}
Entering second order integrable as is solver Integrating both sides of the ODE w.r.t \(x\) gives
\begin{align*} \int \left (y^{\prime \prime }+y^{\prime }\right )d x &= \int \left (x +1\right )d x\\ y^{\prime }+y = \frac {1}{2} x^{2}+x + c_1 \end{align*}
Which is now solved for \(y\) . Entering first order ode linear solver In canonical form a linear first
order is
\begin{align*} y^{\prime } + q(x)y &= p(x) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(x) &=1\\ p(x) &=\frac {1}{2} x^{2}+x +c_1 \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int 1d x}\\ &= {\mathrm e}^{x} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {1}{2} x^{2}+x +c_1\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left ({\mathrm e}^{x} y\right ) &= \left ({\mathrm e}^{x}\right ) \left (\frac {1}{2} x^{2}+x +c_1\right ) \\
\mathrm {d} \left ({\mathrm e}^{x} y\right ) &= \left (\left (\frac {1}{2} x^{2}+x +c_1 \right ) {\mathrm e}^{x}\right )\, \mathrm {d} x \\
\end{align*}
Integrating gives \begin{align*} {\mathrm e}^{x} y&= \int {\left (\frac {1}{2} x^{2}+x +c_1 \right ) {\mathrm e}^{x} \,dx} \\ &=\frac {{\mathrm e}^{x} \left (x^{2}+2 c_1 \right )}{2} + c_2 \end{align*}
Dividing throughout by the integrating factor \({\mathrm e}^{x}\) gives the final solution
\[ y = \frac {x^{2}}{2}+c_1 +{\mathrm e}^{-x} c_2 \]
Summary of solutions found
\begin{align*}
y &= \frac {x^{2}}{2}+c_1 +{\mathrm e}^{-x} c_2 \\
\end{align*}
Figure 2.78: Slope field \(y^{\prime \prime }+y^{\prime } = x +1\)
2.1.33.5 second order kovacic
0.131 (sec)
\begin{align*}
y^{\prime \prime }+y^{\prime }&=x +1 \\
\end{align*}
Entering kovacic solver Writing the ode as \begin{align*} y^{\prime \prime }+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 &= 1 \\ B &= 1\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 {1}{4}\tag {6} \end{align*}
Comparing the above to (5) shows that
\begin{align*} s &= 1\\ t &= 4 \end{align*}
Therefore eq. (4) becomes
\begin{align*} z''(x) &= \frac {z \left (x \right )}{4} \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 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 = {\frac {1}{4}}\) 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) = {\mathrm e}^{-\frac {x}{2}} \]
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 {1}{1} \,dx} \\
&= z_1 e^{-\frac {x}{2}} \\
&= z_1 \left ({\mathrm e}^{-\frac {x}{2}}\right ) \\
\end{align*}
Which simplifies to \[
y_1 = {\mathrm e}^{-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 {1}{1} \,dx}}{\left (y_1\right )^2} \,dx \\
&= y_1 \int \frac { e^{-x}}{\left (y_1\right )^2} \,dx \\
&= y_1 \left ({\mathrm e}^{x}\right ) \\
\end{align*}
Therefore the
solution is
\begin{align*}
y &= c_1 y_1 + c_2 y_2 \\
&= c_1 \left ({\mathrm e}^{-x}\right ) + c_2 \left ({\mathrm e}^{-x}\left ({\mathrm e}^{x}\right )\right ) \\
\end{align*}
This is second order nonhomogeneous ODE. Let the solution be \[
y = y_h + y_p
\]
Where \(y_h\) is the solution to the
homogeneous ODE \[
A y''(x) + B y'(x) + C y(x) = 0
\]
And \(y_p\) is a particular solution to the nonhomogeneous ODE \[
A y''(x) + B y'(x) + C y(x) = f(x)
\]
\(y_h\) is the solution
to \[
y^{\prime \prime }+y^{\prime } = 0
\]
The homogeneous solution is found using the Kovacic algorithm which results in \[
y_h = {\mathrm e}^{-x} c_1 +c_2
\]
The
particular solution is now found using the method of undetermined coefficients. Looking at the
RHS of the ode, which is \[ x +1 \]
Shows that the corresponding undetermined set of the basis functions
(UC_set) for the trial solution is \[ [\{1, x\}] \]
While the set of the basis functions for the homogeneous
solution found earlier is \[ \{1, {\mathrm e}^{-x}\} \]
Since \(1\) is duplicated in the UC_set, then this basis is multiplied by extra
\(x\) . The UC_set becomes \[ [\{x, x^{2}\}] \]
Since there was duplication between the basis functions in the UC_set
and the basis functions of the homogeneous solution, the trial solution is a linear combination
of all the basis function in the above updated UC_set. \[
y_p = A_{2} x^{2}+A_{1} x
\]
The unknowns \(\{A_{1}, A_{2}\}\) are found
by substituting the above trial solution \(y_p\) into the ODE and comparing coefficients.
Substituting the trial solution into the ODE and simplifying gives \[
2 x A_{2}+A_{1}+2 A_{2} = x +1
\]
Solving for the
unknowns by comparing coefficients results in \[ \left [A_{1} = 0, A_{2} = {\frac {1}{2}}\right ] \]
Substituting the above back in the
above trial solution \(y_p\) , gives the particular solution \[
y_p = \frac {x^{2}}{2}
\]
Therefore the general solution is
\begin{align*}
y &= y_h + y_p \\
&= \left ({\mathrm e}^{-x} c_1 +c_2\right ) + \left (\frac {x^{2}}{2}\right ) \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= \frac {x^{2}}{2}+{\mathrm e}^{-x} c_1 +c_2 \\
\end{align*}
Figure 2.79: Slope field \(y^{\prime \prime }+y^{\prime } = x +1\)
2.811 (sec)
\begin{align*}
y^{\prime \prime }+y^{\prime }&=x +1 \\
\end{align*}
Applying change of variable \(x = \arccos \left (\tau \right )\) to the above ode results in the following new ode
\[
-\left (\frac {d^{2}}{d \tau ^{2}}y \left (\tau \right )\right ) \tau ^{2}-\left (\frac {d}{d \tau }y \left (\tau \right )\right ) \sqrt {-\tau ^{2}+1}-\left (\frac {d}{d \tau }y \left (\tau \right )\right ) \tau +\frac {d^{2}}{d \tau ^{2}}y \left (\tau \right ) = 1+\arccos \left (\tau \right )
\]
Which is now
solved for \(y \left (\tau \right )\) . Entering second order ode missing \(y\) solver This is second order ode with missing
dependent variable \(y \left (\tau \right )\) . Let \begin{align*} u(\tau ) &= \frac {d}{d \tau }y \left (\tau \right ) \end{align*}
Then
\begin{align*} u'(\tau ) &= \frac {d^{2}}{d \tau ^{2}}y \left (\tau \right ) \end{align*}
Hence the ode becomes
\begin{align*} -\left (\frac {d}{d \tau }u \left (\tau \right )\right ) \tau ^{2}-u \left (\tau \right ) \sqrt {-\tau ^{2}+1}-u \left (\tau \right ) \tau +\frac {d}{d \tau }u \left (\tau \right )-1-\arccos \left (\tau \right ) = 0 \end{align*}
Which is now solved for \(u(\tau )\) as first order ode.
Entering first order ode linear solver In canonical form a linear first order is
\begin{align*} \frac {d}{d \tau }u \left (\tau \right ) + q(\tau )u \left (\tau \right ) &= p(\tau ) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(\tau ) &=-\frac {-\sqrt {-\tau ^{2}+1}-\tau }{\tau ^{2}-1}\\ p(\tau ) &=\frac {-1-\arccos \left (\tau \right )}{\tau ^{2}-1} \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,d\tau }}\\ &= {\mathrm e}^{\int -\frac {-\sqrt {-\tau ^{2}+1}-\tau }{\tau ^{2}-1}d \tau }\\ &= \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\tau }}\left ( \mu u\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\tau }}\left ( \mu u\right ) &= \left (\mu \right ) \left (\frac {-1-\arccos \left (\tau \right )}{\tau ^{2}-1}\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\tau }} \left (u \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}\right ) &= \left (\sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}\right ) \left (\frac {-1-\arccos \left (\tau \right )}{\tau ^{2}-1}\right ) \\
\mathrm {d} \left (u \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}\right ) &= \left (\frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}\right )\, \mathrm {d} \tau \\
\end{align*}
Integrating gives \begin{align*} u \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}&= \int {\frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1} \,d\tau } \\ &=\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau + c_1 \end{align*}
Dividing throughout by the integrating factor \(\sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}\) gives the final solution
\[ u \left (\tau \right ) = \frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}} \]
In summary, these are the
solution found for \(y \left (\tau \right )\) \begin{align*}
u \left (\tau \right ) &= \frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}} \\
\end{align*}
For solution \(u \left (\tau \right ) = \frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}}\) , since \(u=\frac {d}{d \tau }y \left (\tau \right )\) then we now have a new first order ode to solve which is
\begin{align*} \frac {d}{d \tau }y \left (\tau \right ) = \frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}} \end{align*}
Entering first order ode quadrature solver Since the ode has the form \(\frac {d}{d \tau }y \left (\tau \right )=f(\tau )\) , then we only need to
integrate \(f(\tau )\) .
\begin{align*} \int {dy} &= \int {\frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}}\, d\tau }\\ y \left (\tau \right ) &= \int \frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}}d \tau + c_2 \end{align*}
\begin{align*} y \left (\tau \right )&= \int \frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}}d \tau +c_2 \end{align*}
In summary, these are the solution found for \((y \left (\tau \right ))\)
\begin{align*}
y \left (\tau \right ) &= \int \frac {{\mathrm e}^{\arcsin \left (\tau \right )} \left (\int \frac {\left (-1-\arccos \left (\tau \right )\right ) \sqrt {\tau -1}\, \sqrt {\tau +1}\, {\mathrm e}^{-\arcsin \left (\tau \right )}}{\tau ^{2}-1}d \tau +c_1 \right )}{\sqrt {\tau -1}\, \sqrt {\tau +1}}d \tau +c_2 \\
\end{align*}
Applying change of variable \(\tau = \cos \left (x \right )\) to the solutions
above gives \begin{align*}
y &= \int -\frac {{\mathrm e}^{\arcsin \left (\cos \left (x \right )\right )} \left (\int -\frac {\left (-1-\arccos \left (\cos \left (x \right )\right )\right ) \sqrt {\cos \left (x \right )-1}\, \sqrt {\cos \left (x \right )+1}\, {\mathrm e}^{-\arcsin \left (\cos \left (x \right )\right )} \sin \left (x \right )}{\cos \left (x \right )^{2}-1}d x +c_1 \right ) \sin \left (x \right )}{\sqrt {\cos \left (x \right )-1}\, \sqrt {\cos \left (x \right )+1}}d x +c_2 \\
\end{align*}
Figure 2.80: Slope field \(y^{\prime \prime }+y^{\prime } = x +1\)
2.1.33.7 ✓ Maple. Time used: 0.001 (sec). Leaf size: 18
ode := diff ( diff ( y ( x ), x ), x )+ diff ( y ( x ), x ) = x+1;
dsolve ( ode , y ( x ), singsol=all);
\[
y = \frac {x^{2}}{2}-{\mathrm e}^{-x} c_1 +c_2
\]
Maple trace
Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
trying high order exact linear fully integrable
-> Calling odsolve with the ODE, diff(_b(_a),_a) = -_b(_a)+1+_a, _b(_a)
*** Sublevel 2 ***
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful
<- high order exact linear fully integrable successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )+\frac {d}{d x}y \left (x \right )=1+x \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Characteristic polynomial of homogeneous 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 homogeneous ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (x \right )={\mathrm e}^{-x} \\ \bullet & {} & \textrm {2nd solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y_{2}\left (x \right )=1 \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & y \left (x \right )=\mathit {C1} y_{1}\left (x \right )+\mathit {C2} y_{2}\left (x \right )+y_{p}\left (x \right ) \\ \bullet & {} & \textrm {Substitute in solutions of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y \left (x \right )=\mathit {C1} \,{\mathrm e}^{-x}+\mathit {C2} +y_{p}\left (x \right ) \\ \square & {} & \textrm {Find a particular solution}\hspace {3pt} y_{p}\left (x \right )\hspace {3pt}\textrm {of the ODE}\hspace {3pt} \\ {} & \circ & \textrm {Use variation of parameters to find}\hspace {3pt} y_{p}\hspace {3pt}\textrm {here}\hspace {3pt} f \left (x \right )\hspace {3pt}\textrm {is the forcing function}\hspace {3pt} \\ {} & {} & \left [y_{p}\left (x \right )=-y_{1}\left (x \right ) \int \frac {y_{2}\left (x \right ) f \left (x \right )}{W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )}d x +y_{2}\left (x \right ) \int \frac {y_{1}\left (x \right ) f \left (x \right )}{W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )}d x , f \left (x \right )=1+x \right ] \\ {} & \circ & \textrm {Wronskian of solutions of the homogeneous equation}\hspace {3pt} \\ {} & {} & W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )=\left [\begin {array}{cc} {\mathrm e}^{-x} & 1 \\ -{\mathrm e}^{-x} & 0 \end {array}\right ] \\ {} & \circ & \textrm {Compute Wronskian}\hspace {3pt} \\ {} & {} & W \left (y_{1}\left (x \right ), y_{2}\left (x \right )\right )={\mathrm e}^{-x} \\ {} & \circ & \textrm {Substitute functions into equation for}\hspace {3pt} y_{p}\left (x \right ) \\ {} & {} & y_{p}\left (x \right )=-{\mathrm e}^{-x} \int \left (1+x \right ) {\mathrm e}^{x}d x +\int \left (1+x \right )d x \\ {} & \circ & \textrm {Compute integrals}\hspace {3pt} \\ {} & {} & y_{p}\left (x \right )=\frac {x^{2}}{2} \\ \bullet & {} & \textrm {Substitute particular solution into general solution to ODE}\hspace {3pt} \\ {} & {} & y \left (x \right )=\mathit {C1} \,{\mathrm e}^{-x}+\mathit {C2} +\frac {x^{2}}{2} \end {array} \]
2.1.33.8 ✓ Mathematica. Time used: 0.02 (sec). Leaf size: 24
ode = D [ y [ x ],{ x ,2}]+ D [ y [ x ], x ]==1+ x ;
ic ={};
DSolve [{ ode , ic }, y [ x ], x , IncludeSingularSolutions -> True ]
\begin{align*} y(x)&\to \frac {x^2}{2}-c_1 e^{-x}+c_2 \end{align*}
2.1.33.9 ✓ Sympy. Time used: 0.077 (sec). Leaf size: 14
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(-x + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 1,0)
ics = {}
dsolve ( ode , func = y ( x ), ics = ics )
\[
y{\left (x \right )} = C_{1} + C_{2} e^{- x} + \frac {x^{2}}{2}
\]