40.9.11 problem 21

Internal problem ID [6721]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 14. Linear equations with constant coefficients. Supplemetary problems. Page 92
Problem number : 21
Date solved : Monday, January 27, 2025 at 02:24:51 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.071 (sec). Leaf size: 86

DSolve[D[y[x],{x,2}]-y[x]==Csc[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \left (\frac {1}{2}+\frac {i}{2}\right ) e^{i x} \left (\operatorname {Hypergeometric2F1}\left (\frac {1}{2}-\frac {i}{2},1,\frac {3}{2}-\frac {i}{2},e^{2 i x}\right )+i \operatorname {Hypergeometric2F1}\left (\frac {1}{2}+\frac {i}{2},1,\frac {3}{2}+\frac {i}{2},e^{2 i x}\right )\right )+c_1 e^x+c_2 e^{-x} \]