75.12.10 problem 284

Internal problem ID [16797]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 12. Miscellaneous problems. Exercises page 93
Problem number : 284
Date solved : Thursday, March 13, 2025 at 08:50:38 AM
CAS classification : [_quadrature]

\begin{align*} x^{2}+x y^{\prime }&=3 x +y^{\prime } \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 20
ode:=x^2+x*diff(y(x),x) = 3*x+diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x^{2}}{2}+2 x +2 \ln \left (x -1\right )+c_{1} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 29
ode=x^2+x*D[y[x],x]==3*x+D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^x-\frac {(K[1]-3) K[1]}{K[1]-1}dK[1]+c_1 \]
Sympy. Time used: 0.175 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + x*Derivative(y(x), x) - 3*x - Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - \frac {x^{2}}{2} + 2 x + 2 \log {\left (x - 1 \right )} \]