18.1.19 problem Problem 14.24 (b)

Internal problem ID [3475]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 14, First order ordinary differential equations. 14.4 Exercises, page 490
Problem number : Problem 14.24 (b)
Date solved : Monday, January 27, 2025 at 07:38:22 AM
CAS classification : [_linear]

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

With initial conditions

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

Solution by Maple

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

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

Solution by Mathematica

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

DSolve[{D[y[x],x]-y[x]*Tan[x]==1,y[Pi/4]==3},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \left (\sin (x)+\sqrt {2}\right ) \sec (x) \]