2.2.1 Problem 4 (a)

Solved using first_order_ode_separable
Maple
Mathematica
Sympy

Internal problem ID [18469]
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 24. Problems at page 62
Problem number : 4 (a)
Date solved : Monday, March 31, 2025 at 05:30:18 PM
CAS classification : [_separable]

Solved using first_order_ode_separable

Time used: 0.212 (sec)

Solve

sin(x)cos(y)2+cos(x)2y=0

The ode

(1)y=sin(x)cos(y)2cos(x)2

is separable as it can be written as

y=sin(x)cos(y)2cos(x)2=f(x)g(y)

Where

f(x)=sin(x)cos(x)2g(y)=cos(y)2

Integrating gives

1g(y)dy=f(x)dx1cos(y)2dy=sin(x)cos(x)2dx
tan(y)=sec(x)+c1

We now need to find the singular solutions, these are found by finding for what values g(y) is zero, since we had to divide by this above. Solving g(y)=0 or

cos(y)2=0

for y gives

y=π2

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

tan(y)=sec(x)+c1y=π2

Solving for y gives

y=π2y=arctan(sec(x)+c1)
Figure 2.11: Slope field sin(x)cos(y)2+cos(x)2y=0

Summary of solutions found

y=π2y=arctan(sec(x)+c1)
Maple. Time used: 0.005 (sec). Leaf size: 11
ode:=sin(x)*cos(y(x))^2+cos(x)^2*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=arctan(sec(x)+c1)

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 solvesin(x)cos(y(x))2+cos(x)2(ddxy(x))=0Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=sin(x)cos(y(x))2cos(x)2Separate variablesddxy(x)cos(y(x))2=sin(x)cos(x)2Integrate both sides with respect toxddxy(x)cos(y(x))2dx=sin(x)cos(x)2dx+C1Evaluate integraltan(y(x))=1cos(x)+C1Solve fory(x)y(x)=arctan(C1cos(x)1cos(x))Simplifyy(x)=arctan(C1sec(x))
Mathematica. Time used: 1.507 (sec). Leaf size: 31
ode=Sin[x]*Cos[y[x]]^2+ Cos[x]^2*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)arctan(sec(x)+c1)y(x)π2y(x)π2
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(x)*cos(y(x))**2 + cos(x)**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out