2.19 problem Problem 19

Internal problem ID [10834]

Book: Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section: Chapter 2, DIFFERENTIAL EQUATIONS OF THE SECOND ORDER AND HIGHER. Problems page 172
Problem number: Problem 19.
ODE order: 2.
ODE degree: 1.

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

\[ \boxed {y^{\prime \prime }+y-1+\frac {1}{\sin \left (x \right )}=0} \]

Solution by Maple

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

dsolve(diff(y(x),x$2)+y(x)=1-1/sin(x),y(x), singsol=all)
 

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

Solution by Mathematica

Time used: 0.016 (sec). Leaf size: 30

DSolve[y''[x]+y[x]==1-1/Sin[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to (x+c_1) \cos (x)+\sin (x) (-\log (\tan (x))-\log (\cos (x))+c_2)+1 \\ \end{align*}