1.91 problem 89

1.91.1 Solving as second order integrable as is ode
1.91.2 Solving as type second_order_integrable_as_is (not using ABC version)
1.91.3 Solving as exact nonlinear second order ode ode

Internal problem ID [7135]
Internal file name [OUTPUT/6121_Sunday_June_05_2022_04_23_34_PM_68750402/index.tex]

Book: Own collection of miscellaneous problems
Section: section 1.0
Problem number: 89.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "second_order_integrable_as_is", "exact nonlinear second order ode"

Maple gives the following as the ode type

[[_2nd_order, _exact, _nonlinear], [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_y_y1], [_2nd_order, _reducible, _mu_xy]]

\[ \boxed {y^{\prime \prime }-y^{\prime } y=2 x} \]

1.91.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 }-y^{\prime } y\right )d x &= \int 2 x d x\\ -\frac {y^{2}}{2}+y^{\prime } = x^{2} + c_{1} \end {align*}

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

This is a Riccati ODE. Comparing the ODE to solve \[ y' = \frac {y^{2}}{2}+x^{2}+c_{1} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=x^{2}+c_{1}\), \(f_1(x)=0\) and \(f_2(x)={\frac {1}{2}}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u}{2}} \tag {1} \end {align*}

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for \(u(x)\) which is \begin {align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end {align*}

But \begin {align*} f_2' &=0\\ f_1 f_2 &=0\\ f_2^2 f_0 &=\frac {x^{2}}{4}+\frac {c_{1}}{4} \end {align*}

Substituting the above terms back in equation (2) gives \begin {align*} \frac {u^{\prime \prime }\left (x \right )}{2}+\left (\frac {x^{2}}{4}+\frac {c_{1}}{4}\right ) u \left (x \right ) &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = \frac {c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )}{\sqrt {x}} \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {c_{2} \left (3-\frac {i c_{1} \sqrt {2}}{2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )-4 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) c_{3} +\left (-1+i \left (x^{2}+\frac {c_{1}}{2}\right ) \sqrt {2}\right ) \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )}{2 x^{\frac {3}{2}}} \] Using the above in (1) gives the solution \[ y = -\frac {c_{2} \left (3-\frac {i c_{1} \sqrt {2}}{2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )-4 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) c_{3} +\left (-1+i \left (x^{2}+\frac {c_{1}}{2}\right ) \sqrt {2}\right ) \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )}{x \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \] Dividing both numerator and denominator by \(c_{2}\) gives, after renaming the constant \(\frac {c_{3}}{c_{2}}=c_{4}\) the following solution

\[ y = \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \] Verified OK.

1.91.2 Solving as type second_order_integrable_as_is (not using ABC version)

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

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

This is a Riccati ODE. Comparing the ODE to solve \[ y' = \frac {y^{2}}{2}+x^{2}+c_{1} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=x^{2}+c_{1}\), \(f_1(x)=0\) and \(f_2(x)={\frac {1}{2}}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u}{2}} \tag {1} \end {align*}

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for \(u(x)\) which is \begin {align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end {align*}

But \begin {align*} f_2' &=0\\ f_1 f_2 &=0\\ f_2^2 f_0 &=\frac {x^{2}}{4}+\frac {c_{1}}{4} \end {align*}

Substituting the above terms back in equation (2) gives \begin {align*} \frac {u^{\prime \prime }\left (x \right )}{2}+\left (\frac {x^{2}}{4}+\frac {c_{1}}{4}\right ) u \left (x \right ) &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = \frac {c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )}{\sqrt {x}} \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {c_{2} \left (3-\frac {i c_{1} \sqrt {2}}{2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )-4 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) c_{3} +\left (-1+i \left (x^{2}+\frac {c_{1}}{2}\right ) \sqrt {2}\right ) \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )}{2 x^{\frac {3}{2}}} \] Using the above in (1) gives the solution \[ y = -\frac {c_{2} \left (3-\frac {i c_{1} \sqrt {2}}{2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )-4 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) c_{3} +\left (-1+i \left (x^{2}+\frac {c_{1}}{2}\right ) \sqrt {2}\right ) \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )}{x \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \] Dividing both numerator and denominator by \(c_{2}\) gives, after renaming the constant \(\frac {c_{3}}{c_{2}}=c_{4}\) the following solution

