20.3.17 problem Problem 17

Internal problem ID [3626]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.6, First-Order Linear Differential Equations. page 59
Problem number : Problem 17
Date solved : Monday, January 27, 2025 at 07:47:47 AM
CAS classification : [_linear]

\begin{align*} y^{\prime } \sin \left (x \right )-y \cos \left (x \right )&=\sin \left (2 x \right ) \end{align*}

With initial conditions

\begin{align*} y \left (\frac {\pi }{2}\right )&=2 \end{align*}

Solution by Maple

Time used: 0.011 (sec). Leaf size: 13

dsolve([sin(x)*diff(y(x),x)-y(x)*cos(x)=sin(2*x),y(1/2*Pi) = 2],y(x), singsol=all)
 
\[ y \left (x \right ) = 2 \left (\ln \left (\sin \left (x \right )\right )+1\right ) \sin \left (x \right ) \]

Solution by Mathematica

Time used: 0.039 (sec). Leaf size: 14

DSolve[{Sin[x]*D[y[x],x]-y[x]*Cos[x]==Sin[2*x],{y[Pi/2]==2}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to 2 \sin (x) (\log (\sin (x))+1) \]