29.11.24 problem 315

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

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

Maple. Time used: 0.001 (sec). Leaf size: 25
ode:=x*(1-x)*diff(y(x),x) = a+2*(2-x)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {12 c_1 \,x^{4}+4 a x -3 a}{12 \left (-1+x \right )^{2}} \]
Mathematica. Time used: 0.042 (sec). Leaf size: 29
ode=x(1-x)D[y[x],x]==a+2(2-x)y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {a (4 x-3)+12 c_1 x^4}{12 (x-1)^2} \]
Sympy. Time used: 0.573 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a + x*(1 - x)*Derivative(y(x), x) - (4 - 2*x)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x^{4} + \frac {a x}{3} - \frac {a}{4}}{x^{2} - 2 x + 1} \]