From fd0ae2345dd22e7f903ffe24499f42265cce51e2 Mon Sep 17 00:00:00 2001 From: algasami <105358814+algasami@users.noreply.github.com> Date: Sat, 22 Jun 2024 10:03:30 +0800 Subject: [PATCH] approx --- app/content/posts/20240621-precalc-zh-tw.mdx | 84 +++++++++++++++++++ app/content/posts/20240621-precalc.mdx | 87 ++++++++++++++++++++ 2 files changed, 171 insertions(+) diff --git a/app/content/posts/20240621-precalc-zh-tw.mdx b/app/content/posts/20240621-precalc-zh-tw.mdx index 31a9217..5ec6b0e 100644 --- a/app/content/posts/20240621-precalc-zh-tw.mdx +++ b/app/content/posts/20240621-precalc-zh-tw.mdx @@ -111,3 +111,87 @@ f(x) = a^x = e^{\ln(a)x} \\ ``` 。上述技巧其實就是連鎖律喔! + +## 線性估計 + +給定函數$f, f(x)$,其在$(r, f(r))$的線性估計(直線)為$y = f'(r)(x-r)+f(r) = g(x)$。 + +### 好用表 + +```math +(1+x)^r \approx 1 + rx \text{ where } x \rightarrow 0 +``` + +```math +\sin(x) \approx x \text{ where } x \rightarrow 0 +``` + +```math +\cos(x) \approx 1 \text{ where } x \rightarrow 0 +``` + +```math +e^x \approx 1 + x \text{ where } x \rightarrow 0 +``` + +```math +\ln(1+x) \approx x \text{ where } x \rightarrow 0 +``` + +### 推導 + +```math +(1+x)^r \approx (1+0)^r + r(1+0)^{r-1}x=1+rx +``` + +```math +\sin(x)\approx \sin(0) + \cos(0)x = x +``` + +```math +\cos(x)\approx \cos(0) + -\sin(0)x = 1 +``` + +```math +e^x \approx e^0 + e^0 x = 1 + x +``` + +```math +\ln(1+x) \approx \ln(1) + \frac{x}{1+0}=x +``` + +## 二次估計 + +設定函數$f(x)=ax^2+bx+c$,查看其在$x=0$的導數, + +```math +f(0)=c, +f'(0)=b, +f''(0)=2a +``` + +可以用來表示$f(x) = f(0) + f'(0)x + f''(0)x^2 \cdot (2!)^{-1}$。 +推廣這心得,我們得到對於函數在$x=r$的二次估計為 + +```math +f(x) \approx f(r) + \frac{f'(r)(x-r)^1}{1!} + +\frac{f''(r)(x-r)^2}{2!} +``` + +$f$的二次估計為$Q(f)$。 + +## 估計定理 + +```math +Q(f(x) \cdot g(x)) = Q(Q(f(x))\cdot Q(g(x))) +``` + +## 泰勒級數 + +由上面的估計不難看出規則,對於函數$f$在$x=r$的估計而言, + +```math +f(x) = f(r) + \sum^{\infty}_{n=1}{\frac{f^{(n)}(x) \cdot (x-r)^n}{n!}} +``` + +,稱為泰勒級數。 diff --git a/app/content/posts/20240621-precalc.mdx b/app/content/posts/20240621-precalc.mdx index 2372178..efa3d4f 100644 --- a/app/content/posts/20240621-precalc.mdx +++ b/app/content/posts/20240621-precalc.mdx @@ -117,3 +117,90 @@ so for function $f$, ``` . The above technique is actually chain rule if you look closely! + +## Linear Approximation + +Given function $f(x)$, the linear approximation (tangent lines) at +$(r, f(r))$ is $y = f'(r)(x-r)+f(r) = g(x)$. +($f'$ is the derivative of $f$) + +### Cheatsheet + +```math +(1+x)^r \approx 1 + rx \text{ where } x \rightarrow 0 +``` + +```math +\sin(x) \approx x \text{ where } x \rightarrow 0 +``` + +```math +\cos(x) \approx 1 \text{ where } x \rightarrow 0 +``` + +```math +e^x \approx 1 + x \text{ where } x \rightarrow 0 +``` + +```math +\ln(1+x) \approx x \text{ where } x \rightarrow 0 +``` + +### Deduction + +```math +(1+x)^r \approx (1+0)^r + r(1+0)^{r-1}x=1+rx +``` + +```math +\sin(x)\approx \sin(0) + \cos(0)x = x +``` + +```math +\cos(x)\approx \cos(0) + -\sin(0)x = 1 +``` + +```math +e^x \approx e^0 + e^0 x = 1 + x +``` + +```math +\ln(1+x) \approx \ln(1) + \frac{x}{1+0}=x +``` + +## Quadratic Approximation + +Think of a function $f(x)=ax^2+bx+c$, we want to see its derivatives at $x=0$: + +```math +f(0)=c, +f'(0)=b, +f''(0)=2a +``` + +which can represent $f(x)$ as $f(0) + f'(0)x + f''(0)x^2 \cdot (2!)^{-1}$. +Generalizing this observation, we can get that the quadratic approximation at $x=r$ is + +```math +f(x) \approx f(r) + \frac{f'(r)(x-r)^1}{1!} + +\frac{f''(r)(x-r)^2}{2!} +``` + +The notation for quadratic approximation of function $f$ is $Q(f)$. + +## Approximation Laws + +```math +Q(f(x) \cdot g(x)) = Q(Q(f(x))\cdot Q(g(x))) +``` + +## Taylor Series + +It's not particularly difficult to see the pattern from above approximations. For function $f$, its +approximation at $x=r$ would be + +```math +f(x) = f(r) + \sum^{\infty }_{n=1}{\frac{f^{(n)}(x) \cdot (x-r)^n}{n!}} +``` + +, which is called Taylor series.