81.8.8 problem 15

Internal problem ID [18647]
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 : 15
Date solved : Monday, March 31, 2025 at 05:48:49 PM
CAS classification : system_of_ODEs

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

Maple. Time used: 0.188 (sec). Leaf size: 55
ode:=[diff(z(x),x)+y(x)+3*z(x) = exp(x), diff(y(x),x)+3*y(x)+4*z(x) = exp(2*x)]; 
dsolve(ode);
 
\begin{align*} y \left (x \right ) &= {\mathrm e}^{-x} c_2 +{\mathrm e}^{-5 x} c_1 -\frac {{\mathrm e}^{x}}{3}+\frac {5 \,{\mathrm e}^{2 x}}{21} \\ z \left (x \right ) &= -\frac {{\mathrm e}^{2 x}}{21}-\frac {{\mathrm e}^{-x} c_2}{2}+\frac {{\mathrm e}^{-5 x} c_1}{2}+\frac {{\mathrm e}^{x}}{3} \\ \end{align*}
Mathematica. Time used: 0.065 (sec). Leaf size: 103
ode={D[z[x],x]+y[x]+3*z[x]==Exp[x],D[y[x],x]+3*y[x]+4*z[x]==Exp[2*x]}; 
ic={}; 
DSolve[{ode,ic},{y[x],z[x]},x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {e^x}{3}+\frac {5 e^{2 x}}{21}+\frac {1}{2} (c_1-2 c_2) e^{-x}+\left (\frac {c_1}{2}+c_2\right ) e^{-5 x} \\ z(x)\to \frac {1}{84} e^{-5 x} \left (28 e^{6 x}-4 e^{7 x}-21 (c_1-2 c_2) e^{4 x}+21 (c_1+2 c_2)\right ) \\ \end{align*}
Sympy. Time used: 0.215 (sec). Leaf size: 56
from sympy import * 
x = symbols("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(y(x) + 3*z(x) - exp(x) + Derivative(z(x), x),0),Eq(3*y(x) + 4*z(x) - exp(2*x) + Derivative(y(x), x),0)] 
ics = {} 
dsolve(ode,func=[y(x),z(x)],ics=ics)
 
\[ \left [ y{\left (x \right )} = - 2 C_{1} e^{- x} + 2 C_{2} e^{- 5 x} + \frac {5 e^{2 x}}{21} - \frac {e^{x}}{3}, \ z{\left (x \right )} = C_{1} e^{- x} + C_{2} e^{- 5 x} - \frac {e^{2 x}}{21} + \frac {e^{x}}{3}\right ] \]