2.126 problem 702

2.126.1 Solving as homogeneousTypeD2 ode
2.126.2 Solving as riccati ode
2.126.3 Maple step by step solution

Internal problem ID [9036]
Internal file name [OUTPUT/7971_Monday_June_06_2022_01_03_34_AM_63643124/index.tex]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 1, Additional non-linear first order
Problem number: 702.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "riccati", "homogeneousTypeD2"

Maple gives the following as the ode type

[[_homogeneous, `class D`], _Riccati]

\[ \boxed {y^{\prime }-\frac {-y \,{\mathrm e}^{x}+x y-x^{3} \ln \left (x \right )-x^{3}-x y^{2} \ln \left (x \right )-x y^{2}}{\left (-{\mathrm e}^{x}+x \right ) x}=0} \]

2.126.1 Solving as homogeneousTypeD2 ode

Using the change of variables \(y = u \left (x \right ) x\) on the above ode results in new ode in \(u \left (x \right )\) \begin {align*} x^{3} u \left (x \right )^{2} \ln \left (x \right )+x^{3} \ln \left (x \right )-\left (u^{\prime }\left (x \right ) x +u \left (x \right )\right ) x \,{\mathrm e}^{x}+x^{3} u \left (x \right )^{2}+\left (u^{\prime }\left (x \right ) x +u \left (x \right )\right ) x^{2}+x^{3}+u \left (x \right ) x \,{\mathrm e}^{x}-x^{2} u \left (x \right ) = 0 \end {align*}

In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= \frac {x \left (1+\ln \left (x \right )\right ) \left (-u^{2}-1\right )}{-{\mathrm e}^{x}+x} \end {align*}

Where \(f(x)=\frac {x \left (1+\ln \left (x \right )\right )}{-{\mathrm e}^{x}+x}\) and \(g(u)=-u^{2}-1\). Integrating both sides gives \begin{align*} \frac {1}{-u^{2}-1} \,du &= \frac {x \left (1+\ln \left (x \right )\right )}{-{\mathrm e}^{x}+x} \,d x \\ \int { \frac {1}{-u^{2}-1} \,du} &= \int {\frac {x \left (1+\ln \left (x \right )\right )}{-{\mathrm e}^{x}+x} \,d x} \\ -\arctan \left (u \right )&=\int \frac {x \left (1+\ln \left (x \right )\right )}{-{\mathrm e}^{x}+x}d x +c_{2} \\ \end{align*} The solution is \[ -\arctan \left (u \left (x \right )\right )-\left (\int \frac {x \left (1+\ln \left (x \right )\right )}{-{\mathrm e}^{x}+x}d x \right )-c_{2} = 0 \] Replacing \(u(x)\) in the above solution by \(\frac {y}{x}\) results in the solution for \(y\) in implicit form \begin {align*} -\arctan \left (\frac {y}{x}\right )-\left (\int \frac {x \left (1+\ln \left (x \right )\right )}{-{\mathrm e}^{x}+x}d x \right )-c_{2} = 0\\ -\arctan \left (\frac {y}{x}\right )+\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x -c_{2} = 0 \end {align*}

Summary

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

Figure 516: Slope field plot

Verification of solutions

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

2.126.2 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= \frac {x^{3} \ln \left (x \right )+y^{2} x \ln \left (x \right )+x^{3}+x \,y^{2}+y \,{\mathrm e}^{x}-x y}{\left ({\mathrm e}^{x}-x \right ) x} \end {align*}

