29.8.23 problem 228

Internal problem ID [4828]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 228
Date solved : Sunday, March 30, 2025 at 04:02:38 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=(x+a)*diff(y(x),x) = b*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\ln \left (a +x \right ) a b +b x +c_1 \]
Mathematica. Time used: 0.004 (sec). Leaf size: 19
ode=(a+x) D[y[x],x]==b x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -a b \log (a+x)+b x+c_1 \]
Sympy. Time used: 0.156 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-b*x + (a + x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + b \left (- a \log {\left (a + x \right )} + x\right ) \]