29.8.12 problem 12

Internal problem ID [7354]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number : 12
Date solved : Tuesday, September 30, 2025 at 04:29:33 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} x y^{\prime \prime }+y^{\prime }&=4 x \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 13
ode:=x*diff(diff(y(x),x),x)+diff(y(x),x) = 4*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{2}+c_1 \ln \left (x \right )+c_2 \]
Mathematica. Time used: 0.018 (sec). Leaf size: 16
ode=x*D[y[x],{x,2}]+D[y[x],x]==4*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x^2+c_1 \log (x)+c_2 \end{align*}
Sympy. Time used: 0.095 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) - 4*x + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} \log {\left (x \right )} + x^{2} \]