12.1.12 problem 5(a)

Internal problem ID [1530]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 1, Introduction. Section 1.2 Page 14
Problem number : 5(a)
Date solved : Monday, January 27, 2025 at 04:58:58 AM
CAS classification : [_linear]

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

With initial conditions

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

Solution by Maple

Time used: 0.006 (sec). Leaf size: 8

dsolve([diff(y(x),x) = cos(x)-y(x)*tan(x),y(1/4*Pi) = 1/8*2^(1/2)*Pi],y(x), singsol=all)
 
\[ y = \cos \left (x \right ) x \]

Solution by Mathematica

Time used: 0.049 (sec). Leaf size: 9

DSolve[{D[y[x],x] ==Cos[x]-y[x]*Tan[x],y[Pi/4]==Pi/(4*Sqrt[2])},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x \cos (x) \]