3.2 second exam

  3.2.1 Problem 1
  3.2.2 Problem 2
  3.2.3 Problem 3
  3.2.4 Problem 4
  3.2.5 Problem 5
  3.2.6 Problem 6
  3.2.7 Problem 7
  3.2.8 Problem 8
PDF (letter size)
PDF (legal size)

3.2.1 Problem 1

Find the equilibria of the following differential equation \(y^{\prime }=1-y^{2}\) and determine their stability. Derive the explicit solution for the initial value problem\begin{align*} y^{\prime }\left ( t\right ) & =1-y^{2}\\ y\left ( 0\right ) & =-2 \end{align*}

Find the finite time interval for which the solution exists.

solution

Before solving the problem, the domain of the solution is determined. The RHS of the ODE is\(\ f\left ( t,y\right ) =1-y^{2}\). This is a continuous and real function for all \(y\). Now \(\frac{\partial f}{\partial y}=-2y\) shows it is also continuous and real for all \(y\). Combining these results shows that there exists a solution and is unique in some subset of the domain\[ -\infty <y<\infty \] The problem is now solved. Since\[ y^{\prime }\left ( t\right ) =f\left ( y\right ) \] Then the equilibrium points are the solution to \(f\left ( y\right ) =0\) or \(1-y^{2}=0\). Therefore there are two equilibrium points given by\[ y=\pm 1 \] The stability type is determined by taking the second derivative and evaluating it at at each equilibrium point. If the second derivative is negative, then the point is stable equilibrium. If the second derivative is positive then the point is unstable equilibrium. If the second derivative is zero, it is a saddle point. Since \[ y^{\prime \prime }=-2y \] Then at \(y=1\), \(y^{\prime \prime }<0\) which implies \(y=1\) is stable. At \(y=-1\), \(y^{\prime \prime }>0\) which implies \(y=-1\) is unstable equilibrium.

The above result was verified by generating the direction field plot for the ODE. It shows that solution lines are moving away from line \(y=-1\), which means it is unstable (A solution that starts near \(y=-1\) will move away from its initial position). The plot also shows solutions that start near \(y=1\) moving towards \(y=1\). Hence \(y=1\) is stable equilibrium. The line in red is the particular solution trajectory for the initial condition given in the problem.

pict
f[t_, y_] := 1 - y^2;
p = StreamPlot[{1, f[t, y]}, {t, 0, 3}, {y, -3, 2},
Frame -> False,
Axes -> True,
AxesLabel -> {"t", "y(t)"},
BaseStyle -> 14,
StreamPoints -> {{{{0, -2}, Red}, Automatic}},
ImageSize -> 400,
PlotLabel -> Style[Text[ "Direction field plot showing the solution trajectory in red"], 12]
]

The ODE is now solved. \begin{align*} \frac{dy}{dt} & =1-y^{2}\\ \frac{dy}{1-y^{2}} & =dt \end{align*}

Since it is separable, then Integrating both sides results in\begin{align*} \int \frac{dy}{1-y^{2}} & =\int dt\\ \operatorname{arctanh}\left ( y\right ) & =t+c \end{align*}

Hence the solution is\[ y\left ( t\right ) =\tanh \left ( t+c\right ) \] But \[ \tanh \left ( z\right ) =\frac{e^{z}-e^{-z}}{e^{z}+e^{-z}}\] Therefore the solution can be written as\begin{align} y\left ( t\right ) & =\frac{e^{t+c}-e^{-t-c}}{e^{t+c}+e^{-t-c}}\nonumber \\ & =\frac{ce^{t}-\frac{1}{c}e^{-t}}{ce^{t}+\frac{1}{c}e^{-t}}\nonumber \\ & =\frac{c^{2}e^{t}-e^{-t}}{c^{2}e^{t}+e^{-t}}\nonumber \\ & =\frac{Ce^{t}-e^{-t}}{Ce^{t}+e^{-t}} \tag{1} \end{align}

Using the initial conditions \(y\left ( 0\right ) =-2\) the above gives the value of \(C\)\begin{align*} -2 & =\frac{C-1}{C+1}\\ -2C-2 & =C-1\\ -3C & =1\\ C & =\frac{-1}{3} \end{align*}

Substituting the constant \(C\) value found above into solution (1) gives\begin{align*} y\left ( t\right ) & =\frac{\frac{-1}{3}e^{t}-e^{-t}}{\frac{-1}{3}e^{t}+e^{-t}}\\ & =\frac{-e^{t}-3e^{-t}}{-e^{t}+3e^{-t}}\\ & =\frac{e^{t}+3e^{-t}}{e^{t}-3e^{-t}} \end{align*}

By factoring \(e^{-t}\) the above becomes\[ y\left ( t\right ) =\frac{3+e^{2t}}{-3+e^{2t}}\] To find when the solution stops, means to find the time when solution becomes undefined. This occurs when the denominator becomes zero (the solution reaches a pole). The denominator of the solution above becomes zero when\begin{align*} -3+e^{2t} & =0\\ 2t & =\ln 3\\ t & =\frac{1}{2}\ln 3 \end{align*}

Numerically, this is approximately \(t=0.549\) seconds. Here is a plot of the solution showing what happens when it reaches close to the above \(t\) value starting from \(t=0\). The plot shows that the solution diverges to \(-\infty \) as the pole is approached from the left and the solution becomes undefined.

pict
sol = (3 + Exp[2 t])/(-3 + Exp[2 t]);
p = Plot[sol, {t, 0, 0.54}, PlotRange -> All,
Frame -> True,
GridLines -> Automatic, GridLinesStyle -> LightGray,
PlotStyle -> Red,
FrameLabel -> {{"y(t)", None}%
, {"t (sec)", "Showing when solution becomes undefined"}},
BaseStyle -> 14]

3.2.2 Problem 2

pict

solution\[ \frac{dy}{dt}=t\sqrt{y}\] The domain of the solution is first found. Since \(f\left ( t,y\right ) =t\sqrt{y}\) then this function is real and continuous for all \(t\) and for \(y\geq 0\). Since \(\frac{\partial f}{\partial y}=\frac{t}{2\sqrt{y}}\) then this is continuous for all \(t\) and for \(y\neq 0\) (to avoid a pole). Combining these two results shows a solution exists and unique in some subset of the domain \begin{align*} -\infty & <t<\infty \\ y & >0 \end{align*}

The direction field for the above ode is given in the plot below

pict
f[t_, y_] := t Sqrt[y];
p = StreamPlot[{1, f[t, y]}, {t, 0, 3}, {y, 0, 2},
Frame -> False,
Axes -> True,
AxesLabel -> {"t", "y(t)"},
BaseStyle -> 14,
ImageSize -> 400,
PlotLabel -> Style[Text["Direction field plot for problem 2"], 12]
]

The ODE is now solved. \begin{align*} \frac{dy}{dt} & =t\sqrt{y}\\ \frac{dy}{\sqrt{y}} & =tdt \end{align*}

This is separable. Integrating both sides gives\begin{align} \int y^{-\frac{1}{2}}dy & =\int tdt\nonumber \\ 2\sqrt{y} & =\frac{t^{2}}{2}+c\nonumber \\ \sqrt{y} & =\frac{t^{2}}{4}+\frac{c}{2}\nonumber \end{align}

Applying initial conditions \(y\left ( 1\right ) =k\) the above becomes\begin{align*} \sqrt{k} & =\frac{1}{4}+\frac{c}{2}\\ c & =2\sqrt{k}-\frac{1}{2} \end{align*}

Hence \begin{align} \sqrt{y} & =\frac{t^{2}}{4}+\frac{\left ( 2\sqrt{k}-\frac{1}{2}\right ) }{2}\nonumber \\ & =\frac{t^{2}}{4}+\sqrt{k}-\frac{1}{4}\tag{2} \end{align}

Or\begin{align} y\left ( t\right ) & =\left ( \frac{t^{2}}{4}+\sqrt{k}-\frac{1}{4}\right ) ^{2}\nonumber \\ & =k+\frac{1}{2}\sqrt{k}t^{2}-\frac{1}{8}t^{2}+\frac{1}{16}t^{4}-\frac{1}{2}\sqrt{k}+\frac{1}{16}\tag{3} \end{align}

part (a)

Looking at solutions in (3) shows that \(k>0\) is needed to obtain two real solutions.

part (b)

When \(k=0\) then \(y\left ( 1\right ) =0\). But from earlier the domain of the unique solution was found to be\begin{align*} -\infty & <t<\infty \\ y & >0 \end{align*}

Therefore the initial condition point where \(y=0\) is outside the above domain. Therefore \(k=0\) will generate infinite number of solutions because it the initial condition is outside the domain where the solution have to satisfy in order to be unique.

part (c)

No real solution can be obtained when \(k<0\). This is because when \(k\) is negative then \(\sqrt{k}=i\sqrt{\left \vert k\right \vert }\) and the solution becomes complex.

part (d)

\[ f\left ( t,y\right ) =t\sqrt{y}\] Let \(k=1\). This implies the initial conditions is \(y\left ( 1\right ) =1\). This means the initial conditions point is inside the domain given. Therefore when \(k=1\) then \(f\left ( t,y_{1}\right ) \) becomes, using \(y_{1}\left ( t\right ) \) solution from above, the following\begin{align*} f\left ( t,y_{1}\right ) & =t\sqrt{y_{1}}\\ & =\frac{t}{4}\sqrt{t^{4}-t^{2}+8t^{2}+\frac{1}{4}+16-4}\\ & =\frac{t}{4}\sqrt{t^{4}+7t^{2}+\frac{49}{4}} \end{align*}

