79.1.6 problem 1 (vi)

Internal problem ID [18422]
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 : 1 (vi)
Date solved : Monday, March 31, 2025 at 05:27:55 PM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=\frac {\cos \left (t \right )}{\sin \left (t \right )} \end{align*}

With initial conditions

\begin{align*} x \left (1\right )&=0 \end{align*}

Maple. Time used: 0.040 (sec). Leaf size: 13
ode:=diff(x(t),t) = cos(t)/sin(t); 
ic:=x(1) = 0; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x = \ln \left (\sin \left (t \right )\right )-\ln \left (\sin \left (1\right )\right ) \]
Mathematica. Time used: 0.008 (sec). Leaf size: 11
ode=D[x[t],t]==Cos[t]/Sin[t]; 
ic={x[1]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \log (\csc (1) \sin (t)) \]
Sympy. Time used: 0.146 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(Derivative(x(t), t) - cos(t)/sin(t),0) 
ics = {x(1): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \log {\left (\sin {\left (t \right )} \right )} - \log {\left (\sin {\left (1 \right )} \right )} \]