Systems recordings

Here is a recoding of a solution to a system of linear, first-order differential equations with a slope field and solution curves near eigenvectors.


or get it on You Tube, http://youtu.be/A-RwYm2SLiA

Here is a recording of a similar system but with complex eigenvalues:
http://youtu.be/q9nCdpdlqE4

 

Exam 3

Here is the third test.  I have one more comprehensive part to post: coming soon.

For now enjoy part 1 of the last test:
mth256_exam3_summer12

Laplace Transform, impulse response

Suppose a differential equation, \(a\ddot{w}+b\dot{w}+cw=\delta(t)\), has the following unit impulse response:

\[w(t)=e^{-t}-e^{-3t}\]

What would its response to the unit step function be?

\[a\ddot{v}+b\dot{v}+cv=u(t)\]

Using convolution we get

\[v(t)=\int_0^t w(t-\tau)*u(\tau)d\tau=\int_0^t w(\tau)*u(t-\tau)d\tau=\int_0^te^{-t}-e^{-3t} d\tau\]

So, \(v(t)=\left[-e^{-\tau}+\frac{1}{3}e^{-3\tau}\right]_0^t=-e^{-t}+1+\frac{1}{3}e^{-3t}-\frac{1}{3}=\frac{2}{3}-e^{-t}+\frac{1}{3}e^{-3t}\)

Alternatively, we know that \(w(t)=\mathop{\mathscr{L^{-1}}}\left\{\frac{1}{as^2+bs+c}\right\}\).

Comparing that to \(\mathop{\mathscr{L}}\left\{w(t)\right\}=\mathop{\mathscr{L}}\left\{e^{-t}-e^{-3t}\right\}=\frac{1}{s+1}-\frac{1}{s+3}\).

\[\frac{1}{s+1}-\frac{1}{s+3}=\frac{2}{(s+1)(s+3)}=\frac{1}{\frac{1}{2}(s^2+4s+3)}=\frac{1}{\frac{1}{2}s^2+2s+\frac{3}{2}}\]

Cool! \(a=\frac{1}{2}\) , \(b=2\) , and \(a=\frac{3}{2}\).

For fun we could solve \(\frac{1}{2}\ddot{v}+2\dot{v}+\frac{3}{2}s=u(t)\)

Using Laplace transforms with rest conditions \(v(0)=0\) and \(\dot{v}(0)=0\)

\[\hat{v}(s)=\frac{1}{s}\frac{1}{\frac{1}{2}s^2+2s+\frac{3}{2}}=\frac{2}{s(s+1)(s+3)}\]

Applying partial fractions

\[\hat{v}(s)=\frac{2/3}{s}+\frac{-1}{s+1}+\frac{1/3}{s+3}\]

Finally

\[v(t)=\frac{2}{3}-e^{-t}+\frac{1}{3}e^{-3t}\]

Laplace Transform Example

\[\dot{x}-4x=e^t \; ,\; x(0)=f(o)=1\]

Applying the Laplace transform operator to both sides:

\[\mathop{\mathscr{L}}\{\dot{x}-4x\}=\mathop{\mathscr{L}}\{e^t\}\]

\[\mathop{\mathscr{L}}\{\dot{x}\}-4\mathop{\mathscr{L}}\{x\}=\frac{1}{s-1}\]

\[s\hat{f}(s)-f(0)-4\hat{f}(s)=\frac{1}{s-1}\]

\[(s-4)\hat{f}(s)-1=\frac{1}{s-1}\]

\[\hat{f}(s)=\frac{1}{(s-1)(s-4)}+\frac{1}{s-4}\]

And now for the inverse Laplace transform:

\[x(t)=\mathop{\mathscr{L}^{-1}}\{\hat{f}(s)\}=\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{(s-1)(s-4)}+\frac{1}{s-4}\right\}\]

\[x(t)=\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{(s-1)(s-4)}\right\}+\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{s-4}\right\}\]

The second term is easy:

\[\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{s-4}\right\}=e^{4t}\]

The first term requires partial fraction decomposition or completing the square and involving complex numbers.  I am going to show the latter.

\[(s-1)(s-4)=s^2-5s+4=\left(s-\frac{5}{2}\right)^2-\frac{9}{4}=\left(s-\frac{5}{2}\right)^2+\left(\frac{3i}{2}\right)^2\]

I am doing this with the Laplace transform for  \(\sin(bt)\) , which is  \(\frac{b}{s^2+b^2}\).  In this case  \(b=\frac{3i}{2}\).

\[\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{(s-1)(s-4)}\right\}=\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{\left(s-\frac{5}{2}\right)^2+\left(\frac{3i}{2}\right)^2}\right\}=\mathop{\mathscr{L}^{-1}}\left\{\frac{2}{3i}\cdot\frac{\frac{3i}{2}}{\left(s-\frac{5}{2}\right)^2+\left(\frac{3i}{2}\right)^2}\right\}\]

Since we have  \(s-\frac{5}{2}\)  instead of  \(s\) , we get a multiple of  \(e^{\frac{5}{2}t}\)  in the inverse transform.

