28.1.1 problem 1

Internal problem ID [7160]
Book : A treatise on ordinary and partial differential equations by William Woolsey Johnson. 1913
Section : Chapter 1, Nature and meaning of a differential equation between two variables. page 12
Problem number : 1
Date solved : Tuesday, September 30, 2025 at 04:24:04 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }+y \tan \left (x \right )&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 8
ode:=diff(y(x),x)+y(x)*tan(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \cos \left (x \right ) \]
Mathematica. Time used: 0.021 (sec). Leaf size: 15
ode=D[y[x],x]+y[x]*Tan[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \cos (x)\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.120 (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 )} = C_{1} \cos {\left (x \right )} \]