75.33.4 problem 833

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

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

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=-{\frac {1}{2}} \end{align*}

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