38.2.31 problem 31

Internal problem ID [6460]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Further problems 24. page 1068
Problem number : 31
Date solved : Monday, January 27, 2025 at 02:04:53 PM
CAS classification : [_linear]

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

With initial conditions

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

Solution by Maple

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

dsolve([diff(y(x),x)-y(x)*tan(x)=cos(x)-2*x*sin(x),y(1/6*Pi) = 0],y(x), singsol=all)
 
\[ y = \cos \left (x \right ) x -\frac {\pi \sec \left (x \right )}{8} \]

Solution by Mathematica

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

DSolve[{D[y[x],x]-y[x]*Tan[x]==Cos[x]-2*x*Sin[x],{y[Pi/6]==0}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{8} (4 x+4 x \cos (2 x)-\pi ) \sec (x) \]