The above shows that \(f\left ( t,y_{1}\right ) \) is continuous and real over the range \(0.5\leq t\leq 1.5\). And \(\frac{\partial f\left ( t,y_{1}\right ) }{\partial y_{1}}\) becomes\[ \frac{\partial f\left ( t,y_{1}\right ) }{\partial y_{1}}=\frac{1}{2}\frac{t}{\sqrt{y_{1}}}\] Using \(k=1\) in the solution \(y_{1}\left ( t\right ) \) the above becomes\begin{align*} \frac{\partial f\left ( t,y_{1}\right ) }{\partial y_{1}} & =\frac{1}{2}\frac{t}{\frac{1}{4}\sqrt{t^{4}+7t^{2}+\frac{49}{4}}}\\ & =\frac{2t}{\sqrt{t^{4}+7t^{2}+\frac{49}{4}}} \end{align*}

Over the range \(0.5\leq t\leq 1.5\) the denominator above is never zero. Hence there is no pole and therefore \(\frac{\partial f\left ( t,y_{1}\right ) }{\partial y_{1}}\) is also continuous and real in the range given.  This shows that \(f\left ( t,y\right ) \) is Lipschitz continuous inside a rectangular around initial conditions given for the value \(k=1\).

This is not the only \(k\) value that could be selected. However the problem is asking for one such \(k\) value.

3.2.3 Problem 3

pict

Solution

\[ ay^{\prime \prime }+by^{\prime }+cy=0 \] Because the coefficients of the ODE are constants, the solution is found by solving for the roots of the characteristic equation\[ a\lambda ^{2}+b\lambda +c=0 \] The roots are\[ \lambda =\frac{-b}{2a}\pm \frac{1}{2a}\sqrt{b^{2}-4ac}\] Hence the solution is given by linear combination of each solution \(e^{\lambda _{1}t},e^{\lambda _{2}t}\) as \begin{align} y\left ( t\right ) & =c_{1}e^{\lambda _{1}t}+c_{2}e^{\lambda _{2}t}\nonumber \\ & =c_{1}e^{\frac{-b}{2a}t}e^{\frac{\sqrt{b^{2}-4ac}}{2a}t}+c_{1}e^{\frac{-b}{2a}t}e^{\frac{-\sqrt{b^{2}-4ac}}{2a}t}\nonumber \\ & =e^{\frac{-b}{2a}t}\left ( c_{1}e^{\frac{\sqrt{b^{2}-4ac}}{2a}t}+c_{2}e^{\frac{-\sqrt{b^{2}-4ac}}{2a}t}\right ) \tag{1} \end{align}

The above shows that since \(b>0\) and \(a>0\) then \(e^{\frac{-b}{2a}t}\) will go to zero as \(t\rightarrow \infty \). This shows that all solutions will eventually go to zero.

When \(b=0\), the solution given by (1) reduces to\[ y\left ( t\right ) =c_{1}e^{\frac{\sqrt{-4ac}}{2a}t}+c_{2}e^{\frac{-\sqrt{-4ac}}{2a}t}\] But because \(a>0\) and \(c>0\) then \(-4ac\) is negative and the discriminant \(\sqrt{-4ac}\) becomes complex and the above solution becomes\begin{align*} y\left ( t\right ) & =c_{1}e^{\frac{2i\sqrt{ac}}{2a}t}+c_{2}e^{\frac{-2i\sqrt{ac}}{2a}t}\\ & =c_{1}e^{i\sqrt{\frac{c}{a}}t}+c_{2}e^{-i\sqrt{\frac{c}{a}}t}\\ & =C_{1}\cos \left ( \sqrt{\frac{c}{a}}t\right ) +C_{2}\sin \left ( \sqrt{\frac{c}{a}}t\right ) \end{align*}

The above shows that the solution never goes to zero as \(t\rightarrow \infty \) as the solution continues to oscillate. This happened because the damping term \(b\) was set to zero, so there is no loss of energy in the system as it moves and therefore once the system is set in motion (by some initial condition away from rest), the system will continue to vibrate for all time.

To obtain unbounded solution, \(b\) must be negative while keeping \(a>0\). In this case the solution in (1) becomes\[ y\left ( t\right ) =e^{\frac{\left \vert b\right \vert }{2a}t}\left ( c_{1}e^{\frac{\sqrt{b^{2}-4ac}}{2a}t}+c_{2}e^{\frac{-\sqrt{b^{2}-4ac}}{2a}t}\right ) \] The above shows that since \(b<0\) then \(e^{\frac{-b}{2a}t}=e^{\frac{\left \vert b\right \vert }{2a}t}\) and this will cause the solution to blow up as \(t\) increases. Negative damping means there is energy being added to the system as it time increases instead of the normal case where damping causes energy to be lost from the system with time. This is why the solution becomes unbounded when \(b<0\). In Physical systems the damping term is always positive.

3.2.4 Problem 4

pict

solution

Analysis of motion

The following diagram shows the initial positions of the four bugs and what happens after \(\Delta t\) has elapsed.

pict

The four bugs initially are located at the corners of the rectangle. The width is \(h=1\) and the height is \(L=2\). Because each bug moves with the same speed toward the bug adjacent to it (in clockwise direction), then by symmetry, the four bugs will remain on the corners of a rectangle as time increases, but the rectangle shrinks and rotates clockwise in time as the bugs spiral towards the center of the original rectangle where they collide. The following diagram illustrates such motion after some \(\Delta t\) has elapsed.

pict

The above shows that at each instance of time, each bug remains at the corner of a scaled down version of the original rectangle that is rotating. Each bug’s velocity vector is always pointing straight towards the bug it is chasing. This means that bug’s 1 motion is always at \(90^{0}\) to the path of bug 2. And bug’s 2 motion is at \(90^{0}\) to the path of bug 3 and so on.

Equations of motion

To obtain the equation of motion for each bug, each bug’s position is considered relative to the bug it is chasing. Starting with bug’s 1 relative position to bug 2. This is done with the help of the following diagram

pict

The position vector of bug 1 is \(\vec{r}_{1}\left ( t\right ) \) and the position vector of bug 2 is \(\vec{r}_{2}\left ( t\right ) \). Therefore \begin{align*} \vec{v}_{1} & =\frac{d\vec{r}_{1}\left ( t\right ) }{dt}\\ & =\left \vert \vec{v}_{1}\right \vert \hat{r} \end{align*}

Where \(\hat{r}\) is unit vector in the direction from bug 1 to bug 2. Hence the above can be written as \[ \frac{d\vec{r}_{1}\left ( t\right ) }{dt}=\left \vert \vec{v}_{1}\right \vert \frac{\vec{r}_{2}\left ( t\right ) -\vec{r}_{1}\left ( t\right ) }{\parallel \vec{r}_{2}\left ( t\right ) -\vec{r}_{1}\left ( t\right ) \parallel }\] Because \(\left \vert \vec{v}_{1}\right \vert =1\) meter per seconds, then the above simplifies to\begin{align*} \frac{d\vec{r}_{1}\left ( t\right ) }{dt} & =\frac{\left ( x_{2}\hat{\imath }+y_{2}\hat{\jmath }\right ) -\left ( x_{1}\hat{\imath }+y_{1}\hat{\jmath }\right ) }{\parallel \left ( x_{2}\hat{\imath }+y_{2}\hat{\jmath }\right ) -\left ( x_{1}\hat{\imath }+y_{1}\hat{\jmath }\right ) \parallel }\\ \left ( \frac{dx_{1}}{dt}\hat{\imath }+\frac{dy_{1}}{dt}\hat{\jmath }\right ) & =\frac{x_{2}-x_{1}}{\sqrt{\left ( x_{2}-x_{1}\right ) ^{2}+\left ( y_{2}-y_{1}\right ) ^{2}}}\hat{\imath }+\frac{y_{2}-y_{1}}{\sqrt{\left ( x_{2}-x_{1}\right ) ^{2}+\left ( y_{2}-y_{1}\right ) ^{2}}}\hat{\jmath } \end{align*}

Where \(x_{1},y_{1}\) are the coordinates of bug 1 and \(x_{2},y_{2}\) are the coordinates of bug 2. The above gives the equation of motion for bug 1. Let \(x_{1}^{\prime }=\frac{dx_{1}}{dt}\) and \(y_{1}^{\prime }=\frac{dy_{1}}{dt}\) for bug 1 then the following are the two equations of motion for bug 1 as function of its position and the position of bug 2\begin{align} x_{1}^{\prime } & =\frac{x_{2}-x_{1}}{\sqrt{\left ( x_{2}-x_{1}\right ) ^{2}+\left ( y_{2}-y_{1}\right ) ^{2}}}\nonumber \\ y_{1}^{\prime } & =\frac{y_{2}-y_{1}}{\sqrt{\left ( x_{2}-x_{1}\right ) ^{2}+\left ( y_{2}-y_{1}\right ) ^{2}}} \tag{3} \end{align}

The same analysis is now carried out to obtain \(x_{2}^{\prime }\left ( t\right ) \) and \(y_{2}^{\prime }\left ( t\right ) \) expressions similar to (3) above for bug 2.

pict

