15.8.1 problem 1

Internal problem ID [3004]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 1
Date solved : Tuesday, March 04, 2025 at 03:39:59 PM
CAS classification : [_separable]

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

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