2023-10-07 23:56:36 -06:00
# Variation of parameters
>[Professors definition/derivations during lecture](prof-variation-of-parameters.html) < - I found this to be too big brain for me . Here is a simplified definition:
2023-09-27 10:58:42 -06:00
2023-10-07 23:56:36 -06:00
## Variation of parameters is a method to solve:
## $$ay''+by'+cy=f(t)$$
2023-10-08 15:14:20 -06:00
#voparam
2023-10-07 23:56:36 -06:00
First, find the homogenous solution:
$y_{h}=c_{1}y_{1}(t)+c_{2}y_{2}(t)$
Now we need the particular solution, let $y_{p}$ be in the following form:
$y_{p}(t)=v_{1}(t)y_{1}(t)+v_{2}(t)y_{2}(t)$ < - btw $ y_ { 1 } $ and $ y_ { 2 } $ are often called a fundamental pair . They are obtained from your homogenous solution .
Impose the following:
1) $v_{1}'y_{1}+v_{2}'y_{2}=0$
Compute the derivatives and simplify:
2023-10-08 11:43:02 -06:00
$y_{p}'=v_{1}y_{1}'+v_{2}y_{2}'$
2023-10-07 23:56:36 -06:00
$y_{p}''=v_{1}'y_{1}'+v_{1}y_{1}''+v_{2}'y_{2}'+v_{2}y_{2}''$
Now we plug those into the second order equation and simplify:
2) $v_{1}'y_{1}'+v_{2}'y_{2}'=\frac{f(t)}{a}$
We now have a system of two equations (1 and 2). Now we can solve for $v_{1}$ and $v_{2}$:
Using Cramer's rule, we can solve for the system of equations and obtain the solutions:
$v_{1}'=-\frac{{f(t)y_{2}(t)}}{aW[y_{1},y_{2}]}$; $v_{2}'=\frac{{f(t)y_{1}(t)}}{aW[y_{1},y_{2}]}$ < - integrate both sizes to get $ v_ { 1 }$ and $ v_ { 2 }$. When integrating , you don ' t need to add a generic constant .
a lso, $W[y_1,y_{2}]$ is the Wrońskian, and it equals to: $\det \begin{pmatrix}y_{1}& y_{2}\\ y_{1}' & y_{2}'\end{pmatrix}=y_{1}y_{2}'-y_{2}y_{1}'$
Finally, the general solution is:
$$y(t)=y_{h}+y_{p}\qquad \text{where}\qquad y_{p}(t)=v_{1}(t)y_{1}(t)+v_{2}(t)y_{2}(t)$$
## What you need to remember
2023-10-08 11:43:02 -06:00
#remember
2023-10-07 23:56:36 -06:00
So, what do you need to commit to memory? I believe memorizing these three is a good tradeoff between memory allocated and speed for when you're solving a #voparam problem:
1) $y_{p}(t)=v_{1}(t)y_{1}(t)+v_{2}(t)y_{2}(t)$
2) $v_{1}'=-\frac{{f(t)y_{2}(t)}}{aW[y_{1},y_{2}]}$
3) $v_{2}'=\frac{{f(t)y_{1}(t)}}{aW[y_{1},y_{2}]}$
Alternatively, you could memorize the system of equations and solve for $v_{1}'$ and $v_{2}'$. Ie:
1) $y_{p}(t)=v_{1}(t)y_{1}(t)+v_{2}(t)y_{2}(t)$
2) $v_{1}'y_{1}+v_{2}'y_{2}=0$
3) $v_{1}'y_{1}'+v_{2}'y_{2}'=\frac{f(t)}{a}$
This is what the prof likes. I love you Dr. Minev, but this I personally disagree with. I think I'll stick with the formulas.
---
#ex #second_order #IVP #voparam #mouc
2023-10-08 15:14:20 -06:00
Solve the IVP:
$$y''+4y=2\tan(2t)-e^t \qquad y(0)=0 \qquad y'(0)=\frac{4}{5}$$
2023-10-07 23:56:36 -06:00
Can we use undetermined coefficients? Yes and no. We can use it on the $e^t$ term. However, guessing and checking $y_{p}$ for the $2\tan(2t)$ term might take a really, really long time.
First, find general solution to homogenous counterpart:
$y''+4y=0$ -> $r^2+4=0$ -> $r_{1,2}=\pm 2i$
$y_{h}(t)=c_{1}\cos(2t)+c_{2}\sin(2t)$ Done. Easy peasy.
For $-e^t$ lets use method of undetermined coefficients:
$y''+4y=-e^t$
$y_{p_{1}}(t)=Ae^{t}$
2023-09-27 10:58:42 -06:00
$5Ae^t=-e^t$
$A=-\frac{1}{5}$
2023-10-07 23:56:36 -06:00
$y_{p_{1}}(t)=-\frac{1}{5}e^t$
2023-09-27 10:58:42 -06:00
2023-10-07 23:56:36 -06:00
Now for $2\tan(2t)$, we cannot realistically use method of undetermined coefficients.
Let's use variation of parameters instead:
$y''+4y=2\tan(2t)$
$y_{p_{2}}(t)=v_{1}(t)y_{1}(t)+v_{2}(t)y_{2}(t)$
where $y_{1}=\cos(2t)$, $y_{2}=\sin(2t)$
recall:
$v_{1}'=-\frac{f(t)y_{2}}{aW[y_{1},y_{2}]}$
$v_{2}'=\frac{f(t)y_{1}}{aW[y_{1},y_{2}]}$
plugging in:
$v_{1}'=-\frac{2\tan(2t)\sin(2t)}{(1)(\cos2t(2)\cos2t-\sin2t(-2)\sin2t}=-\frac{2\tan(2t)\sin(2t)}{2\cos^22t+2\sin^22t}=-\tan(2t)\sin(2t)$
$v_{2}'=\frac{2\tan(2t)\cos(2t)}{2}=\sin(2t)$ < - isn ' t it nice how we can reuse our computation for the denominator ? :D
Now we integrate.
$v_{2}=-\frac{1}{2}\cos(2t)$ < - Don ' t add a constant of integration , we want one solution only .
2023-10-03 10:11:20 -06:00
$v_{1}=-\int \frac{\sin^2(2t)}{\cos(2t)} \, dt$
2023-09-27 10:58:42 -06:00
$v_{1}=-\int \frac{{1-\cos^2(2t)}}{\cos(2t)} \, dt$
2023-10-03 10:11:20 -06:00
$v_1=-\int sec(2t) \, dt+\int \cos(2t) \, dt$
2023-09-27 10:58:42 -06:00
$v_{1}(t)=-\frac{1}{2}\ln\mid sec(2t)+\tan(2t)\mid+\frac{1}{2}\sin(2t)$
2023-10-07 23:56:36 -06:00
$y_{p_{2}}(t)=v_{1}(t)\cos(2t)+v_{2}(t)\sin(2t)$
> ^Now you can start to see how guessing $y_{p_{2}}$ would take a really, really long time.
$y(t)=y_{h}(t)+y_{p_{1}}(t)+y_{p_{2}}(t)$
2023-09-27 10:58:42 -06:00
=$c_{1}\cos(2t)+c_{2}\sin(2t)+v_{1}(t)\cos(2t)+v_{2}(t)\sin(2t)-\frac{1}{5}e^t$
2023-10-03 10:11:20 -06:00
is the general answer.
2023-09-27 10:58:42 -06:00
IVP solution:
2023-10-07 23:56:36 -06:00
$y(0)=0=c_{1}-y_{p}(0)=c_{1}-\frac{1}{5} \implies c_{1}=\frac{1}{5}$
$y'(0)=\frac{4}{5}=2c_{2}+v_{1}'(0)+2v_{2}(0)-\frac{1}{5} \implies c_{2}=1$
2023-10-03 10:11:20 -06:00
$$y(t)=\frac{1}{5}\cos(2t)+\sin(2t)-\frac{1}{5}e^t+v_{1}(t)\cos(2t)+v_{2}(t)\sin(2t)$$
2023-09-27 10:58:42 -06:00
2023-10-08 11:43:02 -06:00
#end of lecture 9 #start of lecture 10
2023-10-07 23:56:36 -06:00
#ex #second_order #voparam #mouc
2023-10-08 15:14:20 -06:00
Find the general solution for:
2023-10-01 22:39:08 -06:00
$$y''-2y'+y=e^t\ln(t)+2\cos(t)$$
2023-10-07 23:56:36 -06:00
Find homogenous solution first:
2023-10-01 22:39:08 -06:00
$r^2-2r+1=0$
2023-10-07 23:56:36 -06:00
$r_{1,2}=1$ (repeated root)
2023-10-01 22:39:08 -06:00
$y_{h}(t)=c_{1}e^t+c_{2}te^t$
2) $y_{p}(t)=?$
$y''-2y'+y=2\cos (t)$
2023-10-07 23:56:36 -06:00
let's use method of undetermined coefficients:
$y_{p_{1}}=A\cos(t)+B\sin(t)$ is our guess
$y_{p_{1}}'=-A\sin t+B\cos t$
$y_{p_{1}}''=-A\cos t-B\sin t$
$-A\cos t-B\sin t+2A\sin t-2B\cos t+A\cos t+B\sin t=2\cos t$
$-2B\cos t+2A\sin(t)=2\cos t(t)$
$\implies A=0,\ B=-1$
$y_{p_{1}}=-\sin(t)$
2023-10-01 22:39:08 -06:00
$y''-2y'+y=e^t\ln(t)$ cant use undetermined coefficients, use variation of parameters
2023-10-08 00:22:10 -06:00
$y_{p}''(t)=v_{1}y_{1}+v_{2}y_{2}$
2023-10-01 22:39:08 -06:00
$=v_{1}e^t+v_{2}te^t$
2023-10-08 00:22:10 -06:00
Compute $v_{1}$ and $v_{2}$. This time let's do it using the linear system for practice:
2023-10-07 23:56:36 -06:00
eq1) $e^tv_{1}'+te^tv_{2}'=0$
2023-10-01 22:39:08 -06:00
eq2) $e^tv_{1}'+(te^t+e^t){v_{2}'}=e^t{\ln t}$
2023-10-07 23:56:36 -06:00
subtract eq1 from eq2: $v_{2}'=\ln(t)$
2023-10-01 22:39:08 -06:00
$v_{2}(t)=\int \ln(t) \, dt$
integrate by parts
$=t\ln(t)-\int t\frac{1}{t} \, dt$
$=t\ln(t)-t$ no constant of integration.
compute $v_{1}$ now:
$v_{1}'=-tv_{2}'$
$=-t\ln t$
2023-10-08 00:22:10 -06:00
integrate to get $v_1$:
2023-10-01 22:39:08 -06:00
$v_{1}=-\int t\ln t \, dt$
integrate by parts (btw integration by parts will be the most important integration technique in this course):
$v_{1}=-\frac{1}{2}(t^2\ln t)-\int t^2\frac{1}{t} \, dt$
$=-\frac{1}{2}\left( t^2\ln t-\frac{t^2}{2} \right)=-\frac{1}{2}t^2\ln t+\frac{1}{4}t^2$
$y_{p}''(t)=(\frac{1}{2}t^2\ln t+\frac{1}{4}t^2)e^t+(t\ln t-t)te^t$
$y_{p}(t)=-\sin(t)+\frac{1}{2}t^2\ln(t)e^t-\frac{3}{4}t^2e^t$
general solution is produced by adding the homogenous eq with $y_{p}(t)$
2023-10-08 00:22:10 -06:00
general solution:
$$y(t)=c_{1}e^t+c_{2}te^t-\sin(t)+\frac{1}{2}t^2\ln(t)e^t-\frac{3}{4}t^2e^t$$
We are done.