forked from Sasserisop/MATH201
102 lines
4.8 KiB
Markdown
102 lines
4.8 KiB
Markdown
|
|
#start of lec 17
|
|
<i>Lecture starts with a 25 minute long midterm review.</i>
|
|
He spends most of the time giving us a summary of all the equations (separable, linear, homogenous, exact, ...) The review is available on the eclass page.
|
|
|
|
So, why did we learn all this stuff about Laplace transforms? We will now see how its useful:
|
|
# Solving IVP's with Laplace
|
|
## Example:
|
|
#ex #LT #second_order_nonhomogenous #IVP
|
|
Solve the following IVP using Laplace transforms:
|
|
$$y''+y=t^2+2 \qquad y(0)=1 \qquad y'(0)=-1$$
|
|
LHS=RHS, so the Laplace transforms of each side must also be equal.
|
|
We take the Laplace transform of both sides:
|
|
$\mathcal{L}\{y''+y\}=\mathcal{L}\{t^2+2\}$
|
|
applying linearity:
|
|
$\mathcal{L}\{y''\}+\mathcal{L}\{y\}=\mathcal{L}\{t^2\}+\mathcal{L}\{2\}$
|
|
using properties:
|
|
$s^2Y(s)-sy(0)-y'(0)+Y(s)=\frac{2!}{s^3}+\frac{2}{s}$
|
|
$s^2Y(s)-s+1+Y(s)=\frac{2!}{s^3}+\frac{2}{s}$
|
|
Now we need to isolate $Y(s)$.
|
|
So we add $s-1$ to both sides and factor out $Y(s)$:
|
|
$Y(s)(s^2+1)=\frac{2(s^2+1)}{s^3}+s-1$
|
|
Divide both sides by $(s^2+1)$ :
|
|
$Y(s)=\frac{2}{s^3}+\frac{s}{s^2+1}-\frac{1}{s^2+1}$
|
|
Now we take the inverse LT of both sides to obtain $y(t)$
|
|
$$y(t)=t^2+\cos(t)-\sin(t)$$
|
|
Done. That was pretty fast!
|
|
|
|
second example:
|
|
#ex #LT #second_order_nonhomogenous
|
|
Solve the following IVP using Laplace transforms:
|
|
$$y''-y=(t-2)e^{t-2} \qquad y(2)=0 \qquad y'(2)=0$$
|
|
We are provided $y(2)$ but usually we need it in the form $y(0)$ What do we do?
|
|
We make a substitution: $x=t-2$
|
|
$\frac{d^2y}{dx^2}-y=xe^x$ <- notice the y here is not the same as the y above, lousy notation. This graph is shifted 2 units to the left.
|
|
where $y(0)=0 \qquad \frac{dy}{dx}(0)=0$
|
|
Hit it with the LT!
|
|
$\frac{1}{s^2}$ is LT of $x$. Using the shifting property, $\frac{1}{(s-\alpha)^2}$ is the LT of $xe^{\alpha x}$
|
|
$s^2Y(s)-s\underbrace{ y(0) }_{ =0 }-\underbrace{ y'(0) }_{ =0 }-Y(s) =\frac{1}{(s-1)^2}$
|
|
Isolate $Y(s)$ :
|
|
$(s^2-1)Y(s)=\frac{1}{(s-1)^2}$
|
|
$Y(s)=\frac{1}{(s-1)^2(s^2-1)}$
|
|
$Y(s)=\frac{1}{(s-1)^2(s-1)(s+1)}$
|
|
Partial fraction time:
|
|
$Y(s)=\frac{1}{(s-1)^3(s+1)}=\frac{A}{s-1}+\frac{B}{(s-1)^2}+\frac{C}{(s-1)^3}+\frac{D}{s+1}$
|
|
$\frac{{A(s-1)^2(s+1)+B(s-1)(s+1)+C(s+1)+D(s-1)^3}}{(s-1)^3(s+1)}$
|
|
$\begin{matrix}A+D=0 \\A-2A+B-3D=0 \\ A-2A+B-B+C+3D=0 \\ A-B+C-D=1\end{matrix}$
|
|
We can express this linear system as a matrix:
|
|
$\begin{bmatrix}1 & 0 & 0 & 1 & 0 \\-1 & 1 & 0 & -3 & 0 \\-1 & 0 & 1 & 3 & 0 \\ 1 & -1 & 1 & -1 & 1\end{bmatrix}$
|
|
Solving this matrix is a PITA. you could use row reduction or Cramer's rule.
|
|
However, I happen to know that adding all four gives an equation for $C$ alone. We are lucky, this is not always the case.
|
|
$0+0+2C+0=1 \qquad \implies C=\frac{1}{2}$
|
|
Add equations 1 and 3:
|
|
$C+4D=0 \qquad\qquad\ \ \ \implies D=\frac{-1}{8}$
|
|
equation 3:
|
|
$-A+C+3D=0 \qquad \implies A=\frac{1}{2}-\frac{3}{8}=\frac{1}{8}$
|
|
equation 2:
|
|
$-A+B-3D=0 \qquad \implies B=\frac{1}{8}-\frac{3}{8}=-\frac{1}{4}$
|
|
|
|
Plug into expression then take inv LT to obtain y(x):
|
|
$y(x)=\frac{1}{8}e^x-\frac{1}{4}xe^x+\frac{1}{4}x^2e^x-\frac{1}{8}e^{-x}$
|
|
substitute back $x=t-2$
|
|
$$y(t)=\frac{1}{8}e^{t-2}-\frac{1}{4}(t-2)e^{t-2}+\frac{1}{4}(t-2)^2e^{t-2}-\frac{1}{8}e^{-(t-2)}$$
|
|
all done!
|
|
#end of lec 17 #start of lec 18
|
|
#ex #LT #IVP
|
|
Solve the following equation using LT:
|
|
$$y''+ty'-2y=2 \qquad y(0)=y'(0)=0$$
|
|
hit it with the LT!
|
|
$\mathcal{L}\{y''\}+\mathcal{L}\{ty'\}-2\mathcal{L}\{y\}=\frac{2}{s}$
|
|
$s^2Y(s)-s\cancelto{ 0 }{ y(0) }-\cancelto{ 0 }{ y'(0) }-\frac{d}{ds}\mathcal{L}\{y'\}-2Y(s)=\frac{2}{s}$
|
|
$s^2Y-\frac{d}{ds}(sY(s)-\cancelto{ 0 }{ y(0) })-2Y=\frac{2}{s}$
|
|
apply product rule:
|
|
$s^2Y-3Y-s\frac{dY}{ds}=\frac{2}{s}$
|
|
^ Boooo! another differential equation! :(
|
|
$\frac{dY}{ds}$ lies in the s "phase space"
|
|
$-s\frac{dY}{ds}+s\left( s-\frac{3}{s} \right)Y=\frac{2}{s}$
|
|
This is a linear equation!
|
|
divide both sides by $-s$ to get it in standard form
|
|
$\frac{dY}{ds}-\left( s-\frac{3}{s} \right)Y=-\frac{2}{s^2}$
|
|
compute integrating factor:
|
|
$\mu(s)=e^{-\int (s-3/s) \, ds}=e^{-s^2/2}e^{\ln{s^3}}=s^3e^{-s^2/2}$
|
|
> ^interesting, why no abs() when integrating $\frac{1}{s}$ ?
|
|
|
|
recall, $(\mu Y)'=\mu(s)Q(s)$ according to linear equation solving technique.
|
|
However, you could also continue from here using the formula $Y(s)=\frac{1}{\mu(s)}\int \mu(s) Q(s) \, ds$
|
|
$\frac{d}{ds}(s^3e^{-s^2/2}Y)= \underbrace{ -2se^{-s^2/2} }_{ \mu(s)Q(s) }$
|
|
integrate both sides:
|
|
$s^3e^{-s^2/2}Y=-2\int se^{-s^2/2} \, ds$
|
|
use u sub:
|
|
$u=\frac{s^2}{2} \qquad du=sds$
|
|
$=-2\int e^{-u} \, du$
|
|
$s^3e^{-s^2/2}Y=2e^{-s^2/2}+C$
|
|
$Y(s)=\frac{2}{s^3}+C \frac{e^{s^2/2}}{s^3}$
|
|
Is this even a legitimate thing to take an inverse of?
|
|
The lim of the expression approaches inf as s approaches inf due to the exponential.
|
|
So what do we do? Well we have that $C$ term. We have to set $C=0$
|
|
then:
|
|
$Y(s)=\frac{2}{s^3}$
|
|
$$y(t)=t^2$$
|
|
We just solved a new equation that hasn't fit into our previous equation types using LT. How cool is that!
|