15.1.10 problem 10

Internal problem ID [2850]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 10
Date solved : Sunday, March 30, 2025 at 12:34:11 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 10
ode:=y(x)+3+cot(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \cos \left (x \right ) c_1 -3 \]
Mathematica. Time used: 0.05 (sec). Leaf size: 17
ode=(y[x]+3)+Cot[x]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -3+c_1 \cos (x) \\ y(x)\to -3 \\ \end{align*}
Sympy. Time used: 0.250 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + 3 + Derivative(y(x), x)/tan(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \cos {\left (x \right )} - 3 \]