# 微積分不熟整理
## 夾擠定理
If a 屬開區間,$f(x)\le g(x) \le h(x)$, $\lim \limits_{x \to a}f(x)=L=\lim \limits_{x\to a} h(x)$, then $\lim \limits_{x \to a} g(x)=L$
### ex. prove $\lim \limits_{\theta \to 0} \frac{sin\theta}{\theta}=1$

面積大小:小白三角形<紅單位圓<綠大三角形
$\frac{1}{2}sin \theta <\frac{1}{2}1^2<\frac{1}{2}(1 \times tan\theta)$
$\to sin \theta <1<\frac{sin \theta}{cos \theta}$
$\to 1 <\frac{1}{\theta}<\frac{1}{cos \theta}$
$\to 1 >\frac{sin \theta}{\theta}<cos \theta$
$\because \lim \limits_{\theta \to 0} cos \theta =1$,
by 夾擠定理, $\lim \limits_{\theta \to 0} \frac{sin\theta}{\theta}=1$
## 極限嚴格定義
假設有個函數f(x),想知道在x趨近於a時,f(a)的值會跟$\lim\limits_{x\to a}f(x)$有多接近,故:
$|f(x)-\lim\limits_{x\to a}f(x)|<ε$, $|x-a|<δ$
讀法:給定任意正數 ε ,存在正數δ使得當$0<|x-a|<δ$
時,誤差 $|f(x)- L|< ε$。其中$L$為極限至$a$的值。
## 多變量函數極限的嚴格定義
Let $\lim \limits_{(x, y) \to (a,b)}f(x,y)=l$, for all $ε>0$,
when $0<\sqrt {(x-a)^2+(y-b)^2} <δ$, $\fbox{ |f(x,y)-l|<ε}$成立
:::info
即:
$(x,y)$循各種途徑到達$(a,b)$的極限均為$l$
$(\impliedby只要有一條到達(a,b)的極限不為0,\lim \limits_{(x,y) \to (0,0)}f(x,y)\neq0$
:::
## 連續(Continuity)的條件
1. $f(c)$ is defined
2. $\lim\limits_{x\to c}f(x)$ is exist
3. $\lim\limits_{x\to c}f(x)=f(c)$
### 相關定理: intermediate value theorem(中間值定理)
source: wiki
此定理描述了連續函數在兩點之間的連續性:
Given $f(x)$ is a continuous function on $[a,b]$, if $\exists L \in (f(a), f(b))$ or $f(b), f(a))$, then must $\exists c \in (a,b)$ s.t $f(c)=L$
## 可微分的條件
左極限=右極限
## 微分定義
1. $f^′(x)$$=\lim\limits_{h\to 0}{f(x+h)-f(x) \over h}$
- 通用版。二微也寫成這樣
2. $f^′(a)=\lim\limits_{x\to a}{f(x)-f(a) \over {x-a}}$
- 可證明$x=a$時可微
## 微分容易忘記的題目
### 找切線在點(a,b)
1. 切線公式
$y-b=+m(x-a)$ or $y=b+m(x-a)$
2. 用隱微分找斜率,代入點(小心計算錯誤)
$m=\frac {dy}{dx}|_{(a,b)}$
3. 跟切線垂直的線normal公式:
$y-b=-\frac{1}{m}(x-a)$ or $y=b-\frac{1}{m}(x-a)$
## 全微分in多變數
$z=f(x,y)$
$dz=f_xdx+f_ydy$
## 偏微Chain rule
$z=f(u,v)$, $u=g(x,y)$, $v=h(x,y)$
$\frac {\partial z}{\partial x}= \frac{\partial z}{\partial u} \frac{\partial u}{\partial x} + \frac{\partial z}{\partial v}\frac{\partial v}{\partial y}$
```graphviz
digraph hierarchy {
nodesep=1.0 // increases the separation between nodes
node [color=blue,fontname=Courier,shape=box] //All nodes will this shape and colour
edge [color= black, style=dashed] //All the lines look like this
Z->{u v }
u->{x y}
v->{X Y}
{rank=same;x y} // Put them on the same level
}
```
## 均值定理系列
### 微分版
Let f in [a,b]中連續,在(a,b)可微,則(a,b)內至少有一點c滿足:
$f'(c)=\frac{f(b)-f(a)}{b-a}$
### 積分版
Let f in [a,b]中連續,在(a,b)可微,則(a,b)內至少有一點c滿足:
$f(c)=\frac{1}{b-a}\int _a^bf(x)dx$
## some sum formula:
1. $\sum \limits _{k=1} ^n k^2 = \frac{n(n+1)(n+2)}{6}$
2. $\sum \limits _{k=1} ^n k^3 = [\frac{n(n+1)}{2}]^2$
## 自然對數的性質(Natural Log)
$log_a b=\frac {ln b}{ln a}$
## 自然數$e$
### sources: 微甲DP570
$e=\lim\limits_{n\to 0}(1+x)^{\frac {1}{x}}$
or
$e=\lim\limits_{n\to 0}(1+\frac {1}{x})^n$
or
$e = \sum\limits _{x=0}^\infty \frac {1}{x!}$
#### 變數版
$e^a=\lim\limits_{n\to 0}(1+\frac {a}{x})^n$
or
$e^a = \sum\limits _{x=0}^\infty \frac {a}{x!}$
## 不會的積分:(
$\int x^x dx=\frac {x^{n+1}}{n+1} +C$
$\int x^n \sqrt {a+bx}dx=\frac {2}{b(2n+3)}[x^n(a+bx)^{\frac {3}{2}}-na\int x^{n-1}\sqrt {a+bx}dx]$
## 三角函數-基本中的基本
$sin( {\pi \over 2}) = 1$
$cos({\pi \over 2}) =0$
Why?設想一個單位圓$90^o$的圖形:


