77.1.27 problem 43 (page 55)

Internal problem ID [17838]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 43 (page 55)
Date solved : Thursday, March 13, 2025 at 10:58:59 AM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.002 (sec). Leaf size: 46
ode:=x*diff(y(x),x)-3*y(x)+y(x)^2 = 4*x^2-4*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2 x \left (8 c_{1} x^{2}-{\mathrm e}^{4 x}-4 c_{1} x -c_{1} \right )}{{\mathrm e}^{4 x}+c_{1} \left (8 x^{2}+4 x +1\right )} \]
Mathematica. Time used: 0.248 (sec). Leaf size: 55
ode=x*D[y[x],x]-3*y[x]+y[x]^2==4*x^2-4*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {2 x \left (8 x^2-4 x+32 c_1 e^{4 x}-1\right )}{8 x^2+4 x-32 c_1 e^{4 x}+1} \\ y(x)\to 2 x \\ \end{align*}
Sympy. Time used: 0.449 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**2 + x*Derivative(y(x), x) + 4*x + y(x)**2 - 3*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {2 x \left (- 8 C_{1} x^{2} + 4 C_{1} x + C_{1} - e^{4 x}\right )}{8 C_{1} x^{2} + 4 C_{1} x + C_{1} - e^{4 x}} \]