12.1.11 problem 4(c)

Internal problem ID [1529]
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 : 4(c)
Date solved : Monday, January 27, 2025 at 04:58:57 AM
CAS classification : [_quadrature]

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

With initial conditions

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

Solution by Maple

Time used: 0.029 (sec). Leaf size: 15

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

Solution by Mathematica

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

DSolve[{D[y[x],x] == Tan[x],y[Pi/4]==3},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\log (\cos (x))+3-\frac {\log (2)}{2} \]