66.1.1 problem Problem 1

Internal problem ID [13777]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 1
Date solved : Monday, March 31, 2025 at 08:11:20 AM
CAS classification : [_separable]

\begin{align*} \tan \left (y\right )-\cot \left (x \right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.039 (sec). Leaf size: 9
ode:=tan(y(x))-cot(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (c_1 \sec \left (x \right )\right ) \]
Mathematica. Time used: 0.102 (sec). Leaf size: 80
ode=Tan[y[x]]-Cot[x]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x(\cos (K[1]+y(x))-\cos (K[1]-y(x)))dK[1]+\int _1^{y(x)}\left (\cos (x-K[2])+\cos (x+K[2])-\int _1^x(-\sin (K[1]-K[2])-\sin (K[1]+K[2]))dK[1]\right )dK[2]=c_1,y(x)\right ] \]
Sympy. Time used: 0.466 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(tan(y(x)) - Derivative(y(x), x)/tan(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \pi - \operatorname {asin}{\left (\frac {C_{1}}{\cos {\left (x \right )}} \right )}, \ y{\left (x \right )} = \operatorname {asin}{\left (\frac {C_{1}}{\cos {\left (x \right )}} \right )}\right ] \]