User:Popcrate/sandbox

Method for Solving these Systems of Differential Equations
Write the system of differential equations that must be solved to find the desired flow line, and solve the sytem of differential equations using the methods…


 * 1) Let: $$a$$, $$b$$, and $$c$$ be constants, such that $$a \neq 0$$. The Linear Second-Order Differential Equation with constant coefficients is:

$$ax^{''} \left( t \right) + bx^{'} \left( t \right) + cx \left( t \right) = 0$$

 Let: $$x \left( t \right) = e^{\lambda t}$$ and compute:

$$\begin{aligned} x^{'} \left( t \right) = \lambda e ^{\lambda t} \\ x^{''} \left( t \right) = \lambda ^{2} e ^{\lambda t} \end{aligned}$$

 Substitute the functions from #2 into the differential equation from #1…

$$\begin{aligned} ax^{''} \left( t \right) + bx^{'} \left( t \right) + cx \left( t \right) & = 0 \\ a \left( \lambda ^2 e^{\lambda t} \right) + b \left( \lambda e^{\lambda t} \right) + c \left( e^{\lambda t} \right) & = 0 \\ e^{\lambda t} \left( a \lambda^2 + b\lambda + c \right) & = 0 \end{aligned}$$

Since $$e^{\lambda t} \neq 0$$, If the equation above is true, then the characteristic equation must be $$a \lambda^2 + b\lambda + c =0$$ in order for the equation to be true. The solutions to this equation are given by:

$$\lambda_{1}, \lambda_{2} = \dfrac{-b \pm \sqrt{b^{2}-4ac}}{2a}$$

It can now be shown that the general solution to the differential equation in #1 is given by one of the following cases:

Let: $$c_{1}$$ and $$c_{2}$$ be arbitrary constants.


 * 1) If $$\lambda_{1}, \lambda_{2}$$ are real numbers, and $$\lambda_{1} \neq \lambda_{2}$$. Then the general solution is: $$x \left( t \right) = c_{1}e^{\lambda_{1}t}+c_{2}e^{\lambda_{2}t}$$
 * 2) If $$\lambda_{1}=\lambda_{2}=\lambda$$, then the general solution is: $$x \left( t \right) = c_{1}e^{\lambda t}+c_{2}te^{\lambda t}$$
 * 3) If $$\lambda_{1}, \lambda_{2} = \alpha \pm i \beta$$ (complex non real-valued solutions), Then the general solution is: $$x \left( t \right) = e^{ \alpha t} \left( c_{1} \cos{\beta t} + c_{2} \sin{\beta t} \right)$$

= Problem 1. =

Find the flow line $$\vec{r} \left( t \right)$$ for the vector field $$\vec{F} = \left \langle 3x-y, \ 6x-4y \right \rangle$$ that passes through the point $$(2,7)$$ when $$t=0$$. Plot the flow line for $$0 \leq t \leq 2$$. -

Begin by writing out the system of equations, based on the given information about $$\vec{F}$$. Let $$X$$ and $$Y$$ represent $$x \left( t \right)$$ and $$y \left( t \right)$$…

$$\begin{aligned} x' \left( t \right) & = 3X-Y &&  \Longrightarrow && Y=3X-X' \\ y' \left( t \right) & = 6X-4Y && \\ \end{aligned}$$

Then, combine the equations such that $$Y'$$ is given in terms of $$X$$ and $$X'$$.

$$\begin{aligned} Y' & = 6X-4Y \\ &= 6X-4 \left( 3X-X' \right) \\ &= 6X-12X+4X \\ Y' &= -6X +4X' \end{aligned}$$

Now, find $$X''$$ from the given $$X'$$, substitute the previous equation into $$Y'$$, and re-arrange the terms algebraically until they are equal to 0.

