75.4.32 problem 97

Internal problem ID [16663]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 4. Equations with variables separable and equations reducible to them. Exercises page 38
Problem number : 97
Date solved : Monday, March 31, 2025 at 03:04:08 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 10
ode:=(1+x)*diff(y(x),x) = -1+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 x +c_1 +1 \]
Mathematica. Time used: 0.028 (sec). Leaf size: 18
ode=(x+1)*D[y[x],x]==y[x]-1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 1+c_1 (x+1) \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.232 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 1)*Derivative(y(x), x) - y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x + C_{1} + 1 \]