\[\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{(s-1)(s-4)}\right\}=\frac{2}{3i}\cdot\sin\left(\frac{3i}{2}t\right)\cdot e^{\frac{5}{2}t}\]

One amazing fact about   \(\sin(ix)\)   is that it is equal to   \(i\cdot\sinh(x)\), the hyperbolic sine, which is equal to \(\frac{i}{2}\left(e^x-e^{-x}\right)\).

Hence

\[\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{(s-1)(s-4)}\right\}=\frac{2}{3i}\cdot i\cdot\sinh\left(\frac{3}{2}t\right)\cdot e^{\frac{5}{2}t}\]

which equals

\[\frac{2}{3}\frac{1}{2}\left(e^{\frac{3t}{2}}-e^{\frac{-3t}{2}}\right)\cdot e^{\frac{5t}{2}}=\frac{1}{3}e^{\frac{3t}{2}+\frac{5t}{2}}-\frac{1}{3}e^{\frac{-3t}{2}+\frac{5t}{2}}=\frac{1}{3}e^{4t}-\frac{1}{3}e^{t}\]

Crazy!  Now add on the \(e^{4t}\) and we get

\[x(t)=\frac{4}{3} e^{4t}-\frac{1}{3} e^{t}\]

Partial fractions will lead to the same solution and is actually a bit easier.  However, this was a wild ride, and well worth the trouble in my opinion.

If you don't have much time to screw around with this, then you could also look up \(\mathop{\mathscr{L}^{-1}}\left\{\frac{1}{(s-1)(s-4)}\right\}\) in a table of Laplace transforms.

Friday Review

