22.1.120 problem 143

Internal problem ID [4426]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 143
Date solved : Tuesday, September 30, 2025 at 07:31:41 AM
CAS classification : [[_2nd_order, _missing_y]]

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