34.13.12 problem 33

Internal problem ID [8053]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 18. Linear equations with variable coefficients (Equations of second order). Supplemetary problems. Page 120
Problem number : 33
Date solved : Tuesday, September 30, 2025 at 05:14:48 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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