\[ y = \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \] Verified OK.

1.91.3 Solving as exact nonlinear second order ode ode

An exact non-linear second order ode has the form \begin {align*} a_{2} \left (x , y, y^{\prime }\right ) y^{\prime \prime }+a_{1} \left (x , y, y^{\prime }\right ) y^{\prime }+a_{0} \left (x , y, y^{\prime }\right )&=0 \end {align*}

Where the following conditions are satisfied \begin {align*} \frac {\partial a_2}{\partial y} &= \frac {\partial a_1}{\partial y'}\\ \frac {\partial a_2}{\partial x} &= \frac {\partial a_0}{\partial y'}\\ \frac {\partial a_1}{\partial x} &= \frac {\partial a_0}{\partial y} \end {align*}

Looking at the the ode given we see that \begin {align*} a_2 &= 1\\ a_1 &= -y\\ a_0 &= -2 x \end {align*}

Applying the conditions to the above shows this is a nonlinear exact second order ode. Therefore it can be reduced to first order ode given by \begin {align*} \int {a_2\,d y'} + \int {a_1\,d y} + \int {a_0\,d x} &= c_{1}\\ \int {1\,d y'} + \int {-y\,d y} + \int {-2 x\,d x} &= c_{1} \end {align*}

Which results in \begin {align*} y^{\prime }-\frac {y^{2}}{2}-x^{2} = c_{1} \end {align*}

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

