28.4.41 problem 7.41

Internal problem ID [4573]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 7. Systems of linear differential equations. Problems at page 351
Problem number : 7.41
Date solved : Sunday, March 30, 2025 at 03:26:37 AM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x_{1} \left (t \right )&=-x_{1} \left (t \right )+2 x_{2} \left (t \right )\\ \frac {d}{d t}x_{2} \left (t \right )&=-3 x_{1} \left (t \right )+4 x_{2} \left (t \right )+\frac {{\mathrm e}^{3 t}}{1+{\mathrm e}^{2 t}} \end{align*}

Maple. Time used: 0.180 (sec). Leaf size: 70
ode:=[diff(x__1(t),t) = -x__1(t)+2*x__2(t), diff(x__2(t),t) = -3*x__1(t)+4*x__2(t)+exp(3*t)/(1+exp(2*t))]; 
dsolve(ode);
 
\begin{align*} x_{1} \left (t \right ) &= 2 \arctan \left ({\mathrm e}^{t}\right ) {\mathrm e}^{2 t}+{\mathrm e}^{2 t} c_1 -\ln \left (1+{\mathrm e}^{2 t}\right ) {\mathrm e}^{t}+{\mathrm e}^{t} c_2 \\ x_{2} \left (t \right ) &= 3 \arctan \left ({\mathrm e}^{t}\right ) {\mathrm e}^{2 t}+\frac {3 \,{\mathrm e}^{2 t} c_1}{2}-\ln \left (1+{\mathrm e}^{2 t}\right ) {\mathrm e}^{t}+{\mathrm e}^{t} c_2 \\ \end{align*}
Mathematica. Time used: 0.087 (sec). Leaf size: 100
ode={D[x1[t],t]==-x1[t]+2*x2[t],D[x2[t],t]==-3*x1[t]+4*x2[t]+Exp[3*t]/(1+Exp[2*t])}; 
ic={}; 
DSolve[{ode,ic},{x1[t],x2[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} \text {x1}(t)\to e^t \left (2 e^t \arctan \left (e^t\right )-\log \left (e^{2 t}+1\right )-2 c_1 e^t+2 c_2 e^t+3 c_1-2 c_2\right ) \\ \text {x2}(t)\to e^t \left (3 e^t \arctan \left (e^t\right )-\log \left (e^{2 t}+1\right )-3 c_1 e^t+3 c_2 e^t+3 c_1-2 c_2\right ) \\ \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x__1 = Function("x__1") 
x__2 = Function("x__2") 
ode=[Eq(x__1(t) - 2*x__2(t) + Derivative(x__1(t), t),0),Eq(3*x__1(t) - 4*x__2(t) + Derivative(x__2(t), t) - exp(3*t)/(exp(2*t) + 1),0)] 
ics = {} 
dsolve(ode,func=[x__1(t),x__2(t)],ics=ics)
 
NotImplementedError :