29.11.19 problem 310

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

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

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