66.1.36 problem Problem 50

Internal problem ID [13804]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 50
Date solved : Wednesday, March 05, 2025 at 10:17:37 PM
CAS classification : [_linear]

\begin{align*} x^{\prime }-x \cot \left (t \right )&=4 \sin \left (t \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=diff(x(t),t)-x(t)*cot(t) = 4*sin(t); 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = \left (4 t +c_{1} \right ) \sin \left (t \right ) \]
Mathematica. Time used: 0.038 (sec). Leaf size: 14
ode=D[x[t],t]-x[t]*Cot[t]==4*Sin[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to (4 t+c_1) \sin (t) \]
Sympy. Time used: 0.604 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t)/tan(t) - 4*sin(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (C_{1} + 4 t\right ) \sin {\left (t \right )} \]