Here are a few problems to review from Unit 2. We discussed the ERF, undetermined coefficients, and variation of parameter, mainly focusing on the ERF.

  1. \(y''+7y'+12y=3\cos(2x)\)
  2. \(\ddot{x}+x=3\sin(2t)+3\cos(2t)\)
  3. \(\ddot{x}+\dot{x}+2x=5\sin(2t)+\cos(2t)\)

From Unit 1 we discussed:

\[m\dot{v}=-mg+kv \; , \; \mathrm{with} \; v(0)=v_0\]

versus

\[m\dot{v}=-mg-kv \; , \; \mathrm{with} \; v(t_m)=0\]

where \(t_0\) is the time the object reaches its maximum height (when \(v=0\)) and upward is positive.

Last, I introduced the Laplace transform:

\[\mathop{\mathscr{L}}\{f(t)\}=\int_0^{\infty}f(t)\cdot e^{-st}dt=\hat{f}(s)\]

For example

\[\mathop{\mathscr{L}}\{1\}=\int_0^{\infty}1\cdot e^{-st}dt=\frac{1}{s}\]

\[\mathop{\mathscr{L}}\{e^{at}\}=\int_0^{\infty}e^{at}\cdot e^{-st}dt=\frac{1}{s-a}\]

and finally (this one is miraculous):

\[\mathop{\mathscr{L}}\{f'(t)\}=s\hat{f}(s)-f(0)\]

Fourier Series

Let \(f\) be a piecewise continuous function on the interval \([-T,T]\).  The Fourier Series of \(f\) is the trigonometric series

\[f(x)\sim\frac{a_0}{2}+\sum_{n=1}^\infty \left\{a_n\cos\left(\frac{n\pi x}{T}\right)+b_n\sin\left(\frac{n\pi x}{T}\right)\right\}\]

where the \(a_n\)'s and \(b_n\)'s are given by the formulas

\[a_n=\frac{1}{T}\int_{-T}^Tf(x)\cos\left(\frac{n\pi x}{T}\right)dx\; , \; n=0,1,2,...\]

\[b_n=\frac{1}{T}\int_{-T}^Tf(x)\sin\left(\frac{n\pi x}{T}\right)dx\; , \; n=1,2,3,...\]

For example, let \(f(x)\) be defined by

\[f(x)=\begin{cases} 0 & , -\pi < x < 0 \\ 1 & , 0 < x < \pi \end{cases}\]

If we let \(f(x)\) be periodic with period \(2\pi\), it is referred to as a square wave.

Find \(a_0\) first, \(\displaystyle a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)dx=\frac{1}{\pi}\int_{0}^{\pi}1dx=1\)

Now find the \(a_n\)'s

\[a_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(nx)dx=\frac{1}{\pi}\int_{0}^{\pi}\cos(nx)dx=\frac{1}{\pi n}\Big[\sin(nx)\Big]_{0}^{\pi}=0\]

And now for the \(b_n\)'s

\[b_n=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin(nx)dx=\frac{1}{\pi}\int_{0}^{\pi}\sin(nx)dx=\frac{-1}{\pi n}\Big[\cos(nx)\Big]_{0}^{\pi}=\frac{-1}{\pi n}\Big(\cos(\pi n)-1\Big)=\frac{-1}{\pi n}\Big((-1)^n-1\Big)\]

\[b_n=\begin{cases} \frac{2}{\pi n} & , n \; \textrm{is odd} \\ 0 & , n \; \textrm{is even} \end{cases}\]

Alternatively, \(b_{2n-1}=\frac{2}{(2n-1)\pi}\), while \(b_{2n}=0\)

so,

\[ f(x)\sim \frac{1}{2}+\frac{2}{\pi}\sum_{n=1}^\infty \frac{1}{2n-1}\sin((2n-1)x)\]

Here are the first ten terms:

Fun with Trigonometry

\[\ddot{x}+x=0.5\cos(0.8x)\]

The homogeneous solution is

\[x_h(t)=c_1\cos(t)+c_2\sin(t)\]

Using variation of parameters we get a nonhomogeneous solution of

\[x_p(t)=\left(\frac{5}{4}\cos(0.2t)+\frac{5}{36}\cos(1.8t)\right)\cos(t)+\left(\frac{5}{4}\sin(0.2t)+\frac{5}{36}\sin(1.8t)\right)\sin(t)\]

Distributing and regrouping

\[x_p(t)=\frac{5}{4}\cos(t)\cos(0.2t)+\frac{5}{4}\sin(t)\sin(0.2t)+\frac{5}{36}\cos(1.8t)\cos(t)+\frac{5}{36}\sin(1.8t)\sin(t)\]

Reversing the cosine angle difference formula

\[x_p(t)=\frac{5}{4}\cos(0.8t)+\frac{5}{36}\cos(0.8t)=\frac{25}{18}\cos(0.8t)\]

Using the initial conditions \(x(0)=0\), \(\dot{x}(0)=0\), we get \(c_1=\frac{-25}{18}\) and \(c_2=0\)

So a specific solution is

\[x(t)=\frac{-25}{18}\cos(t)+\frac{25}{18}\cos(0.8t)\]

\[x(t)=\frac{25}{18}\left(\cos(0.8t)-\cos(t)\right)\]

Regrouping and applying a difference to product formula

\[x(t)=\frac{25}{18}\left(2\sin\left(\frac{1-0.8}{2}\right)\sin\left(\frac{1+0.8}{2}\right)\right)\]

so

\[x(t)=\frac{25}{9}\sin(0.1t)\sin(0.9t)\]

amplitude modulation

Bernoulli Equations

Bernoulli equations are of the form:

\[\frac{dy}{dx}+P(x)y=Q(x)y^n\]

Dividing by \(y^n\):

\[\frac{dy}{dx}y^{-n}+P(x)y^{1-n}=Q(x)\]

If \(n=0\) or \(n=1\) then the equation is linear.  Otherwise a substitution of \(u=y^{1-n}\) will give us a linear equation.

If \(u=y^{1-n}\), then \(\frac{du}{dx}u=(1-n)\frac{dy}{dx}y^{-n}\).  Substituting these into the second equation from above:

\[\frac{1}{1-n}\frac{du}{dx}+P(x)u=Q(x)\]

For example,

\[y'+2xy=xy^4\]

Dividing by \(y^4\), we get  \(y'y^{-4}+2xy^{-3}=x\)

Substituting \(u=y^{-3}\) and \(\frac{du}{dx}={-3}\frac{dy}{dx}y^{-4}\) gives us

\[\frac{1}{-3}\frac{du}{dx}+2xu=x\]

\[\frac{du}{dx}-6xu=-3x\]

Homogeneous First-order Equations

There are two ways to view "homogeneous" first-order ordinary differential equations.

1. \(\frac{dy}{dx}=f(x,y)\) is a general first order ordinary differential equation.  If the function on the right, \(f(x,y)\), can be rewritten as a function of \(\frac{y}{x}\), e.g. \(f(x,y)=\frac{y-2x}{x}\) can be rewritten as \(g\left(\frac{y}{x}\right)=\frac{y}{x}-2\).  If we let \(v=\frac{y}{x}\), then we would have \(g(v)=v-2\).

In general, the substitution, \(v=\frac{y}{x}\) or \(y=vx\), will lead to a separable differential equation.

Since \(y=vx\) ,  differentiating both sides gives  \(\frac{dy}{dx}=\frac{dv}{dx}x+v\).  This new version of \(\frac{dy}{dx}\) becomes our new left side and \(g(v)\) becomes the right.

\[\frac{dv}{dx}x+v=g(v)\]

\[\frac{dv}{dx}x=g(v)-v\]

\[\frac{1}{g(v)-v}dv=\frac{1}{x}dx\]

 The above version of our differential equation has been separated.

2. First-order linear equations, \(\displaystyle \frac{dy}{dx}+P(x)y=Q(x)\), are also separable if \(Q(x)\equiv 0\).

\[\frac{dy}{dx}+P(x)y=0\]

\[\frac{dy}{dx}=-P(x)y\]

\[\frac{1}{y}dy=P(x)dx\]

INTERESTING.

Differential Equations Textbook

The book Gary is recommending for the course is "Differential Equations with Applications" by Paul D. Ritger and Nicholas J. Rose. You may read the book online for free HERE at Google books.