12.2.20 problem 20

Internal problem ID [1556]
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 : 20
Date solved : Monday, January 27, 2025 at 04:59:57 AM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.001 (sec). Leaf size: 10

dsolve(diff(y(x),x) +tan(x)*y(x)=cos(x),y(x), singsol=all)
 
\[ y = \left (x +c_1 \right ) \cos \left (x \right ) \]

Solution by Mathematica

Time used: 0.040 (sec). Leaf size: 12

DSolve[D[y[x],x] +Tan[x]*y[x]==Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to (x+c_1) \cos (x) \]