The position vector of bug 2 is \(\vec{r}_{2}\left ( t\right ) \) and the position vector of bug 3 is \(\vec{r}_{3}\left ( t\right ) \). Therefore \(\vec{v}_{2}=\frac{d\vec{r}_{2}\left ( t\right ) }{dt}=\left \vert \vec{v}_{2}\right \vert \hat{r}\) where \(\hat{r}\) is unit vector in the direction from bug 2 to bug 3. Hence\[ \frac{d\vec{r}_{2}\left ( t\right ) }{dt}=\left \vert \vec{v}_{2}\right \vert \frac{\vec{r}_{3}\left ( t\right ) -\vec{r}_{2}\left ( t\right ) }{\parallel \vec{r}_{3}\left ( t\right ) -\vec{r}_{2}\left ( t\right ) \parallel }\] Since \(\left \vert \vec{v}_{2}\right \vert =1\) meter per seconds then\begin{align*} \frac{d\vec{r}_{2}\left ( t\right ) }{dt} & =\frac{\left ( x_{3}\hat{\imath }+y_{2}\hat{\jmath }\right ) -\left ( x_{3}\hat{\imath }+y_{2}\hat{\jmath }\right ) }{\parallel \left ( x_{3}\hat{\imath }+y_{2}\hat{\jmath }\right ) -\left ( x_{3}\hat{\imath }+y_{2}\hat{\jmath }\right ) \parallel }\\ \left ( \frac{dx_{2}}{dt}\hat{\imath }+\frac{dy_{2}}{dt}\hat{\jmath }\right ) & =\frac{x_{3}-x_{2}}{\sqrt{\left ( x_{3}-x_{2}\right ) ^{2}+\left ( y_{3}-y_{2}\right ) ^{2}}}\hat{\imath }+\frac{y_{3}-y_{2}}{\sqrt{\left ( x_{3}-x_{2}\right ) ^{2}+\left ( y_{3}-y_{2}\right ) ^{2}}}\hat{\jmath } \end{align*}

Where \(x_{2},y_{2}\) are the coordinates of bug 2 and \(x_{3},y_{3}\) are the coordinates of bug 3. The above gives the two equations of motion for bug 2. Using \(x_{2}^{\prime }=\frac{dx_{2}}{dt}\) and \(y_{2}^{\prime }=\frac{dy_{2}}{dt}\) for bug 2, then the following gives the two equations of motion for bug 2 as function of its position and the position of bug 3 \begin{align} x_{2}^{\prime } & =\frac{x_{3}-x_{2}}{\sqrt{\left ( x_{3}-x_{2}\right ) ^{2}+\left ( y_{3}-y_{2}\right ) ^{2}}}\nonumber \\ y_{2}^{\prime } & =\frac{y_{3}-y_{2}}{\sqrt{\left ( x_{3}-x_{2}\right ) ^{2}+\left ( y_{3}-y_{2}\right ) ^{2}}} \tag{3} \end{align}

The same analysis is carried out for bug 3 and bug 4, which results in similar equations. Therefore the final equations of motions in vector form are\[ \mathbf{x}^{\prime }=f\left ( \mathbf{x}\right ) \] Or\[\begin{pmatrix} x_{1}^{\prime }\left ( t\right ) =\frac{x_{2}-x_{1}}{\sqrt{\left ( x_{2}-x_{1}\right ) ^{2}+\left ( y_{2}-y_{1}\right ) ^{2}}}\\ y_{1}^{\prime }\left ( t\right ) =\frac{y_{2}-y_{1}}{\sqrt{\left ( x_{2}-x_{1}\right ) ^{2}+\left ( y_{2}-y_{1}\right ) ^{2}}}\\ x_{2}^{\prime }\left ( t\right ) =\frac{x_{3}-x_{2}}{\sqrt{\left ( x_{3}-x_{2}\right ) ^{2}+\left ( y_{3}-y_{2}\right ) ^{2}}}\\ y_{2}^{\prime }\left ( t\right ) =\frac{y_{3}-y_{2}}{\sqrt{\left ( x_{3}-x_{2}\right ) ^{2}+\left ( y_{3}-y_{2}\right ) ^{2}}}\\ x_{3}^{\prime }\left ( t\right ) =\frac{x_{4}-x_{3}}{\sqrt{\left ( x_{4}-x_{3}\right ) ^{2}+\left ( y_{4}-y_{3}\right ) ^{2}}}\\ y_{3}^{\prime }\left ( t\right ) =\frac{y_{4}-y_{3}}{\sqrt{\left ( x_{4}-x_{3}\right ) ^{2}+\left ( y_{4}-y_{3}\right ) ^{2}}}\\ x_{4}^{\prime }\left ( t\right ) =\frac{x_{1}-x_{4}}{\sqrt{\left ( x_{1}-x_{4}\right ) ^{2}+\left ( y_{1}-y_{4}\right ) ^{2}}}\\ y_{4}^{\prime }\left ( t\right ) =\frac{y_{1}-y_{4}}{\sqrt{\left ( x_{1}-x_{4}\right ) ^{2}+\left ( y_{1}-y_{4}\right ) ^{2}}}\end{pmatrix} \] With the initial conditions\[ \mathbf{x}\left ( 0\right ) =\begin{pmatrix} x_{1}\left ( 0\right ) \\ y_{1}\left ( 0\right ) \\ x_{2}\left ( 0\right ) \\ y_{2}\left ( 0\right ) \\ x_{3}\left ( 0\right ) \\ y_{3}\left ( 0\right ) \\ x_{4}\left ( 0\right ) \\ y_{4}\left ( 0\right ) \end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0\\ 2\\ 1\\ 2\\ 1\\ 0 \end{pmatrix} \] The above system of equation can not written as \(\mathbf{x}^{\prime }=A\mathbf{x}\) because the equations of motion are not linear. These ODE’s have to solved numerically. The following is the result of running the numerical solution for \(1.5\) seconds. The code used is listed below. This shows the bugs spiraling down to the center of the original rectangle as expected.

pict
ode1 =x1'[t] == (x2[t] - x1[t])/Sqrt[(x2[t] - x1[t])^2 + (y2[t] - y1[t])^2];
ode2 =y1'[t]== (y2[t] - y1[t])/Sqrt[(x2[t] - x1[t])^2 + (y2[t] - y1[t])^2];
ode3 =x2'[t] == (x3[t] - x2[t])/Sqrt[(x3[t] - x2[t])^2 + (y3[t] - y2[t])^2];
ode4 =y2'[t] == (y3[t] - y2[t])/Sqrt[(x3[t] - x2[t])^2 + (y3[t] - y2[t])^2];
ode5 =x3'[t]== (x4[t] - x3[t])/Sqrt[(x4[t] - x3[t])^2 + (y4[t] - y3[t])^2];
ode6 =y3'[t]== (y4[t] - y3[t])/Sqrt[(x4[t] - x3[t])^2 + (y4[t] - y3[t])^2];
ode7 =x4'[t]== (x1[t] - x4[t])/Sqrt[(x1[t] - x4[t])^2 + (y1[t] - y4[t])^2];
ode8 =y4'[t] == (y1[t] - y4[t])/Sqrt[(x1[t] - x4[t])^2 + (y1[t] - y4[t])^2];
sol = NDSolve[{ode1, ode2, ode3, ode4, ode5, ode6, ode7, ode8, x1[0] == 0,
y1[0] == 0, x2[0] == 0, y2[0] == 2, x3[0] == 1, y3[0] == 2, x4[0] == 1,
y4[0] == 0},
{x1[t], y1[t], x2[t], y2[t], x3[t], y3[t], x4[t], y4[t]}, {t, 0, 1.5}];
p = ParametricPlot[{x1[t], y1[t], x2[t], y2[t], x3[t], y3[t], x4[t], y4[t]}
/. sol,
{t, 0, 1.5}, AxesOrigin -> {0, 0},
GridLines -> Automatic, GridLinesStyle -> LightGray, Frame -> True,
FrameLabel -> {{"y", None}, {"x", "Solution to problem 4"}},
ImageSize -> 350]

This problem was also solved for a square instead of a rectangle. The only change needed was to modify the initial conditions so as to locate the bugs at corners of unit square as shown below. No changes are needed in the equations of motion.\[ \mathbf{x}\left ( 0\right ) =\begin{pmatrix} x_{1}\left ( 0\right ) \\ y_{1}\left ( 0\right ) \\ x_{2}\left ( 0\right ) \\ y_{2}\left ( 0\right ) \\ x_{3}\left ( 0\right ) \\ y_{3}\left ( 0\right ) \\ x_{4}\left ( 0\right ) \\ y_{4}\left ( 0\right ) \end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0\\ 1\\ 1\\ 1\\ 1\\ 0 \end{pmatrix} \] The time needed to reach the center in this case is one second. The following plot shows the path generated for the bugs at the corners of the square.

pict

3.2.5 Problem 5

pict

solution

The system can be written using \(\mathbf{x}^{\prime }=A\mathbf{x}\) as\begin{align*} \begin{pmatrix} x^{\prime }\left ( t\right ) \\ y^{\prime }\left ( t\right ) \end{pmatrix} & =\begin{pmatrix} -2 & -1\\ 2 & -1 \end{pmatrix}\begin{pmatrix} x\left ( t\right ) \\ y\left ( t\right ) \end{pmatrix} \\\begin{pmatrix} x\left ( 1\right ) \\ y\left ( 1\right ) \end{pmatrix} & =\begin{pmatrix} 2\\ 4 \end{pmatrix} \end{align*}

