66.1.9 problem Problem 9

Internal problem ID [13785]
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 9
Date solved : Monday, March 31, 2025 at 08:11:49 AM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=diff(x(t),t) = x(t)+sin(t); 
dsolve(ode,x(t), singsol=all);
 
\[ x = -\frac {\cos \left (t \right )}{2}-\frac {\sin \left (t \right )}{2}+{\mathrm e}^{t} c_1 \]
Mathematica. Time used: 0.04 (sec). Leaf size: 29
ode=D[x[t],t]==x[t]+Sin[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to e^t \left (\int _1^te^{-K[1]} \sin (K[1])dK[1]+c_1\right ) \]
Sympy. Time used: 0.127 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t) - sin(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} e^{t} - \frac {\sin {\left (t \right )}}{2} - \frac {\cos {\left (t \right )}}{2} \]