This is a Riccati ODE. Comparing the ODE to solve \[ y' = \frac {x^{2} \ln \left (x \right )}{{\mathrm e}^{x}-x}+\frac {y^{2} \ln \left (x \right )}{{\mathrm e}^{x}-x}+\frac {x^{2}}{{\mathrm e}^{x}-x}+\frac {y^{2}}{{\mathrm e}^{x}-x}+\frac {y \,{\mathrm e}^{x}}{\left ({\mathrm e}^{x}-x \right ) x}-\frac {y}{{\mathrm e}^{x}-x} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=\frac {x^{3} \ln \left (x \right )+x^{3}}{\left ({\mathrm e}^{x}-x \right ) x}\), \(f_1(x)=\frac {1}{x}\) and \(f_2(x)=\frac {x \ln \left (x \right )+x}{\left ({\mathrm e}^{x}-x \right ) x}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {\left (x \ln \left (x \right )+x \right ) u}{\left ({\mathrm e}^{x}-x \right ) x}} \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' &=\frac {2+\ln \left (x \right )}{\left ({\mathrm e}^{x}-x \right ) x}-\frac {\left (x \ln \left (x \right )+x \right ) \left ({\mathrm e}^{x}-1\right )}{\left ({\mathrm e}^{x}-x \right )^{2} x}-\frac {x \ln \left (x \right )+x}{\left ({\mathrm e}^{x}-x \right ) x^{2}}\\ f_1 f_2 &=\frac {x \ln \left (x \right )+x}{\left ({\mathrm e}^{x}-x \right ) x^{2}}\\ f_2^2 f_0 &=\frac {\left (x \ln \left (x \right )+x \right )^{2} \left (x^{3} \ln \left (x \right )+x^{3}\right )}{\left ({\mathrm e}^{x}-x \right )^{3} x^{3}} \end {align*}

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

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

\[ u \left (x \right ) = c_{1} {\mathrm e}^{i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}+c_{2} {\mathrm e}^{-i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )} \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {i x \left (1+\ln \left (x \right )\right ) \left (c_{1} {\mathrm e}^{i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}-c_{2} {\mathrm e}^{-i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}\right )}{{\mathrm e}^{x}-x} \] Using the above in (1) gives the solution \[ y = -\frac {i x^{2} \left (1+\ln \left (x \right )\right ) \left (c_{1} {\mathrm e}^{i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}-c_{2} {\mathrm e}^{-i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}\right )}{\left (x \ln \left (x \right )+x \right ) \left (c_{1} {\mathrm e}^{i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}+c_{2} {\mathrm e}^{-i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}\right )} \] Dividing both numerator and denominator by \(c_{1}\) gives, after renaming the constant \(\frac {c_{2}}{c_{1}}=c_{3}\) the following solution

\[ y = -\frac {i \left (c_{3} {\mathrm e}^{i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}-{\mathrm e}^{-i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}\right ) x}{c_{3} {\mathrm e}^{i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}+{\mathrm e}^{-i \left (\int \frac {x \left (1+\ln \left (x \right )\right )}{{\mathrm e}^{x}-x}d x \right )}} \]

Summary

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

Figure 517: Slope field plot

Verification of solutions

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

2.126.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x y^{2} \ln \left (x \right )+x^{3} \ln \left (x \right )-y^{\prime } x \,{\mathrm e}^{x}+x y^{2}+y^{\prime } x^{2}+x^{3}+y \,{\mathrm e}^{x}-x y=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {-y \,{\mathrm e}^{x}+x y-x^{3} \ln \left (x \right )-x^{3}-x y^{2} \ln \left (x \right )-x y^{2}}{-{\mathrm e}^{x} x +x^{2}} \end {array} \]

Maple trace

`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 homogeneous D 
<- homogeneous successful`
 

Solution by Maple

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

dsolve(diff(y(x),x) = (-y(x)*exp(x)+x*y(x)-x^3*ln(x)-x^3-x*y(x)^2*ln(x)-x*y(x)^2)/(-exp(x)+x)/x,y(x), singsol=all)
 

\[ y \left (x \right ) = \tan \left (\int \frac {x \ln \left (x \right )}{{\mathrm e}^{x}-x}d x +\int \frac {x}{{\mathrm e}^{x}-x}d x +c_{1} \right ) x \]

Solution by Mathematica

Time used: 5.829 (sec). Leaf size: 37

DSolve[y'[x] == (-x^3 - x^3*Log[x] - E^x*y[x] + x*y[x] - x*y[x]^2 - x*Log[x]*y[x]^2)/(x*(-E^x + x)),y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to x \tan \left (\int _1^x\frac {K[1] (\log (K[1])+1)}{e^{K[1]}-K[1]}dK[1]+c_1\right ) \]