38.3.18 problem 26

Internal problem ID [8285]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Review problems at page 34
Problem number : 26
Date solved : Tuesday, September 30, 2025 at 05:21:39 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }+x y^{\prime }+y&=\sec \left (\ln \left (x \right )\right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 27
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+y(x) = sec(ln(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\ln \left (\sec \left (\ln \left (x \right )\right )\right ) \cos \left (\ln \left (x \right )\right )+\cos \left (\ln \left (x \right )\right ) c_1 +\sin \left (\ln \left (x \right )\right ) \left (c_2 +\ln \left (x \right )\right ) \]
Mathematica. Time used: 0.029 (sec). Leaf size: 26
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]+y[x]==Sec[Log[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cos (\log (x)) (\log (\cos (\log (x)))+c_1)+(\log (x)+c_2) \sin (\log (x)) \end{align*}
Sympy. Time used: 0.396 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) + y(x) - 1/cos(log(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (\log {\left (x \right )} \right )} + C_{2} \cos {\left (\log {\left (x \right )} \right )} + \log {\left (x \right )} \sin {\left (\log {\left (x \right )} \right )} - \frac {\log {\left (\frac {1}{\cos ^{2}{\left (\log {\left (x \right )} \right )}} \right )} \cos {\left (\log {\left (x \right )} \right )}}{2} \]