$$\begin{aligned} X'&=3X-Y \\ X''&=3X'-Y' \\ 0&=-X''+3X'-Y'\\ &=-X''+3X'- \left( -6X + 4X'\right)\\ &= -X''-X'+-6X\\ &= X'' + X' -6X \end{aligned}$$

From here, we can begin to use the method (mentioned earlier) for solving differential equations by substituting $$\lambda$$ to replace all of the functions.

$$\begin{aligned} 0 &= X'' + X' -6X \\ &= \lambda ^2+\lambda -6 \\ &= \left( \lambda +3\right) \left( \lambda-2 \right) \end{aligned}$$

$$\lambda = -3, +2$$

Referencing the Method: Since $$\lambda_{1} \neq \lambda_{2}$$, and they are both real numbers, we can use the following equation, and begin to solve our system:

$$\begin{aligned} x \left( t \right) & = c_{1}e^{\lambda_{1} t}+c_{2}e^{\lambda_{2} t}\\ x \left( t \right)& = c_{1}e^{-3 t}+c_{2}e^{2 t}\\ x' (t) &= -3c_{1}e^{-3t}+2c_2e^{2t} \\ \end{aligned}$$

Begin with $$y(t)$$ that we solved for earlier, and plug in the differential equation we just found. (Fun with Variables): To avoid repetitiveness, and add clarity in algebraic manipulation, I temporarily use $$A$$ and $$B$$ to represent certain expressions…

$$\begin{aligned} &= 3 \underbrace{ \left( c_{1}\cdot e^{-3 t} \right) }_{A} + \underbrace{ \left( c_{2}\cdot e^{2 t} \right)}_{B} - \left( -3c_{1}e^{-3t}+2c_2e^{2t} \right) \\

\end{aligned}$$

-

Now that we have an equation for $$x(t)$$ and $$y(t)$$, we can find the Flow Line by using the given point $$(2,7)$$ when $$t=0$$.

$$\begin{aligned} x \left( 0 \right)=2 \quad && \quad y \left( 0 \right)=7 \end{aligned}$$

$$\begin{aligned} y(0) &= 6 \left( c_{1}\cdot e^{-3 \cdot [0]} \right) + \left(c_{2}\cdot e^{2 \cdot [0]}\right) \\ 7 &= 6 \cdot c_{1} + c_{2} \\ c_{2} &= 7- 6 c_{1} \end{aligned}$$

$$\begin{aligned} x{(0)} = 2 &= c_{1}e^{-3 \cdot [0]}+c_{2}e^{2 \cdot [0]}\\ &= c_{1}+c_{2} \\ 2 &= c_{1}+ \left(7- 6 c_{1} \right)\\ 1 &= c_{1} \end{aligned}$$

And now that $$c_1$$, and $$c_2$$ are known, solve for the parametric equations of the flow line.

$$\begin{aligned} x(t) &= c_{1} \cdot e^{\lambda_{1}t}+c_{2}\cdot e^{\lambda_{2}t}  &   y(t) &= 6 \left( c_{1}\cdot e^{-3 \cdot t} \right) + \left(c_{2}\cdot e^{2 \cdot t}\right) && \\ x(t) &= e^{-3t}+e^{2t}   &    y(t) &= 6e^{-3t}+e^{2t}  \\ \end{aligned}$$

=Problem 2= Find the flow line $$\vec{r} \left( t \right)$$ for the vector field $$\vec{F} = \left \langle x-y, \ x+y \right \rangle$$ that passes through the point $$(2,-1)$$ when $$t=0$$. Plot the flow line for $$0 \leq t \leq 3.8$$.

For simplicity of notation, Let $$x = x(t)$$, and $$y = y(t)$$. Set up the system of equations:

$$\begin{aligned} x' = x-y && \longrightarrow && y&=x-x' \\ y'=x+y && \longrightarrow && y' &=x+(x-x') && \longrightarrow && y'=2x-x'\\ \end{aligned}$$

Solve for $$\lambda$$:

$$\begin{aligned} x{'} &=x-y \\ x{''} &=x'-y' \\ 0 &= -x'' +x' -y' \\ &= x''-x'+y'\\ &= x'' -x' + (2x-x') \\ &= x'' -2x' + 2x \\ &= \lambda^2 - 2\lambda + 2 \end{aligned}$$

To solve for $$\lambda$$ with the quadratic equation, Let: $$a=1$$, $$b=-2$$, and $$c=2$$

$$\begin{aligned} \lambda & = && \dfrac{-b \pm \sqrt{b^2-4ac}}{2a} && = && \dfrac{-(-2) \pm \sqrt{(-2)^2-4(1)(2)}}{2(1)} && = && \dfrac{2 \pm \sqrt{-4}}{2} && \end{aligned}$$

$$\lambda = 1 \pm i$$

Since $$\lambda$$ has complex non real-valued solutions, with the form: $$\lambda = \alpha \pm \beta i$$, such that $$\alpha = -2, \beta = 1$$

The general solution to the differential equation is:

$$\begin{aligned} x(t) &= e^{ \alpha t} \left( c_{1} \cos{\beta t} + c_{2} \sin{\beta t} \right) \\ &= e^{t} \left( c_{1} \cos{t} + c_{2} \sin{t} \right) \end{aligned}$$

Find the derivative of $$x(t)$$.

$$\begin{aligned} x(t) &= e^{t} \left( c_{1} \cos{t} + c_{2} \sin{t} \right) \\ x'(t) &= e^{t} \left( c_{1} \cos{t} + c_{2} \sin{t} \right) + e^{t} \left( -c_{1} \sin{t} + c_{2} \cos{t} \right) \\ &= x(t) + e^t \left( -c_{1} \sin{t} + c_{2} \cos{t}\right) \end{aligned}$$

Now that we have an equation for $$x'(t)$$, we can find $$y(t)$$ by using the set of equations from the beginning of the problem.

$$\begin{aligned} y(t) &= x(t) - x'(t) \\ &= x(t) - \left[ x(t) + e^t \left( -c_{1} \sin{t} + c_{2} \cos{t}\right) \right] \\ &= -e^t \left( -c_{1} \sin{t} + c_{2} \cos{t}\right) \\ &= e^t \left(c_{1} \sin{t} - c_{2} \cos{t}\right)

\end{aligned}$$

Next, we find $$c_{1}$$ and $$c_{2}$$, based on the given point $$(2,-1)$$ when $$t=0$$, and solve the system of equations.

$$\begin{aligned} x(0) = 2 &= e^{0} \left( c_{1} \cos{0} + c_{2} \sin{0} \right)\\ 2 &= 1\cdot (c_{1} \cdot 1 + 0)\\ 2 &= c_{1} \\ \\ y(0) = -1 &= e^0 \left( c_{1} \sin{0} - c_{2} \cos{0} \right) \\ -1 &= 1 \cdot \left( 0-1\cdot c_2 \right) \\ 1 &= c_{2}

\end{aligned}$$

Now that we have found $$c_{1}=2$$, and $$c_{2} = 1$$, we can solve for the flow line, parameterized by...

$$\begin{aligned} x(t) &= e^{t} \left( 2 \cos{t} - \sin{t} \right) \\ y(t) &= e^{t} \left( 2\sin{t} - \cos{t} \right) \end{aligned}$$