20.12.12 problem Problem 31

Internal problem ID [3806]
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.10, Chapter review. page 575
Problem number : Problem 31
Date solved : Monday, January 27, 2025 at 08:02:37 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y&=\ln \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.004 (sec). Leaf size: 60

dsolve(diff(y(x),x$2)+4*y(x)=ln(x),y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {i \cos \left (2 x \right ) \pi \left (\operatorname {csgn}\left (x \right )-1\right ) \operatorname {csgn}\left (i x \right )}{8}+\frac {\left (8 c_{1} -2 \,\operatorname {Ci}\left (2 x \right )\right ) \cos \left (2 x \right )}{8}+\frac {\left (\pi \,\operatorname {csgn}\left (x \right )+8 c_{2} -2 \,\operatorname {Si}\left (2 x \right )\right ) \sin \left (2 x \right )}{8}+\frac {\ln \left (x \right )}{4} \]

Solution by Mathematica

Time used: 0.050 (sec). Leaf size: 48

DSolve[D[y[x],{x,2}]+4*y[x]==Log[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{4} (-\operatorname {CosIntegral}(2 x) \cos (2 x)-\text {Si}(2 x) \sin (2 x)+\log (x)+4 c_1 \cos (2 x)+4 c_2 \sin (2 x)) \]