23.3.180 problem 182

Internal problem ID [5894]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 182
Date solved : Tuesday, September 30, 2025 at 02:05:52 PM
CAS classification : [[_2nd_order, _missing_y]]

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