76.1.12 problem 12

Internal problem ID [17240]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.1 (Separable equations). Problems at page 44
Problem number : 12
Date solved : Monday, March 31, 2025 at 03:45:49 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 16
ode:=diff(y(x),x) = x*(y(x)-y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{1+{\mathrm e}^{-\frac {x^{2}}{2}} c_1} \]
Mathematica. Time used: 0.264 (sec). Leaf size: 46
ode=D[y[x],x]==x*(y[x]-y[x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-1) K[1]}dK[1]\&\right ]\left [-\frac {x^2}{2}+c_1\right ] \\ y(x)\to 0 \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 1.697 (sec). Leaf size: 53
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(-y(x)**2 + y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {- e^{x^{2}} - \sqrt {e^{C_{1} + x^{2}}}}{e^{C_{1}} - e^{x^{2}}}, \ y{\left (x \right )} = \frac {- e^{x^{2}} + \sqrt {e^{C_{1} + x^{2}}}}{e^{C_{1}} - e^{x^{2}}}\right ] \]