76.6.7 problem 7

Internal problem ID [17391]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 3. Systems of two first order equations. Section 3.2 (Two first order linear differential equations). Problems at page 142
Problem number : 7
Date solved : Monday, March 31, 2025 at 04:12:40 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 2.062 (sec). Leaf size: 4166
ode:=[diff(x(t),t) = x(t)+y(t)+4, diff(y(t),t) = -2*x(t)+sin(t)*y(t)]; 
dsolve(ode);
 
\begin{align*} \text {Solution too large to show}\end{align*}

Mathematica
ode={D[x[t],t]==x[t]+y[t],D[y[t],t]==-2*x[t]+Sin[t]*y[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-x(t) - y(t) + Derivative(x(t), t) - 4,0),Eq(2*x(t) - y(t)*sin(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
NotImplementedError :