2.3.4 Problem 4

Solved using first_order_ode_separable
Maple
Mathematica
Sympy

Internal problem ID [18477]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter IV. Methods of solution: First order equations. section 29. Problems at page 81
Problem number : 4
Date solved : Monday, March 31, 2025 at 05:35:20 PM
CAS classification : [_separable]

Solved using first_order_ode_separable

Time used: 0.159 (sec)

Solve

sec(x)2tan(y)y+sec(y)2tan(x)=0

The ode

(1)y=sec(y)2tan(x)sec(x)2tan(y)

is separable as it can be written as

y=sec(y)2tan(x)sec(x)2tan(y)=f(x)g(y)

Where

f(x)=tan(x)sec(x)2g(y)=sec(y)2tan(y)

Integrating gives

1g(y)dy=f(x)dxtan(y)sec(y)2dy=tan(x)sec(x)2dx
12sec(y)2=12sec(x)2+c1

Solving for y gives

y=πarcsec(1cos(x)22c1)y=arcsec(1cos(x)22c1)
Figure 2.30: Slope field sec(x)2tan(y)y+sec(y)2tan(x)=0

Summary of solutions found

y=πarcsec(1cos(x)22c1)y=arcsec(1cos(x)22c1)
Maple. Time used: 0.003 (sec). Leaf size: 17
ode:=sec(x)^2*tan(y(x))*diff(y(x),x)+sec(y(x))^2*tan(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=arccos(cos(2x)+4c1)2

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
<- separable successful
 

Maple step by step

Let’s solvesec(x)2tan(y(x))(ddxy(x))+sec(y(x))2tan(x)=0Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=sec(y(x))2tan(x)sec(x)2tan(y(x))Separate variables(ddxy(x))tan(y(x))sec(y(x))2=tan(x)sec(x)2Integrate both sides with respect tox(ddxy(x))tan(y(x))sec(y(x))2dx=tan(x)sec(x)2dx+C1Evaluate integral12sec(y(x))2=12sec(x)2+C1Solve fory(x){y(x)=πarcsec(1cos(x)22C1),y(x)=arcsec(1cos(x)22C1)}Redefine the integration constant(s){y(x)=πarcsec(1cos(x)2+C1),y(x)=arcsec(1cos(x)2+C1)}
Mathematica. Time used: 0.504 (sec). Leaf size: 41
ode=Sec[x]^2*Tan[y[x]]*D[y[x],x]+Sec[y[x]]^2*Tan[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)12arccos(cos(2x)2c1)y(x)12arccos(cos(2x)2c1)
Sympy. Time used: 0.635 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(tan(x)/cos(y(x))**2 + tan(y(x))*Derivative(y(x), x)/cos(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
[y(x)=πacos(C1cos(2x))2, y(x)=acos(C1cos(2x))2]