71.17.3 problem 4
Internal
problem
ID
[14488]
Book
:
Ordinary
Differential
Equations
by
Charles
E.
Roberts,
Jr.
CRC
Press.
2010
Section
:
Chapter
7.
Systems
of
First-Order
Differential
Equations.
Exercises
page
329
Problem
number
:
4
Date
solved
:
Monday, March 31, 2025 at 12:28:28 PM
CAS
classification
:
system_of_ODEs
\begin{align*} \frac {d}{d x}y_{1} \left (x \right )&=y_{1} \left (x \right )+2 y_{2} \left (x \right )+x -1\\ \frac {d}{d x}y_{2} \left (x \right )&=3 y_{1} \left (x \right )+2 y_{2} \left (x \right )-5 x -2 \end{align*}
With initial conditions
\begin{align*} y_{1} \left (0\right ) = -2\\ y_{2} \left (0\right ) = 3 \end{align*}
✓ Maple. Time used: 0.138 (sec). Leaf size: 17
ode:=[diff(y__1(x),x) = y__1(x)+2*y__2(x)+x-1, diff(y__2(x),x) = 3*y__1(x)+2*y__2(x)-5*x-2];
ic:=y__1(0) = -2y__2(0) = 3;
dsolve([ode,ic]);
\begin{align*}
y_{1} \left (x \right ) &= -2+3 x \\
y_{2} \left (x \right ) &= 3-2 x \\
\end{align*}
✓ Mathematica. Time used: 0.237 (sec). Leaf size: 479
ode={D[ y1[x],x]==y1[x]+2*y2[x]+x-1,D[ y2[x],x]==3*y1[x]+2*y2[x]-5*x-2};
ic={y1[0]==-2,y2[0]==3};
DSolve[{ode,ic},{y1[x],y2[x]},x,IncludeSingularSolutions->True]
\begin{align*}
\text {y1}(x)\to \frac {1}{5} e^{-x} \left (-\left (\left (2 e^{5 x}+3\right ) \int _1^0\frac {1}{5} e^{-4 K[1]} \left (-8 K[1]+e^{5 K[1]} (13 K[1]+1)-6\right )dK[1]\right )+\left (2 e^{5 x}+3\right ) \int _1^x\frac {1}{5} e^{-4 K[1]} \left (-8 K[1]+e^{5 K[1]} (13 K[1]+1)-6\right )dK[1]+2 \left (-\left (\left (e^{5 x}-1\right ) \int _1^0-\frac {1}{5} e^{-4 K[2]} \left (12 K[2]+e^{5 K[2]} (13 K[2]+1)+9\right )dK[2]\right )+\left (e^{5 x}-1\right ) \int _1^x-\frac {1}{5} e^{-4 K[2]} \left (12 K[2]+e^{5 K[2]} (13 K[2]+1)+9\right )dK[2]+e^{5 x}-6\right )\right ) \\
\text {y2}(x)\to \frac {1}{5} e^{-x} \left (-3 \left (e^{5 x}-1\right ) \int _1^0\frac {1}{5} e^{-4 K[1]} \left (-8 K[1]+e^{5 K[1]} (13 K[1]+1)-6\right )dK[1]+3 \left (e^{5 x}-1\right ) \int _1^x\frac {1}{5} e^{-4 K[1]} \left (-8 K[1]+e^{5 K[1]} (13 K[1]+1)-6\right )dK[1]-3 e^{5 x} \int _1^0-\frac {1}{5} e^{-4 K[2]} \left (12 K[2]+e^{5 K[2]} (13 K[2]+1)+9\right )dK[2]+3 e^{5 x} \int _1^x-\frac {1}{5} e^{-4 K[2]} \left (12 K[2]+e^{5 K[2]} (13 K[2]+1)+9\right )dK[2]+2 \int _1^x-\frac {1}{5} e^{-4 K[2]} \left (12 K[2]+e^{5 K[2]} (13 K[2]+1)+9\right )dK[2]-2 \int _1^0-\frac {1}{5} e^{-4 K[2]} \left (12 K[2]+e^{5 K[2]} (13 K[2]+1)+9\right )dK[2]+3 e^{5 x}+12\right ) \\
\end{align*}
✓ Sympy. Time used: 0.199 (sec). Leaf size: 41
from sympy import *
x = symbols("x")
y__1 = Function("y__1")
y__2 = Function("y__2")
ode=[Eq(-x - y__1(x) - 2*y__2(x) + Derivative(y__1(x), x) + 1,0),Eq(5*x - 3*y__1(x) - 2*y__2(x) + Derivative(y__2(x), x) + 2,0)]
ics = {}
dsolve(ode,func=[y__1(x),y__2(x)],ics=ics)
\[
\left [ y^{1}{\left (x \right )} = - C_{1} e^{- x} + \frac {2 C_{2} e^{4 x}}{3} + 3 x - 2, \ y^{2}{\left (x \right )} = C_{1} e^{- x} + C_{2} e^{4 x} - 2 x + 3\right ]
\]