76.3.12 problem 12

Internal problem ID [17312]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.4 (Differences between linear and nonlinear equations). Problems at page 79
Problem number : 12
Date solved : Monday, March 31, 2025 at 03:51:56 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {\cot \left (t \right ) y}{1+y} \end{align*}

Maple. Time used: 0.042 (sec). Leaf size: 9
ode:=diff(y(t),t) = cot(t)*y(t)/(1+y(t)); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \operatorname {LambertW}\left (c_1 \sin \left (t \right )\right ) \]
Mathematica. Time used: 1.548 (sec). Leaf size: 18
ode=D[y[t],t]==Cot[t]*y[t]/(1+y[t]); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to W\left (e^{c_1} \sin (t)\right ) \\ y(t)\to 0 \\ \end{align*}
Sympy. Time used: 0.248 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(Derivative(y(t), t) - y(t)/((y(t) + 1)*tan(t)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = W\left (C_{1} \sin {\left (t \right )}\right ) \]