75.2.6 problem 26

Internal problem ID [16612]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 2. The method of isoclines. Exercises page 27
Problem number : 26
Date solved : Monday, March 31, 2025 at 03:01:29 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\left (y-1\right ) x \end{align*}

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