73.16.11 problem 24.1 (k)

Internal problem ID [15444]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 24. Variation of parameters. Additional exercises page 444
Problem number : 24.1 (k)
Date solved : Thursday, March 13, 2025 at 06:03:59 AM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }-2 y&=\frac {1}{x -2} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 44
ode:=x^2*diff(diff(y(x),x),x)-2*y(x) = 1/(x-2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x^{3}-8\right ) \ln \left (x -2\right )+24 c_{2} x^{3}-x^{3} \ln \left (x \right )+2 x^{2}+2 x +24 c_{1}}{24 x} \]
Mathematica. Time used: 0.043 (sec). Leaf size: 56
ode=x^2*D[y[x],{x,2}]-2*y[x]==1/(x-2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^2 \int _1^x\frac {1}{3 (K[1]-2) K[1]^3}dK[1]-\frac {\log (6-3 x)-3 \left (c_2 x^3+c_1\right )}{3 x} \]
Sympy. Time used: 0.351 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - 2*y(x) - 1/(x - 2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + C_{2} x^{3} + \frac {x \left (x^{2} \left (- \log {\left (x \right )} + \log {\left (x - 2 \right )}\right ) + 2 x + 2\right )}{24} - \frac {\log {\left (x - 2 \right )}}{3}}{x} \]