Where \(A=\begin{pmatrix} -2 & -1\\ 2 & -1 \end{pmatrix} \), The eigenvalues of \(A\) are found using \(\det \left ( A-\lambda I\right ) =0\) which gives\begin{align*} \begin{vmatrix} -2-\lambda & -1\\ 2 & -1-\lambda \end{vmatrix} & =0\\ \left ( -2-\lambda \right ) \left ( -1-\lambda \right ) +2 & =0\\ \lambda ^{2}+3\lambda +4 & =0 \end{align*}

The roots of the above characteristic equation are\begin{align*} \lambda & =\frac{-b}{2a}\pm \frac{1}{2a}\sqrt{b^{2}-4ac}\\ & =\frac{-3}{2}\pm \frac{1}{2}\sqrt{9-4\left ( 4\right ) }\\ & =\frac{-3}{2}\pm \frac{1}{2}\sqrt{-7}\\ & =\frac{-3}{2}\pm \frac{i}{2}\sqrt{7} \end{align*}

Therefore the roots are\begin{align*} \lambda _{1} & =-\frac{3}{2}-i\frac{\sqrt{7}}{2}\\ \lambda _{2} & =-\frac{3}{2}+i\frac{\sqrt{7}}{2} \end{align*}

The above shows that the solution will go to zero for large \(t\) since the eigenvalues have negative real part. The system is asymptotically stable. The complex conjugate parts of the eigenvalues give solutions that will oscillate with frequency \(\frac{\sqrt{7}}{2}\) rad/sec. To obtain the actual solution the eigenvectors are now found for each eigenvalue. Since the eigenvalues are unique, then there is one eigenvector for each eigenvalue.

For \(\lambda _{1}=-\frac{3}{2}-i\frac{\sqrt{7}}{2}\)\begin{align*} \left ( A-\lambda _{1}I\right ) \mathbf{v}_{1} & =0\\\begin{pmatrix} -2-\left ( -\frac{3}{2}-i\frac{\sqrt{7}}{2}\right ) & -1\\ 2 & -1-\left ( -\frac{3}{2}-i\frac{\sqrt{7}}{2}\right ) \end{pmatrix}\begin{pmatrix} v_{1}\\ v_{2}\end{pmatrix} & =\begin{pmatrix} 0\\ 0 \end{pmatrix} \end{align*}

Let \(v_{2}=1\). The first equation gives \(-2-\left ( -\frac{3}{2}-i\frac{\sqrt{7}}{2}\right ) v_{1}-1=0\) or \(v_{1}=\frac{1}{-2-\left ( -\frac{3}{2}-i\frac{\sqrt{7}}{2}\right ) }=\frac{1}{\frac{1}{2}i\sqrt{7}-\frac{1}{2}}=\frac{\frac{-1}{2}i\sqrt{7}-\frac{1}{2}}{\left ( \frac{1}{2}i\sqrt{7}-\frac{1}{2}\right ) \left ( \frac{1}{2}i\sqrt{7}-\frac{1}{2}\right ) }=\) \(\frac{\frac{-1}{2}i\sqrt{7}-\frac{1}{2}}{2}=-i\frac{\sqrt{7}}{4}-\frac{1}{4}\). Hence the first eigenvector is\[ \mathbf{v}_{1}=\begin{pmatrix} -i\frac{\sqrt{7}}{4}-\frac{1}{4}\\ 1 \end{pmatrix} \] For \(\lambda _{2}=-\frac{3}{2}+i\frac{\sqrt{7}}{2}\)\begin{align*} \left ( A-\lambda _{2}I\right ) \mathbf{v}_{1} & =0\\\begin{pmatrix} -2-\left ( -\frac{3}{2}+i\frac{\sqrt{7}}{2}\right ) & -1\\ 2 & -1-\left ( -\frac{3}{2}+i\frac{\sqrt{7}}{2}\right ) \end{pmatrix}\begin{pmatrix} v_{1}\\ v_{2}\end{pmatrix} & =\begin{pmatrix} 0\\ 0 \end{pmatrix} \end{align*}

Let \(v_{2}=1\). The first equation gives \(-2-\left ( -\frac{3}{2}+i\frac{\sqrt{7}}{2}\right ) v_{1}-1=0\) or \(v_{1}=\frac{1}{-2-\left ( -\frac{3}{2}+i\frac{\sqrt{7}}{2}\right ) }=\frac{1}{-\frac{1}{2}i\sqrt{7}-\frac{1}{2}}=\frac{\frac{1}{2}i\sqrt{7}-\frac{1}{2}}{2}=\frac{1}{4}i\sqrt{7}-\frac{1}{4}\) . Hence the second eigenvector is\[ \mathbf{v}_{2}=\begin{pmatrix} i\frac{\sqrt{7}}{4}-\frac{1}{4}\\ 1 \end{pmatrix} \] Using the above two linearly independent eigenvectors, the two basis solutions are\begin{align*} \mathbf{x}_{1} & =\mathbf{v}_{1}e^{\lambda _{1}t}\\ \mathbf{x}_{2} & =\mathbf{v}_{2}e^{\lambda _{1}t} \end{align*}

The solution is a linear combination of the above solutions\[ \mathbf{x}=c_{1}\mathbf{x}_{1}+c_{1}\mathbf{x}_{2}\] The solution is converted to real solution by taking the real and imaginary part of one of the basis solution above. Therefore\begin{align*} \mathbf{x}_{3} & =\operatorname{Re}\left ( \mathbf{x}_{1}\right ) \\ \mathbf{x}_{4} & =\operatorname{Im}\left ( \mathbf{x}_{1}\right ) \end{align*}

The solution becomes\begin{equation} \mathbf{x}=c_{3}\mathbf{x}_{3}+c_{4}\mathbf{x}_{4} \tag{1} \end{equation} But \begin{align} \operatorname{Re}\left ( \mathbf{x}_{1}\right ) & =\operatorname{Re}\left [ \begin{pmatrix} -i\frac{\sqrt{7}}{4}-\frac{1}{4}\\ 1 \end{pmatrix} e^{\lambda _{1}t}\right ] \nonumber \\ & =\operatorname{Re}\begin{pmatrix} -i\frac{\sqrt{7}}{4}e^{\lambda _{1}t}-\frac{1}{4}e^{\lambda _{1}t}\\ e^{\lambda _{1}t}\end{pmatrix} \nonumber \\ & =\operatorname{Re}\begin{pmatrix} -i\frac{\sqrt{7}}{4}e^{\left ( -\frac{3}{2}-i\sqrt{\frac{7}{4}}\right ) t}-\frac{1}{4}e^{\left ( -\frac{3}{2}-i\sqrt{\frac{7}{4}}\right ) t}\\ e^{\left ( -\frac{3}{2}-i\sqrt{\frac{7}{4}}\right ) t}\end{pmatrix} \nonumber \\ & =\operatorname{Re}\begin{pmatrix} -i\frac{\sqrt{7}}{4}e^{\frac{-3}{2}t}\left ( \cos \sqrt{\frac{7}{4}}t-i\sin \sqrt{\frac{7}{4}}t\right ) -\frac{1}{4}e^{\frac{-3}{2}t}\left ( \cos \sqrt{\frac{7}{4}}t-i\sin \sqrt{\frac{7}{4}}t\right ) \\ e^{\frac{-3}{2}t}\left ( \cos \sqrt{\frac{7}{4}}t-i\sin \sqrt{\frac{7}{4}}t\right ) \end{pmatrix} \nonumber \\ & =\operatorname{Re}\begin{pmatrix} \sqrt{\frac{7}{16}}e^{\frac{-3}{2}t}\left ( -i\cos \sqrt{\frac{7}{4}}t-\sin \sqrt{\frac{7}{4}}t\right ) -\frac{1}{4}e^{\frac{-3}{2}t}\left ( \cos \sqrt{\frac{7}{4}}t-i\sin \sqrt{\frac{7}{4}}t\right ) \\ e^{\frac{-3}{2}t}\left ( \cos \sqrt{\frac{7}{4}}t-i\sin \sqrt{\frac{7}{4}}t\right ) \end{pmatrix} \nonumber \\ & =\operatorname{Re}\begin{pmatrix} e^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\sin \sqrt{\frac{7}{4}}t-\frac{1}{4}\cos \sqrt{\frac{7}{4}}t\right ) +ie^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\cos \sqrt{\frac{7}{4}}t+\frac{1}{4}\sin \sqrt{\frac{7}{4}}t\right ) \\ e^{\frac{-3}{2}t}\cos \sqrt{\frac{7}{4}}t-ie^{\frac{-3}{2}t}\sin \sqrt{\frac{7}{4}}t \end{pmatrix} \nonumber \\ & =\begin{pmatrix} e^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\sin \sqrt{\frac{7}{4}}t-\frac{1}{4}\cos \sqrt{\frac{7}{4}}t\right ) \\ e^{\frac{-3}{2}t}\cos \sqrt{\frac{7}{4}}t \end{pmatrix} \tag{2} \end{align}

And\begin{align} \operatorname{Im}\left ( \mathbf{x}_{1}\right ) & =\operatorname{Im}\begin{pmatrix} e^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\sin \sqrt{\frac{7}{4}}t-\frac{1}{4}\cos \sqrt{\frac{7}{4}}t\right ) +ie^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\cos \sqrt{\frac{7}{4}}t+\frac{1}{4}\sin \sqrt{\frac{7}{4}}t\right ) \\ e^{\frac{-3}{2}t}\cos \sqrt{\frac{7}{4}}t-ie^{\frac{-3}{2}t}\sin \sqrt{\frac{7}{4}}t \end{pmatrix} \nonumber \\ & =\begin{pmatrix} e^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\cos \sqrt{\frac{7}{4}}t+\frac{1}{4}\sin \sqrt{\frac{7}{4}}t\right ) \\ -e^{\frac{-3}{2}t}\sin \sqrt{\frac{7}{4}}t \end{pmatrix} \tag{3} \end{align}

