23.1.32 problem 27

Internal problem ID [4639]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 27
Date solved : Tuesday, September 30, 2025 at 07:37:48 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=y \tan \left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 8
ode:=diff(y(x),x) = y(x)*tan(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \sec \left (x \right ) \]
Mathematica. Time used: 0.021 (sec). Leaf size: 15
ode=D[y[x],x]==y[x]*Tan[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \sec (x)\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.123 (sec). Leaf size: 7
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)*tan(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{\cos {\left (x \right )}} \]