71.17.2 problem 3

Internal problem ID [14487]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 7. Systems of First-Order Differential Equations. Exercises page 329
Problem number : 3
Date solved : Monday, March 31, 2025 at 12:28:27 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d x}y_{1} \left (x \right )&=y_{1} \left (x \right )-2 y_{2} \left (x \right )\\ \frac {d}{d x}y_{2} \left (x \right )&=y_{1} \left (x \right )+3 y_{2} \left (x \right ) \end{align*}

Maple. Time used: 0.125 (sec). Leaf size: 45
ode:=[diff(y__1(x),x) = y__1(x)-2*y__2(x), diff(y__2(x),x) = y__1(x)+3*y__2(x)]; 
dsolve(ode);
 
\begin{align*} y_{1} \left (x \right ) &= {\mathrm e}^{2 x} \left (\sin \left (x \right ) c_1 +\cos \left (x \right ) c_2 \right ) \\ y_{2} \left (x \right ) &= -\frac {{\mathrm e}^{2 x} \left (\sin \left (x \right ) c_1 -\sin \left (x \right ) c_2 +\cos \left (x \right ) c_1 +\cos \left (x \right ) c_2 \right )}{2} \\ \end{align*}
Mathematica. Time used: 0.006 (sec). Leaf size: 51
ode={D[ y1[x],x]==y1[x]-2*y2[x],D[ y2[x],x]==y1[x]+3*y2[x]}; 
ic={}; 
DSolve[{ode,ic},{y1[x],y2[x]},x,IncludeSingularSolutions->True]
 
\begin{align*} \text {y1}(x)\to e^{2 x} (c_1 \cos (x)-(c_1+2 c_2) \sin (x)) \\ \text {y2}(x)\to e^{2 x} (c_2 \cos (x)+(c_1+c_2) \sin (x)) \\ \end{align*}
Sympy. Time used: 0.113 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
y__1 = Function("y__1") 
y__2 = Function("y__2") 
ode=[Eq(-y__1(x) + 2*y__2(x) + Derivative(y__1(x), x),0),Eq(-y__1(x) - 3*y__2(x) + Derivative(y__2(x), x),0)] 
ics = {} 
dsolve(ode,func=[y__1(x),y__2(x)],ics=ics)
 
\[ \left [ y^{1}{\left (x \right )} = - \left (C_{1} - C_{2}\right ) e^{2 x} \sin {\left (x \right )} - \left (C_{1} + C_{2}\right ) e^{2 x} \cos {\left (x \right )}, \ y^{2}{\left (x \right )} = C_{1} e^{2 x} \cos {\left (x \right )} - C_{2} e^{2 x} \sin {\left (x \right )}\right ] \]