75.31.2 problem 816

Internal problem ID [17190]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 3 (Systems of differential equations). Section 23.2 The method of undetermined coefficients. Exercises page 239
Problem number : 816
Date solved : Thursday, March 13, 2025 at 09:18:31 AM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.047 (sec). Leaf size: 36
ode:=[diff(x(t),t) = 3-2*y(t), diff(y(t),t) = 2*x(t)-2*t]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= \sin \left (2 t \right ) c_{2} +\cos \left (2 t \right ) c_{1} +t \\ y \left (t \right ) &= -c_{2} \cos \left (2 t \right )+c_{1} \sin \left (2 t \right )+1 \\ \end{align*}
Mathematica. Time used: 0.043 (sec). Leaf size: 156
ode={D[x[t],t]==3-2*y[t],D[y[t],t]==2*x[t]-2*t}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \cos (2 t) \int _1^t(3 \cos (2 K[1])-2 K[1] \sin (2 K[1]))dK[1]-\sin (2 t) \int _1^t(-2 \cos (2 K[2]) K[2]-3 \sin (2 K[2]))dK[2]+c_1 \cos (2 t)-c_2 \sin (2 t) \\ y(t)\to \cos (2 t) \int _1^t(-2 \cos (2 K[2]) K[2]-3 \sin (2 K[2]))dK[2]+\sin (2 t) \int _1^t(3 \cos (2 K[1])-2 K[1] \sin (2 K[1]))dK[1]+c_2 \cos (2 t)+c_1 \sin (2 t) \\ \end{align*}
Sympy. Time used: 0.160 (sec). Leaf size: 61
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(2*y(t) + Derivative(x(t), t) - 3,0),Eq(2*t - 2*x(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = - C_{1} \sin {\left (2 t \right )} - C_{2} \cos {\left (2 t \right )} + t \sin ^{2}{\left (2 t \right )} + t \cos ^{2}{\left (2 t \right )}, \ y{\left (t \right )} = C_{1} \cos {\left (2 t \right )} - C_{2} \sin {\left (2 t \right )} + \sin ^{2}{\left (2 t \right )} + \cos ^{2}{\left (2 t \right )}\right ] \]