79.1.20 problem 4 (ii)

Internal problem ID [18428]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 3. Solutions of first-order equations. Exercises at page 47
Problem number : 4 (ii)
Date solved : Thursday, March 13, 2025 at 11:56:47 AM
CAS classification : [_separable]

\begin{align*} x^{\prime }+x \tan \left (t \right )&=0 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 8
ode:=diff(x(t),t)+x(t)*tan(t) = 0; 
dsolve(ode,x(t), singsol=all);
 
\[ x = c_{1} \cos \left (t \right ) \]
Mathematica. Time used: 0.032 (sec). Leaf size: 15
ode=D[x[t],t]+x[t]*Tan[t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to c_1 \cos (t) \\ x(t)\to 0 \\ \end{align*}
Sympy. Time used: 0.196 (sec). Leaf size: 7
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t)*tan(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} \cos {\left (t \right )} \]