29.1.25 problem 24

Internal problem ID [4632]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 24
Date solved : Sunday, March 30, 2025 at 03:31:38 AM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 11
ode:=diff(y(x),x) = y(x)*sec(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \left (\sec \left (x \right )+\tan \left (x \right )\right ) \]
Mathematica. Time used: 0.035 (sec). Leaf size: 24
ode=D[y[x],x]==y[x]*Sec[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 e^{2 \text {arctanh}\left (\tan \left (\frac {x}{2}\right )\right )} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.318 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)/cos(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} \sqrt {\sin {\left (x \right )} + 1}}{\sqrt {\sin {\left (x \right )} - 1}} \]