13.4.3 problem 5

Internal problem ID [2340]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 1.9. Page 66
Problem number : 5
Date solved : Saturday, March 29, 2025 at 11:56:50 PM
CAS classification : [_exact, [_Abel, `2nd type`, `class A`]]

\begin{align*} \sec \left (t \right ) \tan \left (t \right )+\sec \left (t \right )^{2} y+\left (\tan \left (t \right )+2 y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.014 (sec). Leaf size: 61
ode:=sec(t)*tan(t)+sec(t)^2*y(t)+(tan(t)+2*y(t))*diff(y(t),t) = 0; 
dsolve(ode,y(t), singsol=all);
 
\begin{align*} y &= -\frac {\tan \left (t \right )}{2}-\frac {\sqrt {-4 \cos \left (t \right )^{2} c_1 +\sin \left (t \right )^{2}-4 \cos \left (t \right )}\, \sec \left (t \right )}{2} \\ y &= -\frac {\tan \left (t \right )}{2}+\frac {\sqrt {-4 \cos \left (t \right )^{2} c_1 +\sin \left (t \right )^{2}-4 \cos \left (t \right )}\, \sec \left (t \right )}{2} \\ \end{align*}
Mathematica. Time used: 1.0 (sec). Leaf size: 101
ode=Sec[t]*Tan[t]+Sec[t]^2*y[t]+(Tan[t]+2*y[t])*D[y[t],t]== 0; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to \frac {1}{4} \left (-2 \tan (t)-\sqrt {2} \sqrt {\sec ^2(t)} \sqrt {-8 \cos (t)+(-1+4 c_1) \cos (2 t)+1+4 c_1}\right ) \\ y(t)\to \frac {1}{4} \left (-2 \tan (t)+\sqrt {\sec ^2(t)} \sqrt {-16 \cos (t)+(-2+8 c_1) \cos (2 t)+2+8 c_1}\right ) \\ \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq((2*y(t) + tan(t))*Derivative(y(t), t) + y(t)/cos(t)**2 + tan(t)/cos(t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
Timed Out