83.3.3 problem 3

Internal problem ID [18988]
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 (B) at page 9
Problem number : 3
Date solved : Monday, March 31, 2025 at 06:28:42 PM
CAS classification : [_separable]

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

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