75.12.13 problem 287

Internal problem ID [16800]
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 : 287
Date solved : Thursday, March 13, 2025 at 08:51:04 AM
CAS classification : [_linear]

\begin{align*} \left (2 x -1\right ) y^{\prime }-2 y&=\frac {1-4 x}{x^{2}} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=(2*x-1)*diff(y(x),x)-2*y(x) = (1-4*x)/x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-1+2 x \right ) c_{1} +\frac {1}{x} \]
Mathematica. Time used: 0.094 (sec). Leaf size: 18
ode=(2*x-1)*D[y[x],x]-2*y[x]==(1-4*x)/x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{x}+2 c_1 x-c_1 \]
Sympy. Time used: 0.361 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*x - 1)*Derivative(y(x), x) - 2*y(x) - (1 - 4*x)/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - 2 C_{1} x + C_{1} + \frac {1}{x} \]