23.4.5 problem 8(e)

Internal problem ID [4170]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 6. Linear systems. Exercises at page 110
Problem number : 8(e)
Date solved : Tuesday, March 04, 2025 at 05:54:49 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.024 (sec). Leaf size: 69
ode:=[diff(y__1(x),x) = y__1(x)+y__2(x), diff(y__2(x),x) = y__1(x)-y__2(x)]; 
dsolve(ode);
 
\begin{align*} y_{1} \left (x \right ) &= c_{1} {\mathrm e}^{\sqrt {2}\, x}+c_{2} {\mathrm e}^{-\sqrt {2}\, x} \\ y_{2} \left (x \right ) &= c_{1} \sqrt {2}\, {\mathrm e}^{\sqrt {2}\, x}-c_{2} \sqrt {2}\, {\mathrm e}^{-\sqrt {2}\, x}-c_{1} {\mathrm e}^{\sqrt {2}\, x}-c_{2} {\mathrm e}^{-\sqrt {2}\, x} \\ \end{align*}
Mathematica. Time used: 0.008 (sec). Leaf size: 139
ode={D[y1[x],x]==y1[x]+y2[x],D[y2[x],x]==y1[x]-y2[x]}; 
ic={}; 
DSolve[{ode,ic},{y1[x],y2[x]},x,IncludeSingularSolutions->True]
 
\begin{align*} \text {y1}(x)\to \frac {1}{4} e^{-\sqrt {2} x} \left (c_1 \left (\left (2+\sqrt {2}\right ) e^{2 \sqrt {2} x}+2-\sqrt {2}\right )+\sqrt {2} c_2 \left (e^{2 \sqrt {2} x}-1\right )\right ) \\ \text {y2}(x)\to \frac {1}{4} e^{-\sqrt {2} x} \left (\sqrt {2} c_1 \left (e^{2 \sqrt {2} x}-1\right )-c_2 \left (\left (\sqrt {2}-2\right ) e^{2 \sqrt {2} x}-2-\sqrt {2}\right )\right ) \\ \end{align*}
Sympy. Time used: 0.174 (sec). Leaf size: 58
from sympy import * 
x = symbols("x") 
y__1 = Function("y__1") 
y__2 = Function("y__2") 
ode=[Eq(-y__1(x) - y__2(x) + Derivative(y__1(x), x),0),Eq(-y__1(x) + 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 )} = C_{1} \left (1 - \sqrt {2}\right ) e^{- \sqrt {2} x} + C_{2} \left (1 + \sqrt {2}\right ) e^{\sqrt {2} x}, \ y^{2}{\left (x \right )} = C_{1} e^{- \sqrt {2} x} + C_{2} e^{\sqrt {2} x}\right ] \]