20.10.4 problem Problem 17

Internal problem ID [3776]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.8, A Differential Equation with Nonconstant Coefficients. page 567
Problem number : Problem 17
Date solved : Tuesday, March 04, 2025 at 05:15:25 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }-x y^{\prime }+5 y&=8 x \ln \left (x \right )^{2} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 28
ode:=x^2*diff(diff(y(x),x),x)-x*diff(y(x),x)+5*y(x) = 8*x*ln(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = x \left (-1+\sin \left (2 \ln \left (x \right )\right ) c_{2} +\cos \left (2 \ln \left (x \right )\right ) c_{1} +2 \ln \left (x \right )^{2}\right ) \]
Mathematica. Time used: 0.146 (sec). Leaf size: 31
ode=x^2*D[y[x],{x,2}]-x*D[y[x],x]+5*y[x]==8*x*(Log[x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x \left (2 \log ^2(x)+c_2 \cos (2 \log (x))+c_1 \sin (2 \log (x))-1\right ) \]
Sympy. Time used: 0.335 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - 8*x*log(x)**2 - x*Derivative(y(x), x) + 5*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} \sin {\left (2 \log {\left (x \right )} \right )} + C_{2} \cos {\left (2 \log {\left (x \right )} \right )} + 2 \log {\left (x \right )}^{2} - 1\right ) \]