2.28 problem 28

Internal problem ID [914]

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.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_linear]

Solve \begin {gather*} \boxed {y^{\prime }+\cot \relax (x ) y-\cos \relax (x )=0} \end {gather*} With initial conditions \begin {align*} \left [y \left (\frac {\pi }{2}\right ) = 1\right ] \end {align*}

Solution by Maple

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

dsolve([diff(y(x),x)+cot(x)*y(x)=cos(x),y(1/2*Pi) = 1],y(x), singsol=all)
 

\[ y \relax (x ) = \frac {-\frac {\left (\cos ^{2}\relax (x )\right )}{2}+1}{\sin \relax (x )} \]

Solution by Mathematica

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

DSolve[{y'[x]+Cot[x]*y[x]==Cos[x],y[Pi/2]==1},y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \csc (x)-\frac {1}{2} \cos (x) \cot (x) \\ \end{align*}