1.18.10 problem 10

Internal problem ID [539]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 4. Laplace transform methods. Section 4.2 (Transformation of initial value problems). Problems at page 287
Problem number : 10
Date solved : Tuesday, September 30, 2025 at 04:01:08 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=0 \\ x^{\prime }\left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.100 (sec). Leaf size: 21
ode:=diff(diff(x(t),t),t)+3*diff(x(t),t)+2*x(t) = t; 
ic:=[x(0) = 0, D(x)(0) = 2]; 
dsolve([ode,op(ic)],x(t),method='laplace');
 
\[ x = \frac {t}{2}+3 \,{\mathrm e}^{-t}-\frac {9 \,{\mathrm e}^{-2 t}}{4}-\frac {3}{4} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 28
ode=D[x[t],{t,2}]+3*D[x[t],t]+2*x[t]==t; 
ic={x[0]==0,Derivative[1][x][0] ==2}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{4} \left (2 t-9 e^{-2 t}+12 e^{-t}-3\right ) \end{align*}
Sympy. Time used: 0.123 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t + 2*x(t) + 3*Derivative(x(t), t) + Derivative(x(t), (t, 2)),0) 
ics = {x(0): 0, Subs(Derivative(x(t), t), t, 0): 2} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {t}{2} - \frac {3}{4} + 3 e^{- t} - \frac {9 e^{- 2 t}}{4} \]