29.7.9 problem 184

Internal problem ID [4784]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 7
Problem number : 184
Date solved : Monday, January 27, 2025 at 09:37:44 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational, _Riccati]

\begin{align*} x y^{\prime }&=2 x -y+a \,x^{n} \left (x -y\right )^{2} \end{align*}

Solution by Maple

Time used: 0.010 (sec). Leaf size: 34

dsolve(x*diff(y(x),x) = 2*x-y(x)+a*x^n*(x-y(x))^2,y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {a \,x^{n} x -c_{1} x^{2}-n +1}{a \,x^{n}-c_{1} x} \]

Solution by Mathematica

Time used: 1.122 (sec). Leaf size: 164

DSolve[x D[y[x],x]==2 x -y[x]+a x^n(x-y[x])^2,y[x],x,IncludeSingularSolutions -> True]
 
\begin{align*} y(x)\to \frac {x^{-n} \left (2 a x^{n+\sqrt {(n-1)^2}+1}+2 a c_1 \sqrt {(n-1)^2} x^{n+1}-\left (n+\sqrt {(n-1)^2}-1\right ) x^{\sqrt {(n-1)^2}}-c_1 \left (-n+\sqrt {(n-1)^2}+1\right ) (n-1)\right )}{2 a \left (x^{\sqrt {(n-1)^2}}+c_1 \sqrt {(n-1)^2}\right )} \\ y(x)\to \frac {x^{-n} \left (2 a x^{n+1}-n+\sqrt {(n-1)^2}+1\right )}{2 a} \\ \end{align*}