67.15.77 problem 22.15 (d)

Internal problem ID [16795]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 22. Method of undetermined coefficients. Additional exercises page 412
Problem number : 22.15 (d)
Date solved : Thursday, October 02, 2025 at 01:38:59 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }-2 y&=15 \cos \left (3 \ln \left (x \right )\right )-10 \sin \left (3 \ln \left (x \right )\right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 29
ode:=x^2*diff(diff(y(x),x),x)-2*y(x) = 15*cos(3*ln(x))-10*sin(3*ln(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1}{x}+c_2 \,x^{2}-\frac {3 \cos \left (3 \ln \left (x \right )\right )}{2}+\frac {\sin \left (3 \ln \left (x \right )\right )}{2} \]
Mathematica. Time used: 0.227 (sec). Leaf size: 80
ode=x^2*D[y[x],{x,2}]-2*y[x]==15*Cos[3*Log[x]]-10*Sin[3*Log[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^3 \int _1^x\frac {5 (3 \cos (3 \log (K[2]))-2 \sin (3 \log (K[2])))}{3 K[2]^3}dK[2]+\int _1^x\left (\frac {10}{3} \sin (3 \log (K[1]))-5 \cos (3 \log (K[1]))\right )dK[1]+c_2 x^3+c_1}{x} \end{align*}
Sympy. Time used: 0.238 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - 2*y(x) + 10*sin(3*log(x)) - 15*cos(3*log(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x} + C_{2} x^{2} + \frac {\sin {\left (3 \log {\left (x \right )} \right )}}{2} - \frac {3 \cos {\left (3 \log {\left (x \right )} \right )}}{2} \]