25.1.8 problem 8

Internal problem ID [4220]
Book : Advanced Mathematica, Book2, Perkin and Perkin, 1992
Section : Chapter 11.3, page 316
Problem number : 8
Date solved : Tuesday, March 04, 2025 at 05:56:33 PM
CAS classification : [_separable]

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

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