###### tags: `ClassNote` `必修`
# 工數沒救了 等明年八
## Chapter 2
### 2.6 Wronskian
Wronskian 是用來證明$y_1$&$y_2$是否為線性獨立
$W(y_1(x),y_2(X)) = y_1y_2'-y_1'y_2$
If $W(y_1(x),y_2(x)) \neq 0$ Then $y_1$&$y2$ independent
### 2.7 Nonhomogeneous ODEs
$y'' + py' + qy = 0$ <- This is homogeneous(H)
$y'' + py' + qy = r$ <- This is nonhomogeneous(N)
- (1) The difference(-) of 2 solutions of (N) is a solution of (H)
- (2) The sum(+) of a solution of (H) and a solution of (N) is also a solution of (N)
---
$y_N = y_H + y_P$
$y_H = c_1y_1 + c_2y_2$ (GS of H)
$y_P$ is any aolution of(N)
Ex $y'' + 2y' + 101y = 10.4 e^x$
1. Solve $y'' +2y' + 101y = 0$
$\lambda^2 + 2\lambda + 101 = 0 \\
\lambda = \dfrac {-2 \pm \sqrt{4 -404}}{2} = -1 \pm 10 j \\
y_H = e^{-x} (c_1 \cos 10 x + c_2 \sin 10x)$
2. Find $y_P$
Guess $y_P = ce^x$
$ce^x + 2ce^x + 101ce^x = 10.4e^x \Rightarrow$因為$y_P$為解(部分)因此可帶入y運算
$\Rightarrow c = 0.1, y_P = 0.1e^x, y=e^{-x}(c_1 \cos 10x + c_2 \sin 10x) + 0.1 e^x$
---
**Principle**
Choose $y_p$ similar to $r(x)$ with unknown coefficients and then determine coefficients by substitution
**Basic Rule**
| $r(x)$ | $y_p$ |
| -------------- | ------------- |
| $e^{\alpha x}$ | $ce^{\alpha x}$ |
| $x^n$ | $K_nx^n+K_{n-1}x^{n-1}+\cdots+K_1x+K_0$ |
| $\cos\omega x$ or $\sin\omega x$ | $M\cos\omega x + N\sin\omega x$ |
| $e^{\alpha x}\cos\omega x$ or $e^{\alpha x} \sin \omega x$ | $e^{\alpha x}(M\cos\omega x + N\sin\omega x)$ |
| $e^{\alpha x}x^n$ | $e^{\alpha x}(k_n x^n + \cdots + k_1 x + k_0)$ |
---
Ex1.
$y'' + 4y = 8x^2$
$\lambda^2 + 4 = 0 \Rightarrow \lambda = \pm 2j \\
y_H = c_1 \cos 2x + c_2 \sin 2x$
Let $y_P = k_2x^2 + k_1x + k_0$
$y_P' = 2k_2 x + k_1 \\
y_P'' = 2k_2$
$2k_2 + 4(k_2x^2 + k_1 x +k_0) = 8x^2 \\
\Rightarrow 4k_2x^2 + 4k_1x + (4k_0 + 2k_2) = 8x^2 \\
\begin{split}
\Rightarrow &4k_2 = 8 \Rightarrow k_2 =2\\
&4k_1 = 0 \Rightarrow k_1 =0\\
&4k_0 + 2k_2 = 0 \Rightarrow k_0 = -1
\end{split}$
$y_P = 2x^2 -1\\
y=y_H +y_P\\
y = c_1 \cos 2x + c_2 \sin 2x + 2x^2 -1$
**Modification Rule**
If a term in your choice of $y_P$ is a solution of the homogeneous Eq., then multiply $y_P$ by $x$ (or by $x^2$ if double roots)
---
Ex2.
$y'' - 3y' + 2y = e^x$
$\lambda^2 - 3\lambda + 2=0 \Rightarrow y_H = c_1 e^x + c_2 e^{2x} \\
y_P = ce^x\ ?$
Let $y_P = ce^x \cdot x
y_P' = ce^x + cxe^x \\
y_P '' = 2ce^x + cxe^x \\
y_P '' - 3y_P' + 2y_P = e^x \\
\Rightarrow 2ce^x + cxe^x -3ce^x - 3cxe^x + 2cxe^x=e^x\\
\begin{split}
\Rightarrow -ce^x = e^x \\
\Rightarrow c=-1\\
y_P = -e^x x
\end{split}
\qquad\\ y = y_H + y_P = c_1 e^x + c_2 e^{2x} - xe^x$
**Sum rule**
If $r(x)$ is a sum of the "common" functions, then choose $y_P$ to be the sum of the solution function.
---
Ex.
$y''+ 2y'+5y =1.25 e^{0.5x} + 40 \cos 4x - 55 \sin 4x$
$\lambda^2+2\lambda+5=0\\
\lambda=-1\pm2j\\
y_H=c_1e^{-x}\cos2x+c_2e^{-x}\sin2x\\
y_P=ce^{0.5x}+M\cos4x+N\sin4x\\
y_P'=0.5ce^{0.5x}-4M\sin4x+4N\cos4x\\
y_P''=0.25ce^{0.5x}-16M\cos4x-16N\sin4x$
$y_P''+2y_P'+5y_P=1.25e^{0.5x}+40\cos4x-55\sin4x\\
\Rightarrow (0.25+1+5)ce^{0.5x}+(-16M+8N+5M)\cos4x+(-16N-8M+5N)\sin4x\\
=1.25e^{0.5x}+40\cos4x-55\sin4x$
$6.25c=1.25\Rightarrow c=0.2$
$-11M+8N=40$
$-11N-8M=-55$
$M=0,N=5$
$y=y_H+y_P=c_1e^{-x}\cos2x+c_2e^{-x}\sin2x+0.2e^{0.5x}+5\sin4x$
### 2.10 Variation of Parameters
$y'' + py' + qy = r$,p,q,r are functions of x
$y_P = y_1\int \dfrac{w_1}{w}rdx + y_2\int \dfrac{w_2}{w}rdx$
$w = \begin{vmatrix}
y_1 & y_2\\
y_1' & y_2'\end{vmatrix},\
w_1 = \begin{vmatrix}
0 & y_2\\
1 & y_2'\end{vmatrix},\
w_2 = \begin{vmatrix}
y_1 & 0\\
y_1' & 1\end{vmatrix}$
$y_1 \& y_2$ form a basis of the solutions of $y''+py'+qy=0$
<hr>
Ex.
$y''+y=\sec(x)$ ---> Not common
$\lambda^2+1=0\Rightarrow \lambda=\pm j$
$y_1=\cos x,y_2=\sin x$
$w = \begin{vmatrix}
\cos x & \sin x\\
-\sin x & \cos x\end{vmatrix}=\cos^2x+\sin^2x=1$
$y_P=-\cos x\int \sin x\sec x \ dx+\sin x\int \cos x \sec x \ dx\\
=+\cos x\int\dfrac1{\cos x}d\cos x+\sin x\int dx\\
=\cos x\ln|\cos x|+x \sin x$
$y = c_1\cos x + c_2\sin x + \cos x \ln|\cos x| + x\sin x$
## Chapter 4
### 4.1 System of Differential Equations
| | Dependent V | Independent V | Differential Form | Eq Form |
| -------- | -------- | -------- | -------- | -------- |
| ODE | $y$ | $x$ | $y',y''$... | $y' = f(x,y)$$y'' = f(x,y,y')$|
| PDE | $y$ | $x_1$&$x_2$ | $\frac{dy}{\partial x_1},\frac{dy}{\partial x_2}$... | |
| System of ODE | $y_1$&$y_2$ | $t$ | $y_1',y_2',y_1'',y_2''$... | ?? |
### 4.2 Linear System
**Homogeneous System**
:::warning
以下皆用2nd order DE作為例子
好吧,其實特殊Case大部分都是3rd order DE
:::
$y' = \underline{A}(t)\underline{y}$
Any linear combination of $y^{<1>}$&$y^{<2>}$ is also a solution of homogeneous linear different system
**Consider Homogeneous System with Constant Coefficients**
Let $y = xe^{\lambda t}$
$\underline{Ax}=\lambda \underline{x} \Rightarrow (\underline{A}-\lambda I) = 0$
$\Rightarrow$ 帶入$\lambda$後求出$Nx_1 = Mx_2$
$\underline{x}^{<1>}$ = $\begin{bmatrix} \frac{M}{N} \\
1 \end{bmatrix}$...依此類推出$\underline{x_2}$
$y = C_1 \underline {x}^{<1>} e^{\lambda_1 t} + C_2\underline {x}^{<2>} e^{\lambda_2 t}$
- **如果$\lambda$為重根**
用$(\underline{A}-\lambda I)\underline{u} = \underline{x}$求出$\underline{u}$的值
$y^{<2>} = t\underline{x}^{<1>}e^{\lambda t} + \underline{u} e^{\lambda t}$
- **如果$\lambda$為重根,且最終只解出兩$\lambda$**
用$(\underline{A}-\lambda I)\underline{u} = \underline{x}$求出$\underline{u}$的值
$y^{<3>} = t\underline{x}^{<重根>}e^{\lambda t} + \underline{u} e^{\lambda t}$
- **如果$\lambda$為重根,且其中一$\lambda$可得出兩$\underline{x}$**
把兩$\underline{x}$分別當作 $\underline{x}^{<2>}$ 與$\underline{x}^{<3>}$
$\Rightarrow$成功獲得兩個$\underline{y}$
- **如果$\lambda$是三重根的話**
用$(\underline{A}-\lambda I)\underline{u} = \underline{x}$求出$\underline{u}$的值
用$(\underline{A}-\lambda I)\underline{v} = \underline{u}$求出$\underline{v}$的值
$\underline{y}^{<1>} = \underline{x}e^{\lambda t}$
$\underline{y}^{<2>} = (t \underline{x} + \underline{u})e^{\lambda t}$
$\underline{y}^{<3>} = (\frac{t^2}{2} \underline{x} + t\underline{u} + \underline{v}) e^{\lambda t}$
**Nonhomogeneous System**
$y' = \underline{A}y + \underline{g}$
Solution $y = y_H + y_P \leftarrow y_H$就是上面那個,$y_P$自己設相似的函式(like:$e^{Nt}$ and $te^{Nt}$ ,$\cos{wt}$ and $\sin{wt}$)
$\underline{y_P'} = \underline{A}\underline{y_P} + \underline{g}$
求出的數字帶回原先設的$y_P$就可得到解
## Chapter 5
### 5.1 Power Series
This is a standard method for solving linear DE with variable coefficient
It generally look like this:
$\sum_{m=0}^{\infty} a_m(x - x_0)^{m} = a_0 + a_1(x- x_0) + a_2(x - x_0)^{2}$...
**Convergence of Power Series**
There exist a unmber $R$ such that the series converges at $|x - x_0| < R$ and diverges at $|x - x_0| > R$
1. $R = 0$ $\Rightarrow$The series converges at $x = 0$ for al $x$
2. $R = \infty$
3. $R = \frac{1}{\lim_{m\to 0}|\frac{a_{m+1}}{m} |}$ or $\frac{1}{\lim_{m\to \infty}\sqrt[m]{|a_m|}}$
**Operstion of Power Series**
$f(x) = \Sigma_{m=0}^{\infty} {a_m(x - x_0)^m}$ $g(x) = \Sigma_{m=0}^{\infty} {b_m(x - x_0)^m}$
1. Termwise Addition:
$f(x) \pm g(x) = \Sigma_{m=0}^{\infty} {(a_m \pm b_m)(x - x_0)^m}$
2. Termwise Multiplication:
$f(x)\times g(x) = \Sigma_{m=0}^{\infty}\Sigma_{k=0}^{\infty} {a_k b_{m-k}(x - x_0)^m}$
3. Derivative:
$f(x)' = \Sigma_{m=1}^{\infty} a_m m (x-x_0)^{m-1}$
$f(x)'' = \Sigma_{m=1}^{\infty} a_m m (m -1) (x-x_0)^{m-2}$
$f(x)^{(k)} = \Sigma_{m=k}^{\infty} a_m m (m -1)...(m-k+1) (x-x_0)^{m-k}$
4. Integral:
$\int f(x) dx = \Sigma_{m=0}^{\infty} \frac{a_m}{m+1} (x - x_0)^{m+1} + C$
5. Shifting:
$f(x) = \Sigma_{m=0}^{\infty} a_m(x - x_0)^m = \Sigma_{m =1}^{\infty} a_{m-1} (x - x_0)^{m-1}$
**$f(x_0)^{(k)} = a_k k!$**
**$\Rightarrow a_k = \frac{f(x_0)^{(k)}}{k!}$**
**Solving DE by Power Series**
For $y'' + py' + qy = r$
Steps:
1. Assume $y(x) = \Sigma_{m=0}^{\infty} a_m x^m$
2. Represent $p, q, r$ by power series
3. Try to form a single summation $\Sigma_{m = k}^{\infty}($ $)x^m$
4. We then generate $a_0'+a_1'x+...+a_{k-1}'x^{k-1}+\Sigma_{m = k}^{\infty}($ $)x^m = 0$
5. Equate all the terms$(x^0, x^1...)$ to obtain the "recursive relationship"
---
Ex. $y' + ky = 0$
Let$y = \Sigma_{m=0}^{\infty}a_m x^m$
$\rightarrow$ $\Sigma_{m=1}^{\infty}a_m m x^{m-1} + \Sigma_{m=0}^{\infty} a_m k x^m$
$\rightarrow \Sigma_{m=0}^{\infty}(a_{m+1}(m+1)+k a_m)x^m = 0$
$a_{m+1} = \frac{-k}{m+1} a_m$
$\Rightarrow$求出$a_0,a_1$...後代入原先設的Power serie
### 5.2 Legendre's Differential Equation
:::info
$(1-x^2)y''-2xy'+\underbrace{n(n+1)}_{k}\ \ y=0$
:::
:::danger
窩不知道Legendre到底在幹嘛
所以... :confused:
:::
### 5.3 Forbenius
當$x$ is analytic at $x = 0($也就是$x_0 = 0)$
可用reduction of order 去解power series
**Frobenius Method Basis of solutions: Three Cases**
==Case 1==:$r_1 - r_2$ is not an integer
$y_1 = x^{r_1} (a_0+a_1 x+a_2 x^2 +\dots)$
$y_2 = x^{r_2} (A_0+A_1 x + A_2 x^2 + \dots)$
==Case 2==:$r_1=r_2=r$
$y_1 = x^{r} (a_0+a_1 x+a_2 x^2 +\dots)$
$y_2 = y_1 \ln x + x^{r} (A_0+A_1 x + A_2 x^2 + \dots)$
$A_0 = 0$
==Case 3==:$r_1 - r_2$ is an integer $\neq 0$
$y_1 = x^{r_1}(a_0 + a_1 x +a_2 x^2 + \dots)$
$y_2 = y_1 \ln x \cdot k + x^{r_2} (A_0 + A_1 x + A_2 x^2 + \dots)$
$A_0 \neq 0$
$k$ is a **constant** and can be **zero**
## 窩偷懶一下(反正大一共筆都有了$\quad\Rightarrow$ 快進Laplace!!
## Chapter6
### 6.1 Laplace Transforamation (S-Shift)
$t:$ time
$s:$ freq
For a function $f(t)$, the Laplace transform $F(s)$ is defined as
$F(s)=\mathscr{L}\{f(t)\} = \int_0^\infty f(t)e^{-st}dt$ ( $s$, domain )
$f(t)$ is the ==inverse== of $F(s)$
$f(t)=\mathscr{L}^{-1}\{F(s)\}$
定義
$s \to jw$
$0 \to - \infty$
==$\mathscr{L}\big\{f(t)e^{at}\big\} = F(s - a)$==
**T-Shift**
$\mathscr{L}\big\{ f(t-a)u(t-a)\big\} = e^{-as}F(s)$
**Theorem: Linearity of the Laplace Transform**
For $f(t),g(t)$
$\mathscr{L}\Big\{a \ f(t)+b \ g(t)\Big\}=aF(s)+bG(s)$

### 6.2 Transforms of Derivates and Intergrals. ODEs.
**Transform of Derivative**
$\mathscr{L}\big\{f'(t)\big\}=sF(s)-f(0)$
**Laplace Transform of the Integral of a Function**
$\mathscr{L}\{\int_0^tf(\tau)d\tau\} = \dfrac{F(s)}s$
**Differentiation of Laplace Transforms**
$\quad f(t)\quad \leftrightarrow \quad F(s)$
$\ \ tf(t)\quad \leftrightarrow \quad -\dfrac{d}{ds}F(s)$
$t^nf(t)\quad \leftrightarrow\quad (-1)^nF^{(n)}(s)$
:::warning
解題時大概就是先把$\mathscr{L}$微$n$次$\rightarrow$inverse$\rightarrow$除$t^{n}$
:::
**Integration of Transforms**
$\dfrac{f(t)}{t}\leftrightarrow\int_s^\infty F(\widetilde s)d\widetilde s$