40.2.24 problem 49

Internal problem ID [6602]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 4. Equations of first order and first degree (Variable separable). Supplemetary problems. Page 22
Problem number : 49
Date solved : Wednesday, March 05, 2025 at 01:30:23 AM
CAS classification : [_rational, _Bernoulli]

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

With initial conditions

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

Maple. Time used: 0.066 (sec). Leaf size: 22
ode:=y(x)^2+x*y(x)-x*diff(y(x),x) = 0; 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{x}}{\operatorname {Ei}_{1}\left (-x \right )+{\mathrm e}-\operatorname {Ei}_{1}\left (-1\right )} \]
Mathematica. Time used: 0.156 (sec). Leaf size: 19
ode=(y[x]^2+x*y[x])-x*D[y[x],x]== 0; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^x}{-\operatorname {ExpIntegralEi}(x)+\operatorname {ExpIntegralEi}(1)+e} \]
Sympy. Time used: 0.445 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) - x*Derivative(y(x), x) + y(x)**2,0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e^{x}}{- \operatorname {Ei}{\left (x \right )} + \operatorname {Ei}{\left (1 \right )} + e} \]