80.10.11 problem 38

Internal problem ID [21406]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 11. Laplace transform. Excercise 11.7 at page 248
Problem number : 38
Date solved : Thursday, October 02, 2025 at 07:30:53 PM
CAS classification : system_of_ODEs

\begin{align*} x^{\prime }&=2 x+y \left (t \right )\\ y^{\prime }\left (t \right )&=-x-4 y \left (t \right ) \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=0 \\ y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.065 (sec). Leaf size: 96
ode:=[diff(x(t),t) = 2*x(t)+y(t), diff(y(t),t) = -x(t)-4*y(t)]; 
ic:=[x(0) = 0, y(0) = 1]; 
dsolve([ode,op(ic)]);
 
\begin{align*} x \left (t \right ) &= \frac {\sqrt {2}\, {\mathrm e}^{\left (-1+2 \sqrt {2}\right ) t}}{8}-\frac {\sqrt {2}\, {\mathrm e}^{-\left (1+2 \sqrt {2}\right ) t}}{8} \\ y \left (t \right ) &= \frac {{\mathrm e}^{\left (-1+2 \sqrt {2}\right ) t}}{2}+\frac {{\mathrm e}^{-\left (1+2 \sqrt {2}\right ) t}}{2}-\frac {3 \sqrt {2}\, {\mathrm e}^{\left (-1+2 \sqrt {2}\right ) t}}{8}+\frac {3 \sqrt {2}\, {\mathrm e}^{-\left (1+2 \sqrt {2}\right ) t}}{8} \\ \end{align*}
Mathematica. Time used: 0.007 (sec). Leaf size: 90
ode={D[x[t],t]==2*x[t]+y[t],D[y[t],t]==-x[t]-4*y[t]}; 
ic={x[0] ==0,y[0]==1}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {e^{-\left (\left (1+2 \sqrt {2}\right ) t\right )} \left (e^{4 \sqrt {2} t}-1\right )}{4 \sqrt {2}}\\ y(t)&\to \frac {1}{8} e^{-\left (\left (1+2 \sqrt {2}\right ) t\right )} \left (\left (4-3 \sqrt {2}\right ) e^{4 \sqrt {2} t}+4+3 \sqrt {2}\right ) \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode=[Eq(-2*x(t) - y(t) + Derivative(x(t), t),0),Eq(x(t) + 4*y(t) + Derivative(y(t), t),0)] 
ics = {x(0): 0, y(0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
ValueError : 
Input to the funcs should be a list of functions.