75.33.1 problem 830

Internal problem ID [17204]
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 : 830
Date solved : Thursday, March 13, 2025 at 09:18:47 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} x^{\prime }+3 x&={\mathrm e}^{-2 t} \end{align*}

Using Laplace method With initial conditions

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

Maple. Time used: 9.339 (sec). Leaf size: 15
ode:=diff(x(t),t)+3*x(t) = exp(-2*t); 
ic:=x(0) = 0; 
dsolve([ode,ic],x(t),method='laplace');
 
\[ x \left (t \right ) = {\mathrm e}^{-2 t}-{\mathrm e}^{-3 t} \]
Mathematica. Time used: 0.058 (sec). Leaf size: 16
ode=D[x[t],t]+3*x[t]==Exp[-2*t]; 
ic={x[0]==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to e^{-3 t} \left (e^t-1\right ) \]
Sympy. Time used: 0.166 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(3*x(t) + Derivative(x(t), t) - exp(-2*t),0) 
ics = {x(0): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (1 - e^{- t}\right ) e^{- 2 t} \]