75.6.2 problem 126

Internal problem ID [16679]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 126
Date solved : Thursday, March 13, 2025 at 08:31:11 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (1\right )&=0 \end{align*}

Maple. Time used: 0.011 (sec). Leaf size: 14
ode:=x^2-x*diff(y(x),x) = y(x); 
ic:=y(1) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {x^{3}-1}{3 x} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 17
ode=x^2-x*D[y[x],x]==y[x]; 
ic={y[1]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^3-1}{3 x} \]
Sympy. Time used: 0.178 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 - x*Derivative(y(x), x) - y(x),0) 
ics = {y(1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\frac {x^{3}}{3} - \frac {1}{3}}{x} \]