11.3 problem 18.1 (iii)

Internal problem ID [11736]

Book: AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section: Chapter 18, The variation of constants formula. Exercises page 168
Problem number: 18.1 (iii).
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+4 y=\cot \left (2 x \right )} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 35

dsolve(diff(y(x),x$2)+4*y(x)=cot(2*x),y(x), singsol=all)
 

\[ y \left (x \right ) = c_{1} \cos \left (2 x \right )+c_{2} \sin \left (2 x \right )+\frac {\sin \left (2 x \right ) \ln \left (\csc \left (2 x \right )-\cot \left (2 x \right )\right )}{4} \]

Solution by Mathematica

Time used: 0.188 (sec). Leaf size: 34

DSolve[y''[x]+4*y[x]==Cot[2*x],y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to c_1 \cos (2 x)+\frac {1}{4} \sin (2 x) (\log (\sin (x))-\log (\cos (x))+4 c_2) \]