12.2.28 problem 28

Internal problem ID [1564]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Linear first order. Section 2.1 Page 41
Problem number : 28
Date solved : Monday, January 27, 2025 at 05:00:18 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }+\cot \left (x \right ) y&=\cos \left (x \right ) \end{align*}

With initial conditions

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

Solution by Maple

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

dsolve([diff(y(x),x)+cot(x)*y(x)=cos(x),y(1/2*Pi) = 1],y(x), singsol=all)
 
\[ y = -\frac {\cos \left (x \right ) \cot \left (x \right )}{2}+\csc \left (x \right ) \]

Solution by Mathematica

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

DSolve[{D[y[x],x]+Cot[x]*y[x]==Cos[x],y[Pi/2]==1},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \csc (x)-\frac {1}{2} \cos (x) \cot (x) \]