76.12.6 problem Ex. 6

Internal problem ID [20056]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Examples on chapter II at page 29
Problem number : Ex. 6
Date solved : Thursday, October 02, 2025 at 05:17:19 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\frac {\left (1-2 x \right ) y}{x^{2}}&=1 \end{align*}
Maple. Time used: 0.001 (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.032 (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 ) \]