40.10.1 problem 10

Internal problem ID [6723]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 15. Linear equations with constant coefficients (Variation of parameters). Supplemetary problems. Page 98
Problem number : 10
Date solved : Monday, January 27, 2025 at 02:24:57 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.002 (sec). Leaf size: 24

dsolve(diff(y(x),x$2)+y(x)=csc(x),y(x), singsol=all)
 
\[ y = -\ln \left (\csc \left (x \right )\right ) \sin \left (x \right )+\left (-x +c_1 \right ) \cos \left (x \right )+\sin \left (x \right ) c_2 \]

Solution by Mathematica

Time used: 0.020 (sec). Leaf size: 24

DSolve[D[y[x],{x,2}]+y[x]==Csc[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to (-x+c_1) \cos (x)+\sin (x) (\log (\sin (x))+c_2) \]