88.11.6 problem 7

Internal problem ID [24053]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 2. Differential equations of first order. Exercise at page 54
Problem number : 7
Date solved : Thursday, October 02, 2025 at 09:55:15 PM
CAS classification : system_of_ODEs

\begin{align*} y^{\prime }&=x +2 z \left (x \right )\\ z^{\prime }\left (x \right )&=3 x +y-z \left (x \right ) \end{align*}
Maple. Time used: 0.045 (sec). Leaf size: 39
ode:=[diff(y(x),x) = x+2*z(x), diff(z(x),x) = 3*x+y(x)-z(x)]; 
dsolve(ode);
 
\begin{align*} y \left (x \right ) &= {\mathrm e}^{x} c_2 +{\mathrm e}^{-2 x} c_1 -\frac {7 x}{2}-\frac {9}{4} \\ z \left (x \right ) &= \frac {{\mathrm e}^{x} c_2}{2}-{\mathrm e}^{-2 x} c_1 -\frac {7}{4}-\frac {x}{2} \\ \end{align*}
Mathematica. Time used: 0.078 (sec). Leaf size: 83
ode={D[y[x],x]==x+2*z[x],D[z[x],x]==3*x+y[x]-z[x]}; 
ic={}; 
DSolve[{ode,ic},{y[x],z[x]},x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{12} \left (-42 x+4 (c_1-2 c_2) e^{-2 x}+8 (c_1+c_2) e^x-27\right )\\ z(x)&\to \frac {1}{12} e^{-2 x} \left (-3 e^{2 x} (2 x+7)+4 (c_1+c_2) e^{3 x}-4 c_1+8 c_2\right ) \end{align*}
Sympy. Time used: 0.103 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(-x - 2*z(x) + Derivative(y(x), x),0),Eq(-3*x - y(x) + z(x) + Derivative(z(x), x),0)] 
ics = {} 
dsolve(ode,func=[y(x),z(x)],ics=ics)
 
\[ \left [ y{\left (x \right )} = - C_{1} e^{- 2 x} + 2 C_{2} e^{x} - \frac {7 x}{2} - \frac {9}{4}, \ z{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{x} - \frac {x}{2} - \frac {7}{4}\right ] \]