29.11.20 problem 311

Internal problem ID [4911]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 11
Problem number : 311
Date solved : Sunday, March 30, 2025 at 04:13:04 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 19
ode:=x*(1-x)*diff(y(x),x) = 2+2*x*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-2 x +2 \ln \left (x \right )+c_1}{\left (-1+x \right )^{2}} \]
Mathematica. Time used: 0.033 (sec). Leaf size: 21
ode=x(1-x)D[y[x],x]==2(1+x y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-2 x+2 \log (x)+c_1}{(x-1)^2} \]
Sympy. Time used: 0.290 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(1 - x)*Derivative(y(x), x) - 2*x*y(x) - 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - 2 x + 2 \log {\left (x \right )}}{x^{2} - 2 x + 1} \]