81.8.9 problem 16

Internal problem ID [18640]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter VII. Ordinary differential equations in two dependent variables. Exercises at page 86
Problem number : 16
Date solved : Thursday, March 13, 2025 at 12:27:05 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d x}z \left (x \right )-3 y \left (x \right )+2 z \left (x \right )&={\mathrm e}^{x}\\ \frac {d}{d x}y \left (x \right )+2 y \left (x \right )-z \left (x \right )&={\mathrm e}^{3 x} \end{align*}

Maple. Time used: 0.053 (sec). Leaf size: 78
ode:=[diff(z(x),x)-3*y(x)+2*z(x) = exp(x), diff(y(x),x)+2*y(x)-z(x) = exp(3*x)]; 
dsolve(ode);
 
\begin{align*} y \left (x \right ) &= {\mathrm e}^{\left (-2+\sqrt {3}\right ) x} c_{2} +{\mathrm e}^{-\left (2+\sqrt {3}\right ) x} c_{1} +\frac {5 \,{\mathrm e}^{3 x}}{22}+\frac {{\mathrm e}^{x}}{6} \\ z \left (x \right ) &= {\mathrm e}^{\left (-2+\sqrt {3}\right ) x} c_{2} \sqrt {3}-{\mathrm e}^{-\left (2+\sqrt {3}\right ) x} c_{1} \sqrt {3}+\frac {3 \,{\mathrm e}^{3 x}}{22}+\frac {{\mathrm e}^{x}}{2} \\ \end{align*}
Mathematica. Time used: 3.298 (sec). Leaf size: 169
ode={D[z[x],x]-3*y[x]+2*z[x]==Exp[x],D[y[x],x]+2*y[x]-z[x]==Exp[3*x]}; 
ic={}; 
DSolve[{ode,ic},{y[x],z[x]},x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{66} e^{-\left (\left (2+\sqrt {3}\right ) x\right )} \left (11 e^{\left (3+\sqrt {3}\right ) x}+15 e^{\left (5+\sqrt {3}\right ) x}+11 \left (3 c_1+\sqrt {3} c_2\right ) e^{2 \sqrt {3} x}+33 c_1-11 \sqrt {3} c_2\right ) \\ z(x)\to \frac {1}{22} e^{-\left (\left (2+\sqrt {3}\right ) x\right )} \left (11 e^{\left (3+\sqrt {3}\right ) x}+3 e^{\left (5+\sqrt {3}\right ) x}+11 \left (\sqrt {3} c_1+c_2\right ) e^{2 \sqrt {3} x}+11 \left (c_2-\sqrt {3} c_1\right )\right ) \\ \end{align*}
Sympy. Time used: 4.964 (sec). Leaf size: 92
from sympy import * 
x = symbols("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(-3*y(x) + 2*z(x) - exp(x) + Derivative(z(x), x),0),Eq(2*y(x) - z(x) - exp(3*x) + Derivative(y(x), x),0)] 
ics = {} 
dsolve(ode,func=[y(x),z(x)],ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {3} C_{1} e^{- x \left (\sqrt {3} + 2\right )}}{3} + \frac {\sqrt {3} C_{2} e^{- x \left (2 - \sqrt {3}\right )}}{3} + \frac {5 e^{3 x}}{22} + \frac {e^{x}}{6}, \ z{\left (x \right )} = C_{1} e^{- x \left (\sqrt {3} + 2\right )} + C_{2} e^{- x \left (2 - \sqrt {3}\right )} + \frac {3 e^{3 x}}{22} + \frac {e^{x}}{2}\right ] \]