71.18.15 problem 13

Internal problem ID [14510]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 8. Linear Systems of First-Order Differential Equations. Exercises 8.3 page 379
Problem number : 13
Date solved : Thursday, March 13, 2025 at 03:31:52 AM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.085 (sec). Leaf size: 80
ode:=[diff(y__1(x),x) = 2*y__1(x)+y__2(x), diff(y__2(x),x) = -y__1(x)+2*y__2(x), diff(y__3(x),x) = 3*y__3(x)-4*y__4(x), diff(y__4(x),x) = 4*y__3(x)+3*y__4(x)]; 
dsolve(ode);
 
\begin{align*} y_{1} \left (x \right ) &= {\mathrm e}^{2 x} \left (c_{3} \sin \left (x \right )+c_4 \cos \left (x \right )\right ) \\ y_{2} \left (x \right ) &= -{\mathrm e}^{2 x} \left (c_4 \sin \left (x \right )-c_{3} \cos \left (x \right )\right ) \\ y_{3} \left (x \right ) &= {\mathrm e}^{3 x} \left (c_{1} \sin \left (4 x \right )+c_{2} \cos \left (4 x \right )\right ) \\ y_{4} \left (x \right ) &= {\mathrm e}^{3 x} \left (c_{2} \sin \left (4 x \right )-c_{1} \cos \left (4 x \right )\right ) \\ \end{align*}
Mathematica. Time used: 0.003 (sec). Leaf size: 92
ode={D[ y1[x],x]==2*y1[x]+1*y2[x]+0*y3[x]+0*y4[x],D[ y2[x],x]==-1*y1[x]+2*y2[x]+0*y3[x]+0*y4[x],D[ y3[x],x]==0*y1[x]+0*y2[x]+3*y3[x]-4*y4[x],D[ y4[x],x]==0*y1[x]+0*y2[x]+4*y3[x]+3*y4[x]}; 
ic={}; 
DSolve[{ode,ic},{y1[x],y2[x],y3[x],y4[x]},x,IncludeSingularSolutions->True]
 
\begin{align*} \text {y1}(x)\to e^{2 x} (c_1 \cos (x)+c_2 \sin (x)) \\ \text {y2}(x)\to e^{2 x} (c_2 \cos (x)-c_1 \sin (x)) \\ \text {y3}(x)\to e^{3 x} (c_3 \cos (4 x)-c_4 \sin (4 x)) \\ \text {y4}(x)\to e^{3 x} (c_4 \cos (4 x)+c_3 \sin (4 x)) \\ \end{align*}
Sympy. Time used: 0.195 (sec). Leaf size: 97
from sympy import * 
x = symbols("x") 
y__1 = Function("y__1") 
y__2 = Function("y__2") 
y__3 = Function("y__3") 
y__4 = Function("y__4") 
ode=[Eq(-2*y__1(x) - y__2(x) + Derivative(y__1(x), x),0),Eq(y__1(x) - 2*y__2(x) + Derivative(y__2(x), x),0),Eq(-3*y__3(x) + 4*y__4(x) + Derivative(y__3(x), x),0),Eq(-4*y__3(x) - 3*y__4(x) + Derivative(y__4(x), x),0)] 
ics = {} 
dsolve(ode,func=[y__1(x),y__2(x),y__3(x),y__4(x)],ics=ics)
 
\[ \left [ y^{1}{\left (x \right )} = C_{1} e^{2 x} \sin {\left (x \right )} + C_{2} 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 )}, \ y^{3}{\left (x \right )} = - C_{3} e^{3 x} \sin {\left (4 x \right )} - C_{4} e^{3 x} \cos {\left (4 x \right )}, \ y^{4}{\left (x \right )} = C_{3} e^{3 x} \cos {\left (4 x \right )} - C_{4} e^{3 x} \sin {\left (4 x \right )}\right ] \]