2.1 problem 1
Internal
problem
ID
[8035]
Book
:
First
order
enumerated
odes
Section
:
section
2
(system
of
first
order
odes)
Problem
number
:
1
Date
solved
:
Monday, October 21, 2024 at 04:44:33 PM
CAS
classification
:
system_of_ODEs
\begin{align*} \frac {d}{d t}x \left (t \right )+\frac {d}{d t}y \left (t \right )-x \left (t \right )&=y \left (t \right )+t\\ \frac {d}{d t}x \left (t \right )+\frac {d}{d t}y \left (t \right )&=2 x \left (t \right )+3 y \left (t \right )+{\mathrm e}^{t} \end{align*}
In canonical form a linear first order is
\begin{align*} \frac {d}{d t}x \left (t \right ) + q(t)x \left (t \right ) &= p(t) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(t) &=-1\\ p(t) &=3 t -1 \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dt}}\\ &= {\mathrm e}^{\int \left (-1\right )d t}\\ &= {\mathrm e}^{-t} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}}\left ( \mu x\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}}\left ( \mu x\right ) &= \left (\mu \right ) \left (3 t -1\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \left (x \,{\mathrm e}^{-t}\right ) &= \left ({\mathrm e}^{-t}\right ) \left (3 t -1\right ) \\
\mathrm {d} \left (x \,{\mathrm e}^{-t}\right ) &= \left (\left (3 t -1\right ) {\mathrm e}^{-t}\right )\, \mathrm {d} t \\
\end{align*}
Integrating gives
\begin{align*} x \,{\mathrm e}^{-t}&= \int {\left (3 t -1\right ) {\mathrm e}^{-t} \,dt} \\ &=-\left (3 t +2\right ) {\mathrm e}^{-t} + \textit {\_C} \end{align*}
Dividing throughout by the integrating factor \({\mathrm e}^{-t}\) gives the final solution
\[ x \left (t \right ) = \textit {\_C} \,{\mathrm e}^{t}-3 t -2 \]
The system is
\begin{align*} \frac {d}{d t}x \left (t \right )+\frac {d}{d t}y \left (t \right )&=x \left (t \right )+y \left (t \right )+t\tag {1}\\ \frac {d}{d t}x \left (t \right )+\frac {d}{d t}y \left (t \right )&=2 x \left (t \right )+3 y \left (t \right )+{\mathrm e}^{t}\tag {2} \end{align*}
Since the left side is the same, this implies
\begin{align*} x \left (t \right )+y \left (t \right )+t&=2 x \left (t \right )+3 y \left (t \right )+{\mathrm e}^{t}\\ y \left (t \right )&=-\frac {x \left (t \right )}{2}-\frac {{\mathrm e}^{t}}{2}+\frac {t}{2}\tag {3} \end{align*}
Taking derivative of the above w.r.t. \(t\) gives
\begin{align*} \frac {d}{d t}y \left (t \right )&=-\frac {\frac {d}{d t}x \left (t \right )}{2}-\frac {{\mathrm e}^{t}}{2}+\frac {1}{2}\tag {4} \end{align*}
Substituting (3,4) in (1) to eliminate \(y \left (t \right ),\frac {d}{d t}y \left (t \right )\) gives
\begin{align*} \frac {\frac {d}{d t}x \left (t \right )}{2}-\frac {{\mathrm e}^{t}}{2}+\frac {1}{2} &= \frac {x \left (t \right )}{2}-\frac {{\mathrm e}^{t}}{2}+\frac {3 t}{2}\\ \frac {d}{d t}x \left (t \right ) &= x \left (t \right )+3 t -1\tag {5} \end{align*}
Which is now solved for \(x \left (t \right )\). Given now that we have the solution
\begin{align*} x \left (t \right )&=\textit {\_C} \,{\mathrm e}^{t}-3 t -2 \tag {6} \end{align*}
Then substituting (6) into (3) gives
\begin{align*} y \left (t \right )&=-\frac {\textit {\_C} \,{\mathrm e}^{t}}{2}+2 t +1-\frac {{\mathrm e}^{t}}{2} \tag {7} \end{align*}
2.1.1 Maple step by step solution
2.1.2 Maple dsolve solution
Solving time : 0.059
(sec)
Leaf size : 30
dsolve([diff(x(t),t)+diff(y(t),t)-x(t) = y(t)+t, diff(x(t),t)+diff(y(t),t) = 2*x(t)+3*y(t)+exp(t)]
,{op([x(t), y(t)])})
\begin{align*}
x \left (t \right ) &= -3 t -2+{\mathrm e}^{t} c_1 \\
y \left (t \right ) &= 2 t +1-\frac {{\mathrm e}^{t} c_1}{2}-\frac {{\mathrm e}^{t}}{2} \\
\end{align*}
2.1.3 Mathematica DSolve solution
Solving time : 0.026
(sec)
Leaf size : 37
DSolve[{{D[x[t],t]+D[y[t],t]-x[t]==y[t]+t,D[x[t],t]+D[y[t],t]==2*x[t]+3*y[t]+Exp[t]},{}},
{x[t],y[t]},t,IncludeSingularSolutions->True]
\begin{align*}
x(t)\to -3 t+(1+2 c_1) e^t-2 \\
y(t)\to 2 t-(1+c_1) e^t+1 \\
\end{align*}