77.5.11 problem 11

Internal problem ID [20391]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (D) at page 16
Problem number : 11
Date solved : Thursday, October 02, 2025 at 05:50:43 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\frac {\left (1-2 x \right ) y}{x^{2}}&=1 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 16
ode:=diff(y(x),x)+(1-2*x)/x^2*y(x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{2} \left ({\mathrm e}^{\frac {1}{x}} c_1 +1\right ) \]
Mathematica. Time used: 0.021 (sec). Leaf size: 19
ode=D[y[x],x]+(1-2*x)/x^2*y[x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x^2 \left (1+c_1 e^{\frac {1}{x}}\right ) \end{align*}
Sympy. Time used: 0.182 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1 + (1 - 2*x)*y(x)/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{2} \left (C_{1} e^{\frac {1}{x}} + 1\right ) \]