65.3.2 problem 8.1 (ii)

Internal problem ID [13720]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 8, Separable equations. Exercises page 72
Problem number : 8.1 (ii)
Date solved : Tuesday, January 28, 2025 at 05:59:39 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (0\right )&=1 \end{align*}

Solution by Maple

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

dsolve([diff(y(x),x)=(1+y(x)^2)*tan(x),y(0) = 1],y(x), singsol=all)
 
\[ y = \cot \left (\frac {\pi }{4}+\ln \left (\cos \left (x \right )\right )\right ) \]

Solution by Mathematica

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

DSolve[{D[y[x],x]==(1+y[x]^2)*Tan[x],{y[0]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \cot \left (\log (\cos (x))+\frac {\pi }{4}\right ) \]