86.1.8 problem 8

Internal problem ID [23070]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 3. Some standard types of differential equations. Exercise 3b at page 43
Problem number : 8
Date solved : Thursday, October 02, 2025 at 09:18:46 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=1 \\ \end{align*}
Maple. Time used: 0.027 (sec). Leaf size: 13
ode:=x*diff(y(x),x) = (1+x)*y(x)^2; 
ic:=[y(1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {1}{\ln \left (x \right )+x -2} \]
Mathematica. Time used: 0.09 (sec). Leaf size: 14
ode=x*D[y[x],x]==(1+x)*y[x]^2; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{x+\log (x)-2} \end{align*}
Sympy. Time used: 0.124 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - (x + 1)*y(x)**2,0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {1}{x + \log {\left (x \right )} - 2} \]