69.33.3 problem 832

Internal problem ID [18572]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 3. Section 24.2. Solving the Cauchy problem for linear differential equation with constant coefficients. Exercises page 249
Problem number : 832
Date solved : Thursday, October 02, 2025 at 03:15:02 PM
CAS classification : [[_linear, `class A`]]

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

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.085 (sec). Leaf size: 6
ode:=diff(x(t),t)-x(t) = cos(t)-sin(t); 
ic:=[x(0) = 0]; 
dsolve([ode,op(ic)],x(t),method='laplace');
 
\[ x = \sin \left (t \right ) \]
Mathematica. Time used: 0.028 (sec). Leaf size: 7
ode=D[x[t],t]-x[t]==Cos[t]-Sin[t]; 
ic={x[0]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \sin (t) \end{align*}
Sympy. Time used: 0.139 (sec). Leaf size: 29
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t) + sin(t) - cos(t) + Derivative(x(t), t),0) 
ics = {x(0): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {\sqrt {2} \sin {\left (t + \frac {\pi }{4} \right )}}{2} - \frac {\sqrt {2} \cos {\left (t + \frac {\pi }{4} \right )}}{2} \]