64.12.15 problem 15

Internal problem ID [13519]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.4. Variation of parameters. Exercises page 162
Problem number : 15
Date solved : Tuesday, January 28, 2025 at 05:51:06 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 29

dsolve(diff(y(x),x$2)+y(x)=1/(1+sin(x)),y(x), singsol=all)
 
\[ y = \ln \left (\sin \left (x \right )+1\right ) \sin \left (x \right )+\left (-x -1+c_{1} \right ) \cos \left (x \right )-1+\left (c_{2} +1\right ) \sin \left (x \right ) \]

Solution by Mathematica

Time used: 0.179 (sec). Leaf size: 79

DSolve[D[y[x],{x,2}]+y[x]==1/(1+Sin[x]),y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \cos (x) \int _1^x-\frac {\sin (K[1])}{\left (\cos \left (\frac {K[1]}{2}\right )+\sin \left (\frac {K[1]}{2}\right )\right )^2}dK[1]+\sin (x) \int _1^x\frac {\cos (K[2])}{\left (\cos \left (\frac {K[2]}{2}\right )+\sin \left (\frac {K[2]}{2}\right )\right )^2}dK[2]+c_1 \cos (x)+c_2 \sin (x) \]