2.1 problem 1

Internal problem ID [7387]
Internal file name [OUTPUT/6633_Monday_November_27_2023_11_02_13_PM_16279652/index.tex]

Book: First order enumerated odes
Section: section 2 (system of first order ode’s)
Problem number: 1.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "system of linear ODEs"

Solve \begin {align*} x^{\prime }\left (t \right )+y^{\prime }\left (t \right )&=x \left (t \right )+y \left (t \right )+t\\ x^{\prime }\left (t \right )+y^{\prime }\left (t \right )&=2 x \left (t \right )+3 y \left (t \right )+{\mathrm e}^{t} \end {align*}

The system is \begin {align*} x^{\prime }\left (t \right )+y^{\prime }\left (t \right )&=x \left (t \right )+y \left (t \right )+t\tag {1}\\ x^{\prime }\left (t \right )+y^{\prime }\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*} y^{\prime }\left (t \right )&=-\frac {x^{\prime }\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 ),y^{\prime }\left (t \right )\) gives \begin {align*} \frac {x^{\prime }\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}\\ x^{\prime }\left (t \right ) &= x \left (t \right )+3 t -1\tag {5} \end {align*}

Which is now solved for \(x \left (t \right )\).

Entering Linear first order ODE solver. In canonical form a linear first order is \begin {align*} x^{\prime }\left (t \right ) + p(t)x \left (t \right ) &= q(t) \end {align*}

Where here \begin {align*} p(t) &=-1\\ q(t) &=3 t -1 \end {align*}

Hence the ode is \begin {align*} x^{\prime }\left (t \right )-x \left (t \right ) = 3 t -1 \end {align*}

The integrating factor \(\mu \) is \begin{align*} \mu &= {\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 ) &= \left (\mu \right ) \left (3 t -1\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \left ({\mathrm e}^{-t} x\right ) &= \left ({\mathrm e}^{-t}\right ) \left (3 t -1\right )\\ \mathrm {d} \left ({\mathrm e}^{-t} x\right ) &= \left (\left (3 t -1\right ) {\mathrm e}^{-t}\right )\, \mathrm {d} t \end {align*}

Integrating gives \begin {align*} {\mathrm e}^{-t} x &= \int {\left (3 t -1\right ) {\mathrm e}^{-t}\,\mathrm {d} t}\\ {\mathrm e}^{-t} x &= -\left (3 t +2\right ) {\mathrm e}^{-t} + c_{1} \end {align*}

Dividing both sides by the integrating factor \(\mu ={\mathrm e}^{-t}\) results in \begin {align*} x \left (t \right ) &= -{\mathrm e}^{t} \left (3 t +2\right ) {\mathrm e}^{-t}+c_{1} {\mathrm e}^{t} \end {align*}

which simplifies to \begin {align*} x \left (t \right ) &= -3 t -2+c_{1} {\mathrm e}^{t} \end {align*}

Given now that we have the solution \begin {align*} x \left (t \right )&=-3 t -2+c_{1} {\mathrm e}^{t} \tag {6} \end {align*}

Then substituting (6) into (3) gives \begin {align*} y \left (t \right )&=2 t +1-\frac {c_{1} {\mathrm e}^{t}}{2}-\frac {{\mathrm e}^{t}}{2} \tag {7} \end {align*}

Solution by Maple

Time used: 0.015 (sec). Leaf size: 31

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)],singsol=all)
 

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

Solution by Mathematica

Time used: 0.042 (sec). Leaf size: 37

DSolve[{x'[t]+y'[t]-x[t]==y[t]+t,x'[t]+y'[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*}