60.9.26 problem 1881

Internal problem ID [11805]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 8, system of first order odes
Problem number : 1881
Date solved : Sunday, March 30, 2025 at 09:15:45 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )+\frac {d}{d t}y \left (t \right )+y \left (t \right )&=f \left (t \right )\\ \frac {d^{2}}{d t^{2}}x \left (t \right )+\frac {d^{2}}{d t^{2}}y \left (t \right )+\frac {d}{d t}y \left (t \right )+x \left (t \right )+y \left (t \right )&=g \left (t \right ) \end{align*}

Maple. Time used: 0.077 (sec). Leaf size: 47
ode:=[diff(x(t),t)+diff(y(t),t)+y(t) = f(t), diff(diff(x(t),t),t)+diff(diff(y(t),t),t)+diff(y(t),t)+x(t)+y(t) = g(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= -\frac {d}{d t}f \left (t \right )+g \left (t \right )-f \left (t \right )-\frac {d^{2}}{d t^{2}}f \left (t \right )+\frac {d}{d t}g \left (t \right ) \\ y \left (t \right ) &= f \left (t \right )+\frac {d^{2}}{d t^{2}}f \left (t \right )-\frac {d}{d t}g \left (t \right ) \\ \end{align*}
Mathematica. Time used: 0.005 (sec). Leaf size: 44
ode={D[x[t],t]+D[y[t],t]+y[t]==f[t],D[x[t],{t,2}]+D[y[t],{t,2}]+D[y[t],t]+x[t]+y[t]==g[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -f''''(t)-f''(t)-f(t)+g''(t)+g(t) \\ y(t)\to f''''(t)+f(t)-g''(t) \\ \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-f(t) + y(t) + Derivative(x(t), t) + Derivative(y(t), t),0),Eq(-g(t) + x(t) + y(t) + Derivative(x(t), (t, 2)) + Derivative(y(t), t) + Derivative(y(t), (t, 2)),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
KeyError : Derivative(y(t), (t, 2))