$\therefore sinx({\pi \over 2})$$= 1, cos({\pi \over 2})=0$
## 三角函數-半角及雙倍角公式推導
由下圖推來(from **《Q.E.D-i.i.f》**)

1. $sin(2x)=sinx\times cosx+cosx\times sinx$(見橘色部分)
2. $cos(2x)=cosx\times cosx-sinx\times sinx$(見藍色部分)
- $cos(2x)=cos^2x-sin^2x+$<font color=orange
size=3>$2sin^2x-2sin^2x$</font>
$2sin^2x=1-cos(2x)$
$sin^2x={1-cos(2x)\over 2}$
- $cos(2x)=cos^2x-sin^2x-$<font color=orange
size=3>$2cos^2x+2cos^2x$</font>
$2cos^2x=1+cos(2x)$
$cos^2x={1+cos(2x)\over 2}$
3. $sin(A+B)=sinA\times cosB+cosA\times sinB$(見橘色部分,角A為棕色底線部分)
4. $cos(A+B)=cosA\times cosB-sinA\times sinB$(見藍色部分,角A為棕色底線部分)
## 三角函數微積分
### 基本型
$\int sinxdx = -cosx + C$
> since $(cosx)^{\prime} = sinx$
$\int cosxdx = sinx + C$
> since $(sinx)^{\prime} = sinx$
$\int sec^2xdx = tanx + C$
$\int tanxdx$ = $\ln{\lvert secx \lvert} + C$
> since $(tanx)^{\prime} = sec^2x$
$\int secxdx$ = $\ln{\lvert secx + tanx \lvert} + C$
> since $(secx)^{\prime} = tanxsecx$
### 遇到變化題可用公式
$sim^2x + cos^2x = 1$
>用在只有sin跟cos的題目
$sin^2x = {1 - cos(2x) \over 2}$
$cos^2x = {1 + cos(2x) \over 2}$
- come from $cos(2x) = 2cos^2x -1 = 1- 2sin^2X$
>用在只有sinc或cos,且次方很高時
$sinxcosx = { sin(2x) \over 2}$
$tan^2x +1 =sec^2x$
>用在只有tan跟sec,且其中一方為偶數時
## 反三角函數
記做arsin、arcos、artan...等。
## 雙曲函數
#### 是甚麼?
- 類似三角函數的東西,__但與三角函數來自單位圓合成的三角形不同,它來自雙曲線__,簡寫做sinh、cosh、tanh、sech...等。
- 微分規則同三角函數的規則。
#### 長相
- sinh
$sinhx = {e^x -e^{-x} \over 2}$
- cosh
$coshx = {e^x +e^{-x} \over 2}$
- tanh (= ${sinh \over cosh}$)
$tanhx = {e^x -e^{-x} \over e^x +e^{-x}}$
- sech (= ${1 \over cosh}$)
$sechx = {2 \over e^x +e^{-x}} = {2e^x \over e^{2x}+1}$
- coth (= ${cosh \over sinh}$)
$cotx = {e^x +e^{-x} \over e^x -e^{-x}}$
-----
## 分部積分
### 正規表達
$\int udv = uv -\int v du$
### 快速: DI method
-----
## 部分分式 partial fraction
$\int{P(x)\over{Q(x)}}dx$,**如果$P(x)$的次方$<Q(x)$的次方,且$Q(x)$可化為兩個以上的多項式,則可使用**。For example: <br>
$\int{2x+1\over{x^2-4}}dx$
= $\int{2x+1\over{(x+2)(x-2)}}dx$
**原則:頭上的未知數次方會比分母小**,in this example:
let A, B as 常數
$\int{2x+1\over{X^2-4}}dx$ = $\int{A\over{x+2}}dx$ + $\int{B\over{x-2}}dx$
解聯立:
$2x+1$
= $(x+2)A + (x-2)B$
= $x(A+B)+2(A-B)$
$A = {5\over 4}$, $B={3\over4}$
回到原式:
$\int{2x+1\over{X^2-4}}dx$ = $\int{1\over{x+2}}\times {5\over 4}dx$ + $\int{1\over{x-2}}\times{3\over4} dx$
照常積分即可。
## 多變量積分小技巧
1. 分不清楚哪條多項式在上: 抽出符合x/y軸中的一點查看。
2. 無法積分時: 先知道(x,y)的domain, 再變換(x,y)積分順序試試。
## 級數收斂發散
### 基本檢查
級數:$\sum \limits _{n=c}^{\infty}a_n$
$\lim \limits_{n \to \infty}a_n=0$
這個不行就代表必定發散。
### 幾何級數注意事項
- r需<1,否則可能依然為發散。
### derict test
不太會 略過
### intergal test
$\sum \limits _{n=c}^{\infty}a_n \le \int _{c}^{\infty}a_n dx$
-可以抓出級數收斂的大概範圍,但不能確定是這個值。
### compare test
> $\sum \limits _{n=c}^{\infty}a_n$需為**非負值**。
- $\sum \limits _{n=c}^{\infty}a_n$收斂 if 有個收斂級數$\sum \limits _{n=c}^{\infty}c_n$,且$a_n \le c_n$,則$a_n$收斂。
- $\sum \limits _{n=c}^{\infty}a_n$發散 if 發散數列$\sum \limits _{n=c}^{\infty}d_n$,且$d_n<a_n$。
### limit comparsion test
- if $\lim \limits _{n \to \infty} \frac {a_n}{b_n}=c>0$, then both are coverge or both diverge.
- if $\lim \limits _{n \to \infty} \frac {a_n}{b_n}=0$, and $\sum b_n$ coverges, then $\sum a_n$ coverges.
- if $\lim \limits _{n \to \infty} \frac {a_n}{b_n}=\infty$, and $\sum b_n$ diverges, then $\sum a_n$ diverges.
### ratio test and root test
$\lim \limits _{n \to \infty} \frac {a_{n+1}}{a_n}=p$
$\lim \limits _{n \to \infty} \sqrt[n] a_n=p$
- if $p<1$, converges.
- if $p>1$, diverges.
- if $p=1$,不知道答案要換test。
## 微積分面積公式們
真的太容易忘記or搞錯使用時機拉~~
表格版
| 求取類別 | xy座標 | xy=t座標 | 極座標 |
| -------- | ------ | ------ | ------ |
| 弧長 | $L=\int ^b _a \sqrt{ 1+ [\frac {dy}{dx}]^2dx}$ | $L=\int ^b _a \sqrt {(\frac{dx}{dt})^2+(\frac {dy}{dx})^2}dt$ | $L=\int _{\alpha}^{\beta}\sqrt {[\frac{dr}{d\theta}]^2+[r(\theta)]^2}$ |
| 面積 | you know | you know | $A=\int _{\alpha}^{\beta}\frac{1}{2}r^2d\theta$ |
| 旋轉體表面積(以繞X軸為例)(the area of the surface) | $S=2 \pi \int^b _a y\sqrt {1+ (\frac{dy}{dx})^2}dx$ | $S=2\pi \int^b_ay \sqrt {(\frac{dx}{dt})^2+(\frac{dy}{dt})^2}dt$ | $S=2\pi\int _{\alpha}^{\beta}rsin\theta\sqrt {[\frac{dr}{d\theta}]^2+[r(\theta)]^2}$ |
| 體積 | | | |
| 旋轉體積(volumn) | $V=\pi \int^b_a[f(x)]^2dx$,其中[a,b]為x的定義域 | $V=\pi \int^b_a[f(x)]^2dx$,其中[a,b]為x的定義域 | |
### 旋轉體積
> 題目沒有提到surface之類的字眼, 但又要轉軸時可能就是
*EX.* Find the volumne of the solid obtained by rotating the region bounded by the following curve about the x-axis:
$y=|x-2|, y=0, x=-3, x=0$
解法第一步驟都是先畫圖
#### 旋轉單一函數的面積公式
以轉x軸為例
$V=\pi \int^b_a[f(x)]^2dx$
其中[a,b]為x的定義域
### 旋轉體的表面積
*EX.* Find the area of the surface generated by rotating the parametric curve $x=\theta - sin\theta$, $y=1-cos\theta$, $0\le \theta \le 2\pi$, about the $x-axis.$
#### 繞X軸轉
##### x與y等於t的函數版
if $f(x)$ and $g(x)$ 在t=a, t=b 處相交
$S=2\pi \int ^b_a y \sqrt {[f’(t)]^2+[g’(t)]^2}dt=2\pi \int^b_ay \sqrt {(\frac{dx}{dt})^2+(\frac{dy}{dt})^2}dt$
##### y等於x的函數版
$S=2 \pi \int^b _a y\sqrt {1+ (\frac{dy}{dx})^2}dx$
#### 繞Y軸轉
#### x與y等於t的函數版
$S=2\pi \int^b_a x \sqrt{ (\frac{dx}{dt})^2+(\frac{dy}{dt})^2}dt$
- $\sqrt {(\frac{dx}{dt})^2+(\frac{dy}{dt})^2}$ 為線長度
- 因為是繞一圈, 所以要乘以$2\pi$
### 極座標曲線的面積
#### 單條線面積
$r=f(\theta)$
$A=\int _{\alpha}^{\beta}\frac{1}{2}[f(\theta)]^2d\theta=\int _{\alpha}^{\beta}\frac{1}{2}r^2d\theta$ 相當於$\int _{\alpha}^{\beta} \frac{1}{2}r^2 d\theta$
- $\frac{1}{2}r^2$ 為扇形面積公式
#### 兩條極座標曲線圍成的面積
$A=\frac {1}{2}\int _{\alpha}^{\beta} [f(\theta)]^2-[g(\theta)]^2d\theta$
### 待分類的面積公式
#### $z=f(x,y)$面積公式:
$A=\int \int _R \sqrt{[f_x(x,y)]^2+[f_y(x,y)]^2+1}dA$, where $R$ is domain of (x,y)
#### $y=g(x,z)$面積公式:
$A=\int \int _R \sqrt {[g_x(x,z)]^2+[f_z(x,z)]^2+1}dA$, where $R$ is domain of (x,z)
#### $x=h(y,z)$面積公式:
$A=\int \int _R \sqrt{[h_y(y,z)]^2+[h_z(y,z)]^2+1}dA$
## 長度公式們
### 弧長
*EX.* Find the arc lenth of the level cuvre $x^{\frac{2}{3}}+y^{\frac{2}{3}}=1$.
#### 弧長公式 in [a,b]
##### y等於x的函數版
$L=\int ^b _a \sqrt{ 1+ [\frac {dy}{dx}]^2dx}$
##### x與y等於t的函數版
$L=\int ^b _a \sqrt {(\frac{dx}{dt})^2+(\frac {dy}{dx})^2}dt$
## 梯度(gradient)與找相對極值max/min. value
$\nabla f(x,y)=f_x(x,y)i+f_y(x,y)j$, (偏微x and y 的線性組合)
> i, j只是用來表示它們的線不同條, 不具變數意義
有時會用頭上畫一條線表示向量
### 求絕對的極值critical point
$z=f(x,y)$, Let critical point is exist at (a,b), then:
1. $f_x(a,b)$ or $f_y(a,b)$ **Do Not Exist**
2. $f_x(a,b)=f_y(a,b)$=0
:::info
:information_source: 基本都用2.來求critical point。
:::
### 公式檢驗方式
$D(x,y)=f_{xx}(x,y)f_{yy}(x,y)-f^2_{xy}(x,y)$
- $f_{xx}(x,y):$
- $f_{yy}(x,y):$
- $f_{xy}(x,y):$
**desion rule:**
- $D(a,b)>0$ and $f_{xx}(a,b)<0 \to$ relative maximum value.
- $D(a,b)>0$ and $f_{xx}(a,b)>0 \to$ relative minimum value.
- $D(a,b)<0 \to$ (a, b, $f[(a,b)]$) is saddle point.(鞍點)
- $D(a,b)=0\to$ No conclusion.
### 拉格朗日插值法in f(x,y,z)
目的:在限制條件$g(x,y,z)=k$下求極值
*Step*
1. $\nabla f(x,y,z)=\lambda \nabla g(x,y,z)$ and find x, y, z, $\lambda$,具體來說:
- $\frac{\partial}{\partial x}f(x,y,z)=\frac {\partial}{\partial x}\lambda g(x,y,z)$
- $\frac{\partial}{\partial y} f(x,y,z)=\frac {\partial}{\partial y}\lambda g(x,y,z)$
- $\frac{\partial}{\partial z} f(x,y,z)=\frac {\partial}{\partial z}\lambda g(x,y,z)$
- $\frac{\partial}{\partial \lambda} f(x,y,z)=\frac {\partial}{\partial \lambda}\lambda g(x,y,z)=g(x,y,z)$
2. x,y,z,$\lambda$ 代回去找誰是最大or最小
3. 最大為relative max., 最小為relative min. in 限制條件
::: info
- if 有兩條限制式,就再加一個變數$\mu$:
$\nabla f(x,y,z)=\lambda \nabla g(x,y,z)+\mu \nabla h(x,y,z)$
- if 限制條件為$g(x,y,z) \le k$ or $g(x,y,z)\ge k$:
- find f(x,y,z)的 critial point
- 如果有滿足$g(x,y,z) \le k$ or $g(x,y,z)\ge k$則列入候選名單
- Let $g(x,y,z)=k$, 繼續插值$f(x,y,z)=\lambda g(x,y,z)$
– 找最大最小時也加入crital point 比較
:::
### 全微分變化題目
**if $y=x\frac{dy}{dx}-x^2cosx$ and $y(\frac{\pi}{2})=\frac{\pi}{2}$, find y and
$y(\frac{\pi}{3})$**
#### 考點:微甲15.2
$sol.$
標準公式:
$\frac{dy}{dx} + P(x)y=Q(x)$
$V(x)=e^{\int P(x)dx}$
$y=\frac{1}{V(x)}\int V(x)Q(x)dx$
*step1*
化為標準公式:
$\frac{dy}{dx}-\frac{1}{x}y=xcosx$
$P(x)=-\frac{1}{x}$, $Q(x)=xcosx$
*step2*
找出$V(x)=e^{\int P(x)dx}$
::: info
note: 此積分不用+C, 後面會處理
:::
$\int P(x)dx=-lnx$
$V(x)=e^{\int P(x)dx}=\frac{1}{x}$
*step3*
$y=\frac{1}{V(x)}\int V(x)Q(x)dx$
$y=x\int cosxdx=x(sinx+C)$
*step4*
求C跟$y\frac{pi}{3}$
已知$y(\frac{\pi}{2})=\frac{\pi}{2}\to y=\frac{\pi}{2}, \ x=\frac{\pi}{2}$代入
$\frac{\pi}{2}=\frac{\pi}{2}(sin(\frac{\pi}{2})+C)$
$C=1-1=0$
$y(\frac{\pi}{3})=\frac{\pi}{3}sin(\frac{\pi}{3})=\frac{\pi}{3}\frac{\sqrt 3}{2}=\frac{\pi \sqrt 3}{6}$
### 反函數定理與性質
Let $f$ is 1-1, then exist $f^{-1}=g(x)$, such that:
$g[f(x)]=f[g(x)]=x$
#### 特質:
1. $g'(x)=\frac{1}{f'[g(x)]}$
2. if f 在 $x=c$ 處可微+$f'(c)\neq 0$,則$f^{-1}(c)$ also 可微(i.e 左極限=右極限)