74.1.38 problem 45

Internal problem ID [15747]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Exercises 1.1, page 10
Problem number : 45
Date solved : Monday, March 31, 2025 at 01:46:57 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=diff(y(x),x) = cos(x)*cot(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \cos \left (x \right )+\ln \left (\csc \left (x \right )-\cot \left (x \right )\right )+c_1 \]
Mathematica. Time used: 0.016 (sec). Leaf size: 22
ode=D[y[x],x]==Cos[x]*Cot[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^x\cos (K[1]) \cot (K[1])dK[1]+c_1 \]
Sympy. Time used: 0.199 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-cos(x)/tan(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \frac {\log {\left (\cos {\left (x \right )} - 1 \right )}}{2} - \frac {\log {\left (\cos {\left (x \right )} + 1 \right )}}{2} + \cos {\left (x \right )} \]