29.19.25 problem 538

Internal problem ID [5134]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 19
Problem number : 538
Date solved : Tuesday, March 04, 2025 at 08:11:04 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 33
ode:=(x+a)*(x+b)*diff(y(x),x) = x*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = c_{1} \left (x +b \right )^{-\frac {b}{a -b}} \left (x +a \right )^{\frac {a}{a -b}} \]
Mathematica. Time used: 0.054 (sec). Leaf size: 37
ode=(a+x)(b+x)D[y[x],x]==x y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 e^{\frac {a \log (a+x)-b \log (b+x)}{a-b}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.807 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-x*y(x) + (a + x)*(b + x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{\frac {C_{1} a - C_{1} b + a \log {\left (a + x \right )} - b \log {\left (b + x \right )}}{a - b}} \]