Skip to content

Commit fd0ae23

Browse files
committed
approx
1 parent 71cf242 commit fd0ae23

File tree

2 files changed

+171
-0
lines changed

2 files changed

+171
-0
lines changed

app/content/posts/20240621-precalc-zh-tw.mdx

+84
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,87 @@ f(x) = a^x = e^{\ln(a)x} \\
111111
```
112112

113113
。上述技巧其實就是連鎖律喔!
114+
115+
## 線性估計
116+
117+
給定函數$f, f(x)$,其在$(r, f(r))$的線性估計(直線)為$y = f'(r)(x-r)+f(r) = g(x)$。
118+
119+
### 好用表
120+
121+
```math
122+
(1+x)^r \approx 1 + rx \text{ where } x \rightarrow 0
123+
```
124+
125+
```math
126+
\sin(x) \approx x \text{ where } x \rightarrow 0
127+
```
128+
129+
```math
130+
\cos(x) \approx 1 \text{ where } x \rightarrow 0
131+
```
132+
133+
```math
134+
e^x \approx 1 + x \text{ where } x \rightarrow 0
135+
```
136+
137+
```math
138+
\ln(1+x) \approx x \text{ where } x \rightarrow 0
139+
```
140+
141+
### 推導
142+
143+
```math
144+
(1+x)^r \approx (1+0)^r + r(1+0)^{r-1}x=1+rx
145+
```
146+
147+
```math
148+
\sin(x)\approx \sin(0) + \cos(0)x = x
149+
```
150+
151+
```math
152+
\cos(x)\approx \cos(0) + -\sin(0)x = 1
153+
```
154+
155+
```math
156+
e^x \approx e^0 + e^0 x = 1 + x
157+
```
158+
159+
```math
160+
\ln(1+x) \approx \ln(1) + \frac{x}{1+0}=x
161+
```
162+
163+
## 二次估計
164+
165+
設定函數$f(x)=ax^2+bx+c$,查看其在$x=0$的導數,
166+
167+
```math
168+
f(0)=c,
169+
f'(0)=b,
170+
f''(0)=2a
171+
```
172+
173+
可以用來表示$f(x) = f(0) + f'(0)x + f''(0)x^2 \cdot (2!)^{-1}$。
174+
推廣這心得,我們得到對於函數在$x=r$的二次估計為
175+
176+
```math
177+
f(x) \approx f(r) + \frac{f'(r)(x-r)^1}{1!} +
178+
\frac{f''(r)(x-r)^2}{2!}
179+
```
180+
181+
$f$的二次估計為$Q(f)$。
182+
183+
## 估計定理
184+
185+
```math
186+
Q(f(x) \cdot g(x)) = Q(Q(f(x))\cdot Q(g(x)))
187+
```
188+
189+
## 泰勒級數
190+
191+
由上面的估計不難看出規則,對於函數$f$在$x=r$的估計而言,
192+
193+
```math
194+
f(x) = f(r) + \sum^{\infty}_{n=1}{\frac{f^{(n)}(x) \cdot (x-r)^n}{n!}}
195+
```
196+
197+
,稱為泰勒級數。

app/content/posts/20240621-precalc.mdx

+87
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,90 @@ so for function $f$,
117117
```
118118

119119
. The above technique is actually chain rule if you look closely!
120+
121+
## Linear Approximation
122+
123+
Given function $f(x)$, the linear approximation (tangent lines) at
124+
$(r, f(r))$ is $y = f'(r)(x-r)+f(r) = g(x)$.
125+
($f'$ is the derivative of $f$)
126+
127+
### Cheatsheet
128+
129+
```math
130+
(1+x)^r \approx 1 + rx \text{ where } x \rightarrow 0
131+
```
132+
133+
```math
134+
\sin(x) \approx x \text{ where } x \rightarrow 0
135+
```
136+
137+
```math
138+
\cos(x) \approx 1 \text{ where } x \rightarrow 0
139+
```
140+
141+
```math
142+
e^x \approx 1 + x \text{ where } x \rightarrow 0
143+
```
144+
145+
```math
146+
\ln(1+x) \approx x \text{ where } x \rightarrow 0
147+
```
148+
149+
### Deduction
150+
151+
```math
152+
(1+x)^r \approx (1+0)^r + r(1+0)^{r-1}x=1+rx
153+
```
154+
155+
```math
156+
\sin(x)\approx \sin(0) + \cos(0)x = x
157+
```
158+
159+
```math
160+
\cos(x)\approx \cos(0) + -\sin(0)x = 1
161+
```
162+
163+
```math
164+
e^x \approx e^0 + e^0 x = 1 + x
165+
```
166+
167+
```math
168+
\ln(1+x) \approx \ln(1) + \frac{x}{1+0}=x
169+
```
170+
171+
## Quadratic Approximation
172+
173+
Think of a function $f(x)=ax^2+bx+c$, we want to see its derivatives at $x=0$:
174+
175+
```math
176+
f(0)=c,
177+
f'(0)=b,
178+
f''(0)=2a
179+
```
180+
181+
which can represent $f(x)$ as $f(0) + f'(0)x + f''(0)x^2 \cdot (2!)^{-1}$.
182+
Generalizing this observation, we can get that the quadratic approximation at $x=r$ is
183+
184+
```math
185+
f(x) \approx f(r) + \frac{f'(r)(x-r)^1}{1!} +
186+
\frac{f''(r)(x-r)^2}{2!}
187+
```
188+
189+
The notation for quadratic approximation of function $f$ is $Q(f)$.
190+
191+
## Approximation Laws
192+
193+
```math
194+
Q(f(x) \cdot g(x)) = Q(Q(f(x))\cdot Q(g(x)))
195+
```
196+
197+
## Taylor Series
198+
199+
It's not particularly difficult to see the pattern from above approximations. For function $f$, its
200+
approximation at $x=r$ would be
201+
202+
```math
203+
f(x) = f(r) + \sum^{\infty }_{n=1}{\frac{f^{(n)}(x) \cdot (x-r)^n}{n!}}
204+
```
205+
206+
, which is called Taylor series.

0 commit comments

Comments
 (0)