Using (2,3) in (1) gives the solution\begin{align*} \mathbf{x} & =c_{3}\operatorname{Re}\left ( \mathbf{x}_{1}\right ) +c_{4}\operatorname{Im}\left ( \mathbf{x}_{1}\right ) \\\begin{pmatrix} x\left ( t\right ) \\ y\left ( t\right ) \end{pmatrix} & =c_{3}\begin{pmatrix} e^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\sin \sqrt{\frac{7}{4}}t-\frac{1}{4}\cos \sqrt{\frac{7}{4}}t\right ) \\ e^{\frac{-3}{2}t}\cos \sqrt{\frac{7}{4}}t \end{pmatrix} +c_{4}\begin{pmatrix} e^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\cos \sqrt{\frac{7}{4}}t+\frac{1}{4}\sin \sqrt{\frac{7}{4}}t\right ) \\ -e^{\frac{-3}{2}t}\sin \sqrt{\frac{7}{4}}t \end{pmatrix} \\\begin{pmatrix} x\left ( t\right ) \\ y\left ( t\right ) \end{pmatrix} & =\begin{pmatrix} c_{3}e^{\frac{-3}{2}t}\left ( -\sqrt{\frac{7}{16}}\sin \sqrt{\frac{7}{4}}t-\frac{1}{4}\cos \left ( \frac{\sqrt{7}t}{2}\right ) \right ) +c_{4}e^{\frac{-3}{2}t}\left ( -\frac{\sqrt{7}}{4}\cos \left ( \frac{\sqrt{7}t}{2}\right ) +\frac{1}{4}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \\ c_{3}e^{\frac{-3}{2}t}\cos \left ( \frac{\sqrt{7}t}{2}\right ) -c_{4}e^{\frac{-3}{2}t}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \end{pmatrix} \end{align*}

Therefore\begin{align*} x\left ( t\right ) & =c_{3}e^{\frac{-3}{2}t}\left ( -\frac{\sqrt{7}}{4}\sin \left ( \frac{\sqrt{7}t}{2}\right ) -\frac{1}{4}\cos \left ( \frac{\sqrt{7}t}{2}\right ) \right ) +c_{4}e^{\frac{-3}{2}t}\left ( -\frac{\sqrt{7}}{4}\cos \left ( \frac{\sqrt{7}t}{2}\right ) +\frac{1}{4}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \\ y\left ( t\right ) & =c_{3}e^{\frac{-3}{2}t}\cos \left ( \frac{\sqrt{7}t}{2}\right ) -c_{4}e^{\frac{-3}{2}t}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \end{align*}

Or\begin{align*} x\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( c_{3}\left ( -\frac{\sqrt{7}}{4}\sin \left ( \frac{\sqrt{7}t}{2}\right ) -\frac{1}{4}\cos \left ( \frac{\sqrt{7}t}{2}\right ) \right ) +c_{4}\left ( -\frac{\sqrt{7}}{4}\cos \left ( \frac{\sqrt{7}t}{2}\right ) +\frac{1}{4}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \right ) \\ y\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( c_{3}\cos \left ( \frac{\sqrt{7}t}{2}\right ) -c_{4}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \end{align*}

Let \(C_{1}=c_{3}\) and \(C_{2}=-c_{3}\), and the above becomes

\begin{align} x\left ( t\right ) & =-\frac{1}{4}e^{\frac{-3}{2}t}\left ( C_{1}\sqrt{7}\sin \left ( \frac{\sqrt{7}t}{2}\right ) +C_{1}\cos \left ( \frac{\sqrt{7}t}{2}\right ) -\sqrt{7}C_{2}\cos \left ( \frac{\sqrt{7}t}{2}\right ) +C_{2}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \nonumber \\ y\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( C_{1}\cos \left ( \frac{\sqrt{7}t}{2}\right ) +C_{2}\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \tag{4} \end{align}

Initial conditions are now used to find \(C_{1},C_{2}\). At \(t=1\) the above becomes\begin{align*} 2 & =-\frac{1}{4}e^{\frac{-3}{2}}\left ( C_{1}\sqrt{7}\sin \left ( \frac{\sqrt{7}}{2}\right ) +C_{1}\cos \left ( \frac{\sqrt{7}}{2}\right ) -\sqrt{7}C_{2}\cos \left ( \frac{\sqrt{7}}{2}\right ) +C_{2}\sin \left ( \frac{\sqrt{7}}{2}\right ) \right ) \\ 4 & =e^{\frac{-3}{2}}\left ( C_{1}\cos \left ( \frac{\sqrt{7}}{2}\right ) +C_{2}\sin \left ( \frac{\sqrt{7}}{2}\right ) \right ) \end{align*}

In system form the above becomes\begin{align*} \begin{pmatrix} 2\\ 4 \end{pmatrix} & =\begin{pmatrix} -\frac{1}{4}e^{\frac{-3}{2}}\sqrt{7}\sin \left ( \frac{\sqrt{7}}{2}\right ) -\frac{1}{4}e^{\frac{-3}{2}}\cos \left ( \frac{\sqrt{7}}{2}\right ) & \frac{1}{4}e^{\frac{-3}{2}}\sqrt{7}\cos \left ( \frac{\sqrt{7}}{2}\right ) -\frac{1}{4}e^{\frac{-3}{2}}\sin \left ( \frac{\sqrt{7}}{2}\right ) \\ e^{\frac{-3}{2}}\cos \left ( \frac{\sqrt{7}}{2}\right ) & e^{\frac{-3}{2}}\sin \left ( \frac{\sqrt{7}}{2}\right ) \end{pmatrix}\begin{pmatrix} C_{1}\\ C_{2}\end{pmatrix} \\ & =\begin{pmatrix} -0.156\,76 & -0.01786\,\\ 0.05\,\allowbreak 475 & 0.216\,31 \end{pmatrix}\begin{pmatrix} C_{1}\\ C_{2}\end{pmatrix} \end{align*}

Solving for \(\begin{pmatrix} C_{1}\\ C_{2}\end{pmatrix} \) by elimination gives\[\begin{pmatrix} C_{1}\\ C_{2}\end{pmatrix} =\begin{pmatrix} -15.307\\ 22.367 \end{pmatrix} \] Using these constants in the the solution (4) results in\begin{align*} x\left ( t\right ) & =-\frac{1}{4}e^{\frac{-3}{2}t}\left ( \left ( -15.307\right ) \sqrt{7}\sin \left ( \frac{\sqrt{7}t}{2}\right ) -15.307\cos \left ( \frac{\sqrt{7}t}{2}\right ) -\sqrt{7}\left ( 22.367\right ) \cos \left ( \frac{\sqrt{7}t}{2}\right ) +22.367\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \\ y\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( -15.307\cos \left ( \frac{\sqrt{7}t}{2}\right ) +22.367\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \end{align*}

Or\begin{align*} x\left ( t\right ) & =-\frac{1}{4}e^{\frac{-3}{2}t}\left ( -40.499\sin \left ( \frac{\sqrt{7}t}{2}\right ) -15.307\cos \left ( \frac{\sqrt{7}t}{2}\right ) -59.178\cos \left ( \frac{\sqrt{7}t}{2}\right ) +22.367\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \\ y\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( -15.307\cos \left ( \frac{\sqrt{7}t}{2}\right ) +22.367\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \end{align*}

Simplifying the above using trigonometric relations gives\begin{align*} x\left ( t\right ) & =-\frac{1}{4}e^{\frac{-3}{2}t}\left ( -74.485\cos \left ( \frac{\sqrt{7}t}{2}\right ) -18.132\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \\ y\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( -15.307\cos \left ( \frac{\sqrt{7}t}{2}\right ) +22.367\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \end{align*}

Or

\begin{align} x\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( 18.621\cos \left ( \frac{\sqrt{7}t}{2}\right ) +4.533\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \nonumber \\ y\left ( t\right ) & =e^{\frac{-3}{2}t}\left ( -15.307\cos \left ( \frac{\sqrt{7}t}{2}\right ) +22.367\sin \left ( \frac{\sqrt{7}t}{2}\right ) \right ) \tag{5} \end{align}

The above shows that due to the exponentially decaying term in the solution, then \[ \lim _{t\rightarrow \infty }\begin{pmatrix} x\left ( t\right ) \\ y\left ( t\right ) \end{pmatrix} \rightarrow \begin{pmatrix} 0\\ 0 \end{pmatrix} \] The following is a plot of \(x\left ( t\right ) \) and \(y\left ( t\right ) \) for \(t\) from \(1\) to \(5\) seconds showing both solutions go to zero quickly due to the \(e^{\frac{-3}{2}t}\) term.

pict
ClearAll[t];
myXSol=Exp[-3/2 t](18.621 Cos[Sqrt[7] t/2]+4.533 Sin[Sqrt[7] t/2]);
myYSol=Exp[-3/2 t](-15.307 Cos[Sqrt[7] t/2]+22.367 Sin[Sqrt[7] t/2]);
p1=Plot[myXSol,{t,1,5},PlotRange->All,Frame->True,
FrameLabel->{{"x(t)",None},{"t sec","Solution x(t)"}},
PlotStyle->Red,
GridLines->Automatic,GridLinesStyle->LightGray,
BaseStyle->14,ImageSize->400,
FrameTicks->{{Range[-1,2,.5],None},{Range[0,5,.5],None}}];
p2=Plot[myYSol,{t,1,5},PlotRange->All,Frame->True,
FrameLabel->{{"y(t)",None},{"t sec","Solution y(t)"}},
PlotStyle->Red,GridLines->Automatic,GridLinesStyle->LightGray,
BaseStyle->14,ImageSize->400,
FrameTicks->{{Range[-1,4,.5],None},{Range[0,5,.5],None}}];
p=Grid[{{p1,p2}}]

3.2.6 Problem 6

pict

Solution\[ 3t^{2}y^{\prime \prime }+ty^{\prime }+y=0 \] Since the powers on the \(t\) coefficients match the order of the derivatives in each term of the ODE, then this is called the Euler ODE. Its solution can be found by assuming solution has this form (Using the hint given) \begin{equation} y\left ( t\right ) =t^{\alpha } \tag{1} \end{equation} Therefore \begin{align*} y^{\prime } & =\alpha t^{\alpha -1}\\ y^{\prime \prime } & =\alpha \left ( \alpha -1\right ) t^{\alpha -2} \end{align*}

Substituting these in the original ODE gives the characteristic equation to solve for \(\alpha \) \begin{align*} 3t^{2}\alpha \left ( \alpha -1\right ) t^{\alpha -2}+t\alpha t^{\alpha -1}+t^{\alpha } & =0\\ 3\alpha \left ( \alpha -1\right ) t^{\alpha }+\alpha t^{\alpha }+t^{\alpha } & =0\\ t^{\alpha }\left ( 3\alpha \left ( \alpha -1\right ) +\alpha +1\right ) & =0 \end{align*}

Since \(t^{\alpha }\neq 0\) (else this will result in a trivial solution), the characteristic equation is \(3\alpha \left ( \alpha -1\right ) +\alpha +1=0\) or\[ 3\alpha ^{2}-2\alpha +1=0 \] Using the quadratic formula, the roots of the above characteristic equation are\begin{align*} \alpha _{1} & =\frac{1}{3}+\frac{1}{3}i\sqrt{2}\\ \alpha _{2} & =\frac{1}{3}-\frac{1}{3}i\sqrt{2} \end{align*}

The solution is a linear combination of the basis solutions \(t^{\alpha _{1}},t^{\alpha _{2}}\). Hence \begin{align} y\left ( t\right ) & =c_{1}t^{\alpha _{1}}+c_{2}t^{\alpha _{2}}\nonumber \\ & =c_{1}t^{\left ( \frac{1}{3}+\frac{1}{3}i\sqrt{2}\right ) }+c_{2}t^{\left ( \frac{1}{3}-\frac{1}{3}i\sqrt{2}\right ) }\nonumber \\ & =c_{1}t^{\frac{1}{3}}t^{\frac{1}{3}i\sqrt{2}}+c_{2}t^{\frac{1}{3}}t^{-\frac{1}{3}i\sqrt{2}}\nonumber \\ & =t^{\frac{1}{3}}\left ( c_{1}t^{\frac{1}{3}i\sqrt{2}}+c_{2}t^{-\frac{1}{3}i\sqrt{2}}\right ) \tag{2} \end{align}

But \begin{align*} t^{\frac{1}{3}i\sqrt{2}} & =e^{\ln \left ( t^{\frac{1}{3}i\sqrt{2}}\right ) }\\ & =e^{\frac{1}{3}i\sqrt{2}\ln t} \end{align*}

And\begin{align*} t^{\frac{-1}{3}i\sqrt{2}} & =e^{\ln \left ( t^{\frac{-1}{3}i\sqrt{2}}\right ) }\\ & =e^{\frac{-1}{3}i\sqrt{2}\ln t} \end{align*}

Using the above two equations in (2) then the solution (2) becomes\[ y\left ( t\right ) =t^{\frac{1}{3}}\left ( c_{1}e^{\frac{1}{3}i\sqrt{2}\ln t}+c_{2}e^{\frac{-1}{3}i\sqrt{2}\ln t}\right ) \] Using Euler relation the above solution is written using \(\sin \) and \(\cos \) to become\[ \fbox{$y\left ( t\right ) =t^\frac{1}{3}\left ( C_1\cos \left ( \frac{\sqrt{2}\ln t}{3}\right ) +C_2\sin \left ( \frac{\sqrt{2}\ln t}{3}\right ) \right ) $}\]

3.2.7 Problem 7

pict

Solution\begin{align*} y_{1}^{\prime } & =3y_{1}+2y_{2}+y_{3}\\ y_{2}^{\prime } & =-y_{1}+3y_{2}+2y_{3}\\ y_{3}^{\prime } & =y_{1}-3y_{2}-2y_{3} \end{align*}

The system is written using \(\mathbf{y}^{\prime }=A\mathbf{y}\) as\[\begin{pmatrix} y_{1}^{\prime }\left ( t\right ) \\ y_{2}^{\prime }\left ( t\right ) \\ y_{3}^{\prime }\left ( t\right ) \end{pmatrix} =\begin{pmatrix} 3 & 2 & 1\\ -1 & 3 & 2\\ 1 & -3 & -2 \end{pmatrix}\begin{pmatrix} y_{1}\left ( t\right ) \\ y_{2}\left ( t\right ) \\ y_{3}\left ( t\right ) \end{pmatrix} \] Where \(A=\begin{pmatrix} 3 & 2 & 1\\ -1 & 3 & 2\\ 1 & -3 & -2 \end{pmatrix} \). The eigenvalues are found by solving \(\det \left ( A-I\lambda \right ) =0\) which gives\begin{align*} \begin{vmatrix} 3-\lambda & 2 & 1\\ -1 & 3-\lambda & 2\\ 1 & -3 & -2-\lambda \end{vmatrix} & =0\\ \lambda ^{3}-4\lambda ^{2}+4\lambda & =0\\ \left ( \lambda ^{2}-4\lambda +4\right ) \lambda & =0\\ \left ( \lambda -2\right ) \left ( \lambda -2\right ) \lambda & =0 \end{align*}

Hence the eigenvalues are\begin{align*} \lambda _{1} & =0\\ \lambda _{2} & =2 \end{align*}

Where \(\lambda _{2}\) has algebraic multiplicity \(2\). The eigenvector associated with \(\lambda _{1}=0\) is now found and then an additional two two linearly independent eigenvectors are needed that are associated with the second eigenvalue \(\lambda _{2}\). The eigenvector \(\mathbf{v}_{1}\) is found as normally done by solving\begin{align*} \left ( A-\lambda _{1}I\right ) \mathbf{v} & =0\\\begin{pmatrix} 3-\lambda _{1} & 2 & 1\\ -1 & 3-\lambda _{1} & 2\\ 1 & -3 & -2-\lambda _{1}\end{pmatrix}\begin{pmatrix} v_{1}\\ v_{2}\\ v_{3}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \\\begin{pmatrix} 3 & 2 & 1\\ -1 & 3 & 2\\ 1 & -3 & -2 \end{pmatrix}\begin{pmatrix} v_{1}\\ v_{2}\\ v_{3}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \end{align*}

This gives three equations \begin{align*} 3v_{1}+2v_{2}+v_{3} & =0\\ -v_{1}+3v_{2}+2v_{3} & =0\\ v_{1}-3v_{2}-2v_{3} & =0 \end{align*}

Let \(v_{1}=1\), then the above becomes\begin{align*} 2v_{2}+v_{3} & =-3\\ 3v_{2}+2v_{3} & =1\\ -3v_{2}-2v_{3} & =-1 \end{align*}

The first equation above gives \(v_{2}=\frac{-3-v_{3}}{2}\). Substituting this in the second equation gives \(3\left ( \frac{-3-v_{3}}{2}\right ) +2v_{3}=1\), or \(v_{3}=11\). Hence \(v_{2}=\frac{-3-11}{2}=-7\).

Therefore the eigenvector associated with \(\lambda _{1}=0\) is\[ \mathbf{v}_{1}\mathbf{=}\begin{pmatrix} 1\\ -7\\ 11 \end{pmatrix} \] For the eigenvalue \(\lambda _{2}=2\), which has algebraic multiplicity \(2\), it is first checked if it is defective eigenvalue or a complete one. A complete eigenvalue is one with an algebraic multiplicity \(m\) and an geometric multiplicity \(m\) as well. When this is the case, then \(m\) linearly independent eigenvectors associated with the eigenvalue can be found.

However, if the eigenvalue is defective, which means its geometric multiplicity is less than \(m\), then it is not possible to find \(m\) linearly independent eigenvectors from the eigenvalue. In this case the defective eigenvalue algorithm is used to find the remaining linearly independent eigenvectors. Note that geometric multiplicity can not be larger than the algebraic multiplicity.

Now a check is made to determine if the eigenvalue \(\lambda _{2}=2\) is defective or complete. The geometric multiplicity of an eigenvalue is the dimension of the null-space of the matrix \(A-\lambda _{2}I\) given by\begin{align*} \left ( A-\lambda _{2}I\right ) & =\begin{pmatrix} 3-\lambda _{2} & 2 & 1\\ -1 & 3-\lambda _{2} & 2\\ 1 & -3 & -2-\lambda _{2}\end{pmatrix} \\ & =\begin{pmatrix} 1 & 2 & 1\\ -1 & 1 & 2\\ 1 & -3 & -4 \end{pmatrix} \end{align*}

The null space of the above matrix is now found. By the Rank nullity theorem of linear algebra, which says\[ \text{column rank}\left ( A\right ) +\text{nullity}\left ( A\right ) =\text{dimension }\left ( A\right ) \] Then the column rank needs to be found as well. This is done by converting the matrix to reduced row echelon form as follows\begin{align*} & \begin{pmatrix} 1 & 2 & 1\\ -1 & 1 & 2\\ 1 & -3 & -4 \end{pmatrix} \overset{R_{2}=R_{2}+R_{1}}{\rightarrow }\begin{pmatrix} 1 & 2 & 1\\ 0 & 3 & 3\\ 1 & -3 & -4 \end{pmatrix} \overset{R_{3}=R_{3}-R_{1}}{\rightarrow }\begin{pmatrix} 1 & 2 & 1\\ 0 & 3 & 3\\ 0 & -5 & -5 \end{pmatrix} \\ & \overset{R_{3}=R_{3}+\frac{5}{3}R_{2}}{\rightarrow }\begin{pmatrix} 1 & 2 & 1\\ 0 & 3 & 3\\ 0 & 0 & 0 \end{pmatrix} \overset{R_{2}=\frac{R_{2}}{\frac{3}{2}R_{1}}}{\rightarrow }\begin{pmatrix} 1 & 2 & 1\\ 0 & 1 & 2\\ 0 & 0 & 0 \end{pmatrix} \end{align*}

The above is in reduced row echelon form. The number of columns with \(1\) on the diagonal is the column rank. The above shows the column rank is \(2\). Using the rank nullity the dimension of the null space is now found as follows \begin{align*} \text{nullity}\left ( A\right ) & =\text{dimension }\left ( A\right ) -\text{column rank}\left ( A\right ) \\ & =3-2\\ & =1 \end{align*}

Therefore the geometric multiplicity is \(1\) which is less than the algebraic multiplicity \(2\). This means only one eigenvector can be obtained directly from \(\lambda _{2}\) since this eigenvalue is defective.

The defective eigenvalue method is used next to find the second eigenvector associated with \(\lambda _{2}\). In this method the first eigenvector from \(\lambda _{2}\) is first found as is done normally by solving\begin{align*} \left ( A-\lambda _{2}I\right ) \mathbf{v}_{2} & =0\\\begin{pmatrix} 3-\lambda _{2} & 2 & 1\\ -1 & 3-\lambda _{2} & 2\\ 1 & -3 & -2-\lambda _{2}\end{pmatrix}\begin{pmatrix} v_{1}\\ v_{2}\\ v_{3}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \\\begin{pmatrix} 1 & 2 & 1\\ -1 & 1 & 2\\ 1 & -3 & -4 \end{pmatrix}\begin{pmatrix} v_{1}\\ v_{2}\\ v_{3}\end{pmatrix} & =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \end{align*}

This gives the three equations \begin{align*} v_{1}+2v_{2}+v_{3} & =0\\ -v_{1}+v_{2}+2v_{3} & =0\\ v_{1}-3v_{2}-4v_{3} & =0 \end{align*}

Let \(v_{1}=1\), then the above becomes\begin{align*} 2v_{2}+v_{3} & =-1\\ v_{2}+2v_{3} & =1\\ -3v_{2}-4v_{3} & =-1 \end{align*}

From the first equation \(v_{2}=\frac{-1-v_{3}}{2}\) and from the second equation \(\frac{-1-v_{3}}{2}+2v_{3}=1\), or \(v_{3}=1\). Hence \(v_{2}=\frac{-1-1}{2}=-1\). Therefore the first eigenvector associated with \(\lambda _{2}\) is\[ \mathbf{v}_{2}=\begin{pmatrix} v_{1}\\ v_{2}\\ v_{3}\end{pmatrix} =\begin{pmatrix} 1\\ -1\\ 1 \end{pmatrix} \] The second eigenvector associated with \(\lambda _{2}\) is given by \[ \mathbf{v}_{3}=t\ \mathbf{v}_{2}+\mathbf{p}\] Where \(\mathbf{p}\) is the solution to \begin{align*} \left ( A-\lambda _{2}I\right ) \mathbf{p} & =\mathbf{v}_{2}\\\begin{pmatrix} 1 & 2 & 1\\ -1 & 1 & 2\\ 1 & -3 & -4 \end{pmatrix}\begin{pmatrix} p_{1}\\ p_{2}\\ p_{3}\end{pmatrix} & =\begin{pmatrix} 1\\ -1\\ 1 \end{pmatrix} \end{align*}

The above gives the equations\begin{align*} p_{1}+2p_{2}+p_{3} & =1\\ -p_{1}+p_{2}+2p_{3} & =-1\\ p_{1}-3p_{2}-4p_{3} & =1 \end{align*}

Let \(p_{1}=1\), and the above becomes\begin{align*} 2p_{2}+p_{3} & =0\\ p_{2}+2p_{3} & =-2\\ -3p_{2}-4p_{3} & =0 \end{align*}

The first equation gives \(p_{2}=\frac{p_{3}}{2}\). Hence the second equation becomes \(\frac{p_{3}}{2}+2p_{3}=0\). Therefore \(p_{3}=0\) and therefore \(p_{2}=0\). Which results in\[ \mathbf{p=}\begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix} \] Therefore the third eigenvector is found from\begin{align*} \mathbf{v}_{3} & =t\mathbf{v}_{2}+\mathbf{p}\\ & =t\begin{pmatrix} 1\\ -1\\ 1 \end{pmatrix} +\begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix} \end{align*}

The three eigenvectors are the following\[ \mathbf{v}_{1}\mathbf{=}\begin{pmatrix} 1\\ -7\\ 11 \end{pmatrix} ,\mathbf{v}_{2}=\begin{pmatrix} 1\\ -1\\ 1 \end{pmatrix} ,\mathbf{v}_{3}=t\begin{pmatrix} 1\\ -1\\ 1 \end{pmatrix} +\begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix} \] The solution can now be written as\[ \mathbf{y}\left ( t\right ) =c_{1}e^{\lambda _{1}t}\mathbf{v}_{1}+c_{2}e^{\lambda _{2}t}\mathbf{v}_{2}+c_{3}e^{\lambda _{2}t}\mathbf{v}_{3}\] Since \(\lambda _{1}=0\) and \(\lambda _{2}=2\) then the above becomes\[\begin{pmatrix} y_{1}\left ( t\right ) \\ y_{2}\left ( t\right ) \\ y_{3}\left ( t\right ) \end{pmatrix} =c_{1}\begin{pmatrix} 1\\ -7\\ 11 \end{pmatrix} +c_{2}e^{2t}\begin{pmatrix} 1\\ -1\\ 1 \end{pmatrix} +c_{3}e^{2t}\left [ t\begin{pmatrix} 1\\ -1\\ 1 \end{pmatrix} +\begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix} \right ] \] Which can be simplified to\begin{align} y_{1}\left ( t\right ) & =c_{1}+c_{2}e^{2t}+c_{3}e^{2t}\left ( t+1\right ) \nonumber \\ y_{2}\left ( t\right ) & =-7c_{1}-c_{2}e^{2t}-c_{3}te^{2t}\nonumber \\ y_{3}\left ( t\right ) & =11c_{1}+c_{2}e^{2t}+c_{3}te^{2t} \tag{1} \end{align}

To plot these solutions, the following arbitrary initial conditions \(y_{1}\left ( 0\right ) =0,y_{2}\left ( 0\right ) =0,y_{3}\left ( 0\right ) =1\) are used\[\begin{pmatrix} y_{1}\left ( 0\right ) \\ y_{2}\left ( 0\right ) \\ y_{3}\left ( 0\right ) \end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 1 \end{pmatrix} =\begin{pmatrix} c_{1}+c_{2}+c_{3}\\ -7c_{1}-c_{2}\\ 11c_{1}+c_{2}\end{pmatrix} \] Solving, this gives \(c_{1}=\frac{1}{4},c_{2}=-\frac{7}{4},c_{3}=\frac{3}{2}\). Therefore the above solution (1) becomes\[\begin{pmatrix} y_{1}\left ( t\right ) \\ y_{2}\left ( t\right ) \\ y_{3}\left ( t\right ) \end{pmatrix} =\begin{pmatrix} \frac{1}{4}-\frac{7}{4}e^{2t}+\frac{3}{2}e^{2t}\left ( t+1\right ) \\ -\frac{7}{4}+\frac{7}{4}e^{2t}-\frac{3}{2}te^{2t}\\ \frac{11}{4}-\frac{7}{4}e^{2t}+\frac{3}{2}te^{2t}\end{pmatrix} \] The following is a plot of the solution for these initial conditions. The solutions are not stable, since they grow in time.

pict
ClearAll[t,y1,y2,y3];
myy1=1/4-7/4 Exp[2 t]+3/2 Exp[2 t](t+1);
myy2=-7/4+7/4 Exp[2 t]-3/2 t Exp[2 t];
myy3=11/4-7/4 Exp[2 t]+3/2 t Exp[2 t];
Plot[{myy1,myy2,myy3},{t,0,2},GridLines->Automatic,GridLinesStyle->LightGray,
ImageSize->300,
AxesLabel->{"t","solutions to problem 7"},
PlotLegends->{"y1(t)","y2(t)","y3(t)"}]

3.2.8 Problem 8

pict

Solution

\(y\left ( t\right ) =\cos t+\sin 2t\) can not be a solution to \(y^{\prime \prime }+ay^{\prime }+by=0\), because both basis solutions (these are the linearly independent solutions \(\sin \) and \(\cos \)) must oscillate with the same frequency. The frequency of oscillation of a second order system with no forcing function is called the natural frequency of the system. There is one unique natural frequency for a second order system.

This frequency comes from finding the value of the discriminant of the characteristic equation of the ODE (since it is constant coefficient). To illustrate, the general solution of the second order ODE  is found to show that the proposed solution is not possible. The general solution of the above ODE is\[ y\left ( t\right ) =c_{1}e^{\lambda _{1}t}+c_{2}e^{\lambda _{2}t}\] Where \(\lambda _{1,2}\) are the two roots of the corresponding characteristic equation \(\lambda ^{2}+a\lambda +b=0\). These roots are \[ \lambda =-\frac{a}{2}\pm \sqrt{a^{2}-4b}\] Therefore the roots are\begin{align*} \lambda _{1} & =-\frac{a}{2}+\sqrt{a^{2}-4b}\\ \lambda _{2} & =-\frac{a}{2}-\sqrt{a^{2}-4b} \end{align*}

The general solution to the given ODE is linear combination of two linearly independent solutions \(e^{\lambda _{1}t},e^{\lambda _{2}t}\), one for each root, which results in\begin{align*} y\left ( t\right ) & =c_{1}e^{\left ( -\frac{a}{2}+\sqrt{a^{2}-4b}\right ) t}+c_{2}e^{\left ( -\frac{a}{2}-\sqrt{a^{2}-4b}\right ) t}\\ & =e^{-\frac{a}{2}t}\left ( c_{1}e^{\sqrt{a^{2}-4b}t}+c_{2}e^{-\sqrt{a^{2}-4b}t}\right ) \end{align*}

\(c_{1},c_{2}\) are determined from initial conditions. Since the proposed solution given does not have \(e^{-\frac{a}{2}t}\) in it, then this implies that \(a=0\) (this is the damping term), and since \(e^{-\frac{a}{2}t}=1\) then the solution reduces to\[ y\left ( t\right ) =c_{1}e^{\sqrt{-4b}t}+c_{2}e^{-\sqrt{-4b}t}\] Since the proposed solution is made up of trigonometric functions, it must be that \(b>0\) in order to make \(-4b\) negative and obtain a pair of conjugate complex roots. The solution now becomes\[ y\left ( t\right ) =c_{1}e^{2i\sqrt{b}t}+c_{2}e^{-2i\sqrt{b}t}\] Expressing this in terms of trigonometric functions using Euler relation results in\[ y\left ( t\right ) =c_{1}\cos \left ( \sqrt{b}t\right ) +c_{2}\sin \left ( \sqrt{b}t\right ) \] The above shows that the solution can not be \(y\left ( t\right ) =\cos t+\sin 2t\) since \(\sqrt{b}\) can not equal \(1\) and \(2\) at the same time.

Another way to show that \(y\left ( t\right ) =\cos t+\sin 2t\) is not be a solution, is to simply substitute this solution into the ODE and obtain a contradiction as shown below.

Since \(y^{\prime }=-\sin t+2\cos 2t\) and \(y^{\prime \prime }=-\cos t-4\sin 2t\), the ODE now becomes\begin{align*} \left ( -\cos t-4\sin 2t\right ) +a\left ( -\sin t+2\cos 2t\right ) +b\left ( \cos t+\sin 2t\right ) & =0\\ \left ( -1+b\right ) \cos t-a\sin t+\left ( -4+b\right ) \sin 2t & =0 \end{align*}

Because the RHS is zero, this implies that\begin{align*} -1+b & =0\\ -4+b & =0\\ -a & =0 \end{align*}

The first equation gives \(b=1\) and the second equation gives \(b=-4\) which is not possible.

To obtain an ODE with such a solution, the ODE has to be of order \(4\). This is to obtain two different natural frequencies (A \(4^{th}\) order ODE can be written as two separate second order ODE’s). Let the ODE be\begin{equation} y^{\prime \prime \prime \prime }\left ( t\right ) +Ay^{\prime \prime \prime }\left ( t\right ) +By^{\prime \prime }\left ( t\right ) +Cy^{\prime }\left ( t\right ) +Dy\left ( t\right ) =0 \tag{1} \end{equation} Given that\begin{align*} y & =\cos t+\sin 2t\\ y^{\prime } & =-\sin t+2\cos 2t\\ y^{\prime \prime } & =-\cos t-4\sin 2t\\ y^{\prime \prime \prime } & =\sin t-8\cos 2t\\ y^{\prime \prime \prime \prime } & =\cos t+16\sin 2t \end{align*}

Substituting the above into (1) gives\[ \left ( \cos t+16\sin 2t\right ) +A\left ( \sin t-8\cos 2t\right ) +B\left ( -\cos t-4\sin 2t\right ) +C\left ( -\sin t+2\cos 2t\right ) +D\left ( \cos t+\sin 2t\right ) =0 \] Collecting terms based on the trigonometric function gives\[ \left ( 1-B+D\right ) \cos t+\left ( A-C\right ) \sin t+\left ( 16-4B+D\right ) \sin 2t+\left ( -8A+2C\right ) \cos 2t=0 \] A solution is obtained by setting all the coefficients above to zero which results in the following four equations to solve for \(A,B,C,D\)\begin{align*} 1-B+D & =0\\ A-C & =0\\ 16-4B+D & =0\\ -8A+2C & =0 \end{align*}

These are solved by elimination. From the second equation \(A=C\). The fourth equation gives \(-8C+2C=0\) or \(C=0\). Hence \(A=0\). From first equation \(B=1+D\), hence the third equation gives \(16-4\left ( 1+D\right ) +D=0\), or \(D=4\) and therefore \(B=5\). The solution is therefore\begin{align*} A & =0\\ B & =5\\ C & =0\\ D & =4 \end{align*}

Using these in (1) gives\begin{equation} y^{\prime \prime \prime \prime }\left ( t\right ) +5y^{\prime \prime }\left ( t\right ) +4y\left ( t\right ) =0 \tag{2} \end{equation} The proposed solution \(y\left ( t\right ) =\cos t+\sin 2t\) now satisfies the above ODE. There will be four constants of integrations (since this is a \(4^{th}\) order ODE), and therefore two of these constants must be set to zero using the appropriate initial conditions. To find which constants are needed to set to zero, the above ODE is first solved. The characteristic equation of (2) is\begin{align*} \lambda ^{4}+5\lambda ^{2}+4 & =0\\ & \left ( \lambda ^{2}+1\right ) \left ( \lambda ^{2}+4\right ) \end{align*}

The roots are \(\lambda _{1}=\pm i,\lambda _{2}=\pm 2i\). Therefore solution to (2) becomes\[ y\left ( t\right ) =c_{1}e^{it}+c_{2}e^{-it}+c_{3}e^{2it}+c_{4}e^{-2it}\] Using Euler relation the above is written in trigonometric functions as\begin{equation} y\left ( t\right ) =c_{1}\cos t+c_{2}\sin t+c_{3}\cos 2t+c_{4}\sin 2t \tag{3} \end{equation} To obtain the proposed solution \(y\left ( t\right ) =\cos t+\sin 2t\) implies that the constants must have these values \begin{align*} c_{1} & =1\\ c_{2} & =0\\ c_{3} & =0\\ c_{4} & =1 \end{align*}

The initial conditions which would lead to these constants having these specific values are now found as follows. From (3) \[ y\left ( 0\right ) =c_{1}+c_{3}\] Since \(y^{\prime }\left ( t\right ) =-c_{1}\sin t+c_{2}\cos t-2c_{3}\sin 2t+2c_{4}\cos 2t\) then\[ y^{\prime }\left ( 0\right ) =c_{2}+2c_{4}\] And since \(y^{\prime \prime }\left ( t\right ) =-c_{1}\cos t-c_{2}\sin t-4c_{3}\cos 2t-4c_{4}\sin 2t\), then\[ y^{\prime \prime }\left ( 0\right ) =-c_{1}-4c_{3}\] and finally since \(y^{\prime \prime \prime }\left ( t\right ) =c_{1}\sin t-c_{2}\cos t+8c_{3}\sin 2t-8c_{4}\cos 2t\) then\[ y^{\prime \prime \prime }\left ( 0\right ) =-c_{2}-8c_{4}\] Since \(c_{1}=1,c_{2}=0,c_{3}=0,c_{4}=1\), then the above initial conditions become\begin{align*} y\left ( 0\right ) & =1\\ y^{\prime }\left ( 0\right ) & =2\\ y^{\prime \prime }\left ( 0\right ) & =-1\\ y^{\prime \prime \prime }\left ( 0\right ) & =-8 \end{align*}

The above initial conditions will now give the solution\[ y\left ( t\right ) =\cos t+\sin 2t \] For the ODE\[ y^{\prime \prime \prime \prime }\left ( t\right ) +5y^{\prime \prime }\left ( t\right ) +4y\left ( t\right ) =0 \] The following is a plot of the solution

pict
Plot[Cos[t] + Sin[2 t], {t, 0, 20}, PlotStyle -> Red,
GridLines -> Automatic, GridLinesStyle -> LightGray,
AxesLabel -> {"t (sec)", "y(t)"},
PlotLabel -> "Problem 8 solution"]