15.1.8 problem 8

Internal problem ID [2848]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 8
Date solved : Tuesday, March 04, 2025 at 02:51:04 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: 13
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.033 (sec). Leaf size: 20
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}{x+1} \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.240 (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 )} = \frac {C_{1} + x}{x + 1} \]