57.5.37 problem 16-b(vi)

Internal problem ID [14392]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.4.1. Integrating factors. Exercises page 41
Problem number : 16-b(vi)
Date solved : Thursday, October 02, 2025 at 09:36:35 AM
CAS classification : [_separable]

\begin{align*} t \cot \left (x\right ) x^{\prime }&=-2 \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 10
ode:=t*cot(x(t))*diff(x(t),t) = -2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \arcsin \left (\frac {c_1}{t^{2}}\right ) \]
Mathematica. Time used: 0.044 (sec). Leaf size: 14
ode=t*Cot[x[t]]*D[x[t],t]==-2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \arcsin \left (\frac {e^{c_1}}{t^2}\right ) \end{align*}
Sympy. Time used: 0.208 (sec). Leaf size: 19
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t*Derivative(x(t), t)/tan(x(t)) + 2,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ \left [ x{\left (t \right )} = \pi - \operatorname {asin}{\left (\frac {C_{1}}{t^{2}} \right )}, \ x{\left (t \right )} = \operatorname {asin}{\left (\frac {C_{1}}{t^{2}} \right )}\right ] \]