This is a Riccati ODE. Comparing the ODE to solve \[ y' = \frac {y^{2}}{2}+x^{2}+c_{1} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=x^{2}+c_{1}\), \(f_1(x)=0\) and \(f_2(x)={\frac {1}{2}}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u}{2}} \tag {1} \end {align*}

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for \(u(x)\) which is \begin {align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end {align*}

But \begin {align*} f_2' &=0\\ f_1 f_2 &=0\\ f_2^2 f_0 &=\frac {x^{2}}{4}+\frac {c_{1}}{4} \end {align*}

Substituting the above terms back in equation (2) gives \begin {align*} \frac {u^{\prime \prime }\left (x \right )}{2}+\left (\frac {x^{2}}{4}+\frac {c_{1}}{4}\right ) u \left (x \right ) &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = \frac {c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )}{\sqrt {x}} \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {c_{2} \left (3-\frac {i c_{1} \sqrt {2}}{2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )-4 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) c_{3} +\left (-1+i \left (x^{2}+\frac {c_{1}}{2}\right ) \sqrt {2}\right ) \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )}{2 x^{\frac {3}{2}}} \] Using the above in (1) gives the solution \[ y = -\frac {c_{2} \left (3-\frac {i c_{1} \sqrt {2}}{2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )-4 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) c_{3} +\left (-1+i \left (x^{2}+\frac {c_{1}}{2}\right ) \sqrt {2}\right ) \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )}{x \left (c_{2} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{3} \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \] Dividing both numerator and denominator by \(c_{2}\) gives, after renaming the constant \(\frac {c_{3}}{c_{2}}=c_{4}\) the following solution

\[ y = \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \\ \end{align*}

Verification of solutions

\[ y = \frac {\left (i c_{1} \sqrt {2}-6\right ) c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+8 \operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+c_{4} \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right ) \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (2+i \left (-2 x^{2}-c_{1} \right ) \sqrt {2}\right )}{2 x \left (c_{4} \operatorname {WhittakerM}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerW}\left (-\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \] Verified OK.

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
trying 2nd order WeierstrassP 
trying 2nd order JacobiSN 
differential order: 2; trying a linearization to 3rd order 
trying 2nd order ODE linearizable_by_differentiation 
trying 2nd order, 2 integrating factors of the form mu(x,y) 
trying differential order: 2; missing variables 
-> trying 2nd order, dynamical_symmetries, fully reducible to Abel through one integrating factor of the form G(x,y)/(1+H(x,y)*y)^2 
   --- trying a change of variables {x -> y(x), y(x) -> x} and re-entering methods for dynamical symmetries --- 
   -> trying 2nd order, dynamical_symmetries, fully reducible to Abel through one integrating factor of the form G(x,y)/(1+H(x,y)*y) 
trying 2nd order, integrating factors of the form mu(x,y)/(y)^n, only the singular cases 
trying symmetries linear in x and y(x) 
trying differential order: 2; exact nonlinear 
-> Calling odsolve with the ODE`, diff(_b(_a), _a) = (1/2)*_b(_a)^2+_a^2-c__1, _b(_a)`   *** Sublevel 2 *** 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   trying Bernoulli 
   trying separable 
   trying inverse linear 
   trying homogeneous types: 
   trying Chini 
   differential order: 1; looking for linear symmetries 
   trying exact 
   Looking for potential symmetries 
   trying Riccati 
   trying Riccati Special 
   trying Riccati sub-methods: 
      trying Riccati to 2nd Order 
      -> Calling odsolve with the ODE`, diff(diff(y(x), x), x) = (-(1/2)*x^2+(1/2)*c__1)*y(x), y(x)`         *** Sublevel 3 *** 
         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)] 
         checking if the LODE is missing y 
         -> Trying a Liouvillian solution using Kovacics algorithm 
         <- No Liouvillian solutions exists 
         -> Trying a solution in terms of special functions: 
            -> Bessel 
            -> elliptic 
            -> Legendre 
            -> Whittaker 
               -> hyper3: Equivalence to 1F1 under a power @ Moebius 
               <- hyper3 successful: received ODE is equivalent to the 1F1 ODE 
            <- Whittaker successful 
         <- special function solution successful 
      <- Riccati to 2nd Order successful 
<- differential order: 2; exact nonlinear successful`
 

Solution by Maple

Time used: 0.016 (sec). Leaf size: 161

dsolve(diff(y(x),x$2)-diff(y(x),x)*y(x)=2*x,y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {-\operatorname {WhittakerM}\left (\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right ) \left (6+i c_{1} \sqrt {2}\right )+8 c_{2} \operatorname {WhittakerW}\left (\frac {i c_{1} \sqrt {2}}{8}+1, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+2 \left (1-i \left (x^{2}-\frac {c_{1}}{2}\right ) \sqrt {2}\right ) \left (c_{2} \operatorname {WhittakerW}\left (\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerM}\left (\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )}{2 x \left (c_{2} \operatorname {WhittakerW}\left (\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )+\operatorname {WhittakerM}\left (\frac {i c_{1} \sqrt {2}}{8}, \frac {1}{4}, \frac {i \sqrt {2}\, x^{2}}{2}\right )\right )} \]

Solution by Mathematica

Time used: 42.411 (sec). Leaf size: 318

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

\begin{align*} y(x)\to -\frac {\sqrt [4]{2} \left (\sqrt [4]{2} x \operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (-\sqrt {2} c_1-2\right ),i \sqrt [4]{2} x\right )+2 i \operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (2-\sqrt {2} c_1\right ),i \sqrt [4]{2} x\right )+c_2 \left (2 \operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (\sqrt {2} c_1+2\right ),\sqrt [4]{2} x\right )-\sqrt [4]{2} x \operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (\sqrt {2} c_1-2\right ),\sqrt [4]{2} x\right )\right )\right )}{\operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (-\sqrt {2} c_1-2\right ),i \sqrt [4]{2} x\right )+c_2 \operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (\sqrt {2} c_1-2\right ),\sqrt [4]{2} x\right )} \\ y(x)\to \sqrt {2} x-\frac {2 \sqrt [4]{2} \operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (\sqrt {2} c_1+2\right ),\sqrt [4]{2} x\right )}{\operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (\sqrt {2} c_1-2\right ),\sqrt [4]{2} x\right )} \\ y(x)\to \sqrt {2} x-\frac {2 \sqrt [4]{2} \operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (\sqrt {2} c_1+2\right ),\sqrt [4]{2} x\right )}{\operatorname {ParabolicCylinderD}\left (\frac {1}{4} \left (\sqrt {2} c_1-2\right ),\sqrt [4]{2} x\right )} \\ \end{align*}