diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..64bb9c368686f3a9611bfefe5d9a3ccf6db4aa33 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,18 @@ +# 敏感資料(絕對不能上傳) +.env +firebase_key.json + +# Python 快取 +__pycache__/ +*.pyc +*.pyo + +# 開發工具 +.vscode/ +.idea/ +*.ipynb + +# 其他 +other/ +*.docx +*.pdf diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..946c872157f1abbfc19484ca3f43f66831739ee6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,40 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.svg filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..64bb9c368686f3a9611bfefe5d9a3ccf6db4aa33 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# 敏感資料(絕對不能上傳) +.env +firebase_key.json + +# Python 快取 +__pycache__/ +*.pyc +*.pyo + +# 開發工具 +.vscode/ +.idea/ +*.ipynb + +# 其他 +other/ +*.docx +*.pdf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a46f1de797d684b6604fb504670bf71f1d082b0e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.11-slim + +# 設定工作目錄 +WORKDIR /app + +# 先安裝依賴(利用 Docker layer cache,只有 requirements.txt 改變才重建) +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# 複製專案檔案(.dockerignore 會排除 .env、firebase_key.json) +COPY . . + +# HF Spaces 要求 port 7860 +EXPOSE 7860 + +# 用 gunicorn 啟動,timeout 調高因為 build pipeline 需要時間 +CMD ["gunicorn", "app:server", \ + "--bind", "0.0.0.0:7860", \ + "--timeout", "120", \ + "--workers", "1"] diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e9409608cd4c3a3caa3e2ece2e0085029b355920 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +--- +title: Dash-math Database +emoji: ⚡ +colorFrom: pink +colorTo: pink +sdk: docker +pinned: false +--- + +Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..0fdb4b5a20a7e1c9dfa538ea3dd0108bc8232f8d --- /dev/null +++ b/app.py @@ -0,0 +1,128 @@ +""" +app.py +------ +Dash app 進入點。 + +職責(僅此而已): + 1. 建立 Dash app 實例 + 2. 組裝 AppShell layout + 3. 掛載全域 callback(navbar、主題、MathJax) + 4. 啟動 dev server + +Build pipeline(MD → JSON)已移至 build.py。 + - 若希望每次啟動都重建:取消下方 build_if_needed 的 force=True 呼叫 + - 若只想手動重建:直接執行 python build.py --force +""" + +import dash +from dash import Dash, html, dcc +from dash import Input, Output, clientside_callback +import dash_mantine_components as dmc +from pathlib import Path + +from layout.shell.navbar import generate_navbar +from layout.shell.header import generate_header +from layout.shell.main import generate_main +from layout.shell.footer import generate_footer +from layout.shell.callbacks import generate_toggle_navbar, switch_light_dark + +# 確保頁面 section 切換 callback 在啟動時就被註冊 +import layout.page.page_callbacks # noqa: F401 + +# 學生登入元件 +from student_login import create_student_store, create_login_modal, create_student_badge + +# Firebase quiz hooks(答題記錄) +from firebase_quiz_hooks import create_dummy_stores +import firebase_quiz_hooks # noqa: F401 ← 掛載 callback + +# Session 狀態保存(重整後恢復 section、答題、解法)由 assets/session_state.js 處理 +from session_state import create_session_stores + +# Build pipeline:只在啟動時呼叫,不影響 app 本體邏輯 +from build import build_if_needed + +BASE_DIR = Path(__file__).resolve().parent +CONFIG_PATH = BASE_DIR / "paths.json" + +build_if_needed(CONFIG_PATH, force=False) # 只重建比 .md 新的 JSON,加速啟動 + +# --------------------------------------------------------------------------- +# App 實例 +# --------------------------------------------------------------------------- +app = Dash( + __name__, + use_pages=True, + external_stylesheets=dmc.styles.ALL, + suppress_callback_exceptions=True, +) + +# --------------------------------------------------------------------------- +# Callbacks +# --------------------------------------------------------------------------- +generate_toggle_navbar() +switch_light_dark() + +# --------------------------------------------------------------------------- +# Layout 元件 +# --------------------------------------------------------------------------- +header = generate_header() +navbar = generate_navbar() +main = generate_main() +footer = generate_footer() + +layout = dmc.AppShell( + id="appshell", + children=[ + dcc.Store(id="noop-store"), + html.Div(id="theme-dummy", style={"display": "none"}), + + # ── 學生登入相關 ── + create_student_store(), # localStorage 學號 Store + create_login_modal(), # 學號輸入 Modal + *create_dummy_stores(), # Firebase 虛擬 Store + *create_session_stores(), # Session 狀態 Store + + header, navbar, main, footer, + ], + header={"height": "4rem"}, + navbar={ + "width": {"xs": 200, "sm": 250, "md": 300, "lg": 300}, + "breakpoint": "sm", + "collapsed": {"mobile": True, "desktop": False}, + }, + footer={"height": "2rem"}, + padding="lg", +) + +app.layout = dmc.MantineProvider( + id="mantine-provider", + children=layout, + defaultColorScheme="light", +) + +# --------------------------------------------------------------------------- +# MathJax:每次換頁都重新 typeset +# --------------------------------------------------------------------------- +clientside_callback( + """ + function(pathname) { + if (window.MathJax) { + window.MathJax.typeset(); + } + return ""; + } + """, + Output("noop-store", "data"), + Input("_pages_location", "pathname"), +) + +# --------------------------------------------------------------------------- +# 啟動 +# --------------------------------------------------------------------------- +server = app.server # 給 gunicorn 用:gunicorn app:server + +if __name__ == "__main__": + app.run(debug=True) + # 部署時改用: + # app.run(host="0.0.0.0", port=8050, debug=False) diff --git a/assets/Ch14_5_ex4.svg b/assets/Ch14_5_ex4.svg new file mode 100644 index 0000000000000000000000000000000000000000..2c21bcd7bf35c28ab15dff47fa9afb1f8399359a --- /dev/null +++ b/assets/Ch14_5_ex4.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da4cfa0348fdb9581a431ba3c7d141c584c4a05ab582f35efd81dfc02076a5e7 +size 2204 diff --git a/assets/Ch14_5_ex5.svg b/assets/Ch14_5_ex5.svg new file mode 100644 index 0000000000000000000000000000000000000000..98b76d576418b2a30b346c0b4bec2a1a8b1809ee --- /dev/null +++ b/assets/Ch14_5_ex5.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52878918fbf3abed111104c3d1c82e176d4ec754f59a902ff2824624767c975d +size 2311 diff --git a/assets/Ch14_5_ex7.svg b/assets/Ch14_5_ex7.svg new file mode 100644 index 0000000000000000000000000000000000000000..5274a320c9a52529fad171b5ab48f2eda0202d2a --- /dev/null +++ b/assets/Ch14_5_ex7.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f4075790c66b59a3610eef4ae888b3d6fa1a4808c64dd42263096e5ef438fbf +size 3298 diff --git a/assets/Ch14_6_8.svg b/assets/Ch14_6_8.svg new file mode 100644 index 0000000000000000000000000000000000000000..86aea1699d03e1bff2dad329c5075cdf3265c83d --- /dev/null +++ b/assets/Ch14_6_8.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28f311a77046331d56187918f6b2d18531b256c52cc9f4f5761791283a84e122 +size 50490 diff --git a/assets/Ch14_6_ex1.svg b/assets/Ch14_6_ex1.svg new file mode 100644 index 0000000000000000000000000000000000000000..6961abfc1ba4a6cb56ae5b88ddca70d04492c6df --- /dev/null +++ b/assets/Ch14_6_ex1.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ba7a2200d2c16b627ddc0ac9be5ef64fdad37c4b7fd78795c9b28f9d2ef62ad +size 81649 diff --git a/assets/Ch14_6_ex3.svg b/assets/Ch14_6_ex3.svg new file mode 100644 index 0000000000000000000000000000000000000000..c5a8d929e8cf570353e28ac67d19af805bef2ba0 --- /dev/null +++ b/assets/Ch14_6_ex3.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f6e97f78a74c9f5542386d4eed4f6fd7b199e1a16b14a6c6714aaca8dbc05b9 +size 194041 diff --git a/assets/Ch14_6_ex5.svg b/assets/Ch14_6_ex5.svg new file mode 100644 index 0000000000000000000000000000000000000000..ee4545701fb0740dbe39dbaeff8f57d83506febe --- /dev/null +++ b/assets/Ch14_6_ex5.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac275d5be15c21d246394c11658aa954d45ac952d3b50eab4a74e049a799628e +size 126519 diff --git a/assets/Ch14_6_ex6.svg b/assets/Ch14_6_ex6.svg new file mode 100644 index 0000000000000000000000000000000000000000..d4b023d9920e149ed2d9ef2195c50c320bcd4569 --- /dev/null +++ b/assets/Ch14_6_ex6.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ff2907b1af0fb48e1759ce1a85fa7cf79e1ff51943c6c91ef340e5901a6aa73 +size 197533 diff --git a/assets/SaddlePoint.svg b/assets/SaddlePoint.svg new file mode 100644 index 0000000000000000000000000000000000000000..2fe938d9ce7efe2148cb2a1a9e80b86e361967e8 --- /dev/null +++ b/assets/SaddlePoint.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:316ac421a50872a4bf0cef671dd3190eab0ecb84cb3e8bf21b1d8dcd68cc6452 +size 414579 diff --git a/assets/anchor-scroll.js b/assets/anchor-scroll.js new file mode 100644 index 0000000000000000000000000000000000000000..6df0a0a3f12ea96a2a65a9848a050beb13691804 --- /dev/null +++ b/assets/anchor-scroll.js @@ -0,0 +1,43 @@ +(function () { + function cleanIdFromHash(h) { + if (!h) return ""; + var s = h.replace(/^#/, ""); + if (s.startsWith("h-")) s = s.slice(2); + return s; + } + + function scrollToId(id) { + if (!id) return; + var el = document.getElementById(id); + if (!el) return; + // ?? CSS ? scroll-margin-top??????? header ?? + el.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" }); + } + + // 1) ??? #hash ????????????? + window.addEventListener("load", function () { + var id = cleanIdFromHash(location.hash); + if (id) setTimeout(function(){ scrollToId(id); }, 0); + }); + + // 2) hash ????? pushState ?????? + window.addEventListener("hashchange", function () { + var id = cleanIdFromHash(location.hash); + if (id) scrollToId(id); + }); + + // 3) ?????? #fragment ??????????? + document.addEventListener("click", function (e) { + var a = e.target.closest('a[href^="#"]'); + if (!a) return; + var raw = a.getAttribute("href") || ""; + var id = cleanIdFromHash(raw); + if (!id) return; // ????????????????? + var el = document.getElementById(id); + if (!el) return; // ??????? + e.preventDefault(); + scrollToId(id); + // ???? hash????????? + history.pushState(null, "", "#" + id); + }); +})(); diff --git a/assets/chain_tree.svg b/assets/chain_tree.svg new file mode 100644 index 0000000000000000000000000000000000000000..626dc7062a1d85a0f9af1e7b9b62d40747570b01 --- /dev/null +++ b/assets/chain_tree.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dad871bada9dd6ba2cc896b08b217b9bdff84d34ca1be0a205ebd9e58ba5a62f +size 6571 diff --git a/assets/chain_tree_card1.svg b/assets/chain_tree_card1.svg new file mode 100644 index 0000000000000000000000000000000000000000..cf624be3f8ac92c9e2f655dc5e6dfcbd6db3794a --- /dev/null +++ b/assets/chain_tree_card1.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d57bc7fbc702cb9945bdcbf2667d11d212b6f12bb96a3fe78a3bf9ca1d4336a2 +size 4375 diff --git a/assets/ggb.css b/assets/ggb.css new file mode 100644 index 0000000000000000000000000000000000000000..18dd3cfe0343c4d106b01edc5e33b1ab8c070573 --- /dev/null +++ b/assets/ggb.css @@ -0,0 +1,10 @@ +/* 把任何誤蓋在 ggb-wrap 上的透明層都失效 */ +.ggb-wrap * { + pointer-events: auto; +} +.ggb-wrap::before { + content: ""; + position: absolute; + inset: 0; + pointer-events: none; /* 確保沒有匿名覆蓋層攔截 */ +} diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..ba56dccb154eaddd0e4c9afbc6a982a287b52e4b --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:953e00deb0dc8fc3d613ef956b31ca1acb48e288ceb03246afe0510f9255ed87 +size 2936627 diff --git a/assets/mathjax-plotly.js b/assets/mathjax-plotly.js new file mode 100644 index 0000000000000000000000000000000000000000..478d04c41739c656e3d9602ac17ba2f6efd2e1a9 --- /dev/null +++ b/assets/mathjax-plotly.js @@ -0,0 +1,36 @@ +// assets/mathjax-plotly.js +(function () { + function attachListeners() { + function typeset(target) { + try { + if (window.MathJax) { + // v3 + if (typeof window.MathJax.typesetPromise === "function") { + return window.MathJax.typesetPromise([target || document.body]); + } + // v2 + if (window.MathJax.Hub && typeof window.MathJax.Hub.Queue === "function") { + window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, target || document.body]); + } + } + } catch (e) { + console.warn("MathJax typeset failed:", e); + } + } + + document.addEventListener("plotly_afterplot", function (e) { typeset(e.target); }); + document.addEventListener("plotly_relayout", function (e) { typeset(e.target); }); + document.addEventListener("plotly_redraw", function (e) { typeset(e.target); }); + window.addEventListener("load", function () { typeset(document.body); }); + } + + // 如果已經有 MathJax,就只掛事件 + if (window.MathJax) { attachListeners(); return; } + + // 推薦載 v3(tex-svg 渲染器);載完再掛事件 + var s = document.createElement("script"); + s.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"; + s.defer = true; + s.onload = attachListeners; + document.head.appendChild(s); +})(); diff --git a/assets/maximum.svg b/assets/maximum.svg new file mode 100644 index 0000000000000000000000000000000000000000..5a532e9dcec32ba3c37d5fb724c5b67e438121b8 --- /dev/null +++ b/assets/maximum.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bd934a8f9bf01d16c5e8aef9c69c128851d32cf942606e319755bed7ae50d5b +size 446344 diff --git a/assets/partial_derivative.svg b/assets/partial_derivative.svg new file mode 100644 index 0000000000000000000000000000000000000000..e491fe8df6b5f4306d4efafb47748fd9fee39067 --- /dev/null +++ b/assets/partial_derivative.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cda43979d58e8efbc240edf7cede3803de332467cec4edf8008fc031473d62b9 +size 475722 diff --git a/assets/quiz.css b/assets/quiz.css new file mode 100644 index 0000000000000000000000000000000000000000..f8af8f49dbff541561c51ee56543526302246cff --- /dev/null +++ b/assets/quiz.css @@ -0,0 +1,105 @@ +/* ? Radio ?????????????? */ +.quiz-option .mantine-Radio-body { + display: flex; + align-items: center; /* ?????? flex-start????????? */ +} + +/* ????????????????? flex ?? */ +.quiz-option .mantine-Radio-label { + display: inline-flex; + align-items: center; + gap: 4px; /* ?? Python ? inline-flex ? gap ?? */ +} + + + + +/* ???????????????????? marker */ +.math-ol { + counter-reset: mathitem; + list-style: none; /* ???????? 1. 2. 3. */ + margin-left: 1.5rem; /* ????????? */ + padding-left: 0; +} + +.math-ol > li { + counter-increment: mathitem; + display: flex; + align-items: center; /* ????????????????????? */ + gap: 0.5rem; /* ?????????? */ +} + +/* ????? marker */ +.math-ol > li::before { + content: counter(mathitem) "."; + flex: 0 0 auto; + min-width: 1.5rem; /* ???????????? */ + text-align: right; +} + +/* ?????? marker ??????????????????? */ + +/* ?? ListItem??????marker + ?? */ +.mantine-List-item.themed-color { + display: flex; + align-items: center; /* marker ????????? */ +} + +/* ??? span ?????????? "1." "2." ?? marker */ +.mantine-List-item.themed-color > span:first-child { + position: static !important; /* ? render_list ?? absolute ?? */ + left: auto !important; + top: auto !important; + transform: none !important; + + min-width: 1.8rem; /* ???????????? */ + text-align: right; + margin-right: 0.5rem; +} + +/* ??? div ????????????? */ +.mantine-List-item.themed-color > div:last-child { + flex: 1 1 auto; +} + + +/* 讓數學式的顏色跟外層 .themed-color 一樣 */ +.themed-color .katex, +.themed-color .katex * { + color: inherit; +} + + +/* 只調整 \text{} 的字型,跟主題 body font 一致 */ +.katex .text, +.katex .text * { + font-family: var(--mantine-font-family, system-ui, -apple-system, + BlinkMacSystemFont, "Segoe UI", sans-serif); + font-weight: 400; +} + + +/* 讓數學式整體跟隨主題色 */ +.themed-color .katex { + color: inherit !important; +} + +/* 特別是 \text{...} 產生的文字 span */ +.themed-color .katex .text, +.themed-color .katex .mord.text, +.themed-color .katex .mathnormal { + color: inherit !important; +} + + +/* 只調整 KaTeX 裡 \text{} 的字型與大小 */ +.katex .text, +.katex .mord.text, +.katex .text * { + font-family: var(--mantine-font-family, + system-ui, -apple-system, BlinkMacSystemFont, + "Segoe UI", "Microsoft JhengHei", sans-serif) !important; + font-size: 0.9em !important; /* 比周圍數學略小一點,自己可改 0.8em / 1em */ + font-weight: 400; /* 回到正常粗細 */ + font-style: normal; /* 不要斜體就設 normal */ +} diff --git a/assets/scroll.css b/assets/scroll.css new file mode 100644 index 0000000000000000000000000000000000000000..8930a55ed894941aded09f9f8c11b290049e1a9a --- /dev/null +++ b/assets/scroll.css @@ -0,0 +1,104 @@ +html { + scroll-behavior: smooth; /* 平滑滾動 */ +} + +/* heading 的捲動預留空間(依你的 header 高度調整,如 80~100px) */ +[id^="h-"] { + scroll-margin-top: 90px; +} +/* 固定 AppShell Header 在頂部,並有底色與層級 */ +.mantine-AppShell-header{ + position: sticky; + top: 0; + z-index: 2000; + background: var(--mantine-color-body); + border-bottom: 1px solid var(--mantine-color-default-border); +} + +/* 主內容預留 Header 高度(64px) */ +.mantine-AppShell-main{ + padding-top: 64px; +} + +/* 圖片安全預設 */ +img{ max-width: 100%; height: auto; } + +html[data-mantine-color-scheme="light"] .themed-color, +#mantine-provider[data-mantine-color-scheme="light"] .themed-color { + --tc: var(--tc-light); +} + +html[data-mantine-color-scheme="dark"] .themed-color, +#mantine-provider[data-mantine-color-scheme="dark"] .themed-color { + --tc: var(--tc-dark); +} + +/* 讓 --tc 指向 light 或 dark,以 data-mantine-color-scheme 為準 */ +[data-mantine-color-scheme="light"] .themed-color { --tc: var(--tc-light); } +[data-mantine-color-scheme="dark"] .themed-color { --tc: var(--tc-dark); } + +/* === Math blocks center (KaTeX + MathJax) === */ +.katex-display { + text-align: center; + overflow-x: auto; /* 數學式太長時橫向捲動,不截斷 */ + overflow-y: hidden; + padding-bottom: 4px; /* 捲動條不擋到數學式 */ +} +mjx-container[display="true"] { + display: block; + text-align: center; + margin: 8px 0; + overflow-x: auto; /* MathJax 同樣加橫向捲動 */ +} + + +.math-block { display:block; width:100%; text-align:center; } + +.mantine-List-item .math-block { + width: calc(100% + var(--li-outdent, 0px)); + margin-left: calc(-1 * var(--li-outdent, 0px)); +} + +/* 主題色切換:背景與前景 */ +html[data-mantine-color-scheme="light"] .themed-bg { --bg: var(--bg-light); } +html[data-mantine-color-scheme="dark"] .themed-bg { --bg: var(--bg-dark); } +html[data-mantine-color-scheme="light"] .themed-fg { --fg: var(--fg-light); } +html[data-mantine-color-scheme="dark"] .themed-fg { --fg: var(--fg-dark); } + +/* 讓有這兩個 class 的元素吃到背景/字色 */ +.themed-bg { background: var(--bg, var(--bg-light)); } +.themed-fg { color: var(--fg, var(--fg-light)); } + +/* === 讓顏色標記()真的套到文字上 === */ +.themed-color { color: var(--tc, inherit); } + + + +/* === 卡片用的背景/前景變數(若尚未加入)=== */ +html[data-mantine-color-scheme="light"] .themed-bg { --bg: var(--bg-light); } +html[data-mantine-color-scheme="dark"] .themed-bg { --bg: var(--bg-dark); } +.themed-bg { background: var(--bg, transparent); } + +html[data-mantine-color-scheme="light"] .themed-fg { --fg: var(--fg-light); } +html[data-mantine-color-scheme="dark"] .themed-fg { --fg: var(--fg-dark); } +.themed-fg { color: var(--fg, inherit); } + +/* 統一卡片外殼造型 */ +.card-shell { + overflow: visible; /* 改為 visible,避免截斷長數學式 */ + border-radius: var(--mantine-radius-md); +} + +/* 亮色:維持無外框 */ +html[data-mantine-color-scheme="light"] .card-shell { + border: 0; + box-shadow: none; +} + +/* 暗色:加一圈白色外框(半透明) */ +html[data-mantine-color-scheme="dark"] .card-shell { + border: 1px solid rgba(255, 255, 255, 0.28); /* 想更亮改 0.4、更細可用 0.22 */ + box-shadow: none; /* 不要陰影 */ +} + + diff --git a/assets/session_state.js b/assets/session_state.js new file mode 100644 index 0000000000000000000000000000000000000000..d75da4e1bdb0b8f70efd63be0a3cd2d30312f38c --- /dev/null +++ b/assets/session_state.js @@ -0,0 +1,171 @@ +/** + * session_state.js + * 事件驅動版,不做定時掃描,只在互動時儲存。 + */ +(function () { + "use strict"; + + var STORE_KEY = "dash_math_page_state"; + + function loadState() { + try { return JSON.parse(sessionStorage.getItem(STORE_KEY) || "{}"); } + catch (e) { return {}; } + } + function saveState(s) { + try { sessionStorage.setItem(STORE_KEY, JSON.stringify(s)); } + catch (e) {} + } + function getPathname() { return window.location.pathname || "/"; } + + function saveProp(key, value) { + var s = loadState(), p = getPathname(); + if (!s[p]) s[p] = {}; + s[p][key] = value; + saveState(s); + } + function saveNested(group, key, value) { + var s = loadState(), p = getPathname(); + if (!s[p]) s[p] = {}; + if (!s[p][group]) s[p][group] = {}; + s[p][group][key] = value; + saveState(s); + } + function getPs() { + var s = loadState(), p = getPathname(); + return s[p] || {}; + } + + // ── 恢復 ────────────────────────────────────────────────────────────── + + var _restoring = false; + + function restoreState() { + var ps = getPs(); + _restoring = true; + + // Section + if (ps.section) { + var b = document.querySelector('[data-sid="' + ps.section + '"]'); + if (b) b.click(); + } + + // 填空題 + var inputs = ps.quiz_inputs || {}; + Object.keys(inputs).forEach(function (qid) { + var val = inputs[qid]; + if (!val) return; + // 用 querySelectorAll 找包含此 qid 的 input + document.querySelectorAll("input").forEach(function (el) { + var w = el.closest("[id]"); + if (!w || w.id.indexOf(qid) === -1 || w.id.indexOf("quiz-input") === -1) return; + var setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; + setter.call(el, val); + el.dispatchEvent(new Event("input", { bubbles: true })); + }); + }); + + // 解法展開 + var solutions = ps.solutions || {}; + Object.keys(solutions).forEach(function (key) { + if (!solutions[key]) return; + document.querySelectorAll("button").forEach(function (btn) { + if (btn.id && btn.id.indexOf(key) > -1 && btn.id.indexOf("solution-toggle") > -1) { + btn.click(); + } + }); + }); + + setTimeout(function () { _restoring = false; }, 800); + } + + // ── 掛載監聽 ───────────────────────────────────────────────────────── + + var _attached = new Set(); + + function attachListeners() { + // Section 按鈕 + document.querySelectorAll("[data-sid]").forEach(function (btn) { + var sid = btn.getAttribute("data-sid"); + if (_attached.has("s:" + sid)) return; + _attached.add("s:" + sid); + btn.addEventListener("click", function () { + if (!_restoring) saveProp("section", sid); + }); + }); + + // 填空題 input + document.querySelectorAll("input").forEach(function (el) { + if (_attached.has(el)) return; + var w = el.closest("[id]"); + if (!w || !w.id || w.id.indexOf("quiz-input") === -1) return; + var m = w.id.match(/"qid":"([^"]+)"/); + if (!m) return; + var qid = m[1]; + _attached.add(el); + el.addEventListener("change", function () { + if (!_restoring) saveNested("quiz_inputs", qid, el.value); + }); + }); + + // 解法 toggle 按鈕 + document.querySelectorAll("button").forEach(function (btn) { + if (_attached.has(btn)) return; + if (!btn.id || btn.id.indexOf("solution-toggle") === -1) return; + var m = btn.id.match(/"key":"([^"]+)"/); + if (!m) return; + var key = m[1]; + _attached.add(btn); + btn.addEventListener("click", function () { + if (_restoring) return; + // 延遲判斷是否展開 + setTimeout(function () { + var col = document.querySelector('[id*="' + key + '"][id*="solution-collapse"]'); + var opened = col ? col.offsetHeight > 10 : false; + saveNested("solutions", key, opened); + }, 400); + }); + }); + } + + // ── 換頁偵測 ───────────────────────────────────────────────────────── + + var _lastPath = null, _timer = null; + + function checkPath() { + var cur = getPathname(); + if (cur !== _lastPath) { + _lastPath = cur; + _attached.clear(); + clearTimeout(_timer); + _timer = setTimeout(function () { + attachListeners(); + restoreState(); + }, 900); + } else { + attachListeners(); + } + } + + // MutationObserver:只做 debounce checkPath,不掃描整個 DOM + var _mutTimer = null; + var obs = new MutationObserver(function () { + clearTimeout(_mutTimer); + _mutTimer = setTimeout(checkPath, 200); + }); + + function init() { + _lastPath = getPathname(); + obs.observe(document.body, { childList: true, subtree: false }); // subtree:false 減少觸發 + setTimeout(function () { + attachListeners(); + restoreState(); + }, 1000); + } + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init); + } else { + init(); + } + +})(); diff --git a/assets/toc.css b/assets/toc.css new file mode 100644 index 0000000000000000000000000000000000000000..ac1c9c46c8d6c869741372c9e9715b10115cc7ed --- /dev/null +++ b/assets/toc.css @@ -0,0 +1,125 @@ +/* === TOC 區塊:捲動與底部空白 === */ + +:root { + --toc-bottom-gap: 10px; +} + +/* TOC 欄:sticky 定位,高度跟隨視窗 */ +.toc-col-wrapper { + /* 桌機:顯示 */ + display: block; +} + +/* 內層容器:只負責間距,overflow 由外層 sticky 容器管理 */ +.toc-scroll { + padding-right: 4px; + padding-bottom: var(--toc-bottom-gap); +} + +/* 再塞一塊看不見的空白,讓最後一個項目可以捲到按鈕上方 */ +.toc-scroll::after { + content: ""; + display: block; + height: var(--toc-bottom-gap); +} + +/* === TOC 連結 / 按鈕 顏色設定 === */ + +/* 淺色主題 */ +.toc-container .toc-link, +.toc-container .toc-link:link, +.toc-container .toc-link:visited, +.toc-container .toc-link:active, +.toc-container .toc-button { + color: #228be6 !important; + text-decoration: none !important; +} + +/* 淺色主題 hover / active */ +.toc-container .toc-link:hover, +.toc-container .toc-button:hover, +.toc-container .toc-button:active, +.toc-container .toc-button:focus, +.toc-container .toc-button[data-active="true"] { + color: #228be6 !important; + background-color: transparent !important; + box-shadow: none !important; +} + +/* 深色主題 */ +[data-mantine-color-scheme="dark"] .toc-container .toc-link, +[data-mantine-color-scheme="dark"] .toc-container .toc-link:link, +[data-mantine-color-scheme="dark"] .toc-container .toc-link:visited, +[data-mantine-color-scheme="dark"] .toc-container .toc-link:active, +[data-mantine-color-scheme="dark"] .toc-container .toc-button { + color: #b197fc !important; +} + +[data-mantine-color-scheme="dark"] .toc-container .toc-link:hover, +[data-mantine-color-scheme="dark"] .toc-container .toc-button:hover, +[data-mantine-color-scheme="dark"] .toc-container .toc-button:active, +[data-mantine-color-scheme="dark"] .toc-container .toc-button:focus, +[data-mantine-color-scheme="dark"] .toc-container .toc-button[data-active="true"] { + color: #b197fc !important; + background-color: transparent !important; + box-shadow: none !important; +} + +/* TOC 內所有超連結都不要底線 */ +.toc-scroll a, +.toc-scroll a:link, +.toc-scroll a:visited, +.toc-scroll a:hover, +.toc-scroll a:active { + text-decoration: none !important; +} + +/* 目前閱讀的段落在 TOC 上高亮 */ +.toc-item.toc-active .mantine-Button-root { + font-weight: 600; + border-left: 3px solid var(--mantine-color-teal-6); + padding-left: 10px; + background-color: rgba(56, 178, 172, 0.08); +} + +/* 讓目錄按鈕的文字可以換行 */ +.toc-button { + white-space: normal; + height: auto; + line-height: 1.4; +} + +.toc-button .mantine-Button-label { + white-space: normal; + text-align: left; + overflow: visible; + text-overflow: clip; +} + +/* =================================================================== + 響應式:小螢幕隱藏 TOC + =================================================================== */ + +/* < 768px:隱藏 TOC,主內容全寬 */ +@media (max-width: 768px) { + .toc-col-wrapper { + display: none !important; + } +} + +/* 768px ~ 992px:顯示但縮小 */ +@media (min-width: 769px) and (max-width: 992px) { + .toc-scroll { + max-height: calc(100vh - 140px); + } +} + +/* =================================================================== + 視窗過小(縮放超過 125%)時也隱藏 TOC + 依據實際視窗寬度,非 CSS zoom + =================================================================== */ +@media (max-width: 900px) { + .toc-col-wrapper { + display: none !important; + } +} diff --git a/assets/toc_scrollspy.js b/assets/toc_scrollspy.js new file mode 100644 index 0000000000000000000000000000000000000000..b1dea3945c28a1d5ea3260924b28826cd0a585fc --- /dev/null +++ b/assets/toc_scrollspy.js @@ -0,0 +1,119 @@ +// assets/toc_scrollspy.js +console.log("[toc_scrollspy] loaded (v3-scroll-sync)"); + +(function () { + let ticking = false; + + function getTocState() { + const root = document.getElementById("toc-root"); + if (!root) return null; + + const offset = parseInt(root.dataset.tocOffset || "80", 10); + const items = Array.from(root.querySelectorAll(".toc-item")); + if (!items.length) return null; + + const pairs = items + .map((item) => { + const targetId = item.dataset.target; + if (!targetId) return null; + const el = document.getElementById(targetId); + if (!el) return null; + return { item, el, id: targetId }; + }) + .filter(Boolean); + + if (!pairs.length) return null; + + return { root, offset, pairs }; + } + + function keepItemVisible(root, item) { + if (!root || !item) return; + + const rootTop = root.scrollTop; + const rootBottom = rootTop + root.clientHeight; + + const itemTop = item.offsetTop; + const itemBottom = itemTop + item.offsetHeight; + + if (itemTop < rootTop + 8) { + root.scrollTo({ + top: Math.max(0, itemTop - 8), + behavior: "smooth", + }); + } else if (itemBottom > rootBottom - 8) { + root.scrollTo({ + top: itemBottom - root.clientHeight + 8, + behavior: "smooth", + }); + } + } + + function updateActiveToc() { + const state = getTocState(); + if (!state) return; + + const { root, offset, pairs } = state; + + // 找目前最接近視窗頂端 offset 的 section + let active = pairs[0]; + let bestDist = Infinity; + + for (const pair of pairs) { + const rect = pair.el.getBoundingClientRect(); + const dist = Math.abs(rect.top - offset - 8); + + // 優先選在 offset 上方或接近 offset 的 section + if (rect.top - offset <= 20 && dist < bestDist) { + bestDist = dist; + active = pair; + } + } + + // 如果上面都沒找到,就退回第一個可見 section + if (!active) { + for (const pair of pairs) { + const rect = pair.el.getBoundingClientRect(); + if (rect.top >= offset) { + active = pair; + break; + } + } + } + + pairs.forEach(({ item }) => item.classList.remove("toc-active")); + + if (active) { + active.item.classList.add("toc-active"); + keepItemVisible(root, active.item); + } + } + + function requestUpdate() { + if (ticking) return; + ticking = true; + window.requestAnimationFrame(() => { + updateActiveToc(); + ticking = false; + }); + } + + function start() { + requestUpdate(); + + window.addEventListener("scroll", requestUpdate, { passive: true }); + window.addEventListener("resize", requestUpdate, { passive: true }); + + const mo = new MutationObserver(() => { + requestUpdate(); + }); + + mo.observe(document.body, { childList: true, subtree: true }); + } + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", start); + } else { + start(); + } +})(); \ No newline at end of file diff --git a/assets/unit_vector.svg b/assets/unit_vector.svg new file mode 100644 index 0000000000000000000000000000000000000000..c40fb2e1206da39f47de626a1f38d4f116de2f3a --- /dev/null +++ b/assets/unit_vector.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09acf636f2ed090d2f94881e631c0192ad8f682eb50014792086d62333f96316 +size 15429 diff --git a/assets/unit_vector_theta.svg b/assets/unit_vector_theta.svg new file mode 100644 index 0000000000000000000000000000000000000000..fd9bc38bd27800b7b4725c4798533df265dc1589 --- /dev/null +++ b/assets/unit_vector_theta.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3009f54924ebd9f7dd9a8f5667a0d5050c74322b50b36d9cc7a0f77708cd1e3 +size 25313 diff --git a/build.py b/build.py new file mode 100644 index 0000000000000000000000000000000000000000..68883489307e703365dcb564e8ab21feb8d7be7a --- /dev/null +++ b/build.py @@ -0,0 +1,66 @@ +""" +build.py +-------- +Markdown → JSON 的 build pipeline。 + +職責: + 讀取 paths.json → 對每個任務呼叫 Test2ChMd._export_one → 輸出 JSON + +與 app.py 完全解耦,可用兩種方式執行: + + A. 命令列(手動重建): + python build.py # 使用預設 paths.json + python build.py paths_ch15.json # 指定 config + python build.py paths.json --force # 強制重建全部 + + B. 由 app.py import 並在啟動時呼叫: + from build import build_if_needed + build_if_needed(CONFIG_PATH, force=False) # 只重建有異動的任務 +""" + +from __future__ import annotations +import sys +from pathlib import Path + +# Test2ChMd 放在同層或 layout/ 下,依實際位置選一種 +from layout.converter.md_pipeline import build_from_config + + +def build_if_needed( + config_path: str | Path = "paths.json", + *, + force: bool = False, +) -> list[Path]: + """ + 執行 build pipeline。 + + config_path:paths.json 路徑(絕對或相對於 CWD) + force:True → 強制重建全部任務;False → 只重建比 md 舊的 json + """ + return build_from_config(config_path, force=force) + + +# --------------------------------------------------------------------------- +# 命令列介面 +# --------------------------------------------------------------------------- +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser( + description="把 paths.json 中的 Markdown 轉換成 JSON" + ) + parser.add_argument( + "config", + nargs="?", + default="paths.json", + help="paths.json 的路徑(預設:./paths.json)", + ) + parser.add_argument( + "--force", + action="store_true", + help="強制重建全部任務(忽略 up_to_date 設定)", + ) + args = parser.parse_args() + + outputs = build_if_needed(args.config, force=args.force) + print(f"\n完成:共輸出 {len(outputs)} 個 JSON 檔案。") diff --git a/components/__init__.py b/components/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..845980e6c4f2139348760d8218922ab24be2c9bf --- /dev/null +++ b/components/__init__.py @@ -0,0 +1,9 @@ +""" +components/ +----------- +純 UI 元件套件,所有元件均無 Dash callback 或 app 狀態。 + +快速 import 範例: + from components.cards import create_chapter_card, render_card_from_node + from components.render_utils import _runs_to_children +""" diff --git a/components/cards.py b/components/cards.py new file mode 100644 index 0000000000000000000000000000000000000000..46bcdc44e4b34dd2bd80be75bf07f2b6718cdac8 --- /dev/null +++ b/components/cards.py @@ -0,0 +1,283 @@ +""" +components/cards.py +-------------------- +所有卡片元件的單一來源。 + +公開 API: + create_chapter_card(data) → dmc.Card (章節卡片,原 Chapter_card.py) + render_card_from_node(card_node) → dmc.Card (結構化 node 卡片,新版) + generate_custom_markdown_card(...) → dmc.Card (舊版 Markdown 字串卡片,保留供過渡期使用) + +遷移建議: + - 新頁面請使用 render_card_from_node(接受 JSON 結構化資料) + - generate_custom_markdown_card 標記為 deprecated,待舊頁面遷移完成後刪除 +""" + +from __future__ import annotations +from typing import Any + +from dash import html, dcc +import dash_mantine_components as dmc +from dash_iconify import DashIconify + +from components.render_utils import _inline_math, _block_math, _runs_to_children + +try: + import dash_latex + DashLatex = dash_latex.DashLatex +except Exception: + DashLatex = None + + +# --------------------------------------------------------------------------- +# 1. 章節卡片(原 Chapter_card.py) +# --------------------------------------------------------------------------- + +def create_chapter_card(data: dict) -> dmc.Card: + """ + 產生章節總覽用的卡片。 + + data 欄位: + title str 卡片標題 + badges List[Tuple[str, str]] [(label, color), ...] + description List[str] 說明文字(最多 4 行) + link str 「單元學習」按鈕連結 + test str 「小測驗」按鈕連結 + trick str (選用) 「技巧學習」按鈕連結 + """ + buttons = [ + dmc.Anchor( + href=data["link"], + children=dmc.Button( + "單元學習", variant="light", color="orange", size="sm", radius="xl" + ), + ) + ] + + if "trick" in data: + buttons.append( + dmc.Anchor( + href=data["trick"], + children=dmc.Button( + "技巧學習", variant="outline", color="gray", size="sm", radius="xl" + ), + ) + ) + + buttons.append( + dmc.Anchor( + href=data["test"], + children=dmc.Button( + "小測驗", variant="filled", color="blue", size="sm", radius="xl" + ), + ) + ) + + # 說明文字補足到 4 行,保持卡片高度一致 + desc_items = [ + dmc.Text(line, size="sm", c="dimmed") for line in data["description"] + ] + desc_items += [ + dmc.Text(" ", size="sm") + for _ in range(4 - len(data["description"])) + ] + + return dmc.Card( + children=[ + dmc.Text(data["title"], fw=700, size="lg"), + dmc.Group( + gap="xs", + mt="xs", + mb="sm", + children=[ + dmc.Badge(label, color=color, radius="md") + for label, color in data["badges"] + ], + ), + dmc.Stack(gap=0, style={"minHeight": 100}, children=desc_items), + dmc.Flex( + gap="sm", + wrap="wrap", + justify="flex-start", + mt="sm", + children=buttons, + ), + ], + withBorder=True, + shadow="sm", + radius="md", + style={ + "width": { + "base": 280, + "sm": 320, + "md": 350, + "lg": 400, + } + }, + ) + + +# --------------------------------------------------------------------------- +# 2. 結構化 node 卡片(原 generate_common_card.py:render_card_from_node) +# --------------------------------------------------------------------------- + +def render_card_from_node(card_node: dict) -> dmc.Card: + """ + 把 Test2ChMd 產生的卡片 JSON node 渲染成 DMC Card。 + + card_node 格式: + { + "kind": str, # 卡片種類(例如「定義」「定理」) + "headline": str, # 標題文字 + "body": List[block], # 內容 block 清單 + } + + body block 支援的 type: + paragraph / list / math / url / picture / horizontal_rule + """ + kind = (card_node.get("kind") or "卡片").strip() + headline = (card_node.get("headline") or "").strip() + + header = dmc.CardSection( + dmc.Group( + [ + dmc.Badge(kind, color="violet", variant="filled"), + dmc.Text(headline, fw=700, style={"whiteSpace": "pre-wrap"}), + ], + gap="sm", + ), + withBorder=True, + inheritPadding=True, + py=6, + style={ + "backgroundColor": dmc.DEFAULT_THEME["colors"]["violet"][7], + "color": "white", + }, + ) + + body_children: list[Any] = [] + for b in card_node.get("body", []): + t = (b.get("type") or "").lower() + + if t == "paragraph": + body_children.append( + html.Div(_runs_to_children(b.get("runs") or [])) + ) + elif t == "list": + items = [ + dmc.ListItem(_runs_to_children(it.get("runs") or [])) + for it in b.get("content", []) + ] + body_children.append( + dmc.List(items, listStyleType="none", spacing="xs", withPadding=True) + ) + elif t == "math": + body_children.append(_block_math(b.get("latex", ""))) + elif t == "url": + body_children.append( + dcc.Markdown( + f"[{b.get('text')}]({b.get('href')})", link_target="_blank" + ) + ) + elif t == "picture": + body_children.append( + html.Img( + src=b.get("src"), + title=b.get("alt") or "", + style={ + "display": "inline-block", + "margin": "6px", + "maxWidth": "100%", + "height": "auto", + }, + ) + ) + elif t == "horizontal_rule": + body_children.append(dmc.Divider(my=12)) + + return dmc.Card( + [header, dmc.Stack(body_children, gap="xs", px="md", py="sm")], + withBorder=True, + shadow="md", + radius="md", + mb=14, + ) + + +# --------------------------------------------------------------------------- +# 3. 舊版 Markdown 字串卡片(deprecated,保留至頁面遷移完成) +# --------------------------------------------------------------------------- + +def generate_custom_markdown_card( + title: str, + paragraphs: list[dict], + card_color: str = "#f8f9fa", + title_bg_color: str = dmc.DEFAULT_THEME["colors"]["green"][7], + latex_list: list[str] | None = None, +) -> dmc.Card: + """ + .. deprecated:: + 請改用 render_card_from_node。 + 此函式將在所有舊頁面遷移完成後刪除。 + + paragraphs 格式: + [{"text": str, "align": "left|center|right", "color": str}, ...] + latex_list 格式: + ["latex_str_1", "latex_str_2", ...] (有序清單) + """ + def _render_paragraph(p: dict) -> html.Div: + return html.Div( + dcc.Markdown(p["text"], mathjax=True), + style={ + "textAlign": p.get("align", "left"), + "color": p.get("color", "black"), + "marginBottom": "0.5rem", + }, + ) + + content: list[Any] = [_render_paragraph(p) for p in paragraphs] + + if latex_list: + # 需要 dash_latex;若未安裝則退回純文字 + list_items = [] + for latex in latex_list: + if DashLatex: + list_items.append( + dmc.ListItem(DashLatex(f"${latex}$"), mt=10) + ) + else: + list_items.append( + dmc.ListItem(dcc.Markdown(f"${latex}$", mathjax=True), mt=10) + ) + content.append( + dmc.List( + children=list_items, + listStyleType="ordered", + spacing="sm", + ) + ) + + return dmc.Card( + children=[ + dmc.CardSection( + dmc.Group( + children=[ + dmc.Text( + title, + fw=500, + style={"color": dmc.DEFAULT_THEME["colors"]["gray"][0]}, + ) + ] + ), + withBorder=True, + inheritPadding=True, + py=3, + style={"backgroundColor": title_bg_color}, + ), + html.Div(children=content, style={"padding": "10px"}), + ], + withBorder=True, + shadow="md", + radius="md", + style={"backgroundColor": card_color}, + ) diff --git a/components/render_utils.py b/components/render_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..d6e4645a850d3a0c6baf8bb45b6eafb8aa4a3114 --- /dev/null +++ b/components/render_utils.py @@ -0,0 +1,91 @@ +""" +components/render_utils.py +-------------------------- +純渲染工具函式,不依賴任何 Dash callback 或 app 狀態。 +供 cards.py、dashTest.py(未來統一後)等元件共用。 + +公開 API: + _inline_math(latex, style=None) → Dash element + _block_math(latex, style=None) → Dash element + _runs_to_children(runs) → List[Dash element] +""" + +from __future__ import annotations +from typing import Any + +from dash import html, dcc +import dash_mantine_components as dmc + +try: + from dash_latex import DashLatex +except Exception: + DashLatex = None + + +# --------------------------------------------------------------------------- +# 數學渲染 +# --------------------------------------------------------------------------- + +def _inline_math(latex: str, style: dict | None = None) -> Any: + """行內數學式。優先使用 DashLatex(KaTeX),退回 dcc.Markdown MathJax。""" + merged = {"display": "inline-block", "margin": "0 2px", **(style or {})} + if DashLatex: + return html.Span(DashLatex(latex, displayMode=False), style=merged) + src = latex if latex.strip().startswith("$") else f"${latex}$" + return dcc.Markdown(src, mathjax=True, style=merged) + + +def _block_math(latex: str, style: dict | None = None) -> Any: + """區塊數學式。優先使用 DashLatex(KaTeX),退回 dcc.Markdown MathJax。""" + merged = {"margin": "8px 0", **(style or {})} + if DashLatex: + return html.Div(DashLatex(latex, displayMode=True), style=merged) + src = latex.strip() + if not (src.startswith("$$") and src.endswith("$$")): + src = f"$$\n{src}\n$$" + return dcc.Markdown(src, mathjax=True, style=merged) + + +# --------------------------------------------------------------------------- +# Run 列表轉 Dash 元素 +# --------------------------------------------------------------------------- + +def _runs_to_children(runs: list[dict] | None) -> list[Any]: + """ + 把 JSON block 中的 runs 陣列轉成 Dash 子元素清單。 + + Run 格式: + {"kind": "math", "latex": "..."} → 行內數學 + {"text": "...", "style": "bold|italic|bold-italic", + "color_light": "#xxx", "color_dark": "#xxx"} → 文字 span + """ + out: list[Any] = [] + for r in runs or []: + # 數學 run + if r.get("kind") == "math" and "latex" in r: + out.append(_inline_math(r["latex"])) + continue + + # 文字 run + sty: dict[str, Any] = {} + s = r.get("style", "") + if s == "bold": + sty["fontWeight"] = 700 + elif s == "italic": + sty["fontStyle"] = "italic" + elif s == "bold-italic": + sty.update({"fontWeight": 700, "fontStyle": "italic"}) + + # 主題雙色(light / dark) + cls = None + if r.get("color_light") or r.get("color_dark"): + if r.get("color_light"): + sty["--tc-light"] = r["color_light"] + if r.get("color_dark"): + sty["--tc-dark"] = r["color_dark"] + sty["color"] = "var(--tc, var(--tc-light))" + cls = "themed-color" + + out.append(html.Span(r.get("text", ""), style=sty, className=cls)) + + return out diff --git a/firebase_init.py b/firebase_init.py new file mode 100644 index 0000000000000000000000000000000000000000..60f5ea158a4aeea3513cc3c872c0b0cab1b7488e --- /dev/null +++ b/firebase_init.py @@ -0,0 +1,46 @@ +""" +firebase_init.py +---------------- +Firebase Admin SDK 初始化(單例模式)。 +放在專案根目錄,其他模組 import 即可。 +""" +from __future__ import annotations +import os, json +from pathlib import Path + +_db = None # 全域單例 + +def get_db(): + """取得 Firestore client(延遲初始化)。""" + global _db + if _db is not None: + return _db + + try: + import firebase_admin + from firebase_admin import credentials, firestore + except ImportError: + raise RuntimeError( + "請先安裝 firebase-admin:pip install firebase-admin --break-system-packages" + ) + + if firebase_admin._apps: + _db = firestore.client() + return _db + + # 優先讀取 firebase_key.json(本機開發) + key_file = Path(__file__).resolve().parent / "firebase_key.json" + if key_file.exists(): + cred = credentials.Certificate(str(key_file)) + else: + # 從環境變數讀取(Hugging Face Secrets) + sa_json = os.getenv("FIREBASE_SERVICE_ACCOUNT") + if not sa_json: + raise RuntimeError( + "找不到 Firebase 憑證。請放置 firebase_key.json 或設定環境變數 FIREBASE_SERVICE_ACCOUNT。" + ) + cred = credentials.Certificate(json.loads(sa_json)) + + firebase_admin.initialize_app(cred) + _db = firestore.client() + return _db diff --git a/firebase_progress.py b/firebase_progress.py new file mode 100644 index 0000000000000000000000000000000000000000..9a313c16ca9bd578dcedf120a13ac9aaebe20cca --- /dev/null +++ b/firebase_progress.py @@ -0,0 +1,127 @@ +""" +firebase_progress.py +-------------------- +學生學習進度的讀寫邏輯。 +放在專案根目錄,由 dt_callbacks.py 和頁面呼叫。 + +Firestore 資料結構: + students/{student_id}/ + profile: { name, student_id, last_seen } + progress: { quiz_correct, solutions_viewed, ai_hints_used, ... } + events: [ { type, unit, qid, ts, ... }, ... ] ← 子集合 +""" +from __future__ import annotations +import datetime +from firebase_init import get_db + +# ─── 時間戳 ──────────────────────────────────────────────────────────────── +def _now() -> str: + return datetime.datetime.now(datetime.timezone.utc).isoformat() + + +# ─── 學生個人資料 ────────────────────────────────────────────────────────── + +def upsert_student(student_id: str, name: str = "") -> None: + """建立或更新學生個人資料。""" + db = get_db() + ref = db.collection("students").document(student_id) + ref.set({ + "student_id": student_id, + "name": name or student_id, + "last_seen": _now(), + }, merge=True) + + +# ─── 記錄事件 ───────────────────────────────────────────────────────────── + +def log_event(student_id: str, event_type: str, **kwargs) -> None: + """ + 記錄一筆學習事件到 students/{student_id}/events 子集合。 + + event_type 範例: + "quiz_correct" - 填空/選擇題答對 + "quiz_wrong" - 答錯 + "solution_viewed" - 展開詳細解法 + "hint_used" - 按下 AI 提示 + "quiz_ai_done" - AI 批改完成 + """ + db = get_db() + payload = { + "type": event_type, + "ts": _now(), + **kwargs, # unit, qid, answer, ... + } + db.collection("students").document(student_id)\ + .collection("events").add(payload) + + +def log_quiz_result( + student_id: str, + unit: str, + qid: str, + correct: bool, + answer: str = "", +) -> None: + """記錄一題答題結果,同時更新 progress 計數。""" + event_type = "quiz_correct" if correct else "quiz_wrong" + log_event(student_id, event_type, unit=unit, qid=qid, answer=answer) + + # 更新統計計數 + db = get_db() + ref = db.collection("students").document(student_id) + field = "quiz_correct_count" if correct else "quiz_wrong_count" + ref.set({field: _increment(1), "last_seen": _now()}, merge=True) + + +def log_solution_viewed(student_id: str, unit: str, solution_id: str) -> None: + """記錄學生展開了某個解法區塊。""" + log_event(student_id, "solution_viewed", unit=unit, solution_id=solution_id) + db = get_db() + db.collection("students").document(student_id)\ + .set({"solutions_viewed_count": _increment(1), "last_seen": _now()}, merge=True) + + +def log_hint_used(student_id: str, unit: str, qid: str) -> None: + """記錄學生使用了 AI 提示。""" + log_event(student_id, "hint_used", unit=unit, qid=qid) + db = get_db() + db.collection("students").document(student_id)\ + .set({"ai_hints_used_count": _increment(1), "last_seen": _now()}, merge=True) + + +# ─── 讀取 ──────────────────────────────────────────────────────────────── + +def get_student_progress(student_id: str) -> dict: + """讀取單一學生的 progress 計數(老師後台用)。""" + db = get_db() + doc = db.collection("students").document(student_id).get() + if doc.exists: + return doc.to_dict() + return {} + + +def get_all_students() -> list[dict]: + """讀取所有學生的 profile(老師後台列表用)。""" + db = get_db() + docs = db.collection("students").stream() + return [d.to_dict() for d in docs] + + +def get_student_events(student_id: str, limit: int = 100) -> list[dict]: + """讀取某學生最近的事件記錄。""" + db = get_db() + docs = ( + db.collection("students").document(student_id) + .collection("events") + .order_by("ts", direction="DESCENDING") + .limit(limit) + .stream() + ) + return [d.to_dict() for d in docs] + + +# ─── Firestore 遞增輔助 ─────────────────────────────────────────────────── + +def _increment(n: int): + from google.cloud.firestore import Increment + return Increment(n) diff --git a/firebase_quiz_hooks.py b/firebase_quiz_hooks.py new file mode 100644 index 0000000000000000000000000000000000000000..8d5bfb4675dcd4ee2c56fa3cdef1a8e90e4719ce --- /dev/null +++ b/firebase_quiz_hooks.py @@ -0,0 +1,75 @@ +""" +firebase_quiz_hooks.py +---------------------- +答題記錄已移至 dt_callbacks.py 直接處理。 +這裡只保留解法展開和 AI 提示的記錄。 +""" +from __future__ import annotations +from dash import callback, Input, Output, State, ALL, no_update, ctx, dcc + + +def create_dummy_stores(): + return [dcc.Store(id="_fq-log", data={})] + + +@callback( + Output("_fq-log", "data"), + Input({"type": "solution-toggle", "key": ALL}, "n_clicks"), + State({"type": "solution-toggle", "key": ALL}, "id"), + State("student-id-store", "data"), + State("page-url", "pathname"), + prevent_initial_call=True, +) +def record_solution(n_clicks_list, ids, student_id, pathname): + if not student_id: + return no_update + trigger = ctx.triggered_id + if not trigger or not isinstance(trigger, dict): + return no_update + key = trigger.get("key", "") + unit = (pathname or "").strip("/").replace("/", "_") or "unknown" + for i, pid in enumerate(ids): + if isinstance(pid, dict) and pid.get("key") == key: + if (n_clicks_list[i] or 0) == 1: + try: + from firebase_progress import log_solution_viewed + log_solution_viewed(student_id, unit, key) + except Exception as e: + print(f"[Firebase] log_solution_viewed 失敗:{e}") + break + return no_update + + +@callback( + Output("_fq-log", "data", allow_duplicate=True), + Input({"type": "quiz-hint", "qid": ALL}, "n_clicks"), + Input({"type": "quiz-hint-choice", "qid": ALL}, "n_clicks"), + State({"type": "quiz-hint", "qid": ALL}, "id"), + State({"type": "quiz-hint-choice", "qid": ALL}, "id"), + State("student-id-store", "data"), + State("page-url", "pathname"), + prevent_initial_call=True, +) +def record_hint(fill_clicks, choice_clicks, fill_ids, choice_ids, student_id, pathname): + if not student_id: + return no_update + trigger = ctx.triggered_id + if not trigger or not isinstance(trigger, dict): + return no_update + qid = trigger.get("qid", "") + qtype = trigger.get("type", "") + if not qid or "hint" not in qtype: + return no_update + unit = (pathname or "").strip("/").replace("/", "_") or "unknown" + ids = fill_ids if qtype == "quiz-hint" else choice_ids + clicks = fill_clicks if qtype == "quiz-hint" else choice_clicks + for i, pid in enumerate(ids): + if isinstance(pid, dict) and pid.get("qid") == qid: + if (clicks[i] or 0) == 1: + try: + from firebase_progress import log_hint_used + log_hint_used(student_id, unit, qid) + except Exception as e: + print(f"[Firebase] log_hint_used 失敗:{e}") + break + return no_update diff --git a/ggb.py b/ggb.py new file mode 100644 index 0000000000000000000000000000000000000000..6ca4cade51f7c8789a2a92a58b640ced2dda33f6 --- /dev/null +++ b/ggb.py @@ -0,0 +1,160 @@ +import dash +from dash import dcc, html, Input, Output +import plotly.graph_objects as go +import numpy as np + +# --- 1. ?????? --- +def f(x, y): + return 4 - x**2 - 2*y**2 + +def df_dx(x, y): # ? x ?? + return -2 * x + +def df_dy(x, y): # ? y ?? + return -4 * y + +# --- 2. ??? Dash App --- +app = dash.Dash(__name__) + +# --- 3. ???? (Layout) --- +app.layout = html.Div([ + html.H2("????????? (Python?)", style={'textAlign': 'center'}), + + # ???? + html.Div([ + html.Div([ + html.Label("?? a ?:"), + dcc.Input(id='input-a', type='number', value=1, step=0.1), + ], style={'marginRight': '20px', 'display': 'inline-block'}), + + html.Div([ + html.Label("?? b ?:"), + dcc.Input(id='input-b', type='number', value=1, step=0.1), + ], style={'marginRight': '20px', 'display': 'inline-block'}), + + # ?? Checklist ?????? + dcc.Checklist( + id='toggle-switches', + options=[ + {'label': ' ???? C1 (x??)', 'value': 'show_c1'}, + {'label': ' ???? T1', 'value': 'show_t1'}, + {'label': ' ???? C2 (y??)', 'value': 'show_c2'}, + {'label': ' ???? T2', 'value': 'show_t2'}, + ], + value=[], # ????? + inline=True + ) + ], style={'padding': '20px', 'backgroundColor': '#f9f9f9'}), + + # ?????? + html.Div(id='slope-info', style={'padding': '10px', 'fontSize': '18px', 'fontWeight': 'bold'}), + + # 3D ??? + dcc.Graph(id='3d-surface-plot', style={'height': '80vh'}) +]) + +# --- 4. ???? (??????) --- +@app.callback( + [Output('3d-surface-plot', 'figure'), + Output('slope-info', 'children')], + [Input('input-a', 'value'), + Input('input-b', 'value'), + Input('toggle-switches', 'value')] +) +def update_graph(a, b, toggles): + # ?????????????????? + if a is None: a = 1 + if b is None: b = 1 + + # ?? P ??? + z_val = f(a, b) + + # --- ?????? --- + x_range = np.linspace(-3, 3, 50) + y_range = np.linspace(-3, 3, 50) + X, Y = np.meshgrid(x_range, y_range) + Z = f(X, Y) + + fig = go.Figure() + + # 1. ??? (???) + fig.add_trace(go.Surface(z=Z, x=X, y=Y, colorscale='Viridis', opacity=0.6, showscale=False, name='??')) + + # 2. ? P ? + fig.add_trace(go.Scatter3d( + x=[a], y=[b], z=[z_val], + mode='markers', marker=dict(size=6, color='black'), + name=f'P({a},{b})' + )) + + # --- ?? C1 ? T1 (? x ??) --- + slope_x = df_dx(a, b) + info_text = [] + + if 'show_c1' in toggles: + # C1: ?? y=b, x ?? + t = np.linspace(-3, 3, 50) + fig.add_trace(go.Scatter3d( + x=t, y=[b]*50, z=f(t, b), + mode='lines', line=dict(color='red', width=5), + name='C1 (?? y=b)' + )) + + if 'show_t1' in toggles: + # T1: ?? (?????????) + # ????? (1, 0, slope_x) + t_tan = np.linspace(-1.5, 1.5, 10) # ???? + x_tan = a + t_tan + y_tan = [b] * 10 + z_tan = z_val + slope_x * t_tan + + fig.add_trace(go.Scatter3d( + x=x_tan, y=y_tan, z=z_tan, + mode='lines', line=dict(color='red', width=4, dash='dash'), + name=f'T1 ?? (m={slope_x:.2f})' + )) + info_text.append(f"x???? (fx) = {slope_x:.2f}") + + # --- ?? C2 ? T2 (? y ??) --- + slope_y = df_dy(a, b) + + if 'show_c2' in toggles: + # C2: ?? x=a, y ?? + t = np.linspace(-3, 3, 50) + fig.add_trace(go.Scatter3d( + x=[a]*50, y=t, z=f(a, t), + mode='lines', line=dict(color='blue', width=5), + name='C2 (?? x=a)' + )) + + if 'show_t2' in toggles: + # T2 ?? + # ????? (0, 1, slope_y) + t_tan = np.linspace(-1.5, 1.5, 10) + x_tan = [a] * 10 + y_tan = b + t_tan + z_tan = z_val + slope_y * t_tan + + fig.add_trace(go.Scatter3d( + x=x_tan, y=y_tan, z=z_tan, + mode='lines', line=dict(color='blue', width=4, dash='dash'), + name=f'T2 ?? (m={slope_y:.2f})' + )) + info_text.append(f"y???? (fy) = {slope_y:.2f}") + + # --- ????????? --- + fig.update_layout( + scene=dict( + xaxis=dict(range=[-3, 3]), + yaxis=dict(range=[-3, 3]), + zaxis=dict(range=[-5, 5]), + aspectratio=dict(x=1, y=1, z=0.7) + ), + margin=dict(l=0, r=0, b=0, t=0) + ) + + return fig, " | ".join(info_text) if info_text else "????????????" + +# --- 5. ????? --- +if __name__ == '__main__': + app.run(debug=True) \ No newline at end of file diff --git a/layout/Chapter_card.py b/layout/Chapter_card.py new file mode 100644 index 0000000000000000000000000000000000000000..4abb59349761986e9f774f17f5f282d206ee967d --- /dev/null +++ b/layout/Chapter_card.py @@ -0,0 +1,56 @@ +""" +layout/Chapter_card.py ← 向下相容 shim +---------------------------------------- +create_card 已整合進 layout/renderer/ 的 cards 模組。 +此 shim 讓舊 import 繼續正常運作: + + from layout.Chapter_card import create_card ← 仍可用 +""" +from .renderer.renderer import render_doc as _ # 確保 renderer 已初始化 # noqa: F401 + +# Chapter_card 的原始功能直接在此定義(避免 components/ 路徑問題) +from dash import html +import dash_mantine_components as dmc +from dash_iconify import DashIconify + + +def create_card(data: dict) -> dmc.Card: + """章節總覽卡片(原 Chapter_card.py)。""" + buttons = [ + dmc.Anchor( + href=data["link"], + children=dmc.Button("單元學習", variant="light", color="orange", size="sm", radius="xl"), + ) + ] + if "trick" in data: + buttons.append( + dmc.Anchor( + href=data["trick"], + children=dmc.Button("技巧學習", variant="outline", color="gray", size="sm", radius="xl"), + ) + ) + buttons.append( + dmc.Anchor( + href=data["test"], + children=dmc.Button("小測驗", variant="filled", color="blue", size="sm", radius="xl"), + ) + ) + desc_items = [dmc.Text(line, size="sm", c="dimmed") for line in data["description"]] + desc_items += [dmc.Text(" ", size="sm") for _ in range(4 - len(data["description"]))] + + return dmc.Card( + children=[ + dmc.Text(data["title"], fw=700, size="lg"), + dmc.Group( + gap="xs", mt="xs", mb="sm", + children=[dmc.Badge(label, color=color, radius="md") for label, color in data["badges"]], + ), + dmc.Stack(gap=0, style={"minHeight": 100}, children=desc_items), + dmc.Flex(gap="sm", wrap="wrap", justify="flex-start", mt="sm", children=buttons), + ], + withBorder=True, shadow="sm", radius="md", + style={"width": {"base": 280, "sm": 320, "md": 350, "lg": 400}}, + ) + + +__all__ = ["create_card"] diff --git a/layout/__init__.py b/layout/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bd167f06343c3a75f28be5826c056cf73d24a76c --- /dev/null +++ b/layout/__init__.py @@ -0,0 +1,25 @@ +""" +layout/__init__.py +------------------ +統一 re-export 各子資料夾的常用 API, +讓 pages/ 裡的 import 路徑保持簡短。 +""" + +# Shell 元件 +from .shell.header import generate_header # noqa: F401 +from .shell.navbar import generate_navbar # noqa: F401 +from .shell.main import generate_main # noqa: F401 +from .shell.footer import generate_footer # noqa: F401 +from .shell.callbacks import generate_toggle_navbar, switch_light_dark # noqa: F401 + +# 轉換器 +from .converter.md_pipeline import build_from_config # noqa: F401 + +# 渲染引擎 +from .renderer.renderer import ( # noqa: F401 + render_doc, + install_callbacks_once, +) + +# 頁面組裝 +from .page.page_layout import make_test_page # noqa: F401 diff --git a/layout/converter/__init__.py b/layout/converter/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4388c7e9f2e8c9d27af9887e5f6abf1413b18299 --- /dev/null +++ b/layout/converter/__init__.py @@ -0,0 +1,8 @@ +""" +converter/ — Markdown → JSON 轉換器 +外部可直接用:from layout.converter import build_from_config +""" +from .md_io import build_from_config # noqa: F401 + +# 進階用途(頁面直接解析 MD) +from .md_blocks import parse_document # noqa: F401 \ No newline at end of file diff --git a/layout/converter/md_attrs.py b/layout/converter/md_attrs.py new file mode 100644 index 0000000000000000000000000000000000000000..5d5755a1f758695ea40765f59864ac1d66702032 --- /dev/null +++ b/layout/converter/md_attrs.py @@ -0,0 +1,82 @@ +""" +md_attrs.py +----------- +HTML 註解屬性字串解析。 + +公開 API: + _attrs_to_dict(s) → dict (通用版,支援帶連字號的 key) + _parse_attrs(s) → dict (quiz block 變體,支援 bare flag) + _slug_ascii(t) → str (ASCII 化 slug,供 quiz id 使用) +""" +from __future__ import annotations +import re +import hashlib +import unicodedata + +# --------------------------------------------------------------------------- +# 正規表達式 +# --------------------------------------------------------------------------- + +# 通用版:支援帶連字號的 key,例如 hint_a="..." +_Q_ATTR = re.compile( + r'([A-Za-z_][A-Za-z0-9_-]*)\s*=\s*"([^"]*)"' + r'|([A-Za-z_][A-Za-z0-9_-]*)\s*=\s*([^\s">]+)' +) + +# quiz block 變體(_parse_attrs 用):額外支援 bare flag(沒有值的 key) +_QUIZ_ATTR = re.compile( + r'([A-Za-z_][\w-]*)\s*=\s*"([^"]*)"|([A-Za-z_][\w-]*)\s*=\s*([^\s">]+)|([A-Za-z_][\w-]*)' +) + +# --------------------------------------------------------------------------- +# 公開函式 +# --------------------------------------------------------------------------- + +def _attrs_to_dict(s: str) -> dict[str, str]: + """ + 把 HTML 註解屬性字串解析為 dict。 + + 支援: + key="value" → {key: value} + key=value → {key: value} + """ + out: dict[str, str] = {} + if not s: + return out + for m in _Q_ATTR.finditer(s): + if m.group(1) and m.group(2) is not None: + out[m.group(1)] = m.group(2) + elif m.group(3) and m.group(4) is not None: + out[m.group(3)] = m.group(4) + return out + + +def _parse_attrs(s: str) -> dict[str, str]: + """ + quiz block 屬性解析變體,額外支援 bare flag(key 無值時設為 "1")。 + """ + out: dict[str, str] = {} + for m in _QUIZ_ATTR.finditer(s or ""): + if m.group(1): + out[m.group(1)] = m.group(2) + elif m.group(3): + out[m.group(3)] = m.group(4) + elif m.group(5): + out[m.group(5)] = "1" + return out + + +def _slug_ascii(t: str, prefix: str = "order") -> str: + """ + 把任意字串轉成 ASCII slug(供 quiz id 使用)。 + 無法轉換時用 sha1 hash 作為 fallback。 + """ + t_norm = unicodedata.normalize("NFKD", t) + t_ascii = "".join( + ch for ch in t_norm if ch.isascii() and (ch.isalnum() or ch in "-_ ") + ) + t_ascii = "-".join(t_ascii.strip().lower().split()) + if t_ascii: + return t_ascii + h = hashlib.sha1(t.encode("utf-8")).hexdigest()[:8] + return f"{prefix}-{h}" diff --git a/layout/converter/md_blocks.py b/layout/converter/md_blocks.py new file mode 100644 index 0000000000000000000000000000000000000000..83728bf1f67e47cba1f2e859605ebbf3d24c5471 --- /dev/null +++ b/layout/converter/md_blocks.py @@ -0,0 +1,970 @@ +""" +md_blocks.py +------------ +段落 / 清單 / 特殊區塊(card、quiz、flow、solution、ggb、icon)解析, +以及文件級 parse_document 與 TOC 指派。 + +依賴:md_color, md_tex, md_attrs, md_runs + +公開 API: + parse_document(text) → List[block] 主要入口 + parse_content_block(text) → List[block] + parse_solution_block(src) → block + parse_card_block(src) → block + parse_interactive_block(src) → block + parse_flow_block(src) → block + parse_quizzes(md) → List[block] + parse_geogebra_marker(s) → block + parse_icon_marker(s) → block + parse_pyfunc_marker(s) → block + parse_list_items(list_block) → List[item] + parse_paragraph_runs_color_aware → List[run] + parse_line_color_aware → List[run] + assign_ids_and_build_toc(nodes) → List[toc_entry] + split_blocks_into_sections(blocks)→ List[section] + build_ai_prompt_for_example(...) → str + build_ai_prompt_for_pos(...) → str + build_ai_prompt_for_solution_pos(...)→ str +""" +from __future__ import annotations +import re +import hashlib +import unicodedata +import json + +from .md_color import attach_theme_colors, _norm_hex +from .md_tex import _ensure_inline_dollars, _ensure_block_dollars +from .md_attrs import _attrs_to_dict, _parse_attrs, _slug_ascii +from .md_runs import ( + build_inline_runs, normalize_runs, + _has_newline_token, _plain_text_from_runs, + _append_hard_break, + _split_text_and_any_display_math, + _split_text_links_images, _split_text_and_ggb, _split_text_and_icon, +) + +# --------------------------------------------------------------------------- +# 模組級正規表達式(只保留 md_blocks 內部用的) +# --------------------------------------------------------------------------- +_COLOR_TAG = re.compile(r'|\s*') +_SOL_OPEN = re.compile(r'', re.IGNORECASE) +_SOL_CLOSE = re.compile(r'', re.IGNORECASE) +_SOL_END_RE = re.compile(r'', re.IGNORECASE) +_EXAMPLE_RE = re.compile(r'^\s*###\s*Example[^\n]*', re.MULTILINE) +_PROBLEM_RE = re.compile(r'', re.IGNORECASE) +_SOLUTION_OPEN_RE = re.compile(r'') +_TAG_ONLY_RE = re.compile(r'^$') +_SPLIT_AFTER_COLOR_CLOSE_TO_NEW_ITEM = re.compile( + r'^(?P.*?)(?:\s*)(?P(?P\s*)(?P\d+\.)\s+.*)$' +) +_BLANKPARA_SPLIT = re.compile(r'(\n\s*\n+)') +_PYFUNC_RE = re.compile(r'') +_GGB_SINGLE_RE = re.compile(r'^\s*\s*$', re.S) +_ICON_SINGLE_RE = re.compile(r'^\s*\s*$', re.S | re.I) +_CARD_RE = re.compile(r'(?P.*?)', re.S) +_FLOW_RE = re.compile(r'(?P.*?)', re.S) +_STEP_RE = re.compile(r'(?P.*?)', re.S) +QUIZ_OPEN = re.compile(r'') +QUIZ_END = re.compile(r'') +STEP_RE_SIMPLE = re.compile(r'\s*(.*)') +_FILE_MARKER_RE = re.compile(r'', re.IGNORECASE) + +# 全域原始 MD(供 AI prompt 查詢用,由 md_io._export_one 注入) +_ROOT_MD: str = "" + +# flow id 計數器 +_FLOW_SEQ: int = 0 + +# --------------------------------------------------------------------------- +# AI Prompt 輔助 +# --------------------------------------------------------------------------- + +def build_ai_prompt_for_example(full_md: str, example_seq: int) -> str: + """回傳第 example_seq 個 Example 標題到第一個 之前的文字。""" + if not full_md or example_seq <= 0: + return "" + ex_iter = list(_EXAMPLE_RE.finditer(full_md)) + if example_seq > len(ex_iter): + return "" + ex_m = ex_iter[example_seq - 1] + sol_m = _SOLUTION_OPEN_RE.search(full_md, pos=ex_m.start()) + end = sol_m.start() if sol_m else len(full_md) + return full_md[ex_m.start():end].strip() + + +def build_ai_prompt_for_solution_pos(full_md: str, pos: int) -> str: + """solution block 的 AI prompt:從最近的 Example 到 pos,若中間有 solution_end 則回空。""" + if not full_md or pos is None or pos < 0: + return "" + search_region = full_md[:pos] + last_example = None + for m in _EXAMPLE_RE.finditer(search_region): + last_example = m + if not last_example: + return "" + seg = search_region[last_example.end():] + if _SOL_END_RE.search(seg): + return "" + return full_md[last_example.start():pos].strip() + + +def build_ai_prompt_for_pos(full_md: str, pos: int) -> str: + """給定 pos,往上找最近的 ### Example 或 ,抽出 prompt 文字。""" + if not full_md or pos is None or pos < 0: + return "" + search_region = full_md[:pos] + last_example = None + for m in _EXAMPLE_RE.finditer(search_region): + last_example = m + last_problem = None + for m in _PROBLEM_RE.finditer(search_region): + last_problem = m + if not last_example and not last_problem: + return "" + if last_example: + seg = search_region[last_example.end():] + if _SOL_END_RE.search(seg): + last_example = None + if not last_example and not last_problem: + return "" + if last_example and (not last_problem or last_example.start() > last_problem.start()): + start = last_example.start() + else: + start = last_problem.end() + return full_md[start:pos].strip() + +# --------------------------------------------------------------------------- +# TOC / ID 相關 +# --------------------------------------------------------------------------- + +def _make_unique_id(base: str, used: set) -> str: + hid, i = base, 1 + while hid in used: + i += 1 + hid = f"{base}-{i}" + used.add(hid) + return hid + + +def _slugify_heading(text: str) -> str: + t = unicodedata.normalize("NFKC", text) + t = re.sub(r'\s+', '-', t.strip()) + t = re.sub(r'[^A-Za-z0-9\-_]+', '-', t) + t = re.sub(r'-{2,}', '-', t).strip('-') + return t or "sec" + + +def assign_ids_and_build_toc(nodes: list[dict]) -> list[dict]: + """為 heading 節點指派 id,並回傳 TOC 清單。""" + current_tag, tag_counters, used_ids, toc = None, {}, set(), [] + for n in nodes: + if n.get('type') == 'comment': + m = _TAG_ONLY_RE.match(n.get('content', '').strip()) + if m: + current_tag = m.group(1) + tag_counters.setdefault(current_tag, 0) + continue + if n.get('type') == 'heading': + title = n.get('content', '').strip() + if current_tag: + tag_counters[current_tag] += 1 + base = f"{current_tag}_id{tag_counters[current_tag]}" + else: + base = _slugify_heading(title) + hid = _make_unique_id(base, used_ids) + n['id'] = hid + toc.append({'label': title, 'id': hid, 'level': n.get('level', 2)}) + return toc + + +def split_blocks_into_sections(blocks: list[dict]) -> list[dict]: + """按 H2 heading 把 blocks 切成 sections,第一個為「全部」。""" + sections: list[dict] = [{"id": "sec-all", "title": "全部", "blocks": blocks[:]}] + current, sec_idx = None, 0 + for b in blocks: + if b.get("type") == "heading" and int(b.get("level", 0)) == 2: + if current: + sections.append(current) + sec_idx += 1 + current = { + "id": f"sec-{sec_idx}", + "title": (b.get("content") or f"段落 {sec_idx}").strip(), + "blocks": [b], + } + else: + if current is not None: + current["blocks"].append(b) + if current: + sections.append(current) + return sections + +# --------------------------------------------------------------------------- +# 段落 / 清單解析 +# --------------------------------------------------------------------------- + +def _split_midline_new_item(line: str) -> tuple[str | None, str | None]: + m = _SPLIT_AFTER_COLOR_CLOSE_TO_NEW_ITEM.match(line) + if not m: + return None, None + return m.group('left'), m.group('right') + + +def _emit_blank_paragraph(parsed_content: list) -> None: + parsed_content.append({'type': 'paragraph', 'content': '', 'runs': [], 'newline': 'true'}) + + +def _append_blankline_runs(blank_token: str, out_runs: list) -> None: + n = max(1, blank_token.count('\n') - 1) + for _ in range(n): + out_runs.append({'text': '', 'newline': 'true', '_blank': '1'}) + + +def parse_line_color_aware(line: str, color_stack: list) -> list[dict]: + """把一行切成 runs,依 color_stack 上色,處理 標記。""" + pos, out = 0, [] + + def cur_color(): + return color_stack[-1] if color_stack else None + + for m in _COLOR_TAG.finditer(line): + chunk = line[pos:m.start()] + if chunk: + for tk in _split_text_and_any_display_math(chunk): + if tk.get("kind") == "math_block": + run = {'latex': tk["latex"], 'kind': 'math_block'} + if cur_color(): + run['color'] = cur_color() + attach_theme_colors(run) + out.append(run) + else: + runs = build_inline_runs(tk["text"] or "") + if cur_color(): + for r in runs: + r.setdefault('color', cur_color()) + attach_theme_colors(r) + out.extend(runs) + if m.group(1): + color_stack.append(m.group(1)) + else: + name = m.group(2) + for k in range(len(color_stack) - 1, -1, -1): + if color_stack[k] == name: + color_stack.pop(k); break + pos = m.end() + + tail = line[pos:] + if tail: + for tk in _split_text_and_any_display_math(tail): + if tk.get("kind") == "math_block": + run = {'latex': tk["latex"], 'kind': 'math_block'} + if cur_color(): + run['color'] = cur_color() + attach_theme_colors(run) + out.append(run) + else: + runs = build_inline_runs(tk["text"] or "") + if cur_color(): + for r in runs: + r.setdefault('color', cur_color()) + attach_theme_colors(r) + out.extend(runs) + return out + + +def parse_paragraph_runs_color_aware(block_text: str) -> list[dict]: + """多行段落 → runs(含 $$ block math、硬換行)。""" + lines = (block_text or "").splitlines(keepends=True) + i, color_stack, runs = 0, [], [] + PARA_DOLLAR_LINE = re.compile(r'^\s*\$\$(.*)$') + + while i < len(lines): + ln = lines[i] + m_dollar = PARA_DOLLAR_LINE.match(ln.rstrip('\r\n')) + if m_dollar: + latex_lines, first = [], m_dollar.group(1) + if re.search(r'\$\$\s*$', first): + latex_lines.append(re.sub(r'\$\$\s*$', '', first)) + else: + i += 1 + while i < len(lines): + seg = lines[i].rstrip('\r\n') + if re.search(r'\$\$\s*$', seg): + latex_lines.append(re.sub(r'\$\$\s*$', '', seg)); break + latex_lines.append(seg); i += 1 + latex = "\n".join(latex_lines).strip() + run = {'latex': _ensure_block_dollars(latex), 'kind': 'math_block'} + if color_stack: + run['color'] = color_stack[-1] + attach_theme_colors(run) + runs.append(run); i += 1; continue + + raw = ln + if re.search(r'[ ]{2,}\r?\n$', raw): + body = re.sub(r'[ ]{2,}\r?\n$', '', raw) + runs.extend(parse_line_color_aware(body, color_stack)) + _append_hard_break(runs) + else: + runs.extend(parse_line_color_aware(raw.rstrip('\r\n'), color_stack)) + i += 1 + + return normalize_runs(runs) + + +def parse_list_items(list_block: str) -> list[dict]: + """解析清單 block,回傳帶 indent / marker / runs / content 的 item 清單。""" + lines, i = list_block.splitlines(), 0 + list_items, color_stack = [], [] + INDENT_PER_LEVEL = 2 + item_re = re.compile(r'^(?P\s*)(?P[*+\-]|\d+\.)\s+(?P.*)$') + + def _parse_dollar_block(start_i): + """從 lines[start_i] 開始讀 $$...$$ block,回傳 (latex_str, next_i)。""" + m_d = re.match(r'^\s*\$\$(.*)$', lines[start_i]) + if not m_d: + return None, start_i + latex_lines, first = [], m_d.group(1) + if re.search(r'\$\$\s*$', first): + latex_lines.append(re.sub(r'\$\$\s*$', '', first)) + return "\n".join(latex_lines).strip(), start_i + 1 + j = start_i + 1 + while j < len(lines): + seg = lines[j] + if re.search(r'\$\$\s*$', seg): + latex_lines.append(re.sub(r'\$\$\s*$', '', seg)); j += 1; break + latex_lines.append(seg); j += 1 + return "\n".join(latex_lines).strip(), j + + while i < len(lines): + line = lines[i] + m = item_re.match(line) + + if not m: + if list_items and line.strip(): + left, right = _split_midline_new_item(line) + if right: + list_items[-1]['runs'].extend(parse_line_color_aware((left or '').strip(), color_stack)) + list_items[-1]['content'] = _plain_text_from_runs(list_items[-1]['runs']) + lines.insert(i + 1, right); i += 1; continue + + latex, next_i = _parse_dollar_block(i) + if latex is not None: + run = {'latex': _ensure_block_dollars(latex), 'kind': 'math_block'} + if color_stack: + run['color'] = color_stack[-1]; attach_theme_colors(run) + list_items[-1]['runs'].append(run) + list_items[-1]['content'] = _plain_text_from_runs(list_items[-1]['runs']) + i = next_i; continue + + list_items[-1]['runs'].extend(parse_line_color_aware(line.strip(), color_stack)) + list_items[-1]['content'] = _plain_text_from_runs(list_items[-1]['runs']) + i += 1; continue + + color_stack = [] + raw_indent = m.group('indent') + indent_spaces = raw_indent.expandtabs(INDENT_PER_LEVEL) + indent = len(indent_spaces) // INDENT_PER_LEVEL + marker = m.group('marker') + content = m.group('content').rstrip() + runs = parse_line_color_aware(content, color_stack) + list_items.append({'indent': indent, 'marker': marker, 'runs': runs, 'content': _plain_text_from_runs(runs)}) + i += 1 + + while i < len(lines) and not item_re.match(lines[i]): + ln = lines[i] + if not ln.strip(): + i += 1; continue + left, right = _split_midline_new_item(ln) + if right: + list_items[-1]['runs'].extend(parse_line_color_aware((left or '').strip(), color_stack)) + list_items[-1]['content'] = _plain_text_from_runs(list_items[-1]['runs']) + lines.insert(i + 1, right); i += 1; continue + latex, next_i = _parse_dollar_block(i) + if latex is not None: + run = {'latex': _ensure_block_dollars(latex), 'kind': 'math_block'} + if color_stack: + run['color'] = color_stack[-1]; attach_theme_colors(run) + list_items[-1]['runs'].append(run) + list_items[-1]['content'] = _plain_text_from_runs(list_items[-1]['runs']) + i = next_i; continue + list_items[-1]['runs'].extend(parse_line_color_aware(ln.strip(), color_stack)) + list_items[-1]['content'] = _plain_text_from_runs(list_items[-1]['runs']) + i += 1 + + return list_items + +# --------------------------------------------------------------------------- +# 特殊 marker 解析 +# --------------------------------------------------------------------------- + +def _ggb_id_from_url(u: str) -> str | None: + m = re.search(r'/m/([A-Za-z0-9]+)', u or '') + return m.group(1) if m else None + + +def _ggb_node_from_attrs(attrs: dict) -> dict: + gid = (attrs.get("id") or "").strip() + if not gid and "url" in attrs: + gid = _ggb_id_from_url(attrs.get("url", "")) or "" + return { + "type": "geogebra", + "id": gid, + "width": attrs.get("w") or attrs.get("width") or "100%", + "height": attrs.get("h") or attrs.get("height") or "480", + "border": attrs.get("border") or "0", + "caption": attrs.get("caption") or "", + "card": attrs.get("card") or "0", + } + + +def parse_geogebra_marker(s: str) -> dict: + m = _GGB_SINGLE_RE.search(s or '') + if not m: + return {"type": "paragraph", "content": s} + attrs = _attrs_to_dict(m.group('attrs') or "") + gid = attrs.get("id") or _ggb_id_from_url(attrs.get("url", "")) + return { + "type": "geogebra", + "id": (gid or "").strip(), + "width": attrs.get("w") or attrs.get("width") or "100%", + "height": attrs.get("h") or attrs.get("height") or "480", + "border": attrs.get("border") or "0", + "caption": attrs.get("caption") or "", + "card": attrs.get("card") or "0", + } + + +def parse_icon_marker(s: str) -> dict: + """解析 為 icon 節點。""" + m = _ICON_SINGLE_RE.search(s or "") + if not m: + return {"type": "paragraph", "content": s} + attrs_str = (m.group("attrs") or "").strip() + attrs = _attrs_to_dict(attrs_str) + icon = (attrs.get("icon") or attrs.get("name") or "").strip() + height = (attrs.get("height") or attrs.get("h") or "18").strip() + if not icon: + m2 = re.search(r'=\s*"([^"]+)"', attrs_str) + if m2: + icon = m2.group(1).strip() + elif attrs_str: + icon = attrs_str.strip() + return {"type": "icon", "icon": icon, "height": height} + + +def parse_pyfunc_marker(s: str) -> dict: + m = _PYFUNC_RE.search(s or '') + if not m: + return {"type": "paragraph", "content": s} + attrs = _attrs_to_dict(m.group('attrs') or "") + kwargs: dict = {} + if 'params' in attrs: + try: + kwargs = json.loads(attrs['params']) + except Exception: + kwargs = {} + for k, v in attrs.items(): + if k not in ('path', 'call', 'params'): + kwargs.setdefault(k, v) + return { + "type": "pyfunc", + "path": (attrs.get("path") or "").strip(), + "call": (attrs.get("call") or "make_view").strip(), + "kwargs": kwargs, + } + + +def _parse_color_pair(token: str) -> tuple[str, str]: + s = (token or "").strip() + if not s: + return "", "" + if "|" in s: + a, b = s.split("|", 1) + return _norm_hex(a.strip()), _norm_hex(b.strip()) + c = _norm_hex(s) + return c, c + + +def parse_card_block(src: str) -> dict: + m = _CARD_RE.search(src) + if not m: + return {"type": "card", "content": src} + attrs = _attrs_to_dict(m.group("attrs") or "") + inner = (m.group("body") or "").strip() + kind = attrs.get("type") or attrs.get("kind") or "" + headline = attrs.get("headline") or attrs.get("title") or "" + + if not (kind and headline): + lines = inner.splitlines() + nz = [i for i, ln in enumerate(lines) if ln.strip()] + if nz: + if not kind: + kind = lines[nz[0]].strip(); lines[nz[0]] = "" + if len(nz) >= 2 and not headline: + headline = lines[nz[1]].strip(); lines[nz[1]] = "" + inner = "\n".join(lines).lstrip() + + bg_l, bg_d = _parse_color_pair(attrs.get("bg") or attrs.get("background") or attrs.get("body_bg") or "") + fg_l, fg_d = _parse_color_pair(attrs.get("fg") or attrs.get("text") or attrs.get("header_fg") or "") + accent = (attrs.get("accent") or attrs.get("badge") or attrs.get("palette") or "").strip() + body_blocks = parse_content_block(inner) + node = {"type": "card", "kind": kind, "headline": headline, "body": body_blocks} + if bg_l or bg_d: node["bg_light"], node["bg_dark"] = bg_l, bg_d + if fg_l or fg_d: node["fg_light"], node["fg_dark"] = fg_l, fg_d + if accent: node["accent"] = accent + return node + + +def _split_mcq_answers(ans_raw: str) -> list[str]: + raw = (ans_raw or "").strip().lower() + if not raw: + return [] + raw = raw.replace(",", ",").replace("、", ",").replace(";", ",").replace("|", ",").replace(" ", ",") + raw = raw.strip(",") + if not raw: + return [] + if re.fullmatch(r"[abcd]+", raw) and "," not in raw: + tokens = list(raw) + else: + tokens = [t for t in re.split(r"[,\s]+", raw) if t] + idxmap = {"1": "a", "2": "b", "3": "c", "4": "d"} + out = [] + for t in tokens: + t = t.strip().lower().rstrip(".") + t = idxmap.get(t, t) + if t in ("a", "b", "c", "d") and t not in out: + out.append(t) + return out + + +def parse_interactive_block(src: str) -> dict: + inner = re.sub(r'^\s*\s*', '', src, flags=re.S) + inner = re.sub(r'\s*$', '', inner, flags=re.S) + + m_fill_zh = re.search(r'(.*?)', inner, re.S) + m_fill_en = re.search(r'(.*?)', inner, re.S) + m_fill = m_fill_en or m_fill_zh + m_mcq_old = re.search(r'(.*?)', inner, re.S) + m_mcq_new = re.search(r'(.*?)', inner, re.S) + m_mcq = m_mcq_new or m_mcq_old + + beg = min([m.start() for m in [m_fill, m_mcq] if m] or [len(inner)]) + prompt_md = inner[:beg].rstrip() + prompt_runs: list[dict] = [] + if prompt_md: + for part in _BLANKPARA_SPLIT.split(prompt_md): + if not part: continue + if _BLANKPARA_SPLIT.fullmatch(part): + _append_blankline_runs(part, prompt_runs) + else: + runs = parse_paragraph_runs_color_aware(part) or [] + for r in runs: r['newline'] = 'false' + prompt_runs.extend(runs) + + if m_fill: + attrs = _attrs_to_dict(m_fill.group(1) or "") + body = (m_fill.group(2) or "").strip() + right = attrs.get("right", ""); wrong = attrs.get("wrong", "") + ans = attrs.get("ans") or (body.splitlines()[0].strip() if body else "") + answers = [s.strip() for s in ans.split("|") if s.strip()] + normalize = [s.strip() for s in (attrs.get("normalize") or "sym,numeric,nospace").split(",") if s.strip()] + if not prompt_runs and body: + for p_idx, para in enumerate(re.split(r'\n\s*\n', body)): + runs = parse_paragraph_runs_color_aware(para) + is_last = (p_idx == len(re.split(r'\n\s*\n', body)) - 1) + for r in runs: r.setdefault("newline", "false" if is_last else "true") + prompt_runs.extend(runs) + return { + "type": "quiz", "qtype": "fill", "id": attrs.get("id", ""), + "prompt_runs": prompt_runs, "answers": answers, "normalize": normalize, + "placeholder": attrs.get("placeholder", ""), "border": attrs.get("border", "1"), + "inline_math": attrs.get("inline_math", "1"), "right_msg": right, "wrong_msg": wrong, + "card": attrs.get("card", "1"), + } + + if m_mcq: + attrs = _attrs_to_dict(m_mcq.group(1) or "") + body = (m_mcq.group(2) or "").strip() + right = attrs.get("right", ""); wrong = attrs.get("wrong", "") + hints = {} + for k, v in attrs.items(): + kk = (k or "").strip().lower() + if kk.startswith("hint_"): + opt = kk.split("_", 1)[1].strip().lower() + if opt in ("a", "b", "c", "d") and str(v).strip(): + hints[opt] = str(v).strip() + indent_flag = attrs.get("indent") or attrs.get("indent_options") + lines = body.splitlines() + lead_lines, opt_lines, seen_option = [], [], False + for ln in lines: + t = ln.strip() + if re.match(r'^[aAdDbBcC]\s*\.', t): + seen_option = True; opt_lines.append(t) + else: + (opt_lines if seen_option else lead_lines).append(ln) + if not prompt_runs and lead_lines: + paragraphs = re.split(r'\n\s*\n', "\n".join(lead_lines).rstrip()) + for p_idx, para in enumerate(paragraphs): + runs = parse_paragraph_runs_color_aware(para) + is_last = (p_idx == len(paragraphs) - 1) + for r in runs: r.setdefault("newline", "false" if is_last else "true") + prompt_runs.extend(runs) + opts = [] + for t in (opt_lines if opt_lines else lines): + tt = t.strip() + for key, pat in [("a", r'^[aA]\s*\.'), ("b", r'^[bB]\s*\.'), ("c", r'^[cC]\s*\.'), ("d", r'^[dD]\s*\.')]: + if re.match(pat, tt): + opts.append({"key": key, "text": tt.split('.', 1)[1].strip()}) + multi_flag = attrs.get("multi") or attrs.get("multiple") or attrs.get("checkbox") + is_multi = str(multi_flag).strip().lower() in ("1", "true", "yes", "y", "on") + ans_raw = (attrs.get("ans", "") or "").strip().lower().rstrip(".") + ans_list = _split_mcq_answers(ans_raw) + ans_one = ans_list[0] if ans_list else "" + node = { + "type": "quiz", "qtype": "multi" if is_multi else "choice", + "id": attrs.get("id", ""), "prompt_runs": prompt_runs, "options": opts, + "shuffle": attrs.get("shuffle", "0") in ("1", "true", "yes"), + "explain": attrs.get("explain", ""), "right_msg": right, "wrong_msg": wrong, + "wrong_hints": hints, "card": attrs.get("card", "1"), + } + if is_multi: + node["answers"] = ans_list; node["answer"] = "" + else: + node["answer"] = ans_one + if indent_flag is not None: + node["indent_options"] = indent_flag + return node + + return {"type": "paragraph", "content": prompt_md, "runs": prompt_runs} + + +def _next_flow_id() -> str: + global _FLOW_SEQ + _FLOW_SEQ += 1 + return f"flow-{_FLOW_SEQ}" + + +def parse_flow_block(src: str) -> dict: + m = _FLOW_RE.search(src) + if not m: + return {"type": "paragraph", "content": src} + fattrs = _attrs_to_dict(m.group("attrs") or "") + body = (m.group("body") or "").strip() + flow_id = fattrs.get("id") or _next_flow_id() + persist = (fattrs.get("persist") or "").strip() + + steps_raw = list(_STEP_RE.finditer(body)) + if not steps_raw: + steps_raw_iter = [("", body)] + def _unwrap(x): return x[0], x[1] + else: + steps_raw_iter = steps_raw + def _unwrap(mm): return (mm.group("attrs") or ""), (mm.group("body") or "").strip() + + steps, quiz_seq, prev_gate_qid = [], 0, None + for i, raw in enumerate(steps_raw_iter, start=1): + sattrs_raw, sbody = _unwrap(raw) + sattrs = _attrs_to_dict(sattrs_raw) + step_id = sattrs.get("id") or f"step-{i}" + title = sattrs.get("title") or f"步驟 {i}" + cond = (sattrs.get("cond") or "all").lower().strip() + content_blocks = parse_document(sbody) + first_quiz_id = None + for b in content_blocks: + if b.get("type") == "quiz": + if not b.get("id"): + quiz_seq += 1 + b["id"] = f"{flow_id}::{step_id}::q{quiz_seq}" + b["flow"] = flow_id; b["step"] = step_id + if first_quiz_id is None: + first_quiz_id = b["id"] + steps.append({"id": step_id, "title": title, "cond": cond, "content": content_blocks, "gate_from": prev_gate_qid}) + if first_quiz_id is not None: + prev_gate_qid = first_quiz_id + + return {"type": "flow", "id": flow_id, "persist": persist, "steps": steps} + + +def parse_solution_block(src: str) -> dict: + m_open = _SOL_OPEN.search(src) + m_close = _SOL_CLOSE.search(src, m_open.end() if m_open else 0) + if not (m_open and m_close): + return {"type": "paragraph", "content": src} + + attrs_raw = (m_open.group("attrs") or "").strip() + shortcut_label = "" + attrs_for_dict = attrs_raw + m_short = re.match(r'^_([^\s]+)(.*)$', attrs_raw) + if m_short: + shortcut_label = (m_short.group(1) or "").strip() + attrs_for_dict = (m_short.group(2) or "").strip() + attrs = _attrs_to_dict(attrs_for_dict) + inner = src[m_open.end():m_close.start()] + body_blocks = [b for b in parse_document(inner) if b.get('type') != 'comment'] + + label = ((attrs.get("label") or shortcut_label or "").strip()) or "看解法" + default = (attrs.get("default", "closed") or "closed").lower() + persist = (attrs.get("persist", "none") or "none").lower() + card = str(attrs.get("card", "0")) + accent = attrs.get("accent", "") + after = attrs.get("after", "") + + h = hashlib.md5() + for part in [inner, label, default, persist, card, accent, after]: + h.update((part or "").encode("utf-8")) + h.update(b"|") + uid = f"sol_{h.hexdigest()[:10]}" + + return { + "type": "solution", "uid": uid, "label": label, + "default": default, "persist": persist, "card": card, + "accent": accent, "after": after, "body": body_blocks, + } + + +def parse_quizzes(md: str) -> list[dict]: + """解析 ... 區塊(order 題型)。""" + out, i = [], 0 + while True: + m = QUIZ_OPEN.search(md, i) + if not m: break + n = QUIZ_END.search(md, m.end()) + if not n: break + block = md[m.end():n.start()] + attrs = _parse_attrs(m.group('attrs') or "") + qtype = (attrs.get("qtype") or "").strip().lower() or "multi" + title = (attrs.get("title") or "練習題").strip() + card = 1 if str(attrs.get("card", "1")).lower() in ("1", "true", "yes") else 0 + shuffle = str(attrs.get("shuffle", "0")).lower() in ("1", "true", "yes") + prompt_md = "" + for ln in block.splitlines(): + s = ln.strip() + if s and not s.startswith(".*?|' + r'.*?|' + r'.*?|' + r'.*?|' + r'|' + r'|' + r'.*?|' + r'.*?|' + r'.*?|' + r'.*?|' + r'.*?|' + r'|' + r'^\s*\s*$|' + r'', + re.DOTALL, + ) + + for match in re.finditer(pattern, entire_markdown_text): + start, end = match.span() + pre_text = entire_markdown_text[last_match_end:start] + if pre_text: + parsed_results.extend(parse_content_block(pre_text)) + content = match.group(0) + + if content.lstrip().startswith('') +COLOR_CLOSE_ANY = re.compile(r'') + +# --------------------------------------------------------------------------- +# CSS 命名色表 +# --------------------------------------------------------------------------- +_CSS_NAMED_TO_HEX: dict[str, str] = { + "black": "#000000", "white": "#ffffff", "gray": "#808080", "grey": "#808080", + "silver": "#c0c0c0", "red": "#ff0000", "green": "#008000", "blue": "#0000ff", + "yellow": "#ffff00", "orange": "#ffa500", "brown": "#a52a2a", "purple": "#800080", + "violet": "#8a2be2", "indigo": "#4b0082", "pink": "#ffc0cb", "magenta": "#ff00ff", + "cyan": "#00ffff", "teal": "#008080", "lime": "#00ff00", "gold": "#ffd700", +} + +# 特殊顏色例外對照(不走一般 HSL 公式) +_COLOR_PAIR_TABLE: dict[str, tuple[str, str]] = { + "#0000ff": ("#A6B7FF", "#4DFFFF"), + "#4dffff": ("#4DFFFF", "#003B66"), +} + +# --------------------------------------------------------------------------- +# HEX 正規化 +# --------------------------------------------------------------------------- +def _norm_hex(c: str) -> str: + """把 CSS 顏色值統一成 7 位 #rrggbb 格式;命名色也轉換。""" + if not isinstance(c, str): + return "" + s = c.strip() + if not s: + return "" + if s.startswith("#"): + if len(s) == 4: # #rgb → #rrggbb + return "#" + "".join(ch * 2 for ch in s[1:]) + return s[:7] if len(s) >= 7 else s + lo = s.lower() + if lo in _CSS_NAMED_TO_HEX: + return _CSS_NAMED_TO_HEX[lo] + return s + +# --------------------------------------------------------------------------- +# HEX ↔ HSL +# --------------------------------------------------------------------------- +def _hex_to_hsl(hx: str) -> tuple[float, float, float]: + hx = _norm_hex(hx) + if not (hx.startswith("#") and len(hx) == 7): + return (0.0, 0.0, 0.0) + r = int(hx[1:3], 16) / 255 + g = int(hx[3:5], 16) / 255 + b = int(hx[5:7], 16) / 255 + mx, mn = max(r, g, b), min(r, g, b) + l = (mx + mn) / 2 + if mx == mn: + return (0.0, 0.0, l) + d = mx - mn + s = d / (2 - mx - mn) if l > 0.5 else d / (mx + mn) + if mx == r: + h = (g - b) / d + (6 if g < b else 0) + elif mx == g: + h = (b - r) / d + 2 + else: + h = (r - g) / d + 4 + return (h / 6, s, l) + + +def _hsl_to_hex(h: float, s: float, l: float) -> str: + def _f(p: float, q: float, t: float) -> float: + if t < 0: t += 1 + if t > 1: t -= 1 + if t < 1 / 6: return p + (q - p) * 6 * t + if t < 1 / 2: return q + if t < 2 / 3: return p + (q - p) * (2 / 3 - t) * 6 + return p + + if s == 0: + r = g = b = l + else: + q = l + s - l * s if l >= 0.5 else l * (1 + s) + p = 2 * l - q + r = _f(p, q, h + 1 / 3) + g = _f(p, q, h) + b = _f(p, q, h - 1 / 3) + return "#{:02x}{:02x}{:02x}".format(int(r * 255 + 0.5), int(g * 255 + 0.5), int(b * 255 + 0.5)) + +# --------------------------------------------------------------------------- +# 亮 / 暗色計算 +# --------------------------------------------------------------------------- +def _to_dark_color(hex_light: str) -> str: + """把亮色調暗,作為 dark mode 用色。""" + hx_low = _norm_hex(hex_light).lower() + if hx_low in _COLOR_PAIR_TABLE: + _, dark_hint = _COLOR_PAIR_TABLE[hx_low] + if dark_hint: + return _norm_hex(dark_hint) + h, s, l = _hex_to_hsl(hex_light) + if l > 0.7: + l2 = 0.50 + elif l > 0.55: + l2 = 0.46 + (l - 0.55) * 0.10 + else: + l2 = max(0.42, l * 0.75 + 0.10) + return _hsl_to_hex(h, max(0.10, s * 0.80), l2) + + +def _to_light_color(hex_dark: str) -> str: + """把暗色調亮,作為 light mode 用色。""" + h, s, l = _hex_to_hsl(hex_dark) + if l < 0.35: + l2 = min(0.82, l * 0.3 + 0.65) + s2 = max(0.10, s * 0.75) + else: + l2 = min(0.86, 1 - (1 - l) * 0.5) + s2 = max(0.10, s * 0.80) + return _hsl_to_hex(h, s2, l2) + + +def _is_named_color(tok: str) -> bool: + return isinstance(tok, str) and tok.strip().lower() in _CSS_NAMED_TO_HEX + +# --------------------------------------------------------------------------- +# 主要對外 API +# --------------------------------------------------------------------------- +def attach_theme_colors(run: dict) -> None: + """ + 根據 run 裡的 color / color_light / color_dark, + 補齊 color_light 與 color_dark 兩個欄位(就地修改)。 + """ + if run.get("color_light") and run.get("color_dark"): + return + if run.get("color_light") and not run.get("color_dark"): + run["color_dark"] = _to_dark_color(run["color_light"]) + return + if run.get("color_dark") and not run.get("color_light"): + run["color_light"] = _to_light_color(run["color_dark"]) + return + + col = run.get("color") + if not col: + return + + if _is_named_color(col): + run["color_light"] = col + run["color_dark"] = _to_dark_color(_norm_hex(col)) + return + + c = _norm_hex(col) + _, _, L = _hex_to_hsl(c) + if L >= 0.5: + run["color_light"] = col + run["color_dark"] = _to_dark_color(c) + else: + run["color_dark"] = col + run["color_light"] = _to_light_color(c) diff --git a/layout/converter/md_io.py b/layout/converter/md_io.py new file mode 100644 index 0000000000000000000000000000000000000000..12fa5cc6c9b3c95d41d679d7fe7f81992711ab2a --- /dev/null +++ b/layout/converter/md_io.py @@ -0,0 +1,202 @@ +""" +md_io.py +-------- +檔案讀寫與 build pipeline(最頂層,依賴全部其他模組)。 + +公開 API: + build_from_config(config_path, force=False) → List[Path] +""" +from __future__ import annotations +from pathlib import Path +from typing import List +import json + +from . import md_blocks # 注入 _ROOT_MD 用 +from .md_blocks import ( + parse_document, + assign_ids_and_build_toc, + split_blocks_into_sections, +) + +# --------------------------------------------------------------------------- +# 副檔名 → 語言對照 +# --------------------------------------------------------------------------- +_EXT2LANG: dict[str, str] = { + ".py": "python", ".js": "javascript", ".ts": "typescript", + ".css": "css", ".html": "markup", ".md": "markdown", + ".json": "json", ".yml": "yaml", ".yaml": "yaml", + ".tex": "latex", ".r": "r", ".cpp": "cpp", ".c": "c", +} + +# --------------------------------------------------------------------------- +# 檔案嵌入工具 +# --------------------------------------------------------------------------- + +def _parse_file_spec(spec: str) -> tuple[str, str | None]: + spec = (spec or "").strip() + if "::" in spec: + p, f = spec.split("::", 1) + return p.strip(), (f.strip() or None) + return spec, None + + +def _split_md_by_file_markers(md_text: str) -> list[tuple[str, str]]: + import re + FILE_MARKER_RE = re.compile( + r'', re.IGNORECASE + ) + segs, pos = [], 0 + for m in FILE_MARKER_RE.finditer(md_text or ""): + if m.start() > pos: + segs.append(("text", md_text[pos:m.start()])) + gd = m.groupdict() if hasattr(m, "groupdict") else {} + file_token = (gd.get("path") or "").strip() + if not file_token: + file_token = md_text[m.start():m.end()] + segs.append(("file", file_token)) + pos = m.end() + if pos < len(md_text or ""): + segs.append(("text", md_text[pos:])) + return segs + + +def _resolve_code_file(md_dir: Path, file_token: str) -> Path | None: + p = Path(file_token) + if not p.is_absolute(): + p = (md_dir / file_token).resolve() + if not p.exists(): + alt = (Path.cwd() / "assets" / "files" / file_token).resolve() + if alt.exists(): + p = alt + return p if p.exists() and p.is_file() else None + + +def _read_code_for_embed(p: Path, max_bytes: int = 300_000) -> tuple[str, str]: + ext = p.suffix.lower() + lang = _EXT2LANG.get(ext, "text") + data = p.read_bytes() + note = "" + if len(data) > max_bytes: + data = data[:max_bytes] + note = f"\n\n# [truncated] file too large; showing first {max_bytes} bytes\n" + code = data.decode("utf-8", errors="replace") + note + return code, lang + + +def _materialize_file_embeds(nodes: list[dict], base_dir: Path) -> list[dict]: + out: list[dict] = [] + for n in nodes: + if not isinstance(n, dict): + out.append(n); continue + if n.get("type") == "file_embed": + file_token = (n.get("relpath") or "").strip() + p = _resolve_code_file(base_dir, file_token) + if not p: + out.append({"type": "code", "filename": file_token, "lang": "text", + "code": f"# [missing] cannot locate file: {file_token}"}) + else: + code, lang = _read_code_for_embed(p) + out.append({"type": "code", "filename": p.name, "path": str(p), "lang": lang, "code": code}) + elif n.get("type") == "card": + n["body"] = _materialize_file_embeds(n.get("body") or [], base_dir) + out.append(n) + elif n.get("type") == "flow": + steps = [] + for s in n.get("steps") or []: + s = dict(s) + s["content"] = _materialize_file_embeds(s.get("content") or [], base_dir) + steps.append(s) + n["steps"] = steps + out.append(n) + elif n.get("type") == "solution": + n["body"] = _materialize_file_embeds(n.get("body") or [], base_dir) + out.append(n) + else: + out.append(n) + return out + +# --------------------------------------------------------------------------- +# 單檔轉換 +# --------------------------------------------------------------------------- + +def _export_one(md_path: Path, out_path: Path) -> Path: + text = md_path.read_text(encoding="utf-8") + md_dir = md_path.parent + + md_blocks._ROOT_MD = text + + segments = _split_md_by_file_markers(text) + blocks: list[dict] = [] + + for kind, payload in segments: + if kind == "text": + if payload.strip(): + blocks.extend(parse_document(payload, root_md=text)) + else: + file_token, func = _parse_file_spec(payload) + p = _resolve_code_file(md_dir, file_token) + if not p: + blocks.append({"type": "code", "filename": file_token, "lang": "text", + "code": f"# [missing] cannot locate file: {file_token}"}) + else: + code, lang = _read_code_for_embed(p) + if func: + blocks.append({"type": "pycall", "filename": p.name, "path": str(p), + "func": func, "lang": lang, "code": code}) + else: + blocks.append({"type": "code", "filename": p.name, "path": str(p), + "lang": lang, "code": code}) + + blocks = _materialize_file_embeds(blocks, md_dir) + toc = assign_ids_and_build_toc(blocks) + sections = split_blocks_into_sections(blocks) + + payload = {"toc": toc, "blocks": blocks, "sections": sections} + out_path.parent.mkdir(parents=True, exist_ok=True) + out_path.write_text(json.dumps(payload, ensure_ascii=False, indent=4), encoding="utf-8") + return out_path + +# --------------------------------------------------------------------------- +# Build pipeline(對外 API) +# --------------------------------------------------------------------------- + +def build_from_config( + config_path: str | Path, + force: bool = False, +) -> List[Path]: + cfgp = Path(config_path).resolve() + base = cfgp.parent + cfg = json.loads(cfgp.read_text(encoding="utf-8")) + + up_to_date = False if force else bool(cfg.get("up_to_date", True)) + outputs: List[Path] = [] + + for t in cfg.get("tasks", []): + md = (base / t["md"]).resolve() + out = (base / t["out"]).resolve() + + if not md.exists(): + raise FileNotFoundError(f"[build] Markdown not found: {md}") + + need = True + if not force and up_to_date and out.exists(): + need = md.stat().st_mtime > out.stat().st_mtime + + if need or not out.exists(): + p = _export_one(md, out) + print(f"[build] wrote: {p}") + else: + print(f"[build] up-to-date: {out}") + p = out + + outputs.append(p) + + return outputs + + +if __name__ == "__main__": + import sys + if len(sys.argv) >= 2: + build_from_config(sys.argv[1]) + else: + print("Usage: python md_io.py ") diff --git a/layout/converter/md_pipeline.py b/layout/converter/md_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..b1e0ce864f4d80188c5a67df66d9758380f7ad0e --- /dev/null +++ b/layout/converter/md_pipeline.py @@ -0,0 +1,101 @@ +""" +Test2ChMd.py ← 向下相容 shim +------------------------------- +原始 2097 行已拆分至以下六個模組(均放在同一 layout/ 資料夾下): + + md_color.py 顏色工具 + md_tex.py TeX 分隔符 + md_attrs.py 屬性解析 + md_runs.py 行內 run 組裝 + md_blocks.py block / 文件解析 + md_io.py I/O + build pipeline + +此 shim 重新匯出所有公開 API,確保現有程式碼不需要修改: + + from layout.Test2ChMd import build_from_config ← 仍可用 + from layout.Test2ChMd import parse_document ← 仍可用 +""" + +# ── Layer 0:顏色 ────────────────────────────────────────────────────────── +from .md_color import ( # noqa: F401 + attach_theme_colors, + _norm_hex, + _hex_to_hsl, _hsl_to_hex, + _to_dark_color, _to_light_color, + _is_named_color, + _CSS_NAMED_TO_HEX, + _COLOR_PAIR_TABLE, +) + +# ── Layer 0:TeX ────────────────────────────────────────────────────────── +from .md_tex import ( # noqa: F401 + _strip_outer_tex_delims, + _ensure_inline_dollars, + _ensure_block_dollars, +) + +# ── Layer 0:屬性解析 ────────────────────────────────────────────────────── +from .md_attrs import ( # noqa: F401 + _attrs_to_dict, + _parse_attrs, + _slug_ascii, +) + +# ── Layer 1-2:行內 run ──────────────────────────────────────────────────── +from .md_runs import ( # noqa: F401 + split_color_runs, + split_math_runs, + split_emphasis_runs, + normalize_runs, + build_inline_runs, + emit_text_runs_color_aware, + _has_newline_token, + _plain_text_from_runs, + _append_hard_break, + _materialize_hard_break_tokens, + _split_text_and_any_display_math, + _split_text_and_icon, + _split_text_links_images, + _split_text_and_ggb, +) + +# ── Layer 2-5:block / 文件解析 ──────────────────────────────────────────── +from .md_blocks import ( # noqa: F401 + # 段落 / 清單 + parse_line_color_aware, + parse_paragraph_runs_color_aware, + parse_list_items, + _emit_blank_paragraph, + _append_blankline_runs, + _split_midline_new_item, + # 特殊 marker + parse_geogebra_marker, + parse_icon_marker, + parse_pyfunc_marker, + parse_card_block, + parse_interactive_block, + parse_flow_block, + parse_solution_block, + parse_quizzes, + # 頂層 + parse_content_block, + parse_document, + # TOC / sections + assign_ids_and_build_toc, + split_blocks_into_sections, + # AI prompt + build_ai_prompt_for_example, + build_ai_prompt_for_pos, + build_ai_prompt_for_solution_pos, +) + +# ── Layer 6:I/O ─────────────────────────────────────────────────────────── +from .md_io import ( # noqa: F401 + build_from_config, + _export_one, + _parse_file_spec, + _split_md_by_file_markers, + _resolve_code_file, + _read_code_for_embed, + _EXT2LANG, +) diff --git a/layout/converter/md_runs.py b/layout/converter/md_runs.py new file mode 100644 index 0000000000000000000000000000000000000000..245d7657c7f0c373f0e85dd8f3339211813342d1 --- /dev/null +++ b/layout/converter/md_runs.py @@ -0,0 +1,338 @@ +""" +md_runs.py +---------- +行內 run(inline run)的切分、組裝與正規化。 + +依賴:md_color, md_tex, md_attrs(相對 import) + +公開 API: + build_inline_runs(text) → List[run] 主要入口 + emit_text_runs_color_aware(text, cs) → List[run] + normalize_runs(runs) → List[run] + split_color_runs(text) → List[run] + split_math_runs(text) → List[run] + split_emphasis_runs(text) → List[run] + _has_newline_token(runs) → bool + _plain_text_from_runs(runs) → str + _append_hard_break(runs) → None + _materialize_hard_break_tokens(runs) → runs + _split_text_and_any_display_math(s) → List[dict] + _split_text_and_icon(text) → List[tuple] + _split_text_links_images(line) → List[dict] + _split_text_and_ggb(s) → List[dict] +""" +from __future__ import annotations +import re + +from .md_color import attach_theme_colors, COLOR_OPEN, COLOR_CLOSE_ANY +from .md_tex import _ensure_inline_dollars, _ensure_block_dollars +from .md_attrs import _attrs_to_dict + +# --------------------------------------------------------------------------- +# 正規表達式 +# --------------------------------------------------------------------------- +_SPLIT_DOLLAR2 = re.compile(r'(\$\$.*?\$\$)', re.S) +_WRAP_DOLLAR2 = re.compile(r'^\s*\$\$(.*?)\$\$\s*$', re.S) + +_GGB_ANY_RE = re.compile(r'') +_ICON_INLINE_RE = re.compile(r'', re.I) + +_IMG_RE = re.compile(r'!\[([^\]]*)\]\(([^)\s]+)\)') +_LINK_RE = re.compile(r'(?|\s*') + +# --------------------------------------------------------------------------- +# 文字切分工具 +# --------------------------------------------------------------------------- + +def _split_text_and_any_display_math(s: str) -> list[dict]: + parts = _SPLIT_DOLLAR2.split(s or "") + out = [] + for p in parts: + if not p: continue + m = _WRAP_DOLLAR2.match(p) + if m: + out.append({"kind": "math_block", "latex": _ensure_block_dollars(m.group(1).strip())}) + else: + out.append({"kind": "text", "text": p}) + return out + + +def _split_text_and_icon(text: str) -> list[tuple[str, str]]: + parts, pos = [], 0 + for m in _ICON_INLINE_RE.finditer(text): + if m.start() > pos: + parts.append(("text", text[pos:m.start()])) + parts.append(("icon", m.group(0))) + pos = m.end() + if pos < len(text): + parts.append(("text", text[pos:])) + return parts + + +def _split_text_links_images(line: str) -> list[dict]: + nodes, i = [], 0 + img_matches = list(_IMG_RE.finditer(line)) + img_spans = [(m.start(), m.end()) for m in img_matches] + matches = [("img", m.start(), m.end(), m) for m in img_matches] + for m in _LINK_RE.finditer(line): + st, ed = m.start(), m.end() + if any(st >= a and ed <= b for a, b in img_spans): + continue + matches.append(("a", st, ed, m)) + if not matches: + return [{"type": "text", "content": line}] + matches.sort(key=lambda x: x[1]) + for kind, start, end, m in matches: + if start > i: + chunk = line[i:start] + if chunk: + nodes.append({"type": "text", "content": chunk}) + if kind == "img": + nodes.append({"type": "picture", "alt": m.group(1).strip(), "src": m.group(2).strip()}) + else: + nodes.append({"type": "URL", "text": m.group(1).strip(), "href": m.group(2).strip()}) + i = end + if i < len(line): + tail = line[i:] + if tail: + nodes.append({"type": "text", "content": tail}) + return nodes + + +def _split_text_and_ggb(s: str) -> list[dict]: + out, i = [], 0 + for m in _GGB_ANY_RE.finditer(s or ""): + if m.start() > i: + out.append({"kind": "text", "text": s[i:m.start()]}) + attrs = _attrs_to_dict(m.group("attrs") or "") + out.append({"kind": "ggb", "attrs": attrs}) + i = m.end() + if i < len(s or ""): + out.append({"kind": "text", "text": s[i:]}) + return out + +# --------------------------------------------------------------------------- +# Run 切分器 +# --------------------------------------------------------------------------- + +def split_color_runs(text: str) -> list[dict]: + runs, i = [], 0 + while True: + m_open = COLOR_OPEN.search(text, i) + if not m_open: + if i < len(text): + runs.append({"text": text[i:]}) + break + if m_open.start() > i: + runs.append({"text": text[i:m_open.start()]}) + name = m_open.group(1) + m_close = re.compile(rf'').search(text, m_open.end()) + if not m_close: + runs.append({"text": text[m_open.start():]}) + break + inner = text[m_open.end():m_close.start()] + runs.append({"text": inner, "color": name}) + i = m_close.end() + return runs + + +def split_math_runs(text: str) -> list[dict]: + from .md_blocks import parse_icon_marker + + runs, i = [], 0 + for m in _MATH_INLINE_RE.finditer(text or ""): + if m.start() > i: + before = text[i:m.start()] + for k2, frag in _split_text_and_icon(before): + if k2 == "text": + if frag: runs.append({"text": frag}) + else: + icon_info = parse_icon_marker(frag) + runs.append({"kind": "icon", "icon": icon_info.get("icon", ""), "height": icon_info.get("height", "18")}) + + latex = (m.group(1) or m.group(2) or "").strip() + runs.append({"latex": _ensure_inline_dollars(latex), "kind": "math"}) + i = m.end() + + if i < len(text or ""): + from .md_blocks import parse_icon_marker as _pim + tail = text[i:] + for k2, frag in _split_text_and_icon(tail): + if k2 == "text": + if frag: runs.append({"text": frag}) + else: + icon_info = _pim(frag) + runs.append({"kind": "icon", "icon": icon_info.get("icon", ""), "height": icon_info.get("height", "18")}) + + return runs + + +def split_emphasis_runs(text: str) -> list[dict]: + runs, i = [], 0 + for m in _EMPH_RE.finditer(text): + if m.start() > i: + runs.append({"text": text[i:m.start()]}) + chunk = m.group(0) + if chunk.startswith("***") and chunk.endswith("***"): + runs.append({"text": chunk[3:-3], "style": "bold-italic"}) + elif chunk.startswith("**") and chunk.endswith("**"): + runs.append({"text": chunk[2:-2], "style": "bold"}) + elif chunk.startswith("*") and chunk.endswith("*"): + runs.append({"text": chunk[1:-1], "style": "italic"}) + else: + runs.append({"text": chunk}) + i = m.end() + if i < len(text): + runs.append({"text": text[i:]}) + return runs + +# --------------------------------------------------------------------------- +# Run 正規化與組裝 +# --------------------------------------------------------------------------- + +def normalize_runs(runs: list[dict]) -> list[dict]: + out: list[dict] = [] + for r in runs: + if "latex" in r and r.get("kind") in ("math", "math_block"): + out.append(r); continue + if r.get("newline") == "true" and "text" not in r: + out.append({"newline": "true"}); continue + if r.get("kind") == "icon": + out.append(r); continue + + t = r.get("text", "") + if t == "": + continue + + style = r.get("style") + color = r.get("color") + cl = r.get("color_light") + cd = r.get("color_dark") + prev = out[-1] if out else None + can_merge = ( + prev is not None + and "latex" not in prev + and prev.get("kind") != "icon" + and prev.get("newline") != "true" + and "text" in prev + and prev.get("style") == style + and prev.get("color") == color + ) + if can_merge: + prev["text"] += t + if cl and "color_light" not in prev: prev["color_light"] = cl + if cd and "color_dark" not in prev: prev["color_dark"] = cd + else: + keep = ("color", "style", "color_light", "color_dark") + out.append({"text": t, **{k: r[k] for k in keep if k in r}}) + + for rr in out: + attach_theme_colors(rr) + return out + + +def build_inline_runs(text: str) -> list[dict]: + out: list[dict] = [] + for cr in split_color_runs(text): + base_color = cr.get("color") + for er in split_emphasis_runs(cr["text"]): + style = er.get("style") + seg = er["text"] + for mr in split_math_runs(seg): + if mr.get("kind") == "icon": + run = {"kind": "icon", "icon": mr.get("icon", ""), "height": mr.get("height", 18)} + elif "latex" in mr: + run = {"latex": mr["latex"], "kind": "math"} + if style: run["style"] = style + else: + run = {"text": mr.get("text", "")} + if style: run["style"] = style + if base_color: run["color"] = base_color + out.append(run) + + runs = normalize_runs(out) + for r in runs: + attach_theme_colors(r) + return runs + + +def emit_text_runs_color_aware(text: str, color_stack: list) -> list[dict]: + runs_out, i, s = [], 0, (text or "") + while i <= len(s): + m_open = COLOR_OPEN.search(s, i) + m_close = COLOR_CLOSE_ANY.search(s, i) + if m_open and m_close: + ev = m_open if m_open.start() < m_close.start() else m_close + typ = "open" if ev is m_open else "close" + else: + ev = m_open or m_close + typ = "open" if ev is m_open else ("close" if m_close else None) + + j = ev.start() if ev else len(s) + visible = s[i:j] + if visible: + seg_runs = build_inline_runs(visible) + if color_stack: + for r in seg_runs: + r["color"] = color_stack[-1] + attach_theme_colors(r) + runs_out.extend(seg_runs) + + if not ev: break + name = ev.group(1) + if typ == "open": + color_stack.append(name) + else: + if color_stack and color_stack[-1] == name: color_stack.pop() + else: + try: color_stack.remove(name) + except ValueError: pass + i = ev.end() + return runs_out + +# --------------------------------------------------------------------------- +# Run 工具函式 +# --------------------------------------------------------------------------- + +def _has_newline_token(runs: list[dict]) -> bool: + return any(r.get("newline") == "true" and "text" not in r for r in runs) + + +def _plain_text_from_runs(runs: list[dict]) -> str: + parts = [] + for r in runs: + if r.get("newline") == "true" and "text" not in r: + parts.append("\n"); continue + if "latex" in r: + if r.get("kind") == "math": + parts.append(_ensure_inline_dollars(r.get("latex", ""))) + elif r.get("kind") in ("math_block", "block_math", "display_math"): + parts.append(_ensure_block_dollars(r.get("latex", ""))) + else: + parts.append(r.get("latex", "")) + else: + parts.append(r.get("text", "")) + return "".join(parts) + + +def _append_hard_break(runs: list[dict]) -> None: + if runs and runs[-1].get("newline") == "true" and "text" not in runs[-1]: + return + runs.append({"newline": "true"}) + + +def _materialize_hard_break_tokens(runs: list[dict]) -> list[dict]: + for r in runs: + if "text" in r and r["text"]: + r["text"] = r["text"].replace(" \r\n", "\n").replace(" \n", "\n") + return runs diff --git a/layout/converter/md_tex.py b/layout/converter/md_tex.py new file mode 100644 index 0000000000000000000000000000000000000000..907b2f3549463faf9c4d0b93b702efa13102eb3a --- /dev/null +++ b/layout/converter/md_tex.py @@ -0,0 +1,50 @@ +""" +md_tex.py +--------- +LaTeX 分隔符正規化工具。 + +公開 API: + _strip_outer_tex_delims(s) → (core_latex, kind) + _ensure_inline_dollars(s) → "$core$" + _ensure_block_dollars(s) → "$$\ncore\n$$" +""" +from __future__ import annotations +import re + +# --------------------------------------------------------------------------- +# 正規表達式 +# --------------------------------------------------------------------------- +_re_outer_block = re.compile(r'^\s*\${2}(.*)\${2}\s*$', re.S) +_re_outer_inline = re.compile(r'^\s*\$(.*)\$\s*$', re.S) + +# --------------------------------------------------------------------------- +# 公開函式 +# --------------------------------------------------------------------------- +def _strip_outer_tex_delims(s: str) -> tuple[str, str]: + """ + 移除最外層的 TeX 分隔符。 + + 回傳 (core_latex, kind),kind 為 "block" / "inline" / "none"。 + """ + if s is None: + return "", "none" + t = str(s).strip() + m = _re_outer_block.match(t) + if m: + return m.group(1).strip(), "block" + m = _re_outer_inline.match(t) + if m: + return m.group(1).strip(), "inline" + return t, "none" + + +def _ensure_inline_dollars(s: str) -> str: + """確保字串以 $...$ 包裹(行內數學)。""" + core, _ = _strip_outer_tex_delims(s) + return f"${core}$" + + +def _ensure_block_dollars(s: str) -> str: + """確保字串以 $$....$$ 包裹(區塊數學)。""" + core, _ = _strip_outer_tex_delims(s) + return f"$$\n{core}\n$$" diff --git a/layout/generate_common_card.py b/layout/generate_common_card.py new file mode 100644 index 0000000000000000000000000000000000000000..7f7b3d4e78a354233251973939e2c1d794cc0cb9 --- /dev/null +++ b/layout/generate_common_card.py @@ -0,0 +1,38 @@ +""" +layout/generate_common_card.py ← 遷移橋接(shim) +---------------------------------------------------- +此檔案已廢棄,請改從 components.cards 匯入。 + + 舊:from layout.generate_common_card import generate_custom_markdown_card + 新:from components.cards import generate_custom_markdown_card + + 舊:from layout.generate_common_card import render_card_from_node + 新:from components.cards import render_card_from_node + +此 shim 讓舊 import 繼續正常運作,不影響現有頁面。 +待所有頁面完成遷移後,直接刪除此檔即可。 +""" +import warnings +warnings.warn( + "layout.generate_common_card 已廢棄,請改用 components.cards", + DeprecationWarning, + stacklevel=2, +) + +from components.cards import ( # noqa: F401 + generate_custom_markdown_card, + render_card_from_node, +) +from components.render_utils import ( # noqa: F401 + _inline_math, + _block_math, + _runs_to_children, +) + +__all__ = [ + "generate_custom_markdown_card", + "render_card_from_node", + "_inline_math", + "_block_math", + "_runs_to_children", +] diff --git a/layout/page/__init__.py b/layout/page/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7f91d0b5595f6437682c9cc97e02f09bd270ac3 --- /dev/null +++ b/layout/page/__init__.py @@ -0,0 +1,5 @@ +""" +page/ — 頁面組裝 +外部可直接用:from layout.page import make_test_page +""" +from .page_layout import make_test_page # noqa: F401 \ No newline at end of file diff --git a/layout/page/loader.py b/layout/page/loader.py new file mode 100644 index 0000000000000000000000000000000000000000..e276bc604cabc2517e80d0bb17b265f4242d4ac7 --- /dev/null +++ b/layout/page/loader.py @@ -0,0 +1,169 @@ +""" +layout/page/loader.py +--------------------- +JSON 資料載入與結構解析。 +無任何 Dash / DMC 依賴,可獨立單元測試。 + +公開 API: + load_json(source) → {"blocks", "sections", "toc"} + norm_id_or_none(raw) → str | None + build_toc_titles(blocks, toc) → [{"id", "label", "level"}, ...] +""" + +from __future__ import annotations +import os +import json +from typing import Any + +# --------------------------------------------------------------------------- +# 檔案快取(process 層級,同一 JSON 只讀一次) +# --------------------------------------------------------------------------- +_cache: dict[str, dict] = {} + +def _load_file_cached(path: str) -> dict: + """讀取並快取 JSON 檔案,檔案未更動時直接回傳快取。""" + try: + mtime = os.path.getmtime(path) + except OSError: + return {} + + cached = _cache.get(path) + if cached and cached.get("_mtime") == mtime: + return cached["_data"] + + try: + with open(path, "r", encoding="utf-8") as f: + data = json.load(f) + except Exception: + data = {} + + _cache[path] = {"_mtime": mtime, "_data": data} + return data + + +# --------------------------------------------------------------------------- +# 錯誤佔位文件 +# --------------------------------------------------------------------------- + +def _err_doc(msg: str) -> dict[str, Any]: + return {"blocks": [{"type": "paragraph", "content": f"⚠ {msg}"}], "toc": []} + + +# --------------------------------------------------------------------------- +# 主要載入函式 +# --------------------------------------------------------------------------- + +def load_json(source: Any) -> dict[str, Any]: + """ + 接受多種來源,統一回傳 {"blocks": [...], "sections": [...], "toc": [...]}。 + + source 可以是: + - list / dict:直接使用 + - str / Path:當作檔案路徑讀取 + """ + if isinstance(source, (list, dict)): + obj = source + else: + p = str(source or "").strip() + if not p: + return _err_doc("未提供 JSON 路徑") + if not os.path.exists(p): + return _err_doc(f"找不到 JSON:{p}") + try: + obj = _load_file_cached(p) + if not obj: + return _err_doc(f"讀取 JSON 失敗或為空:{p}") + except Exception as e: + return _err_doc(f"讀取 JSON 失敗:{e}") + + if isinstance(obj, list): + return {"blocks": obj, "sections": [], "toc": []} + + if isinstance(obj, dict): + blocks = obj.get("blocks") or obj.get("doc") or obj.get("content") or [] + sections = obj.get("sections") or [] + toc = obj.get("toc") or obj.get("TOC") or [] + + if sections and isinstance(sections, list): + return {"blocks": blocks, "sections": sections, "toc": toc} + + return {"blocks": blocks, "sections": [], "toc": toc} + + return _err_doc(f"不支援的 JSON 型別:{type(obj).__name__}") + + +# --------------------------------------------------------------------------- +# ID 正規化 +# --------------------------------------------------------------------------- + +def norm_id_or_none(raw: str | None) -> str | None: + """ + 把 URL fragment 或帶前綴的 id 字串還原成純 id。 + + 範例: + '頁面#h-CH4-P2_id2' → 'CH4-P2_id2' + '#h-foo' → 'foo' + 'h-bar' → 'bar' + '' / None → None + """ + if not raw: + return None + s = str(raw).strip() + if not s: + return None + if "#" in s: + s = s.split("#", 1)[1].strip() + if s.startswith("h-"): + s = s[2:] + return s or None + + +# --------------------------------------------------------------------------- +# TOC 標題清單建立 +# --------------------------------------------------------------------------- + +def build_toc_titles( + blocks: list[dict[str, Any]], + raw_toc: list[Any], +) -> list[dict[str, Any]]: + """ + 回傳給 make_toc() 使用的 titles 清單: + [{"id": str, "label": str, "level": int}, ...] + + 優先使用 JSON 內嵌的 toc;若無,則從 blocks 的 heading 自動產生。 + """ + titles: list[dict[str, Any]] = [] + + # 優先:JSON 內嵌 toc + if isinstance(raw_toc, list) and raw_toc: + for it in raw_toc: + if not isinstance(it, dict): + continue + label = ( + it.get("title") or it.get("text") or it.get("label") or "" + ).strip() + nid = norm_id_or_none( + it.get("id") or it.get("href") or it.get("slug") + ) + level = int(it.get("level") or 1) + if not label or not nid: + continue + titles.append({"id": nid, "label": label, "level": max(1, min(level, 6))}) + return titles + + # 退回:從 blocks heading 產生 + for b in blocks or []: + if (b.get("type") or "").lower() != "heading": + continue + nid = norm_id_or_none(b.get("id")) + if not nid: + continue + label = (b.get("content") or "").strip() + level = int(b.get("level") or 3) + titles.append({ + "id": nid, + "label": label or "(空白標題)", + "level": max(1, min(level, 6)), + }) + + return titles diff --git a/layout/page/page_callbacks.py b/layout/page/page_callbacks.py new file mode 100644 index 0000000000000000000000000000000000000000..de1b56d14e95768165ea4c3480a68fada21ec8b0 --- /dev/null +++ b/layout/page/page_callbacks.py @@ -0,0 +1,118 @@ +""" +layout/page/page_callbacks.py +------------------------------ +頁面級 Dash callback。 +callback 定義在 module 層級,import 即生效。 +register_page_callbacks() 保留為空殼供相容呼叫。 +""" + +from __future__ import annotations +import hashlib, json +from dash import callback, Input, Output, State, ALL, ctx, no_update +from ..renderer.renderer import render_doc +from .sections import get_section_blocks +from .loader import build_toc_titles +from ..toc import make_toc + +# render_doc 結果快取(key = section blocks 的 hash) +_render_cache: dict[str, object] = {} + +def _cached_render(blocks: list) -> object: + """同樣的 blocks 只渲染一次。""" + try: + key = hashlib.md5( + json.dumps(blocks, ensure_ascii=False, sort_keys=True).encode() + ).hexdigest() + except Exception: + return render_doc(blocks) + if key not in _render_cache: + _render_cache[key] = render_doc(blocks) + return _render_cache[key] + + +# ------------------------------------------------------------------ +# Callback 1:切換 section → 更新內容 + TOC + Grid 欄寬 +# ------------------------------------------------------------------ +@callback( + Output("section-content-wrapper", "children"), + Output("section-toc-wrapper", "children"), + Output("main-content-col", "span"), + Output("toc-col", "span"), + Output("toc-col", "style"), + Output("page-active-section-store", "data"), + Input({"type": "section-btn", "sid": ALL}, "n_clicks"), + State("page-sections-store", "data"), + State("page-raw-toc-store", "data"), + prevent_initial_call=True, +) +def _cb_switch_section(_, sections, raw_toc): + if not sections: + return (no_update,) * 6 + + trig = ctx.triggered_id + if not trig: + return (no_update,) * 6 + + section_id = trig.get("sid") + current_blocks = get_section_blocks(sections, section_id) + content = _cached_render(current_blocks) + + if section_id == "sec-all": + toc_titles = build_toc_titles(current_blocks, raw_toc or []) + toc_component = ( + make_toc( + titles=toc_titles, + top_offset=90, + col_span={"xs": 0, "sm": 0, "md": 3, "lg": 3, "xl": 3}, + visible_from="md", + ) + if toc_titles + else None + ) + return ( + content, + toc_component, + {"base": 12, "md": 9}, + {"base": 12, "md": 3}, + {"display": "block"}, + section_id, + ) + + return ( + content, + None, + {"base": 12, "md": 12}, + {"base": 12, "md": 0}, + {"display": "none"}, + section_id, + ) + + +# ------------------------------------------------------------------ +# Callback 2:同步 section 按鈕的 active 樣式 +# ------------------------------------------------------------------ +@callback( + Output({"type": "section-btn", "sid": ALL}, "variant"), + Output({"type": "section-btn", "sid": ALL}, "color"), + Input("page-active-section-store", "data"), + State("page-sections-store", "data"), +) +def _cb_highlight_section_buttons(active_sid, sections): + if not sections: + return [], [] + + variants, colors = [], [] + for s in sections: + sid = s.get("id") or "" + is_active = sid == active_sid + variants.append("filled" if is_active else "light") + colors.append("blue" if is_active else "gray") + return variants, colors + + +# ------------------------------------------------------------------ +# 相容 shim:讓舊的 register_page_callbacks() 呼叫不報錯 +# ------------------------------------------------------------------ +def register_page_callbacks() -> None: + """Callbacks 在 import 時已全部掛載,此函式保留供舊版呼叫。""" + pass diff --git a/layout/page/page_layout.py b/layout/page/page_layout.py new file mode 100644 index 0000000000000000000000000000000000000000..d6218b846d9e5f705ac2e68173e174938cc231eb --- /dev/null +++ b/layout/page/page_layout.py @@ -0,0 +1,193 @@ +""" +layout/page/page_layout.py +--------------------------- +頁面主體 layout 組裝。 +只負責把各子模組的產出組合成最終的 dmc.Container, +不含資料邏輯,也不直接定義 callback。 + +公開 API: + make_test_page(json_source, *, top_offset, show_src) → dmc.Container +""" + +from __future__ import annotations +from typing import Any + +import traceback + +from dash import html, dcc +import dash_mantine_components as dmc + +from ..renderer.renderer import render_doc + +try: + from ..renderer.renderer import install_callbacks_once +except Exception: + install_callbacks_once = None + +from ..toc import make_toc +from .loader import load_json, build_toc_titles +from .sections import ( + split_blocks_into_sections, + get_section_blocks, + make_section_control, +) +from .page_callbacks import register_page_callbacks + + +# --------------------------------------------------------------------------- +# 回到頂端按鈕樣式(獨立常數,方便日後調整) +# --------------------------------------------------------------------------- +_BACK_TO_TOP_STYLE: dict[str, Any] = { + "position": "fixed", + "right": "24px", + "bottom": "24px", + "width": "46px", + "height": "46px", + "borderRadius": "999px", + "border": "none", + "textDecoration": "none", + "display": "flex", + "alignItems": "center", + "justifyContent": "center", + "background": "rgba(0, 0, 0, 0.35)", + "color": "white", + "fontSize": "22px", + "cursor": "pointer", + "zIndex": 999, + "backdropFilter": "blur(4px)", + "boxShadow": "0 4px 12px rgba(0,0,0,0.18)", +} + +# TOC 欄固定定位樣式 +def _toc_fixed_style(top_offset: int) -> dict[str, Any]: + return { + "position": "sticky", + "top": f"{top_offset + 12}px", + "maxHeight": f"calc(100vh - {top_offset + 32}px)", + "overflowY": "auto", + "overflowX": "hidden", + "paddingRight": "4px", + "alignSelf": "flex-start", + } + + +# --------------------------------------------------------------------------- +# 主要組裝函式 +# --------------------------------------------------------------------------- + +def make_test_page( + json_source: Any, + *, + top_offset: int = 90, + show_src: bool = True, +) -> dmc.Container: + """ + 組裝完整的頁面 Container。 + + json_source:可傳入檔案路徑(str/Path)、已解析的 dict 或 list。 + top_offset: 頁首高度(px),用於 TOC 固定定位與 scroll offset。 + show_src: 保留參數(尚未使用),預留供未來顯示原始 JSON 用。 + """ + # 1. 確保 dashTest callbacks 已掛載 + if callable(install_callbacks_once): + try: + install_callbacks_once() + except Exception: + pass + + # 2. 確保頁面 callbacks 已掛載 + register_page_callbacks() + + # 3. 載入資料 + data = load_json(json_source) + blocks = data.get("blocks", []) + sections = data.get("sections", []) or [] + raw_toc = data.get("toc", []) or [] + + # 4. 若 JSON 未提供 sections,自動按 H2 切割 + if not sections: + sections = split_blocks_into_sections(blocks) + + # 5. 決定初始 section + default_section_id = sections[0].get("id") if sections else None + current_blocks = get_section_blocks(sections, default_section_id) if sections else blocks + + # 6. 渲染初始內容 + try: + content = render_doc(current_blocks) + except Exception as e: + content = dmc.Alert( + f"render_doc 發生錯誤:{e}\n\n{traceback.format_exc(limit=2)}", + title="渲染失敗", + color="red", + variant="filled", + ) + + # 7. Section 控制列 + section_control = make_section_control(sections, default_section_id) + + # 8. 左欄:Store + 控制列 + 內容 + left_children: list[Any] = [ + dcc.Store(id="page-sections-store", data=sections), + dcc.Store(id="page-raw-toc-store", data=raw_toc), + dcc.Store(id="page-active-section-store", data=default_section_id), + ] + if section_control is not None: + left_children.append(section_control) + left_children.append(html.Div(content, id="section-content-wrapper")) + + left_area = dmc.Stack(left_children, gap="md", style={"minWidth": 0}) + + # 9. TOC(僅當有標題時才產生) + toc_titles = build_toc_titles(current_blocks, raw_toc) + has_toc = bool(toc_titles) + toc_component = ( + make_toc( + titles=toc_titles, + top_offset=top_offset, + col_span={"xs": 0, "sm": 0, "md": 3, "lg": 3, "xl": 3}, + visible_from="md", + ) + if has_toc + else None + ) + + # 10. Grid 欄位配置 + main_span = {"base": 12, "md": 9 if has_toc else 12} + toc_span = {"base": 12, "md": 3} if has_toc else {"base": 12, "md": 0} + toc_style = _toc_fixed_style(top_offset) if has_toc else {} + + cols = [ + dmc.GridCol(left_area, id="main-content-col", span=main_span), + dmc.GridCol( + html.Div( + id="section-toc-wrapper", + children=toc_component, + style=toc_style, + ), + id="toc-col", + span=toc_span, + className="toc-col-wrapper", + style={"display": "block" if has_toc else "none"}, + ), + ] + + # compat:空 Grid 讓 Dash 的 pattern-matching callback 不出錯 + grid = dmc.Grid(cols, gutter="xl") + compat = dmc.Grid(id="Grid", style={"display": "none"}) + + return dmc.Container( + [ + html.Div(id="page-top-anchor"), + dmc.Stack([grid, compat], gap="md"), + html.A( + "↑", + href="#page-top-anchor", + title="回到最上方", + id="back-to-top-btn", + style=_BACK_TO_TOP_STYLE, + ), + ], + fluid=True, + style={"overflow": "visible"}, + ) diff --git a/layout/page/sections.py b/layout/page/sections.py new file mode 100644 index 0000000000000000000000000000000000000000..960d2327ccc5090aa1c294b04cbcf672c3f91556 --- /dev/null +++ b/layout/page/sections.py @@ -0,0 +1,116 @@ +""" +layout/page/sections.py +------------------------ +Section(分段)相關的資料邏輯與 UI 元件。 +只依賴 Dash / DMC,不含任何 @callback。 + +公開 API: + split_blocks_into_sections(blocks) → List[section_dict] + get_section_blocks(sections, section_id) → List[block_dict] + make_section_control(sections, active_id) → html.Div | None +""" + +from __future__ import annotations +from typing import Any + +from dash import html +import dash_mantine_components as dmc + + +# --------------------------------------------------------------------------- +# 資料邏輯 +# --------------------------------------------------------------------------- + +def split_blocks_into_sections(blocks: list[dict]) -> list[dict]: + """ + 把平坦的 block 清單按 H2 heading 切割成 section 清單。 + + 回傳格式: + [ + {"id": "sec-all", "title": "全部", "blocks": [...]}, # 永遠第一筆 + {"id": "sec-1", "title": "標題文字", "blocks": [...]}, + ... + ] + """ + sections: list[dict] = [ + {"id": "sec-all", "title": "全部", "blocks": blocks[:]} + ] + + current: dict | None = None + sec_idx = 0 + + for b in blocks: + if b.get("type") == "heading" and int(b.get("level", 0)) == 2: + if current: + sections.append(current) + sec_idx += 1 + current = { + "id": f"sec-{sec_idx}", + "title": (b.get("content") or f"段落 {sec_idx}").strip(), + "blocks": [b], + } + else: + if current is not None: + current["blocks"].append(b) + + if current: + sections.append(current) + + return sections + + +def get_section_blocks( + sections: list[dict], section_id: str | None +) -> list[dict]: + """ + 取得指定 section_id 的 block 清單。 + 找不到時退回第一個 section;sections 為空時回傳空清單。 + """ + if not sections: + return [] + if not section_id: + return sections[0].get("blocks") or [] + for s in sections: + if (s.get("id") or "") == section_id: + return s.get("blocks") or [] + return sections[0].get("blocks") or [] + + +# --------------------------------------------------------------------------- +# UI 元件 +# --------------------------------------------------------------------------- + +def make_section_control( + sections: list[dict], active_id: str | None +) -> html.Div | None: + """ + 產生水平捲動的 section 切換按鈕列。 + 若 sections 為空,回傳 None。 + """ + if not sections: + return None + + buttons: list[Any] = [] + for i, s in enumerate(sections): + sid = s.get("id") or f"sec-{i + 1}" + title = s.get("title") or f"段落 {i + 1}" + buttons.append( + dmc.Button( + title, + id={"type": "section-btn", "sid": sid}, + variant="filled" if sid == active_id else "light", + size="sm", + style={"flex": "0 0 auto"}, + **{"data-sid": sid}, + ) + ) + + return html.Div( + dmc.Group(buttons, gap="sm", wrap="nowrap"), + style={ + "overflowX": "auto", + "overflowY": "hidden", + "whiteSpace": "nowrap", + "paddingBottom": "6px", + }, + ) diff --git a/layout/page_builder.py b/layout/page_builder.py new file mode 100644 index 0000000000000000000000000000000000000000..2b468f133c06aed65d4f328ccdc7812743f0055e --- /dev/null +++ b/layout/page_builder.py @@ -0,0 +1,10 @@ +""" +layout/page_builder.py +----------------------- +頁面組裝入口。 + + from layout.page_builder import make_test_page ← 使用這個 +""" +from .page.page_layout import make_test_page # noqa: F401 + +__all__ = ["make_test_page"] diff --git a/layout/renderer/__init__.py b/layout/renderer/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aa22d8d532fa66b21dde84404e092b31b22ea276 --- /dev/null +++ b/layout/renderer/__init__.py @@ -0,0 +1,6 @@ +""" +renderer/ — Dash 渲染引擎 +外部可直接用:from layout.renderer import render_doc +""" +from .dt_render_blocks import render_doc, build_content_and_toc # noqa: F401 +from .dt_callbacks import install_callbacks_once # noqa: F401 \ No newline at end of file diff --git a/layout/renderer/dt_callbacks.py b/layout/renderer/dt_callbacks.py new file mode 100644 index 0000000000000000000000000000000000000000..5a9f04c1336f8b78b4e58db3089966bbe1671313 --- /dev/null +++ b/layout/renderer/dt_callbacks.py @@ -0,0 +1,510 @@ +""" +dt_callbacks.py +--------------- +所有 Dash @callback 集中管理。 + +在 Dash app 啟動時此模組會被 import,所有 @callback 裝飾器即生效。 +install_callbacks_once() 保留為空殼供相容呼叫。 + +Callback 清單: + Fill 題 _cb_check_fill, _fill_hint_loading_on/off + Choice/Multi _cb_check_choice, _choice_hint_loading_on/off + Order 題 _cb_order_move, _cb_order_render, _cb_order_check + Flow _cb_flow_append_steps + Solution _cb_solution_toggle, _cb_solution_apply_open, _cb_solution_gate_view + More Q _cb_moreq_open, _moreq_loading_on/off +""" +from __future__ import annotations + +from dash import callback, Input, Output, State, MATCH, ALL, ctx, no_update, Patch +import dash_mantine_components as dmc + +from .dt_render_utils import ( + render_option_label, _render_inline_math, + DEFAULT_NORMALIZE, DEFAULT_TOL, _ensure_theme_colors, +) +from .dt_math import eq_answer, _normalize_text +from .dt_gemini import ( + _ai_feedback_fill_gemini, _ai_feedback_choice_gemini, _ai_feedback_multi_gemini, + _ai_generate_similar_quizzes_as_md, _parse_ai_md_to_quiz_nodes, +) +from .dt_quiz import _quiz_missing_answer_notice, _feedback_child + +# --------------------------------------------------------------------------- +# 工具 +# --------------------------------------------------------------------------- + +def _as_set(v) -> set: + if v is None: return set() + if isinstance(v, (list, tuple, set)): return set(v) + return {v} + +# --------------------------------------------------------------------------- +# Fill 題 callbacks +# --------------------------------------------------------------------------- + +@callback( + Output({"type": "quiz-feedback-fill", "qid": MATCH}, "children"), + Output({"type": "quiz-feedback-fill", "qid": MATCH}, "color"), + Output({"type": "quiz-feedback-fill", "qid": MATCH}, "variant"), + Output({"type": "quiz-feedback-fill", "qid": MATCH}, "style"), + Output({"type": "quiz-pass-fill", "qid": MATCH}, "data"), + Input({"type": "quiz-check", "qid": MATCH}, "n_clicks"), + Input({"type": "quiz-hint", "qid": MATCH}, "n_clicks"), + State({"type": "quiz-input", "qid": MATCH}, "value"), + State({"type": "quiz-ans", "qid": MATCH}, "data"), + State({"type": "quiz-pass-fill", "qid": MATCH}, "data"), + State("student-id-store", "data"), + State("page-url", "pathname"), + prevent_initial_call=True, +) +def _cb_check_fill(n_check, n_hint, user_input, meta, prev_pass, student_id, pathname): + missing, msg = _quiz_missing_answer_notice({"kind": "fill", **(meta or {})}) + if missing: + return _feedback_child(msg), "yellow", "light", {"display": "block"}, False + + meta = meta or {} + ops = meta.get("normalize") or DEFAULT_NORMALIZE + tol = float(meta.get("tol", DEFAULT_TOL)) + ui = _normalize_text(user_input or "", ops) + trig = ctx.triggered_id + is_hint = isinstance(trig, dict) and trig.get("type") == "quiz-hint" + + right_msg = meta.get("msg_right") or "✔ 正確!" + wrong_msg = meta.get("msg_wrong") or "✘ 再想想~" + + if is_hint: + if not ui: + return _feedback_child("先輸入你的想法,我再給提示~"), "yellow", "light", {}, (prev_pass or False) + ai_cfg = (meta.get("ai") or {}) + if ai_cfg.get("enabled") and (ai_cfg.get("provider") or "gemini") == "gemini": + fb = _ai_feedback_fill_gemini( + prompt_text=meta.get("prompt_text", ""), user_input=ui, + answers=meta.get("answers", []), rubric=ai_cfg.get("rubric", ""), + model=ai_cfg.get("model", "gemini-2.5-flash"), + ) + return _feedback_child(fb.get("hint") or "再檢查定義與條件。"), "yellow", "light", {}, (prev_pass or False) + return _feedback_child("(此題未開啟 AI 提示)"), "gray", "light", {}, (prev_pass or False) + + ok = eq_answer(user_input or "", meta.get("answers", []), ops, tol) + trig = ctx.triggered_id + is_check = isinstance(trig, dict) and trig.get("type") == "quiz-check" + if ok: + if is_check and student_id: + qid = trig.get("qid", "") + unit = (pathname or "").strip("/").replace("/", "_") or "unknown" + try: + from firebase_progress import log_quiz_result + log_quiz_result(student_id, unit, qid, True) + except Exception as e: + print(f"[Firebase] fill correct 失敗:{e}") + return _feedback_child(right_msg), "green", "light", {}, True + if is_check and student_id: + qid = trig.get("qid", "") + unit = (pathname or "").strip("/").replace("/", "_") or "unknown" + try: + from firebase_progress import log_quiz_result + log_quiz_result(student_id, unit, qid, False) + except Exception as e: + print(f"[Firebase] fill wrong 失敗:{e}") + return _feedback_child(wrong_msg), "red", "light", {}, False + + +@callback( + Output({"type": "quiz-hint", "qid": MATCH}, "loading", allow_duplicate=True), + Input( {"type": "quiz-hint", "qid": MATCH}, "n_clicks"), + prevent_initial_call=True, +) +def _fill_hint_loading_on(n_clicks): + return bool(n_clicks) or no_update + + +@callback( + Output({"type": "quiz-hint", "qid": MATCH}, "loading", allow_duplicate=True), + Input( {"type": "quiz-feedback-fill", "qid": MATCH}, "children"), + prevent_initial_call=True, +) +def _fill_hint_loading_off(_children): + return False + +# --------------------------------------------------------------------------- +# Choice / Multi 題 callbacks +# --------------------------------------------------------------------------- + +@callback( + Output({"type": "quiz-feedback-choice", "qid": MATCH}, "children"), + Output({"type": "quiz-feedback-choice", "qid": MATCH}, "color"), + Output({"type": "quiz-feedback-choice", "qid": MATCH}, "variant"), + Output({"type": "quiz-feedback-choice", "qid": MATCH}, "style"), + Output({"type": "quiz-pass-choice", "qid": MATCH}, "data"), + Input( {"type": "quiz-submit", "qid": MATCH}, "n_clicks"), + Input( {"type": "quiz-hint-choice", "qid": MATCH}, "n_clicks"), + State( {"type": "quiz-choice", "qid": MATCH}, "value"), + State( {"type": "quiz-ans", "qid": MATCH}, "data"), + State("student-id-store", "data"), + State("page-url", "pathname"), + prevent_initial_call=True, +) +def _cb_check_choice(n_submit, n_hint, val, meta, student_id, pathname): + missing, msg = _quiz_missing_answer_notice(meta or {}) + if missing: + return _feedback_child(msg), "yellow", "light", {"display": "block"}, False + + meta = meta or {} + qtype = meta.get("qtype", "choice") + trig = ctx.triggered_id + is_hint = isinstance(trig, dict) and trig.get("type") == "quiz-hint-choice" + is_submit = isinstance(trig, dict) and trig.get("type") == "quiz-submit" + selected = _as_set(val) + + hints_raw = meta.get("hints") or {} + hints = {str(k).lower(): str(v).strip() for k, v in hints_raw.items() if str(v).strip()} + has_hints = bool(hints) + + ai_cfg = (meta.get("ai") or {}) + ai_provider = (ai_cfg.get("provider") or "gemini") + ai_model = (ai_cfg.get("model") or "gemini-2.5-flash") + ai_rubric = (ai_cfg.get("rubric") or "") + ai_enabled = True if (qtype in ("multi", "choice") and not has_hints) else \ + str(ai_cfg.get("enabled", "0")).lower() not in ("0", "false", "no", "off") + + # --- 提示 --- + if is_hint: + if not selected: + return _feedback_child("先選一些選項,我再給提示~"), "yellow", "light", {"display": "block"}, False + + if qtype != "multi": + if not val: + return _feedback_child("先選一個選項,我再給提示~"), "yellow", "light", {"display": "block"}, False + if val != (meta.get("answer") or ""): + key = str(val).lower() + h = hints.get(key) + if h: + return _feedback_child(h), "yellow", "light", {"display": "block"}, False + if (not has_hints) and ai_enabled and ai_provider == "gemini": + ai_hint = _ai_feedback_choice_gemini( + prompt_text=meta.get("prompt_text", ""), selected_key=key, + options=meta.get("options", []), answer_key=(meta.get("answer") or "").lower(), + rubric=ai_rubric, model=ai_model, + ) + if ai_hint: + return _feedback_child(ai_hint), "yellow", "light", {"display": "block"}, False + return _feedback_child("再想想這個選項為什麼不對(從定義或條件下手)。"), "yellow", "light", {"display": "block"}, False + return _feedback_child("你選得很接近(或已正確),可以按送出確認~"), "yellow", "light", {"display": "block"}, False + + # 多選 + correct = set(meta.get("answers") or []) + wrong = sorted(selected - correct) + missing_keys = sorted(correct - selected) + + if wrong: + if (not has_hints) and ai_enabled and ai_provider == "gemini": + fb = _ai_feedback_multi_gemini( + prompt_text=meta.get("prompt_text", ""), selected_keys=sorted(selected), + options=meta.get("options", []), answer_keys=sorted(correct), + rubric=ai_rubric, model=ai_model, + ) + if fb: + return _feedback_child(fb), "yellow", "light", {"display": "block"}, False + return _feedback_child("再回頭檢查題目條件:哪些選項其實不符合題意?"), "yellow", "light", {"display": "block"}, False + msgs = [] + for k in wrong[:2]: + h = hints.get(str(k).lower()) + msgs.append(f"{k}. {h}" if h else f"{k}. 這個選項想想它為什麼不符合題意。") + return _feedback_child("\n".join(msgs)), "yellow", "light", {"display": "block"}, False + + if missing_keys: + if (not has_hints) and ai_enabled and ai_provider == "gemini": + fb = _ai_feedback_multi_gemini( + prompt_text=meta.get("prompt_text", ""), selected_keys=sorted(selected), + options=meta.get("options", []), answer_keys=sorted(correct), + rubric=ai_rubric, model=ai_model, + ) + if fb: + return _feedback_child(fb), "yellow", "light", {"display": "block"}, False + return _feedback_child("再檢查題目條件:有沒有哪個關鍵字會讓某些選項必須一起成立?"), "yellow", "light", {"display": "block"}, False + k = str(missing_keys[0]).lower() + h = hints.get(k) + return (_feedback_child(f"你可能漏選了某個關鍵選項,想想:{k}. {h}"), + "yellow", "light", {"display": "block"}, False) if h else \ + (_feedback_child("再檢查題意與每個選項的必要條件。"), "yellow", "light", {"display": "block"}, False) + + return _feedback_child("你選得很好,按送出確認~"), "yellow", "light", {"display": "block"}, False + + # --- 送出 --- + if is_submit: + if not selected: + return _feedback_child("請至少選一個選項。"), "yellow", "light", {}, False + if qtype == "multi": + correct = set(meta.get("answers") or []) + ok = (selected == correct) + else: + ok = (val == (meta.get("answer") or "")) + + # Firebase 記錄 + if student_id and is_submit: + qid = trig.get("qid", "") if isinstance(trig, dict) else "" + unit = (pathname or "").strip("/").replace("/", "_") or "unknown" + try: + from firebase_progress import log_quiz_result + log_quiz_result(student_id, unit, qid, ok) + except Exception as e: + print(f"[Firebase] choice 失敗:{e}") + + if ok: + msg = (meta.get("msg_right") or "✔ 正確!") + if meta.get("explain"): msg += " " + meta["explain"] + return _feedback_child(msg), "green", "light", {}, True + if qtype == "multi" and (not has_hints) and ai_enabled and ai_provider == "gemini": + correct = set(meta.get("answers") or []) + fb = _ai_feedback_multi_gemini( + prompt_text=meta.get("prompt_text", ""), selected_keys=sorted(selected), + options=meta.get("options", []), answer_keys=sorted(correct), + rubric=ai_rubric, model=ai_model, + ) + if fb: + return _feedback_child(fb), "yellow", "light", {}, False + return _feedback_child(meta.get("msg_wrong") or "✘ 再試試看~"), "red", "light", {}, False + + return _feedback_child(""), "gray", "transparent", {"display": "none"}, False + + +@callback( + Output({"type": "quiz-hint-choice", "qid": MATCH}, "loading", allow_duplicate=True), + Input( {"type": "quiz-hint-choice", "qid": MATCH}, "n_clicks"), + prevent_initial_call=True, +) +def _choice_hint_loading_on(n_clicks): + return bool(n_clicks) or no_update + + +@callback( + Output({"type": "quiz-hint-choice", "qid": MATCH}, "loading", allow_duplicate=True), + Input( {"type": "quiz-feedback-choice", "qid": MATCH}, "children"), + prevent_initial_call=True, +) +def _choice_hint_loading_off(_children): + return False + +# --------------------------------------------------------------------------- +# Order 題 callbacks +# --------------------------------------------------------------------------- + +@callback( + Output({"type": "order-state", "qid": MATCH}, "data"), + Input( {"type": "order-up", "qid": MATCH, "idx": ALL}, "n_clicks"), + Input( {"type": "order-down", "qid": MATCH, "idx": ALL}, "n_clicks"), + State( {"type": "order-state", "qid": MATCH}, "data"), + prevent_initial_call=True, +) +def _cb_order_move(up_clicks, down_clicks, order): + if not order or not ctx.triggered_id: return no_update + trig = ctx.triggered_id; pos = int(trig["idx"]); new = list(order) + if trig["type"] == "order-up" and pos > 0: new[pos-1], new[pos] = new[pos], new[pos-1] + elif trig["type"] == "order-down" and pos < len(new)-1: new[pos+1], new[pos] = new[pos], new[pos+1] + return new + + +@callback( + Output({"type": "order-list", "qid": MATCH}, "children"), + Input( {"type": "order-state", "qid": MATCH}, "data"), + State( {"type": "order-steps", "qid": MATCH}, "data"), + State( {"type": "order-list", "qid": MATCH}, "id"), +) +def _cb_order_render(order, steps, this_id): + if not order or not steps or not this_id: return [] + from dash_iconify import DashIconify + import dash_mantine_components as dmc + qid = this_id["qid"] + rows = [] + for pos, idx in enumerate(order): + rows.append(dmc.Group(gap="xs", align="center", wrap="nowrap", children=[ + dmc.ActionIcon(DashIconify(icon="lucide:chevron-up"), + id={"type": "order-up", "qid": qid, "idx": pos}, variant="light", size="sm"), + dmc.ActionIcon(DashIconify(icon="lucide:chevron-down"), + id={"type": "order-down", "qid": qid, "idx": pos}, variant="light", size="sm"), + dmc.Badge(str(pos+1), variant="light"), + _render_inline_math(steps[idx]), + ])) + return rows + + +@callback( + Output({"type": "quiz-feedback-order", "qid": MATCH}, "children"), + Output({"type": "quiz-feedback-order", "qid": MATCH}, "color"), + Output({"type": "quiz-pass-order", "qid": MATCH}, "data"), + Input( {"type": "quiz-check", "qid": MATCH}, "n_clicks"), + State( {"type": "order-state", "qid": MATCH}, "data"), + State( {"type": "quiz-ans", "qid": MATCH}, "data"), + prevent_initial_call=True, +) +def _cb_order_check(_, order, meta): + meta = meta or {}; ans = meta.get("answer") or []; ok = (order == ans) + msg = (meta.get("msg_right") if ok else meta.get("msg_wrong")) or ("✔ 正確!" if ok else "✘ 再想想。") + return render_option_label(msg), ("green" if ok else "red"), bool(ok) + +# --------------------------------------------------------------------------- +# Flow callbacks +# --------------------------------------------------------------------------- + +@callback( + Output({"type": "flow-body", "flow": MATCH}, "children"), + Input( {"type": "quiz-pass-fill", "qid": ALL}, "data"), + Input( {"type": "quiz-pass-choice", "qid": ALL}, "data"), + Input( {"type": "quiz-pass-order", "qid": ALL}, "data"), + State( {"type": "quiz-pass-fill", "qid": ALL}, "id"), + State( {"type": "quiz-pass-choice", "qid": ALL}, "id"), + State( {"type": "quiz-pass-order", "qid": ALL}, "id"), + State( {"type": "flow-steps", "flow": MATCH}, "data"), + State( {"type": "flow-body", "flow": MATCH}, "children"), + State( {"type": "flow-body", "flow": MATCH}, "id"), + prevent_initial_call=True, +) +def _cb_flow_append_steps(pass_fill, pass_choice, pass_order, + ids_fill, ids_choice, ids_order, + steps, current_children, body_id): + from .dt_render_blocks import _make_flow_step_box + qmap: dict = {} + for pid, val in zip(ids_fill or [], pass_fill or []): + if isinstance(pid, dict) and pid.get("qid"): qmap[pid["qid"]] = bool(val) + for pid, val in zip(ids_choice or [], pass_choice or []): + if isinstance(pid, dict) and pid.get("qid"): qmap[pid["qid"]] = bool(val) + for pid, val in zip(ids_order or [], pass_order or []): + if isinstance(pid, dict) and pid.get("qid"): qmap[pid["qid"]] = bool(val) + + fid = (body_id or {}).get("flow") + steps = steps or [] + current_children = current_children or [] + rendered_n = len(current_children) + patch = Patch() + appended = False + + for idx in range(rendered_n, len(steps)): + st = steps[idx] + prev_qid = st.get("gate_from") + if not ((idx == 0) or (prev_qid is None) or qmap.get(prev_qid, False)): + break + patch.append(_make_flow_step_box(fid, st)) + appended = True + + return patch if appended else no_update + +# --------------------------------------------------------------------------- +# Solution callbacks +# --------------------------------------------------------------------------- + +@callback( + Output({"type": "solution-open", "key": MATCH}, "data"), + Input( {"type": "solution-toggle", "key": MATCH}, "n_clicks"), + State( {"type": "solution-open", "key": MATCH}, "data"), + State( {"type": "solution-after", "key": MATCH}, "data"), + State( {"type": "quiz-pass-fill", "qid": ALL}, "id"), + State( {"type": "quiz-pass-fill", "qid": ALL}, "data"), + State( {"type": "quiz-pass-choice", "qid": ALL}, "id"), + State( {"type": "quiz-pass-choice", "qid": ALL}, "data"), + State( {"type": "quiz-pass-order", "qid": ALL}, "id"), + State( {"type": "quiz-pass-order", "qid": ALL}, "data"), + prevent_initial_call=True, +) +def _cb_solution_toggle(n, is_open, after_qid, ids_f, vals_f, ids_c, vals_c, ids_o, vals_o): + if not n: return no_update + if after_qid: + ok = False + for ids, vals in ((ids_f, vals_f), (ids_c, vals_c), (ids_o, vals_o)): + for i, pid in enumerate(ids or []): + if isinstance(pid, dict) and pid.get("qid") == after_qid: + if bool((vals or [None])[i]): ok = True + break + if ok: break + if not ok: return is_open + return not bool(is_open) + + +@callback( + Output({"type": "solution-collapse", "key": MATCH}, "opened"), + Input( {"type": "solution-open", "key": MATCH}, "data"), +) +def _cb_solution_apply_open(is_open): + return bool(is_open) + + +@callback( + Output({"type": "solution-toggle", "key": MATCH}, "disabled"), + Output({"type": "solution-hint", "key": MATCH}, "style"), + Input( {"type": "solution-after", "key": MATCH}, "data"), + Input( {"type": "quiz-pass-fill", "qid": ALL}, "id"), + Input( {"type": "quiz-pass-fill", "qid": ALL}, "data"), + Input( {"type": "quiz-pass-choice", "qid": ALL}, "id"), + Input( {"type": "quiz-pass-choice", "qid": ALL}, "data"), + Input( {"type": "quiz-pass-order", "qid": ALL}, "id"), + Input( {"type": "quiz-pass-order", "qid": ALL}, "data"), +) +def _cb_solution_gate_view(after_qid, ids_f, vals_f, ids_c, vals_c, ids_o, vals_o): + # 沒有設定 after_qid 的解法,直接回傳不鎖定,跳過所有計算 + if not after_qid: + return False, {"display": "none"} + ok = False + for ids, vals in ((ids_f, vals_f), (ids_c, vals_c), (ids_o, vals_o)): + for i, pid in enumerate(ids or []): + if isinstance(pid, dict) and pid.get("qid") == after_qid: + if bool((vals or [None])[i]): + ok = True + break + if ok: break + if ok: + return False, {"display": "none"} + return True, {"display": "block", "opacity": 0.7, "marginTop": "6px"} + +# --------------------------------------------------------------------------- +# More Questions callbacks +# --------------------------------------------------------------------------- + +@callback( + Output({"type": "moreq-modal", "key": MATCH}, "opened"), + Output({"type": "moreq-content", "key": MATCH}, "children"), + Input( {"type": "moreq-open", "key": MATCH}, "n_clicks"), + State( {"type": "moreq-modal", "key": MATCH}, "opened"), + State( {"type": "moreq-prompt", "key": MATCH}, "data"), + prevent_initial_call=True, +) +def _cb_moreq_open(n, opened, prompt_text): + from .dt_render_blocks import render_doc + if not n: return no_update, no_update + if opened: return False, no_update + if not (prompt_text or "").strip(): + return True, dmc.Alert("抓不到題目敘述:請在解法前面放 Example 標題或 當錨點。", + color="yellow", variant="light") + md = _ai_generate_similar_quizzes_as_md(prompt_text=prompt_text, qtype="choice") + nodes = _parse_ai_md_to_quiz_nodes(md, default_qtype="choice") + if not nodes: + return True, dmc.Alert("AI 沒有產出可解析的題目格式。", color="red", variant="light") + return True, render_doc(nodes) + + +@callback( + Output({"type": "moreq-open", "key": MATCH}, "loading", allow_duplicate=True), + Input( {"type": "moreq-open", "key": MATCH}, "n_clicks"), + State( {"type": "moreq-modal","key": MATCH}, "opened"), + prevent_initial_call=True, +) +def _moreq_loading_on(n_clicks, opened): + if not n_clicks: return no_update + if opened: return False + return True + + +@callback( + Output({"type": "moreq-open", "key": MATCH}, "loading", allow_duplicate=True), + Input( {"type": "moreq-content", "key": MATCH}, "children"), + prevent_initial_call=True, +) +def _moreq_loading_off(_children): + return False + +# --------------------------------------------------------------------------- +# 相容 shim +# --------------------------------------------------------------------------- + +def install_callbacks_once() -> None: + """Callbacks 在 import 時已全部掛載;此函式保留供舊版呼叫。""" + return None diff --git a/layout/renderer/dt_gemini.py b/layout/renderer/dt_gemini.py new file mode 100644 index 0000000000000000000000000000000000000000..db592bd831555dceb88d195adc809f49ca8982c0 --- /dev/null +++ b/layout/renderer/dt_gemini.py @@ -0,0 +1,450 @@ +""" +dt_gemini.py +------------ +Gemini AI 用戶端、JSON 解析工具、題目生成、AI 批改回饋。 + +依賴:無 Dash 元件依賴(可獨立測試) + +公開 API: + _gem_call(txt, model) → str + _gem_json(model, system, schema, payload) → dict + _ai_generate_similar_quizzes_as_md(...) → str + _parse_ai_md_to_quiz_nodes(...) → List[dict] + _ai_feedback_fill_gemini(...) → dict + _ai_feedback_choice_gemini(...) → str + _ai_feedback_multi_gemini(...) → dict +""" +from __future__ import annotations +import os, json, re, traceback +from pathlib import Path +from dotenv import load_dotenv + +# --------------------------------------------------------------------------- +# Gemini client 初始化(單一來源) +# --------------------------------------------------------------------------- +import google.genai as genai +from google.genai import types as genai_types + +DOTENV_PATH = Path(__file__).resolve().parents[2] / ".env" # layout/renderer/ → 上兩層 = 專案根目錄 +load_dotenv(dotenv_path=DOTENV_PATH, override=True) + +_JSON_RE = re.compile(r"\{.*\}", re.S) + +def _get_api_key() -> str: + raw = (os.getenv("GEMINI_API_KEY") or os.getenv("GOOGLE_API_KEY") or "").strip() + return raw.strip('"').strip("'") + +_API_KEY = _get_api_key() +print("[dotenv] path =", DOTENV_PATH, "| exists =", DOTENV_PATH.exists()) +print("[dotenv] GEMINI_API_KEY set:", bool(_API_KEY)) +_gem_client = genai.Client(api_key=_API_KEY) if _API_KEY else None + +# --------------------------------------------------------------------------- +# 基礎工具 +# --------------------------------------------------------------------------- + +def _norm_model(m: str) -> str: + m = (m or "").strip() + return m if m.startswith("models/") else (f"models/{m}" if m else "models/gemini-2.5-flash") + + +def _s(x) -> str: + """safe strip:None → '',其他型別 → str().strip()""" + if x is None: return "" + if isinstance(x, str): return x.strip() + return str(x).strip() + + +def _first_json(text: str): + """從文字中抽出第一段 {...} 並解析為 dict;失敗回 None。""" + m = _JSON_RE.search(text or "") + if not m: return None + try: + return json.loads(m.group(0)) + except Exception: + return None + + +def _ai_log_fail(tag: str, exc: Exception, raw_text: str | None = None) -> None: + print("\n" + "=" * 90, flush=True) + print(f"[AI FAIL] {tag}", flush=True) + print(f"[AI FAIL] {type(exc).__name__}: {exc!r}", flush=True) + if raw_text is not None: + raw_text = raw_text or "" + print("[AI FAIL] --- raw response (head 2000 chars) ---", flush=True) + print(raw_text[:2000], flush=True) + if len(raw_text) > 2000: + print("[AI FAIL] --- raw response (tail 400 chars) ---", flush=True) + print(raw_text[-400:], flush=True) + traceback.print_exc() + print("=" * 90 + "\n", flush=True) + +# --------------------------------------------------------------------------- +# Gemini 呼叫 +# --------------------------------------------------------------------------- + +def _gem_call(txt: str, model: str | None = None) -> str: + """最基本的文字呼叫,無 schema,回傳純文字。""" + global _gem_client + if not _gem_client: + print("[gemini] no API key; skip call") + return "" + try: + r = _gem_client.models.generate_content( + model=_norm_model(model or "models/gemini-2.5-flash"), + contents=[{"role": "user", "parts": [{"text": txt}]}], + ) + return (getattr(r, "text", "") or "").strip() + except Exception as e: + print("[gemini] call failed:", e) + return "" + + +def _repair_json_newlines(s: str) -> str: + """修復 JSON 字串值內的真換行,避免 json.loads 爆掉。""" + if not s: return s + out, in_str, esc = [], False, False + for ch in s: + if not in_str: + out.append(ch) + if ch == '"': in_str = True; esc = False + continue + if esc: + out.append(ch); esc = False; continue + if ch == '\\': + out.append(ch); esc = True; continue + if ch == '"': + out.append(ch); in_str = False; continue + if ch == '\n': out.append('\\n') + elif ch == '\r': out.append('\\r') + elif ch == '\t': out.append('\\t') + else: out.append(ch) + return "".join(out) + + +def _loads_json_robust(text: str): + """先直接 loads,失敗後修復換行再試。""" + m = _JSON_RE.search(text or "") + s = m.group(0) if m else (text or "") + s = s.strip() + try: + return json.loads(s) + except json.JSONDecodeError: + pass + try: + return json.loads(_repair_json_newlines(s)) + except Exception: + return None + + +def _gem_json( + model: str, + system: str, + schema: dict, + payload: dict, + temperature: float = 0.2, + max_tokens: int = 256, +) -> dict: + """JSON schema 模式呼叫,自動 fallback 至無 schema 模式。""" + if not _gem_client or not _API_KEY: + print("[gemini] NO_KEY", flush=True) + return {"_error": "NO_KEY"} + + DEBUG_AI = str(os.getenv("DEBUG_AI", "0")).lower() in ("1", "true", "yes", "on") + if DEBUG_AI: + print("\n" + "=" * 90, flush=True) + print(f"[gemini][REQ] model = {model}", flush=True) + print(f"[gemini][REQ] system =\n{system}", flush=True) + print("=" * 90 + "\n", flush=True) + + cfg_schema = genai_types.GenerateContentConfig( + system_instruction=system, + response_mime_type="application/json", + response_schema=schema, + temperature=temperature, + max_output_tokens=max_tokens, + ) + + # --- 第一次嘗試:JSON schema mode --- + try: + resp = _gem_client.models.generate_content( + model=_norm_model(model), + contents=json.dumps(payload, ensure_ascii=False), + config=cfg_schema, + ) + text = getattr(resp, "text", "") or "" + if not text and getattr(resp, "candidates", None): + parts = resp.candidates[0].content.parts + text = getattr(parts[0], "text", "") if parts else "" + try: + return json.loads(text or "{}") + except json.JSONDecodeError as je: + _ai_log_fail("JSON decode failed (schema mode)", je, text) + return {"_error": "BAD_JSON", "_why": str(je), "_raw_head": (text or "")[:2000]} + except Exception as e1: + _ai_log_fail("Gemini call failed (schema mode)", e1) + + # --- 第二次嘗試:無 schema,強制輸出 JSON --- + cfg_plain = genai_types.GenerateContentConfig( + system_instruction=system + " Output ONLY JSON with the requested fields.", + temperature=temperature, + max_output_tokens=max_tokens, + ) + try: + resp2 = _gem_client.models.generate_content( + model=_norm_model(model), + contents=json.dumps(payload, ensure_ascii=False), + config=cfg_plain, + ) + text2 = getattr(resp2, "text", "") or "" + if not text2 and getattr(resp2, "candidates", None): + parts2 = resp2.candidates[0].content.parts + text2 = getattr(parts2[0], "text", "") if parts2 else "" + obj = _loads_json_robust(text2 or "") + if obj is not None: + return obj + _ai_log_fail("JSON decode failed (robust repair also failed)", Exception("BAD_JSON"), text2) + return {"_error": "BAD_JSON", "_why": "robust repair failed", "_raw_head": (text2 or "")[:2000]} + except Exception as e2: + _ai_log_fail("Gemini call failed (no-schema fallback)", e2) + return {"_error": "CALL_FAIL", "_why": str(e2)} + +# --------------------------------------------------------------------------- +# AI 題目生成 +# --------------------------------------------------------------------------- + +_OPT_LINE_RE = re.compile(r'^\s*([a-dA-D])\s*[\.]\s*(.+?)\s*$') +_RE_AI_CHOICE = re.compile(r'(?P.*?)', re.S | re.I) +_RE_AI_FILL = re.compile(r'(?P.*?)', re.S | re.I) +_Q_ATTR = re.compile(r'([A-Za-z_][A-Za-z0-9_-]*)\s*=\s*"([^"]*)"' + r'|([A-Za-z_][A-Za-z0-9_-]*)\s*=\s*([^\s">]+)') + +def _attrs_to_dict_local(s: str) -> dict: + out: dict = {} + if not s: return out + for m in _Q_ATTR.finditer(s): + k = (m.group(1) or m.group(3)).strip() + v = (m.group(2) or m.group(4)).strip() + out[k] = v + return out + + +def _parse_options_md(s: str) -> list[dict]: + out = [] + for line in (s or "").splitlines(): + m = _OPT_LINE_RE.match(line) + if m: + out.append({"key": m.group(1).lower(), "text": m.group(2)}) + return out + + +# DEFAULT_NORMALIZE 由 dt_render_utils 提供,此處需要直接用 +DEFAULT_NORMALIZE = ["sym", "numeric", "nospace"] + + +def _ai_generate_similar_quizzes_as_md( + prompt_text: str, + qtype: str, + model: str = "gemini-2.5-flash", +) -> str: + """呼叫 Gemini,生成 3 題類似題(回傳 Markdown 格式字串)。""" + system = ( + "你是數學教材出題助教。請根據『原題』生成 3 題同概念同難度練習題。\n" + "⚠ 只輸出『題庫註解格式』,不要輸出 JSON、不要 code fence、不要多餘解釋。\n\n" + "格式(單選):\n" + "題目(可含 $...$,允許多行)\n" + '\n' + "a. 選項\nb. 選項\nc. 選項\nd. 選項\n\n\n" + "格式(填空):\n" + "題目(可含 $...$,允許多行)\n" + '\n' + "\n\n" + "規則:\n" + "1) 一共輸出 3 題。\n2) 選項請用 a./b./c./d.。\n" + "3) 內容避免半形雙引號,用「」或單引號。\n" + "4) 數學式只要一組 $ 字號。\n" + "5) 除法要用 \\frac{}{}。\n" + "6) 數學式要用 $ 包起來,禁止用空格。" + ) + ask = system + "\n\n[原題]\n" + (prompt_text or "") + f"\n\n[題型]\n{qtype}" + print("\n===== [moreq] ask to gemini BEGIN =====", flush=True) + print(ask, flush=True) + print("===== [moreq] ask to gemini END =====\n", flush=True) + return (_gem_call(ask, model=model) or "").strip() + + +def _prompt_md_to_runs(md: str) -> list[dict]: + """把含數學式的 prompt MD 字串轉成 prompt_runs(供 render_inline_runs 用)。""" + import re as _re + MATH_FRAG = _re.compile(r'(\\\(.+?\\\)|\\\[.+?\\\]|\$\$.+?\$\$|\$(?!\$).+?(? pos: + push_text(md[pos:m.start()]) + latex, is_block = _strip(m.group(0)) + runs.append({"kind": "math_block" if is_block else "math", "latex": latex}) + pos = m.end() + if pos < len(md): + push_text(md[pos:]) + return runs + + +def _parse_ai_md_to_quiz_nodes( + md_text: str, + default_qtype: str = "choice", +) -> list[dict]: + """把 AI 生成的 Markdown 題目字串解析成 quiz node 清單。""" + md_text = (md_text or "").replace("$", "$").replace("(", "(").replace(")", ")") + + nodes: list[dict] = [] + blocks = [] + for m in _RE_AI_CHOICE.finditer(md_text): + blocks.append(("choice", m.start(), m.end(), m)) + for m in _RE_AI_FILL.finditer(md_text): + blocks.append(("fill", m.start(), m.end(), m)) + blocks.sort(key=lambda x: x[1]) + + last_end = 0 + for kind, s, e, m in blocks: + stem = (md_text[last_end:s] or "").strip() + stem = re.sub(r"^\s*題目\s*[::]\s*", "", stem) + attrs = _attrs_to_dict_local(m.group("attrs") or "") + body = (m.group("body") or "").strip() + + if kind == "choice": + lines = [ln.rstrip() for ln in body.splitlines()] + prompt_lines, opt_lines, hit_opt = [], [], False + for ln in lines: + if _OPT_LINE_RE.match(ln.strip()): hit_opt = True + (opt_lines if hit_opt else prompt_lines).append(ln) + prompt_md = ("\n".join(x for x in prompt_lines if x.strip()) or stem).strip().replace("$", "$") + opts = [] + for ln in opt_lines: + mm = _OPT_LINE_RE.match(ln.strip()) + if mm: + opts.append({"key": mm.group(1).lower(), "text": mm.group(2).strip()}) + ans = (attrs.get("ans") or "").strip().lower().rstrip(".") + idxmap = {"1": "a", "2": "b", "3": "c", "4": "d"} + if ans in idxmap: ans = idxmap[ans] + nodes.append({ + "type": "quiz", "qtype": "choice", "id": "", + "prompt_md": prompt_md, "prompt_runs": _prompt_md_to_runs(prompt_md), + "options": opts, "answer": ans, "card": "1", "ai": "1", + }) + else: + ans_raw = attrs.get("ans") or "" + answers = [a.strip() for a in ans_raw.split("|") if a.strip()] + prompt_md = (body or stem).strip().replace("$", "$") + nodes.append({ + "type": "quiz", "qtype": "fill", "id": "", + "prompt_md": prompt_md, "prompt_runs": _prompt_md_to_runs(prompt_md), + "answers": answers, "normalize": DEFAULT_NORMALIZE, + "card": "1", "ai": "1", + }) + last_end = e + return nodes + +# --------------------------------------------------------------------------- +# AI 批改回饋 +# --------------------------------------------------------------------------- + +def _ai_feedback_multi_gemini( + prompt_text: str, + selected_keys: list[str], + options: list[dict], + answer_keys: list[str], + rubric: str = "", + model: str = "gemini-2.5-flash", + lang: str = "zh-TW", +) -> dict: + opt_map = {str(o.get("key")).lower(): o.get("text", "") for o in (options or [])} + ask = ( + "你是數學助教,請用繁體中文回覆。\n" + "請判斷學生多選題是否正確,並提供具體引導。\n" + "必要時可用行內 LaTeX($...$)。\n" + '只輸出這段 JSON(不得多字):{"is_correct":true/false,"hint":"...","explain":"..."}\n\n' + f"題目:{prompt_text}\n" + f"選項:{json.dumps(opt_map, ensure_ascii=False)}\n" + f"學生勾選:{json.dumps([str(k).lower() for k in (selected_keys or [])], ensure_ascii=False)}\n" + f"正確答案:{json.dumps([str(k).lower() for k in (answer_keys or [])], ensure_ascii=False)}\n" + + (f"評分規則:{rubric}\n" if rubric else "") + ) + obj = _first_json(_gem_call(ask, model=model)) or {} + hint = _s(obj.get("hint")); explain = _s(obj.get("explain")) + if not (hint or explain): return {} + return {"hint": hint, "explain": explain} + + +def _ai_feedback_choice_gemini( + prompt_text: str, + selected_key: str, + options: list[dict], + answer_key: str, + rubric: str = "", + model: str = "gemini-2.5-flash", + lang: str = "zh-TW", +) -> str: + opt_map = {str(o.get("key")).lower(): o.get("text", "") for o in (options or [])} + ask = ( + "你是數學助教,請用繁體中文回覆,提供引導式提示,不要直接公布正確答案。\n" + "必要時可用行內 LaTeX($...$)。\n" + '只輸出這段 JSON(不得多字):{"is_correct":true/false,"hint":"...","explain":"..."}\n\n' + f"題目:{prompt_text}\n" + f"選項:{json.dumps(opt_map, ensure_ascii=False)}\n" + f"學生選的鍵:{selected_key}\n" + f"學生選的內容:{opt_map.get(selected_key, '')}\n" + f"正解鍵:{answer_key}\n" + f"正解內容:{opt_map.get(answer_key, '')}\n" + + (f"評分規則:{rubric}\n" if rubric else "") + ) + txt = _gem_call(ask, model=model) + obj = _first_json(txt) + print(ask) + return _s((obj or {}).get("hint")) + + +def _ai_feedback_fill_gemini( + prompt_text: str, + user_input: str, + answers: list[str], + rubric: str = "", + model: str = "gemini-2.5-flash", + lang: str = "zh-TW", +) -> dict: + ask = ( + "你是數學助教,請用繁體中文回覆。\n" + "判斷學生填空題是否正確,提供具體診斷與引導修正。\n" + "必要時可用行內 LaTeX($...$)。\n" + '只輸出這段 JSON(不得多字):{"is_correct":true/false,"hint":"...","explain":"..."}\n\n' + f"題目:{prompt_text}\n" + f"學生作答:{user_input}\n" + f"可接受答案:{json.dumps(answers, ensure_ascii=False)}\n" + + (f"評分規則:{rubric}\n" if rubric else "") + ) + txt = _gem_call(ask, model=model) + obj = _first_json(txt) or {} + print(ask) + return { + "is_correct": bool((obj or {}).get("is_correct")), + "hint": _s((obj or {}).get("hint")), + "explain": _s((obj or {}).get("explain")), + } diff --git a/layout/renderer/dt_math.py b/layout/renderer/dt_math.py new file mode 100644 index 0000000000000000000000000000000000000000..fff4a5ef40a7ba060884720b4f89c56065924b00 --- /dev/null +++ b/layout/renderer/dt_math.py @@ -0,0 +1,245 @@ +""" +dt_math.py +---------- +數學文字正規化、SymPy 解析管線、答案等價比對。 + +依賴:sympy(純 Python,無 Dash 依賴) + +公開 API: + eq_answer(user_input, answers, ops, tol) → bool 主要入口 + extract_param_function(eq, level_symbol) → (expr, symbol) + extract_k_as_function(eq) → expr | None + _normalize_text(s, ops) → str +""" +from __future__ import annotations +import re +import unicodedata + +import sympy as sp +from sympy.parsing.sympy_parser import ( + parse_expr, + standard_transformations, + implicit_multiplication_application, +) + +# --------------------------------------------------------------------------- +# SymPy 設定 +# --------------------------------------------------------------------------- +_TRANSFORMS = standard_transformations + (implicit_multiplication_application,) + +x, y, z = sp.symbols("x y z") +k, m, n, c, g = sp.symbols("k m n c g") + +XY = {x, y} +PARAMS = {k, m, n, c, g} + +_SINGLE_LETTERS = set(list("xyzkmncg")) +KNOWN_FUNCS = ["sin", "cos", "tan", "cot", "sec", "csc"] +KNOWN_CONST = ["pi", "e"] + +_ALLOWED = { + "x": x, "y": y, "z": z, + "k": k, "m": m, "n": n, "c": c, "g": g, + "pi": sp.pi, "e": sp.E, + "sin": sp.sin, "cos": sp.cos, +} +_LOCALS = dict(_ALLOWED) + +# --------------------------------------------------------------------------- +# 文字正規化 +# --------------------------------------------------------------------------- + +def _std_text(s: str) -> str: + """Unicode 正規化 + 常見符號替換(乘號、除號、減號等)。""" + t = unicodedata.normalize("NFKC", (s or "").strip()) + t = t.replace("×", "*").replace("∙", "*").replace("·", "*") + t = t.replace("÷", "/").replace("⁄", "/").replace("/", "/") + t = t.replace("−", "-").replace("–", "-").replace("—", "-") + t = t.replace("^", "**") + t = re.sub(r'(?<=\d),(?=\d)', "", t) # 移除數字中的千分位逗號 + return t + + +def _apply_text_ops(t: str, ops: set) -> str: + if "lower" in ops: t = t.lower() + if "nospace" in ops: t = re.sub(r"\s+", "", t) + return t + + +def _normalize_text(s: str, ops: list[str]) -> str: + """依 ops 清單對字串做正規化(strip / lower / collapse_space / strip_dollars)。""" + if not isinstance(s, str): + s = "" if s is None else str(s) + t = s + if "strip" in ops: t = t.strip() + if "lower" in ops: t = t.lower() + if "collapse_space" in ops: t = re.sub(r"\s+", " ", t) + if "strip_dollars" in ops: + u = t.strip() + if u.startswith("$$") and u.endswith("$$"): u = u[2:-2].strip() + elif u.startswith("$") and u.endswith("$"): u = u[1:-1].strip() + t = u + return t + +# --------------------------------------------------------------------------- +# SymPy 解析管線 +# --------------------------------------------------------------------------- + +def _protect_funcs_and_consts(s: str) -> tuple[str, dict]: + """把 sin/cos/pi 等先換成佔位符,避免後續拆字母時被錯誤分開。""" + s2, mapping, i = s, {}, 0 + for w in sorted(KNOWN_FUNCS + KNOWN_CONST, key=len, reverse=True): + token = f"__W{i}__" + i += 1 + mapping[token] = w + s2 = re.sub(rf"\b{w}\b", token, s2) + s2 = re.sub(rf"(?<=\w){w}(?=\W|\w|\()", token, s2) + return s2, mapping + + +def _unprotect(s: str, mapping: dict) -> str: + for token, w in mapping.items(): + s = s.replace(token, w) + return s + + +def _insert_implicit_mul(s: str) -> str: + """在相鄰 token 之間插入 *(隱式乘法)。""" + s = re.sub(r"(\d)([A-Za-z_(])", r"\1*\2", s) + s = re.sub(r"(\))([A-Za-z_(\d])", r"\1*\2", s) + s = re.sub(r"([A-Za-z_\d])(\()", r"\1*\2", s) + s = re.sub(r"([A-Za-z_])([A-Za-z_])", r"\1*\2", s) + return s + + +def _preprocess_math(s: str) -> str: + """把數學文字轉成 SymPy-parseable 字串(補乘號、拆字母連寫)。""" + s = _std_text(s) + s = re.sub(r"\s+", "", s) + + for fn in sorted(KNOWN_FUNCS, key=len, reverse=True): + s = re.sub(rf"(?<=[0-9A-Za-z\)]){fn}(?=\()", rf"*{fn}", s) + for cc in sorted(KNOWN_CONST, key=len, reverse=True): + s = re.sub(rf"(?<=[0-9A-Za-z\)]){cc}\b", rf"*{cc}", s) + + pat = rf"(? bool: + """代數等價比對(差為 0 或常數倍)。""" + ea, eb = _to_sympy(a), _to_sympy(b) + if ea is None or eb is None: return False + try: + if isinstance(ea, sp.Equality): ea = sp.simplify(ea.lhs - ea.rhs) + if isinstance(eb, sp.Equality): eb = sp.simplify(eb.lhs - eb.rhs) + if sp.simplify(ea - eb) == 0: return True + if ea.free_symbols == set() and eb.free_symbols == set(): return False + try: + ratio = sp.simplify(ea / eb) + if ratio != 0 and ratio.free_symbols == set(): return True + except Exception: + pass + return False + except Exception: + return False + + +def _as_number(expr: str): + """把字串轉成 SymPy 數值;含符號或失敗則回 None。""" + try: + e = _to_sympy(expr) + if e is None: return None + if getattr(e, "free_symbols", None) and e.free_symbols: return None + if isinstance(e, sp.Equality): return None + return sp.N(e) + except Exception: + return None + + +def _numeric_close(a: str, b: str, tol: float = 1e-9) -> bool: + ua, ub = _as_number(a), _as_number(b) + if ua is None or ub is None: return False + try: + return abs(float(ua) - float(ub)) <= float(tol) + except Exception: + return False + +# --------------------------------------------------------------------------- +# 主要對外 API +# --------------------------------------------------------------------------- + +def eq_answer( + user_input: str, + answers: list[str], + ops: list[str], + tol: float = 1e-9, +) -> bool: + """ + 判斷使用者輸入是否等於任一正確答案。 + + ops 支援:sym(代數等價)/ numeric(數值等價)/ nospace / lower / strip_dollars + """ + ops_set = {o.strip().lower() for o in (ops or []) if o} + u0 = _apply_text_ops(_std_text(user_input), ops_set) + + for a in answers or []: + if u0 == _apply_text_ops(_std_text(a), ops_set): + return True + + if "sym" in ops_set: + for a in answers or []: + if _symbolic_equal(u0, _std_text(a)): + return True + + if "numeric" in ops_set: + for a in answers or []: + if _numeric_close(u0, _std_text(a), tol=tol): + return True + + return False + + +def extract_param_function( + eq: sp.Expr | sp.Eq, + level_symbol: sp.Symbol | None = None, +) -> tuple: + """ + 從方程式 eq 中解出「某個參數 = f(x,y)」的型態。 + 回傳 (f_xy, param_symbol);失敗回傳 (None, None)。 + """ + if not isinstance(eq, sp.Equality): + eq = sp.Eq(eq, 0) + expr0 = sp.simplify(eq.lhs - eq.rhs) + symbols = expr0.free_symbols + candidates = sorted((symbols - XY) & PARAMS, key=lambda s: s.name) + if not candidates: return None, None + + target = level_symbol if level_symbol is not None else candidates[0] + if target not in candidates: return None, None + + sol = sp.solve(sp.Eq(expr0, 0), target) + if not sol: return None, None + return sp.simplify(sol[0]), target + + +def extract_k_as_function(eq: sp.Expr | sp.Eq): + """保留原本 API:專門解出 k = f(x,y)。""" + f_xy, _ = extract_param_function(eq, level_symbol=k) + return f_xy diff --git a/layout/renderer/dt_quiz.py b/layout/renderer/dt_quiz.py new file mode 100644 index 0000000000000000000000000000000000000000..18cc5f1db96350ed39fd573238ee2bea436d2ec8 --- /dev/null +++ b/layout/renderer/dt_quiz.py @@ -0,0 +1,358 @@ +""" +dt_quiz.py +---------- +Quiz 題型渲染:fill / choice / multi / order。 + +依賴:dt_render_utils, dt_render_blocks(延遲 import render_doc) + +公開 API: + render_quiz(node) → Dash element + render_quiz_order(q) → Dash element + _quiz_missing_answer_notice(meta) → (bool, str) + _feedback_child(msg) → Dash element +""" +from __future__ import annotations +import random + +from dash import html, dcc +import dash_mantine_components as dmc +from dash_iconify import DashIconify + +from .dt_render_utils import ( + render_option_label, render_inline_runs, + _render_inline_math, _as_bool, + _runs_to_text_for_prompt, _prompt_md_to_runs, + DEFAULT_NORMALIZE, +) + +# --------------------------------------------------------------------------- +# 工具 +# --------------------------------------------------------------------------- + +def _quiz_missing_answer_notice(meta: dict) -> tuple[bool, str]: + """回傳 (missing: bool, message: str)。""" + qtype = (meta or {}).get("qtype") or (meta or {}).get("kind") or "" + if qtype == "fill" or (meta or {}).get("kind") == "fill": + if not (meta or {}).get("answers"): + return True, "⚠ 此填空題尚未設定答案(請在題庫 JSON 設定 answers / ans)。" + return False, "" + if qtype == "choice": + if not ((meta or {}).get("answer") or "").strip(): + return True, "⚠ 此單選題尚未設定答案(請在題庫 JSON 設定 ans / answer)。" + return False, "" + if qtype == "multi": + if not (meta or {}).get("answers"): + return True, "⚠ 此多選題尚未設定答案(請在題庫 JSON 設定 answers)。" + return False, "" + if qtype == "order": + if (meta or {}).get("answer") is None: + return True, "⚠ 此排序題尚未設定答案(請在題庫 JSON 設定 answer)。" + return False, "" + return False, "" + + +def _feedback_child(msg): + """把 AI 回饋 dict 或純字串渲染成 Dash 元件。""" + if isinstance(msg, dict): + hint = (msg.get("hint") or "").strip() + explain = (msg.get("explain") or "").strip() + parts = [] + if hint: parts.append(f"提示:{hint}") + if explain: parts.append("\n說明:" + explain) + msg_text = "".join(parts) or "(沒有回饋文字)" + else: + msg_text = str(msg or "") + return render_option_label(msg_text) + +# --------------------------------------------------------------------------- +# render_quiz_order(排序題) +# --------------------------------------------------------------------------- + +def render_quiz_order(q: dict): + qid = q.get("id") or f"order-{random.randint(1000,9999)}" + steps = q.get("steps") or [] + if not steps: + return dmc.Alert("⚠ 此排序題尚未設定 steps。", color="yellow", variant="light") + if q.get("answer") is None: + return dmc.Alert("⚠ 此排序題尚未設定答案。", color="yellow", variant="light") + + order0 = list(range(len(steps))) + if q.get("shuffle"): + order0 = random.sample(order0, k=len(order0)) + + def _make_rows(order): + rows = [] + for pos, idx in enumerate(order): + rows.append(dmc.Group( + gap="xs", align="center", wrap="nowrap", + children=[ + dmc.ActionIcon(DashIconify(icon="lucide:chevron-up"), + id={"type": "order-up", "qid": qid, "idx": pos}, variant="light", size="sm"), + dmc.ActionIcon(DashIconify(icon="lucide:chevron-down"), + id={"type": "order-down", "qid": qid, "idx": pos}, variant="light", size="sm"), + dmc.Badge(str(pos + 1), variant="light"), + _render_inline_math(steps[idx]), + ], + )) + return rows + + body = dmc.Stack(gap="xs", children=[ + _render_inline_math(q.get("prompt_md") or ""), + dcc.Store(id={"type": "order-state", "qid": qid}, data=order0), + dcc.Store(id={"type": "order-steps", "qid": qid}, data=steps), + dcc.Store(id={"type": "quiz-ans", "qid": qid}, data={"answer": list(range(len(steps)))}), + dmc.Stack(id={"type": "order-list", "qid": qid}, children=_make_rows(order0)), + dmc.Group(children=[ + dmc.Button("檢查", id={"type": "quiz-check", "qid": qid}, color="blue"), + dmc.Alert("", id={"type": "quiz-feedback-order", "qid": qid}, color="gray", variant="light"), + ], justify="flex-start"), + dcc.Store(id={"type": "quiz-pass-order", "qid": qid}, data=False), + ]) + if q.get("card", 1): + return dmc.Card([ + dmc.CardSection(dmc.Text(q.get("title", ""), fw=700)), + dmc.CardSection(body), + ]) + return body + +# --------------------------------------------------------------------------- +# render_quiz(主入口) +# --------------------------------------------------------------------------- + +def render_quiz(node: dict): + qid = node.get("id") or f"quiz-{random.randint(1000,9999)}" + prompt_runs = node.get("prompt_runs") or [] + prompt_md = (node.get("prompt_md") or "").strip() + + prompt = render_option_label(prompt_md) if prompt_md else render_inline_runs(prompt_runs) + + # AI prompt 文字(供 Gemini 回饋用) + local_prompt = _runs_to_text_for_prompt(prompt_runs).strip() + example_ctx = (node.get("ai_prompt_md") or node.get("prompt_md") or "").strip() + parts = [p for p in [example_ctx, local_prompt] if p] + full_prompt_text = "\n\n".join(parts).strip() or "請依題目作答。" + + qtype = node.get("qtype") + + # ====================================================== + # Choice / Multi + # ====================================================== + if qtype in ("choice", "multi"): + q = node + qid = q.get("id") or f"choice-{random.randint(1000,9999)}" + opts = q.get("options", []) + + indent_options = _as_bool(q.get("indent_options"), default=True) + raw_indent = q.get("indent_controls") or q.get("indent") + indent = _as_bool(raw_indent, True) + controls_wrapper_style = {"marginLeft": "1.5rem"} if indent else {} + option_wrapper_style = {"marginLeft": "18px"} if (indent_options and not indent) else {} + OPTION_GAP_PX = 10 + BASE_FONT = {"fontSize": "1rem"} + + ai_raw = q.get("ai", None) + ai_cfg = ai_raw if isinstance(ai_raw, dict) else { + "enabled": str(ai_raw).lower() not in ("", "0", "false", "no", "off"), + "provider": q.get("ai_provider") or "gemini", + "model": q.get("ai_model") or "gemini-2.5-flash", + "rubric": q.get("ai_rubric") or "", + } + + meta = { + "qtype": qtype, "prompt_text": full_prompt_text, + "options": opts, "answer": q.get("answer", ""), + "answers": q.get("answers", []), "explain": q.get("explain", ""), + "msg_right": q.get("msg_right", "✔ 正確!"), + "msg_wrong": q.get("msg_wrong", "✘ 再試試看~"), + "hints": q.get("wrong_hints", {}) or q.get("hints", {}), + "ai": ai_cfg, + } + missing, msg = _quiz_missing_answer_notice(meta) + notice = dmc.Alert(msg, color="yellow", variant="light") if missing else None + + option_item_style = dict(option_wrapper_style) + option_item_style.update({"marginTop": f"{OPTION_GAP_PX}px", "marginBottom": "0px", **BASE_FONT}) + + items = [] + for i, op in enumerate(opts): + k = op.get("key", ""); txt = op.get("text", "") + label = render_option_label(f" {txt}") + st = dict(option_item_style) + if i == 0: st["marginTop"] = "0px" + items.append( + dmc.Radio(value=k, label=label, style=st, size="md") + if qtype == "choice" + else dmc.Checkbox(value=k, label=label, style=st, size="md") + ) + selector = ( + dmc.RadioGroup(id={"type": "quiz-choice", "qid": qid}, value=None, + children=items, style=BASE_FONT) + if qtype == "choice" + else dmc.CheckboxGroup(id={"type": "quiz-choice", "qid": qid}, value=[], + children=items, style=BASE_FONT) + ) + + return dmc.Stack([ + dcc.Store(id={"type": "quiz-ans", "qid": qid}, data=meta), + html.Div(prompt, style=BASE_FONT), + (html.Div(notice, style=controls_wrapper_style) if notice else html.Span()), + html.Div(selector, style=controls_wrapper_style), + html.Div(dmc.Group([ + dmc.Button("檢查", id={"type": "quiz-submit", "qid": qid}, disabled=missing), + dmc.Button("提示", id={"type": "quiz-hint-choice", "qid": qid}, + leftSection=DashIconify(icon="tabler:sparkles", height=16), + size="sm", variant="outline", n_clicks=0), + ]), style=controls_wrapper_style), + html.Div(dmc.Alert("", id={"type": "quiz-feedback-choice", "qid": qid}, + color="gray", variant="transparent", + style={"display": "none", **BASE_FONT}), + style=controls_wrapper_style), + dcc.Store(id={"type": "quiz-pass-choice", "qid": qid}, data=False), + ]) + + # ====================================================== + # Fill(填空) + # ====================================================== + if qtype == "fill": + q = node + qid = q.get("id") or f"fill-{random.randint(1000,9999)}" + + store = dcc.Store(id={"type": "quiz-ans", "qid": qid}, data={ + "kind": "fill", "answers": q.get("answers", []), + "normalize": q.get("normalize", []), + "msg_right": node.get("right_msg", ""), "msg_wrong": node.get("wrong_msg", ""), + "prompt_text": full_prompt_text, + "ai": { + "enabled": str(node.get("ai", "1")).lower() not in ("0", "false", "no", "off"), + "provider": node.get("ai_provider") or "gemini", + "model": node.get("ai_model") or "gemini-2.5-flash", + "rubric": node.get("ai_rubric") or "", + }, + }) + meta_fill = store.data + missing, msg = _quiz_missing_answer_notice(meta_fill) + notice = dmc.Alert(msg, color="yellow", variant="light") if missing else None + + inline = q.get("inline_math", "1") == "1" + with_border = q.get("border", "1") == "1" + style_input = { + "display": "inline" if inline else "block", + "verticalAlign": "middle", "minWidth": "80px", + "margin": "0 6px" if inline else "6px 0", + "border": "1px solid #ccc" if with_border else "none", + "borderBottom": "1px solid #999" if not with_border else None, + "background": "transparent", "textAlign": "center", "fontSize": "16px", + } + box = dmc.TextInput( + id={"type": "quiz-input", "qid": qid}, + placeholder=q.get("placeholder", ""), + variant="default" if with_border else "unstyled", size="sm", + style={k: v for k, v in style_input.items() if v is not None}, + ) + + raw_indent = node.get("indent_controls") or node.get("indent") + indent = _as_bool(raw_indent, True) + controls_wrapper_style = {"marginLeft": "1.5rem"} if indent else {} + + btn = dmc.Button("檢查", id={"type": "quiz-check", "qid": qid}, + leftSection=DashIconify(icon="tabler:check", height=16), size="sm") + hint_btn = dmc.Button("提示", id={"type": "quiz-hint", "qid": qid}, + leftSection=DashIconify(icon="tabler:sparkles", height=16), + size="sm", variant="outline", n_clicks=0) + + # 數學打法提示 Popover + math_tips = dmc.Popover( + width=220, + position="top-start", + withArrow=True, + shadow="md", + children=[ + dmc.PopoverTarget( + dmc.Tooltip( + label="數學輸入提示", + children=dmc.ActionIcon( + DashIconify(icon="tabler:keyboard", height=16), + variant="subtle", + color="gray", + size="sm", + ), + ) + ), + dmc.PopoverDropdown( + dmc.Stack([ + dmc.Text("📐 數學輸入提示", fw=700, size="xs", mb=4), + dmc.Table( + data={ + "head": ["要輸入", "打法"], + "body": [ + ["根號 √x", "sqrt(x)"], + ["次方 xⁿ", "x^n"], + ["分數 a/b", "a/b"], + ["π", "pi"], + ["e(自然數)", "e"], + ["sin(x)", "sin(x)"], + ["cos(x)", "cos(x)"], + ["ln(x)", "ln(x)"], + ["絕對值 |x|", "abs(x)"], + ["無限大 ∞", "oo"], + ["不存在", "DNE"], + ["乘號", "* 或直接省略"], + ], + }, + striped=True, + highlightOnHover=True, + withTableBorder=False, + withColumnBorders=False, + fz="xs", + ), + ], gap=0, p="xs") + ), + ], + ) + + fb = dmc.Alert(id={"type": "quiz-feedback-fill", "qid": qid}, + title=None, color="gray", variant="transparent", my="xs", children="") + + controls_row = html.Div( + dmc.Group([box, math_tips, btn, hint_btn], gap="sm", align="center"), + style=controls_wrapper_style, + ) + fb_row = html.Div(fb, style=controls_wrapper_style) + + body = html.Div(children=[ + *prompt, dmc.Space(h=6), + notice if notice else html.Span(), + controls_row, fb_row, store, + dcc.Store(id={"type": "quiz-pass-fill", "qid": qid}, data=False), + ], style={"position": "relative"}) + + # ====================================================== + # Order + # ====================================================== + elif qtype == "order": + return render_quiz_order(node) + + else: + return dmc.Alert("未知的互動題型", color="red", variant="light") + + # ====================================================== + # 外層 Card 包裝 + # ====================================================== + use_card = _as_bool(node.get("card"), True) + with_border = _as_bool(node.get("border"), True) + + if not use_card: + return html.Div(body, style={"display": "block", "whiteSpace": "pre-wrap", + "lineHeight": "1.8", "marginBottom": "12px"}) + + header_section = ( + dmc.CardSection(dmc.Text("互動題", fw=600, c="gray"), + withBorder=False, inheritPadding=True, py=6) + if with_border else None + ) + card_children = [html.Div(body, style={"display": "inline", "whiteSpace": "pre-wrap", "lineHeight": "1.8"})] + if header_section: + card_children.insert(0, header_section) + + return dmc.Card(card_children, withBorder=with_border, + shadow="sm" if with_border else "none", radius="md", my="md") diff --git a/layout/renderer/dt_render_blocks.py b/layout/renderer/dt_render_blocks.py new file mode 100644 index 0000000000000000000000000000000000000000..a0a12d1d97534d716008b6f4abd6072cb9cbe991 --- /dev/null +++ b/layout/renderer/dt_render_blocks.py @@ -0,0 +1,650 @@ +""" +dt_render_blocks.py +-------------------- +Block 層渲染:paragraph、list、heading、card、solution、flow、 +GeoGebra、code、pycall,以及頂層的 render_doc / build_content_and_toc。 + +依賴:dt_render_utils(渲染工具) + +公開 API: + render_doc(doc) → html.Div 主要入口 + build_content_and_toc(nodes) → (children, toc) + render_paragraph(item) → Dash element + render_list(node) → Dash element + render_heading(node, hid) → Dash element + render_card(node) → Dash element + render_solution(node) → Dash element + render_flow(node) → Dash element + render_geogebra(node) → Dash element + render_code(node) → Dash element + render_pycall(node) → Dash element + render_hr(_) → Dash element + render_comment(node) → Dash element + render_doc_section(doc, sid) → Dash element + render_section_nav(sections, active_id) → Dash element + maybe_render_paragraph_with_geogebra(item) → Dash element | None +""" +from __future__ import annotations +import re, json, random, hashlib, importlib.util, types +from pathlib import Path + +from dash import html, dcc +import dash_mantine_components as dmc +from dash_iconify import DashIconify +from plotly.graph_objs import Figure as _PlotlyFigure + +from ..toc import make_toc + +from .dt_render_utils import ( + HAS_PRISM, DashLatex, + _norm_hex, _to_dark_color, _themed_color_style, _as_css_color, _ensure_theme_colors, + _parse_img_hints, _apply_img_size_style, _split_text_links_images, + render_url, render_picture, render_inline_media, + _strip_math_delims, _render_inline_math, + render_math_inline, render_math_block, render_option_label, + render_inline_runs, render_runs, + _as_bool, _is_true, +) + +# --------------------------------------------------------------------------- +# GeoGebra 工具 +# --------------------------------------------------------------------------- + +def _ggb_id_from_url(u: str | None) -> str | None: + if not u: return None + m = re.search(r'/m/([A-Za-z0-9]+)', u) + return m.group(1) if m else None + + +_GGB_ANY_RE = re.compile(r'') +_Q_ATTR = re.compile(r'([A-Za-z_][A-Za-z0-9_-]*)\s*=\s*"([^"]*)"' + r'|([A-Za-z_][A-Za-z0-9_-]*)\s*=\s*([^\s">]+)') + +def _attrs_to_dict(s: str) -> dict: + out: dict = {} + if not s: return out + for m in _Q_ATTR.finditer(s): + k = (m.group(1) or m.group(3)).strip() + v = (m.group(2) or m.group(4)).strip() + out[k] = v + return out + + +def _px_or_raw(v: str | None, fallback_px: int) -> tuple: + v = (v or "").strip() + if not v: return (f"{fallback_px}px", fallback_px) + if v.endswith("%"): return (v, 800) + try: n = int(float(v)) + except: n = fallback_px + return (f"{n}px", n) + + +def render_geogebra(node: dict): + gid = (node.get("id") or "").strip() + w_raw = node.get("width") or node.get("w") or "100%" + h_raw = node.get("height") or node.get("h") or "480" + border = str(node.get("border") or "0") == "1" + caption = (node.get("caption") or "").strip() + use_card = str(node.get("card", "0")) not in ("0", "false", "False", "") + + w_css, w_px = _px_or_raw(w_raw, 800) + h_css, h_px = _px_or_raw(h_raw, 480) + + if not gid: + return dmc.Alert("⚠ GeoGebra:缺少 id 或 url。", color="yellow", variant="light") + + iframe = html.Iframe( + src=f"https://www.geogebra.org/material/iframe/id/{gid}" + f"/width/{w_px}/height/{h_px}/border/{'888888' if border else 'ffffff'}" + f"/sfsb/true/smb/false/stb/false/stbh/false/ai/false/asb/false" + f"/sri/false/rc/false/ld/false/sdz/false/ctl/false", + style={"width": w_css, "height": h_css, "border": "none", + "display": "block", "margin": "0 auto"}, + allow="fullscreen", + ) + caption_elem = html.P(caption, style={"textAlign": "center", "fontSize": "0.9rem", + "color": "#888", "marginTop": "4px"}) if caption else None + inner = html.Div([iframe, caption_elem] if caption_elem else [iframe]) + return (dmc.Card([inner], withBorder=border, shadow="sm", radius="md", p=4) + if use_card else inner) + + +def maybe_render_paragraph_with_geogebra(item: dict): + """若段落只包含一個 GeoGebra marker,直接渲染成 GeoGebra;否則回 None。""" + content = (item.get("content") or "").strip() + m = _GGB_ANY_RE.fullmatch(content) + if not m: return None + attrs = _attrs_to_dict(m.group("attrs") or "") + gid = attrs.get("id") or _ggb_id_from_url(attrs.get("url", "")) + if not gid: return None + node = { + "type": "geogebra", "id": gid, + "width": attrs.get("w") or attrs.get("width") or "100%", + "height": attrs.get("h") or attrs.get("height") or "480", + "border": attrs.get("border") or "0", + "caption": attrs.get("caption") or "", + "card": attrs.get("card") or "0", + } + return render_geogebra(node) + +# --------------------------------------------------------------------------- +# 基本 block 渲染 +# --------------------------------------------------------------------------- + +def render_paragraph(item: dict): + content = item.get("content") or "" + runs = item.get("runs") or [] + if not content and not runs and str(item.get("newline", "false")).lower() in ("true", "1", "yes", "on"): + return html.Br() + if runs: + return html.Div(render_inline_runs(runs), style={"display": "block"}) + pieces = [] + for kind, *vals in _split_text_links_images(content): + if kind == "text": + pieces.append(html.Span(vals[0], style={"display": "inline", "whiteSpace": "pre-line"})) + elif kind == "a": + pieces.append(render_url(vals[0], vals[1])) + elif kind == "img": + pieces.append(render_picture(vals[0], vals[1], hints=vals[2])) + return html.Div(pieces, style={"display": "block"}) + + +def render_list(node: dict): + items = node.get("content", []) or [] + rows = [] + INDENT_W, MARKER_W = 18, 22 + + for it in items: + level = int(it.get("indent", 0)) + marker_raw = it.get("marker") or "•" + runs = it.get("runs", []) + col = _as_css_color(it.get("color")) + + if marker_raw in ("-", "*", "+", "•"): + marker = ("•" if level == 0 else "◦" if level == 1 else "▪") + else: + marker = marker_raw + + pad_px = INDENT_W * level + MARKER_W + row_style = { + "display": "flex", "alignItems": "flex-start", "columnGap": "6px", + "marginLeft": f"{INDENT_W * level}px", + "paddingTop": "0.25rem", "paddingBottom": "0.25rem", + } + if col: + row_style.update(_themed_color_style(col, _to_dark_color(col))) + + has_dfrac = any("\\dfrac" in (r.get("latex") or "") for r in runs) + has_any_math= any(r.get("latex") for r in runs) + marker_margin_top = "0.4em" if has_dfrac else "0.1em" if has_any_math else "0em" + + marker_box = html.Div(marker, style={ + "minWidth": f"{MARKER_W}px", "textAlign": "right", + "marginTop": marker_margin_top, "opacity": 0.7, + "pointerEvents": "none", "userSelect": "none", + "whiteSpace": "nowrap", "flex": "0 0 auto", + }) + content_box = html.Div(render_runs(runs, outdent_px=pad_px), style={"flex": "1 1 0%", "minWidth": 0}) + rows.append(html.Div([marker_box, content_box], style=row_style)) + + return html.Div(rows, style={"paddingLeft": "0px", "marginLeft": "0px"}) + + +def render_hr(_): + return dmc.Divider(my=12) + + +def render_comment(node: dict): + label = node.get("content", "").strip("").strip() + return dmc.Badge(label, variant="light", color="gray", + leftSection=DashIconify(icon="tabler:bookmark", height=14), mb=6) + +# --------------------------------------------------------------------------- +# Heading +# --------------------------------------------------------------------------- + +def _plain_text_for_heading(nodes: list) -> str: + out = [] + for n in nodes: + if n.get("runs"): + for r in n["runs"]: + if "text" in r: out.append(r["text"]) + elif "latex" in r and r.get("kind") == "math": out.append(f"${r['latex']}$") + else: + out.append(n.get("content", "")) + return "".join(out).strip() + + +def render_heading_segment(node: dict) -> list: + runs = node.get("runs") + if runs: return render_runs(runs) + text = node.get("content") or "" + return [text] if text else [] + + +def render_heading(node: dict, hid: str): + order = max(1, min(int(node.get("level", 3)), 6)) + runs = node.get("runs") + children = render_runs(runs) if runs else (node.get("content") or "") + clean_id = (hid or "").strip() + if clean_id.startswith("h-"): clean_id = clean_id[2:] + title = dmc.Title(children, order=order, id=clean_id, py=8) + + prompt_md = (node.get("ai_prompt_md") or "").strip() + ex_seq = node.get("example_seq") + if prompt_md and ex_seq: + return dmc.Group( + [title, + dcc.Store(id={"type": "moreq-example-meta", "ex": ex_seq}, data={"prompt_md": prompt_md}), + html.Div(id={"type": "moreq-example-out", "ex": ex_seq})], + justify="space-between", align="center", + ) + return title + + +def render_section_nav(sections: list, active_id: str): + return dmc.SegmentedControl( + id="unit-section-picker", + value=active_id, + data=[{"label": s["title"], "value": s["id"]} for s in sections], + fullWidth=True, radius="md", size="sm", + ) + + +def render_doc_section(doc: dict, section_id: str | None = None): + sections = doc.get("sections") or [] + if not sections: return render_doc(doc.get("blocks") or []) + if not section_id: section_id = sections[0]["id"] + target = next((s for s in sections if s["id"] == section_id), sections[0]) + return render_doc(target.get("blocks") or []) + +# --------------------------------------------------------------------------- +# Cards +# --------------------------------------------------------------------------- + +_CARD_KIND_PALETTE = { + "定義": { + "accent": "red", "header_light": "#AF1F4A", "header_dark": "#841A43", + "fg_light": "#FFFFFF", "fg_dark": "#FFE6EC", + "body_light": "#FFF1F4", "body_dark": "#1F0B12", + }, + "定理": { + "accent": "cyan", "header_light": "#0F4C81", "header_dark": "#0A2E4D", + "fg_light": "#FFFFFF", "fg_dark": "#D7F9FF", + "body_light": "#E6F6FF", "body_dark": "#061A2B", + }, + "引理": { + "accent": "teal", "header_light": "#0F766E", "header_dark": "#0B3B39", + "fg_light": "#FFFFFF", "fg_dark": "#CCFBF1", + "body_light": "#F0FDFA", "body_dark": "#062A27", + }, + "特性": { + "accent": "#F6A160", "header_light": "#CD7F55", "header_dark": "#7C2D12", + "fg_light": "#FFFFFF", "fg_dark": "#FFE8CC", + "body_light": "#FFF4E6", "body_dark": "#2B1B0B", + }, + "註解": { + "accent": "gray", "header_light": "#495057", "header_dark": "#90959BB4", + "fg_light": "#FFFFFF", "fg_dark": "#E9ECEF", + "body_light": "#F8F9FA", "body_dark": "#212529", + }, + "其他": { + "accent": "#6039A0", "header_light": "#9064D8", "header_dark": "#3B1A7A", + "fg_light": "#FFFFFF", "fg_dark": "#F3E8FF", + "body_light": "#FAF5FF", "body_dark": "#1F1233", + }, +} + + +def _merge_card_palette(node: dict) -> dict: + kind = (node.get("kind") or "").strip() + base = _CARD_KIND_PALETTE.get(kind, _CARD_KIND_PALETTE["其他"]).copy() + if node.get("bg_light"): base["body_light"] = node["bg_light"] + if node.get("bg_dark"): base["body_dark"] = node["bg_dark"] + if node.get("fg_light"): base["fg_light"] = node["fg_light"] + if node.get("fg_dark"): base["fg_dark"] = node["fg_dark"] + if node.get("accent"): base["accent"] = node["accent"] + return base + + +def render_card(node: dict): + p = _merge_card_palette(node) + kind = (node.get("kind") or "").strip() + headline = (node.get("headline") or "").strip() + body_blocks = node.get("body") or [] + + header = dmc.CardSection( + dmc.Group([ + dmc.Badge(kind, color=p.get("accent", "gray"), variant="filled"), + dmc.Text(headline, fw=700), + ], gap="sm"), + withBorder=True, inheritPadding=True, py=6, + style={"backgroundColor": p.get("header_light"), "color": p.get("fg_light")}, + ) + + body_children = [] + for b in body_blocks: + t = (b.get("type") or "").lower() + if t == "paragraph": body_children.append(render_paragraph(b)) + elif t == "list": body_children.append(render_list(b)) + elif t == "math": body_children.append(render_math_block(b.get("latex", ""))) + elif t == "url": body_children.append(render_url(b.get("text"), b.get("href"))) + elif t == "picture": body_children.append(render_picture(b.get("alt"), b.get("src"))) + elif t == "horizontal_rule": body_children.append(render_hr(b)) + elif t == "code": body_children.append(render_code(b)) + else: + raw = b.get("content", "") + if raw: body_children.append(dcc.Markdown(raw, mathjax=not DashLatex)) + + return dmc.Card( + [header, dmc.Stack(body_children, gap="xs", px="md", py="sm")], + withBorder=True, shadow="md", radius="md", mb=14, + style={"backgroundColor": p.get("body_light")}, + ) + +# --------------------------------------------------------------------------- +# Code / pycall +# --------------------------------------------------------------------------- + +def render_code(node: dict): + filename = (node.get("filename") or "").strip() + lang = (node.get("lang") or "text").lower() + code = node.get("code") or node.get("content") or "" + header = ( + dmc.Group([dmc.Badge(filename or "file", variant="light"), dmc.Badge(lang, variant="outline")], + gap="xs", mb=6) + if (filename or lang) else None + ) + comp = ( + dmc.Prism(code, language=lang, withLineNumbers=True, copyLabel="複製", copiedLabel="已複製", + style={"fontSize": "13px", "borderRadius": "10px"}) + if HAS_PRISM + else dmc.Code(code, block=True, style={"fontSize": "13px", "whiteSpace": "pre", "display": "block"}) + ) + return html.Div(([header, comp] if header else [comp]), style={"margin": "12px 0"}) + + +PROJECT_ROOT = Path(__file__).resolve().parents[2] # layout/renderer/ → 上兩層 = 專案根目錄 + + +def _load_func_from_path(mod_path: str, func_name: str): + raw = (mod_path or "").strip() + if not raw: raise FileNotFoundError("pyfunc path is empty") + p = Path(raw) + if not p.is_absolute(): p = (PROJECT_ROOT / p).resolve() + if (not p.exists()) or (p.suffix != ".py"): + raise FileNotFoundError(f"pyfunc path not found: {p}") + h = hashlib.md5(str(p).encode("utf-8")).hexdigest()[:10] + spec = importlib.util.spec_from_file_location(f"dynmod_{h}", str(p)) + if not spec or not spec.loader: raise RuntimeError(f"cannot import module from {p}") + mod = importlib.util.module_from_spec(spec) # type: ignore + spec.loader.exec_module(mod) # type: ignore + fn = getattr(mod, func_name, None) + if not callable(fn): raise AttributeError(f"function not found: {func_name} in {p}") + return fn + + +def render_pycall(node: dict): + p = node.get("path") or ""; fn = node.get("func") or "" + try: + mod = types.ModuleType("dynmod") + spec = importlib.util.spec_from_file_location( + "dynmod_" + hashlib.md5(p.encode("utf-8")).hexdigest()[:8], p + ) + if not spec or not spec.loader: raise RuntimeError(f"cannot import module from {p}") + mod = importlib.util.module_from_spec(spec) + spec.loader.exec_module(mod) # type: ignore + if not hasattr(mod, fn): raise AttributeError(f"function '{fn}' not found in {p}") + rv = getattr(mod, fn)() + if hasattr(rv, "type") and hasattr(rv, "props"): return rv + if isinstance(rv, _PlotlyFigure): + return dcc.Graph(figure=rv, responsive=True, style={"height": "100%", "minHeight": "320px"}) + if isinstance(rv, tuple) and len(rv) == 2 and isinstance(rv[1], dict): + return html.Div(rv[0], **rv[1]) + return dmc.Alert([dmc.Text(f"{node.get('filename','')}::{fn} 回傳型別不支援:{type(rv).__name__}"), + dmc.Code(str(rv), block=True, style={"whiteSpace": "pre"})], + color="yellow", variant="light") + except Exception as e: + return dmc.Alert([dmc.Text(f"執行 {node.get('filename','')}::{fn} 失敗:{e}"), + dmc.Space(h=6), render_code(node)], + color="red", variant="light") + +# --------------------------------------------------------------------------- +# Solution / Flow +# --------------------------------------------------------------------------- + +def _storage_type(persist: str) -> str: + return "session" if (persist or "none").strip().lower() == "session" else "memory" + + +def render_solution(node: dict): + uid = node.get("uid") or f"sol-{random.randint(1000,9999)}" + label = (node.get("label") or "看解法").strip() + default = (node.get("default") or "closed").strip().lower() + persist = (node.get("persist") or "none").strip().lower() + card = str(node.get("card", "0")) + accent = (node.get("accent") or "").strip() + after = (node.get("after") or "").strip() + + inner_children = render_doc(node.get("body") or []) + + store_open = dcc.Store(id={"type": "solution-open", "key": uid}, + data=(default == "open"), storage_type=_storage_type(persist)) + store_after = dcc.Store(id={"type": "solution-after", "key": uid}, + data=after, storage_type="memory") + + btn = dmc.Button(label, id={"type": "solution-toggle", "key": uid}, + variant="light", **({} if not accent else {"color": accent})) + prompt_md = (node.get("ai_prompt_md") or "").strip() + + controls_children = [btn] + extra_children = [] + + if prompt_md: + extra_children.append(dcc.Store(id={"type": "moreq-prompt", "key": uid}, data=prompt_md)) + controls_children.append(dmc.Button( + "更多類似題目", id={"type": "moreq-open", "key": uid}, + variant="outline", size="sm", n_clicks=0, + leftSection=DashIconify(icon="tabler:plus", height=16), + )) + extra_children.append(dmc.Modal( + id={"type": "moreq-modal", "key": uid}, title="更多類似題目", + opened=False, size="lg", + children=html.Div(id={"type": "moreq-content", "key": uid}), + )) + + controls = dmc.Group(controls_children, gap="sm", align="center") + hint = dmc.Text("先完成前面的題目再查看解法喔~", + id={"type": "solution-hint", "key": uid}, size="sm", + style={"display": "none", "opacity": 0.7, "marginTop": "6px"}) + coll = dmc.Collapse( + id={"type": "solution-collapse", "key": uid}, opened=(default == "open"), + children=(dmc.Paper(inner_children, shadow="sm", radius="lg", withBorder=True, p="md") + if card == "1" else html.Div(inner_children)), + transitionDuration=150, + ) + + return html.Div( + id={"type": "solution-wrapper", "key": uid}, + children=[store_open, store_after, *extra_children, controls, coll, hint], + style={"margin": "8px 0"}, + ) + + +def _make_flow_step_box(fid: str, st: dict): + meta = dcc.Store(id={"type": "step-meta", "flow": fid, "step": st["id"]}, + data={"prev_qid": st.get("gate_from")}) + return html.Div( + [render_doc(st["content"]), meta], + id={"type": "step-box", "flow": fid, "step": st["id"]}, + ) + + +def render_flow(node: dict): + fid = node["id"] + steps = node.get("steps", []) + first_children = [_make_flow_step_box(fid, steps[0])] if steps else [] + return html.Div( + [dcc.Store(id={"type": "flow-steps", "flow": fid}, data=steps), + html.Div(id={"type": "flow-body", "flow": fid}, children=first_children)], + className="flow", + ) + +# --------------------------------------------------------------------------- +# 頂層 render_doc / build_content_and_toc +# --------------------------------------------------------------------------- + +def render_doc(doc: list[dict]): + """把 block 清單渲染成 html.Div。""" + # 延遲 import 避免循環(render_quiz 在 dt_quiz) + from .dt_quiz import render_quiz + + children = [] + for item in doc: + t = (item.get("type") or "").strip().lower() + if t == "pycall": + children.append(render_pycall(item)) + elif t == "code": + children.append(render_code(item)) + elif t == "math": + children.append(render_math_block(item.get("latex", ""))) + elif t == "paragraph": + g = maybe_render_paragraph_with_geogebra(item) + children.append(g if g is not None else render_paragraph(item)) + elif t == "list": + children.append(render_list(item)) + elif t == "horizontal_rule": + children.append(render_hr(item)) + elif t == "card": + children.append(render_card(item)) + elif t == "icon": + icon_name = (item.get("icon") or item.get("name") or "").strip() + try: height = int(item.get("height", 18)) + except (TypeError, ValueError): height = 18 + children.append(DashIconify(icon=icon_name, height=height)) + elif t == "comment": + continue + elif t == "url": + children.append(render_url(item.get("text"), item.get("href"))) + elif t == "picture": + alt = item.get("alt"); src = item.get("src") + children.append(render_picture(alt, src, hints=_parse_img_hints(alt))) + children.append(dmc.Space(h=6)) + elif t == "quiz": + children.append(render_quiz(item)) + elif t == "heading": + children.append(render_heading(item, item.get("id", ""))) + elif t == "geogebra": + children.append(render_geogebra(item)); children.append(dmc.Space(h=6)) + elif t == "flow": + children.append(render_flow(item)) + elif t == "solution": + children.append(render_solution(item)) + elif t == "pyfunc": + mod_path = item.get("path", ""); func = item.get("call", "make_view") + kwargs = item.get("kwargs") or {} + try: + fn = _load_func_from_path(mod_path, func) + res = fn(**kwargs) if kwargs else fn() + if isinstance(res, _PlotlyFigure): + children.append(dcc.Graph(figure=res, + config={"responsive": True, "displaylogo": False}, + style=({"height": f"{int(kwargs.get('height', 420))}px"} if "height" in kwargs else {}))) + elif hasattr(res, "props") or isinstance(res, (html.Div, dmc.Alert, dcc.Graph)): + children.append(res) + else: + children.append(dmc.Alert(f"pyfunc 回傳型別不支援:{type(res)}", title="pyfunc", + color="red", variant="light")) + except Exception as e: + children.append(dmc.Alert(str(e), title="pyfunc error", color="red", variant="light")) + else: + payload = json.dumps(item, ensure_ascii=False, indent=2) + children.append(dmc.Alert( + [dmc.Text(f"unknown: {item.get('type')}"), dmc.Space(h=6), + dmc.Code(payload, block=True, style={"whiteSpace": "pre"})], + color="gray", variant="light", + )) + return html.Div(children, style={"lineHeight": "1.9"}) + + +def build_content_and_toc(nodes: list, *, top_offset: int = 90) -> tuple: + """ + 從 block 清單生成: + content_children:右側主要內容(heading 已加 id) + toc:左側 TOC 元件 + """ + content_children: list = [] + toc_titles: list[dict] = [] + heading_buf: list[dict] = [] + heading_level: int | None = None + hcount = 0 + + def flush_heading(): + nonlocal heading_buf, heading_level, hcount + if not heading_buf: return + hid = f"h-{hcount}" + children = [] + for seg in heading_buf: + children.extend(render_heading_segment(seg)) + order = max(1, min(int(heading_level or 3), 6)) + content_children.append(dmc.Title(children, order=order, id=hid, py=8)) + title_text = _plain_text_for_heading(heading_buf) + if 1 <= order <= 4: + toc_titles.append({"id": hid, "label": title_text or "(空白標題)", "level": order}) + hcount += 1 + heading_buf.clear() + heading_level = None + content_children.append(dmc.Space(h=6)) + + for node in nodes: + t = (node.get("type") or "").strip().lower() + if t == "heading": + level = int(node.get("level", 3)) + nl = _is_true(node.get("newline")) + if not heading_buf: + heading_buf = [node]; heading_level = level + if nl: flush_heading() + else: + prev_nl = _is_true(heading_buf[-1].get("newline")) + if (level != heading_level) or prev_nl: + flush_heading(); heading_buf = [node]; heading_level = level + if nl: flush_heading() + else: + heading_buf.append(node) + if nl: flush_heading() + continue + + flush_heading() + + if t == "paragraph": + content_children.append(render_paragraph(node)); content_children.append(dmc.Space(h=6)) + elif t == "list": + content_children.append(render_list(node)); content_children.append(dmc.Space(h=6)) + elif t == "horizontal_rule": + content_children.append(render_hr(node)) + elif t == "card": + content_children.append(render_card(node)); content_children.append(dmc.Space(h=6)) + elif t == "comment": + content_children.append(render_comment(node)); content_children.append(dmc.Space(h=6)) + elif t == "math": + content_children.append(render_math_block(node.get("latex", ""))); content_children.append(dmc.Space(h=6)) + elif t in ("url", "URL"): + content_children.append(render_url(node.get("text"), node.get("href"))); content_children.append(dmc.Space(h=6)) + elif t == "picture": + content_children.append(render_picture(node.get("alt"), node.get("src"))); content_children.append(dmc.Space(h=6)) + elif t == "code": + content_children.append(render_code(node)); content_children.append(dmc.Space(h=6)) + else: + raw = node.get("content", "") + if raw: + content_children.append(dcc.Markdown(raw, mathjax=not DashLatex)) + content_children.append(dmc.Space(h=6)) + + flush_heading() + + toc = make_toc( + titles=toc_titles, top_offset=top_offset, + col_span={"xs": 0, "sm": 0, "md": 3, "lg": 3, "xl": 3}, + visible_from="md", + ) + return content_children, toc diff --git a/layout/renderer/dt_render_utils.py b/layout/renderer/dt_render_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..4f21294dc3c97d998009ca00a2c40272b79cb790 --- /dev/null +++ b/layout/renderer/dt_render_utils.py @@ -0,0 +1,440 @@ +""" +dt_render_utils.py +------------------ +純渲染工具:顏色計算、圖片/連結、數學式、inline run 渲染。 +無任何 Dash @callback,可獨立於 app 使用。 + +公開 API: + # 顏色 + _norm_hex(c) → str + _to_dark_color(hex_light) → str + _themed_color_style(light, dark) → dict + _ensure_theme_colors(run) → (cl, cd) + _as_css_color(v) → str | None + + # 圖片 / 連結 + _parse_img_hints(alt) → dict + _apply_img_size_style(base, hints)→ dict + _split_text_links_images(s) → list[tuple] + render_url(text, href) → Dash element + render_picture(alt, src, hints) → Dash element + render_inline_media(text) → list[Dash element] + + # 數學 + _strip_math_delims(s) → (latex, is_block) + _render_inline_math(text) → Dash element + render_math_inline(latex, cl, cd) → Dash element + render_math_block(latex, cl, cd) → Dash element + render_option_label(text) → Dash element + + # Run 渲染 + render_inline_runs(runs) → list[Dash element] + render_runs(runs, outdent_px) → list[Dash element] + + # 雜項 + _as_bool(v, default) → bool + _is_true(x) → bool + _prompt_md_to_runs(md) → list[run] + _runs_to_text_for_prompt(runs) → str + + # 全域常數 + DEFAULT_NORMALIZE, DEFAULT_TOL, HAS_PRISM +""" +from __future__ import annotations +import re + +from dash import html, dcc +import dash_mantine_components as dmc +from dash_iconify import DashIconify + +try: + from dash_latex import DashLatex +except Exception: + DashLatex = None + +HAS_PRISM = hasattr(dmc, "Prism") +DEFAULT_NORMALIZE = ["sym", "numeric", "nospace"] +DEFAULT_TOL = 1e-9 + +# --------------------------------------------------------------------------- +# Regex +# --------------------------------------------------------------------------- +import re as _re_md +_IMG_RE = _re_md.compile(r'!\[([^\]]*)\]\(([^)\s]+)\)') +_LINK_RE = _re_md.compile(r'(? str: + if not isinstance(c, str): return "" + s = c.strip().lower() + if s.startswith("#"): + if len(s) == 4: return "#" + "".join(ch * 2 for ch in s[1:]) + if len(s) >= 7: return s[:7] + return s + named = { + "black": "#000000", "white": "#ffffff", "gray": "#808080", "grey": "#808080", + "red": "#ff0000", "green": "#008000", "blue": "#0000ff", "teal": "#008080", + "orange": "#ffa500", "purple": "#800080", "pink": "#ffc0cb", "yellow": "#ffff00", + "darkblue": "#00008b", "lightgray": "#d3d3d3", "dimgray": "#696969", + "ffa6ff": "#ffa6ff", + } + if s in named: return named[s] + m = re.match(r"rgba?\(([^)]+)\)", s) + if m: + parts = [p.strip() for p in m.group(1).split(",")] + def to255(v): + return round(float(v[:-1]) * 2.55) if v.endswith("%") else max(0, min(255, int(float(v)))) + r, g, b = to255(parts[0]), to255(parts[1]), to255(parts[2]) + return "#{:02x}{:02x}{:02x}".format(r, g, b) + return s + + +def _hex_to_hsl(hx: str) -> tuple: + hx = _norm_hex(hx) + if not (hx.startswith("#") and len(hx) == 7): return (0.0, 0.0, 0.0) + r = int(hx[1:3], 16) / 255; g = int(hx[3:5], 16) / 255; b = int(hx[5:7], 16) / 255 + mx, mn = max(r, g, b), min(r, g, b) + l = (mx + mn) / 2 + if mx == mn: return (0.0, 0.0, l) + d = mx - mn + s = d / (2 - mx - mn) if l > 0.5 else d / (mx + mn) + if mx == r: h = (g - b) / d + (6 if g < b else 0) + elif mx == g: h = (b - r) / d + 2 + else: h = (r - g) / d + 4 + return (h / 6, s, l) + + +def _hsl_to_hex(h, s, l) -> str: + def f(p, q, t): + if t < 0: t += 1 + if t > 1: t -= 1 + if t < 1/6: return p + (q - p) * 6 * t + if t < 1/2: return q + if t < 2/3: return p + (q - p) * (2/3 - t) * 6 + return p + if s == 0: r = g = b = l + else: + q = l + s - l * s if l >= 0.5 else l * (1 + s) + p = 2 * l - q + r = f(p, q, h + 1/3); g = f(p, q, h); b = f(p, q, h - 1/3) + return "#{:02x}{:02x}{:02x}".format(int(r*255+0.5), int(g*255+0.5), int(b*255+0.5)) + + +def _to_dark_color(hex_light: str) -> str: + table = { + "#228be6": "#91c9ff", "#ffa6ff": "#cc66cc", + "#000000": "#f2f2f2", "#808080": "#cccccc", + } + hx = _norm_hex(hex_light) + if hx in table: return table[hx] + h, s, l = _hex_to_hsl(hx) + return _hsl_to_hex(h, max(0.10, s * 0.85), max(0.40, min(0.60, l * 0.65 + 0.20))) + + +def _themed_color_style(light, dark) -> dict: + sty = {} + if light: sty["--tc-light"] = light + if dark: sty["--tc-dark"] = dark + if light or dark: sty["color"] = "var(--tc, var(--tc-light))" + return sty + + +def _as_css_color(v) -> str | None: + return v if isinstance(v, str) else None + + +def _ensure_theme_colors(run: dict) -> tuple: + cl = run.get("color_light"); cd = run.get("color_dark") + if cl or cd: return cl, cd + base = run.get("color") + if not base: return None, None + light = _norm_hex(base); dark = _to_dark_color(light) + return light, dark + +# --------------------------------------------------------------------------- +# 圖片 / 連結工具 +# --------------------------------------------------------------------------- + +def _parse_img_hints(alt: str) -> dict: + out: dict = {} + if not isinstance(alt, str) or '|' not in alt: return out + head, *tokens = alt.split('|') + for t in tokens: + if '=' in t: + k, v = t.split('=', 1) + k, v = k.strip().lower(), v.strip() + if k in ('w', 'h', 'max', 'fit'): out[k] = v + out['_alt'] = head.strip() + return out + + +def _apply_img_size_style(base_style: dict, hints: dict) -> dict: + style = dict(base_style or {}) + w = hints.get('w'); h = hints.get('h'); mx = hints.get('max'); fit = hints.get('fit') + if w: style['width'] = w if any(x in w for x in '%pxremvhvw') else f"{w}px" + if h: style['height'] = h if any(x in h for x in '%pxremvhvw') else f"{h}px" + if mx: style['maxWidth'] = mx if any(x in mx for x in '%pxremvhvw') else str(mx) + if fit: style['objectFit'] = fit + return style + + +def _split_text_links_images(s: str | None) -> list: + s = s if isinstance(s, str) else "" + nodes, i = [], 0 + img_matches = list(_IMG_RE.finditer(s)) + img_spans = [(m.start(), m.end()) for m in img_matches] + matches = [("img", m.start(), m.end(), m) for m in img_matches] + for m in _LINK_RE.finditer(s): + st, ed = m.start(), m.end() + if any(st >= a and ed <= b for a, b in img_spans): continue + matches.append(("a", st, ed, m)) + if not matches: return [("text", s)] + matches.sort(key=lambda x: x[1]) + for kind, st, ed, m in matches: + if st > i: + chunk = s[i:st] + if chunk: nodes.append(("text", chunk)) + if kind == "img": + raw_alt = m.group(1).strip() + hints = _parse_img_hints(raw_alt) + nodes.append(("img", hints.get('_alt', raw_alt), m.group(2).strip(), hints)) + else: + nodes.append(("a", m.group(1).strip(), m.group(2).strip())) + i = ed + if i < len(s): nodes.append(("text", s[i:])) + return nodes + + +def render_url(text: str | None, href: str | None): + href = href or "#" + label = (text or href).replace("\n", " ").strip() + return dcc.Markdown( + f"[{label}]({href})", link_target="_blank", + style={"display": "inline-block", "margin": "0 6px", "verticalAlign": "middle"}, + ) + + +def render_picture(alt: str | None, src: str | None, hints: dict | None = None): + src = src or "data:image/gif;base64,R0lGODlhAQABAAAAACw=" + base_style = { + "display": "inline-block", "margin": "6px", "verticalAlign": "middle", + "maxWidth": "100%", "height": "auto", + } + hints = hints if hints is not None else _parse_img_hints(alt or "") + if hints: base_style = _apply_img_size_style(base_style, hints) + return html.Img(src=src, alt="", title=(alt or ""), role="presentation", + **{"aria-hidden": "true"}, style=base_style) + + +def render_inline_media(text: str) -> list: + out = [] + for kind, *vals in _split_text_links_images(text or ""): + if kind == "text": out.append(html.Span(vals[0])) + elif kind == "a": out.append(render_url(vals[0], vals[1])) + elif kind == "img": out.append(render_picture(vals[0], vals[1], hints=vals[2])) + return out + +# --------------------------------------------------------------------------- +# 數學渲染 +# --------------------------------------------------------------------------- + +def _strip_math_delims(s: str) -> tuple[str, bool]: + t = s.strip() + if t.startswith(r'\(') and t.endswith(r'\)'): return t[2:-2], False + if t.startswith(r'\[') and t.endswith(r'\]'): return t[2:-2], True + if t.startswith('$$') and t.endswith('$$'): return t[2:-2], True + if t.startswith('$') and t.endswith('$'): return t[1:-1], False + return t, False + + +def _render_inline_math(text: str): + """把含 $...$ / \(...\) 的字串渲染成 Dash 元件(單行用,供排序題等舊路徑)。""" + if not text: return html.Span() + if not DashLatex: + return dcc.Markdown(text, mathjax=True, style={"display": "inline"}) + parts = [] + for frag in _MATH_FRAG.split(text): + if not frag: continue + if _MATH_FRAG.fullmatch(frag): + latex, is_block = _strip_math_delims(frag) + parts.append(DashLatex(latex, displayMode=is_block)) + else: + parts.append(dmc.Text(frag, span=True)) + return html.Span(parts) + + +def render_math_inline( + latex: str, + color_light: str | None = None, + color_dark: str | None = None, +): + base_style = { + "display": "inline-block", "margin": "0 2px", "verticalAlign": "0.1em", + } + base_style.update(_themed_color_style(color_light, color_dark)) + if DashLatex: + return html.Span(DashLatex(latex, displayMode=False), style=base_style, className="themed-color") + s = latex if latex.strip().startswith("$") else f"${latex}$" + return html.Span(dcc.Markdown(s, mathjax=True), style=base_style, className="themed-color") + + +def render_math_block(latex, color_light=None, color_dark=None): + style = {"margin": "8px 0", "textAlign": "center", "width": "100%"} + style.update(_themed_color_style(color_light, color_dark)) + inner = ( + DashLatex(latex, displayMode=True) if DashLatex + else dcc.Markdown( + latex if latex.strip().startswith("$$") else f"$$\n{latex}\n$$", + mathjax=True, + ) + ) + return html.Div(inner, style=style, className="themed-color math-block") + + +def render_option_label(text: str): + parts = _MATH_IN_LABEL.split(text or "") + children = [] + for p in parts: + if not p: continue + if p.startswith("$") and p.endswith("$"): + children.append(render_math_inline(p, None, None)) + else: + children.append(html.Span(p)) + return html.Span( + children, + style={"display": "inline-flex", "gap": "4px", "alignItems": "center", "flexWrap": "wrap"}, + className="themed-color", + ) + +# --------------------------------------------------------------------------- +# Run 渲染 +# --------------------------------------------------------------------------- + +def render_inline_runs(runs: list) -> list: + """把 inline run 清單渲染成 Dash 元件清單(含 newline →
)。""" + out = [] + if not runs: return out + for r in runs: + k = r.get("kind") + comp = None + if "latex" in r and k in ("math", "inline_math"): + comp = render_math_inline(r["latex"], r.get("color_light"), r.get("color_dark")) + elif "latex" in r and k in ("math_block", "block_math", "display_math"): + comp = render_math_block(r["latex"], r.get("color_light"), r.get("color_dark")) + elif k == "icon": + icon_name = (r.get("icon") or r.get("name") or "").strip() + try: h = int(r.get("height", 18)) + except (TypeError, ValueError): h = 18 + comp = DashIconify(icon=icon_name, height=h, + style={"margin": "0 4px", "verticalAlign": "text-bottom"}) + else: + txt = r.get("text", "") + if txt != "": + style: dict = {} + cl, cd = _ensure_theme_colors(r) + if cl or cd: style.update(_themed_color_style(cl, cd)) + sty = r.get("style") + if sty == "bold": style["fontWeight"] = 700 + elif sty == "italic": style["fontStyle"] = "italic" + elif sty == "bold-italic": style.update({"fontWeight": 700, "fontStyle": "italic"}) + comp = html.Span(txt, style=style, className="themed-color") + + if comp is not None: out.append(comp) + nl = str(r.get("newline", "false")).lower() + if nl in ("true", "1", "yes", "on"): out.append(html.Br()) + return out + + +def render_runs(runs: list, outdent_px: int = 0) -> list: + """把 run 清單渲染成 Dash 元件(block math 可設 outdent)。""" + out = [] + if not runs: return out + for r in runs: + k = r.get("kind") + if "latex" in r and k in ("math_block", "block_math", "display_math"): + comp = render_math_block(r["latex"], r.get("color_light"), r.get("color_dark")) + if outdent_px: + comp = html.Div(comp, style={ + "width": f"calc(100% + {outdent_px}px)", "marginLeft": f"-{outdent_px}px" + }) + out.append(comp); continue + if "latex" in r and k in ("math", "inline_math"): + out.append(render_math_inline(r["latex"], r.get("color_light"), r.get("color_dark"))); continue + if k == "icon": + icon_name = (r.get("icon") or r.get("name") or "").strip() + try: h = int(r.get("height", 18)) + except (TypeError, ValueError): h = 18 + out.append(DashIconify(icon=icon_name, height=h, + style={"margin": "0 4px", "verticalAlign": "text-bottom"})) + continue + text = r.get("text", "") + if text == "": continue + style: dict = {} + cl, cd = _ensure_theme_colors(r) + if cl or cd: style.update(_themed_color_style(cl, cd)) + sty = r.get("style") + if sty == "bold": style["fontWeight"] = 700 + elif sty == "italic": style["fontStyle"] = "italic" + elif sty == "bold-italic": style.update({"fontWeight": 700, "fontStyle": "italic"}) + out.append(html.Span(text, style=style, className="themed-color")) + return out + +# --------------------------------------------------------------------------- +# 雜項 +# --------------------------------------------------------------------------- + +def _as_bool(v, default: bool = True) -> bool: + if v is None: return default + s = str(v).strip().lower() + if s in ("1", "true", "yes", "y", "on"): return True + if s in ("0", "false", "no", "n", "off"): return False + return default + + +def _is_true(x) -> bool: + return x is True or (isinstance(x, str) and x.lower() == "true") + + +def _prompt_md_to_runs(md: str) -> list[dict]: + """把含數學式的 Markdown 字串轉成 prompt_runs。""" + md = md or "" + runs: list[dict] = [] + + def push_text(text: str): + for i, part in enumerate(text.split("\n")): + r: dict = {"kind": "text", "text": part} + if i != len(text.split("\n")) - 1: + r["newline"] = "true" + runs.append(r) + + pos = 0 + for m in _MATH_FRAG.finditer(md): + if m.start() > pos: push_text(md[pos:m.start()]) + latex, is_block = _strip_math_delims(m.group(0)) + runs.append({"kind": "math_block" if is_block else "math", "latex": latex}) + pos = m.end() + if pos < len(md): push_text(md[pos:]) + return runs + + +def _runs_to_text_for_prompt(runs: list[dict]) -> str: + """把 run 清單還原成純文字(用於 AI prompt)。""" + parts = [] + for r in runs or []: + if "latex" in r: + parts.append( + "$$" + r["latex"] + "$$" + if r.get("kind") in ("math_block", "block_math", "display_math") + else "$" + r["latex"] + "$" + ) + elif "text" in r: + parts.append(r["text"]) + if str(r.get("newline", "false")).lower() == "true": + parts.append("\n") + return "".join(parts).strip() diff --git a/layout/renderer/renderer.py b/layout/renderer/renderer.py new file mode 100644 index 0000000000000000000000000000000000000000..7c25277a91c6d1b9939d2f8bc43fcce8dd2abcaf --- /dev/null +++ b/layout/renderer/renderer.py @@ -0,0 +1,86 @@ +""" +dashTest.py ← 向下相容 shim +-------------------------------- +原始 3443 行已拆分至以下六個模組(均放在同一 layout/ 資料夾下): + + dt_gemini.py Gemini AI 用戶端 + 批改回饋 + dt_math.py 數學運算 + eq_answer + dt_render_utils.py 渲染工具(顏色、數學、run 渲染,無 callback) + dt_render_blocks.py Block 渲染元件 + dt_quiz.py Quiz 題型渲染 + dt_callbacks.py 所有 Dash @callback + +此 shim 重新匯出所有公開 API,確保現有程式碼不需要修改: + + from layout.dashTest import render_doc ← 仍可用 + from layout.dashTest import install_callbacks_once ← 仍可用 +""" + +# ── Gemini / AI ────────────────────────────────────────────────────────── +from .dt_gemini import ( # noqa: F401 + _gem_call, _gem_json, + _first_json, _s, _get_api_key, + _norm_model, _ai_log_fail, + _repair_json_newlines, _loads_json_robust, + _ai_generate_similar_quizzes_as_md, + _parse_ai_md_to_quiz_nodes, _parse_options_md, + _ai_feedback_fill_gemini, + _ai_feedback_choice_gemini, + _ai_feedback_multi_gemini, + _prompt_md_to_runs, + DEFAULT_NORMALIZE, + _gem_client, _API_KEY, +) + +# ── 數學 ────────────────────────────────────────────────────────────────── +from .dt_math import ( # noqa: F401 + eq_answer, + extract_param_function, extract_k_as_function, + _normalize_text, _std_text, _apply_text_ops, + _to_sympy, _symbolic_equal, _as_number, _numeric_close, + _preprocess_math, _protect_funcs_and_consts, _unprotect, + _insert_implicit_mul, + x, y, z, k, m, n, c, g, + XY, PARAMS, KNOWN_FUNCS, KNOWN_CONST, +) + +# ── 渲染工具 ────────────────────────────────────────────────────────────── +from .dt_render_utils import ( # noqa: F401 + HAS_PRISM, DashLatex, DEFAULT_TOL, + _norm_hex, _hex_to_hsl, _hsl_to_hex, + _to_dark_color, _themed_color_style, + _as_css_color, _ensure_theme_colors, + _parse_img_hints, _apply_img_size_style, + _split_text_links_images, + render_url, render_picture, render_inline_media, + _strip_math_delims, _render_inline_math, + render_math_inline, render_math_block, render_option_label, + render_inline_runs, render_runs, + _as_bool, _is_true, + _runs_to_text_for_prompt, +) + +# ── Block 渲染 ──────────────────────────────────────────────────────────── +from .dt_render_blocks import ( # noqa: F401 + render_doc, render_doc_section, + build_content_and_toc, render_section_nav, + render_paragraph, render_list, render_hr, render_comment, + render_heading, render_heading_segment, _plain_text_for_heading, + render_card, _merge_card_palette, _CARD_KIND_PALETTE, + render_solution, _storage_type, + render_flow, _make_flow_step_box, + render_geogebra, maybe_render_paragraph_with_geogebra, + render_code, render_pycall, + _ggb_id_from_url, _px_or_raw, + _attrs_to_dict, _load_func_from_path, +) + +# ── Quiz 渲染 ───────────────────────────────────────────────────────────── +from .dt_quiz import ( # noqa: F401 + render_quiz, render_quiz_order, + _quiz_missing_answer_notice, _feedback_child, +) + +# ── Callbacks(import 即掛載)──────────────────────────────────────────── +from . import dt_callbacks # noqa: F401 +from .dt_callbacks import install_callbacks_once # noqa: F401 diff --git a/layout/safe_sympy.py b/layout/safe_sympy.py new file mode 100644 index 0000000000000000000000000000000000000000..e6b110e87573a557aac28f9c10ac3aaaa9110542 --- /dev/null +++ b/layout/safe_sympy.py @@ -0,0 +1,23 @@ +# safe_sympy.py +import sympy as sp + + +x, y,z = sp.symbols("x y z") + + +ALLOWED_BASE = { + "x": x, "y": y,"z":z, + "pi": sp.pi, "e": sp.E, + "sin": sp.sin, "cos": sp.cos, "tan": sp.tan, + "asin": sp.asin, "acos": sp.acos, "atan": sp.atan, "atan2": sp.atan2, + "sinh": sp.sinh, "cosh": sp.cosh, "tanh": sp.tanh, + "exp": sp.exp, "log": sp.log, "sqrt": sp.sqrt, "abs": sp.Abs, + "floor": sp.floor, "ceil": sp.ceiling, "sign": sp.sign, + "Piecewise": sp.Piecewise, "Max": sp.Max, "Min": sp.Min, +} + +def get_allowed(extra: dict | None = None) -> dict: + allowed = dict(ALLOWED_BASE) + if extra: + allowed.update(extra) + return allowed diff --git a/layout/shell/__init__.py b/layout/shell/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b0e16a96b9fc29824c1a4be32737b67b1e546bb3 --- /dev/null +++ b/layout/shell/__init__.py @@ -0,0 +1,9 @@ +""" +shell/ — AppShell 外殼元件 +外部可直接用:from layout.shell import generate_header +""" +from .header import generate_header # noqa: F401 +from .navbar import generate_navbar # noqa: F401 +from .main import generate_main # noqa: F401 +from .footer import generate_footer # noqa: F401 +from .callbacks import generate_toggle_navbar, switch_light_dark # noqa: F401 \ No newline at end of file diff --git a/layout/shell/callbacks.py b/layout/shell/callbacks.py new file mode 100644 index 0000000000000000000000000000000000000000..f7c8987ddb19cc6a6d37364f4290311fd49b95a1 --- /dev/null +++ b/layout/shell/callbacks.py @@ -0,0 +1,153 @@ +import dash +from dash import Dash, html, dcc +from dash import Input, Output, State, callback, clientside_callback +import dash_mantine_components as dmc +from dash_iconify import DashIconify + + +def generate_toggle_navbar(): + @callback( + Output("appshell", "navbar"), + Input("mobile-burger", "opened"), + Input("desktop-burger", "opened"), + State("appshell", "navbar"), + ) + def toggle_navbar(mobile_opened, desktop_opened, navbar): + navbar["collapsed"] = { + "mobile": not mobile_opened, + "desktop": not desktop_opened, + } + return navbar + + return toggle_navbar + + +def switch_light_dark(): + """ + 前端切換 Mantine 亮/暗主題 + 修正文字/背景的自訂 inline 色彩 + 依據邏輯: + 1) 先決定 desired('light' 或 'dark'),優先用 Switch,其次讀 localStorage + 2) 套用到 、,並同步 localStorage + 3) ★ 套用到根部的 MantineProvider(需要在 app.py: MantineProvider 加 id="mantine-provider") + 4) 同步 Switch 外觀,避免與實際狀態不同步 + 5) 僅對「原本就有 inline color/background」或帶 data-theme-aware 的元素做對應轉色 + """ + return clientside_callback( + """ + function(switchOn, pathname) { + // 0) 決定這次要套用的主題 + let desired = null; + if (typeof switchOn === 'boolean') { + desired = switchOn ? 'dark' : 'light'; + } else { + try { desired = localStorage.getItem('mantine-color-scheme') || 'dark'; } + catch(e) { desired = 'dark'; } + } + const isDark = (desired === 'dark'); + + // 1) 設定 / 屬性 + localStorage(Mantine 會吃到) + document.documentElement.setAttribute('data-mantine-color-scheme', desired); + if (document.body) document.body.setAttribute('data-mantine-color-scheme', desired); + try { + document.documentElement.dataset.mantineColorScheme = desired; + if (document.body) document.body.dataset.mantineColorScheme = desired; + localStorage.setItem('mantine-color-scheme', desired); + } catch (e) {} + + // 2) ★ 套用到 MantineProvider 的根節點(請在 app.py 的 MantineProvider 加 id="mantine-provider") + // 這能讓 Mantine/DMC 的元件樣式(文字、背景、Border)整體跟著切換 + const root = document.querySelector('#mantine-provider'); + if (root) { + root.setAttribute('data-mantine-color-scheme', desired); + try { root.dataset.mantineColorScheme = desired; } catch (e) {} + } + + // 3) 同步 Switch 外觀(避免 UI 與實際主題不同步) + const sw = document.getElementById('color-scheme-switch'); + if (sw && typeof switchOn !== 'boolean') { + try { sw.checked = isDark; } catch (e) {} + } + + // 4) 文字色的亮<->暗對照(只轉「原本就有 inline color」的元素) + const textLightToDark = { + 'black': '#f2f2f2', '#000000': '#f2f2f2', + 'gray': '#cccccc', '#808080': '#cccccc', + 'blue': '#90caf9', 'darkblue': '#64b5f6', + 'teal': '#80cbc4', + 'red': '#ef9a9a', + 'orange': '#ffcc80', + '#ffa6ff': '#cc66cc' + }; + const textDarkToLight = {}; + Object.keys(textLightToDark).forEach(k => { textDarkToLight[textLightToDark[k]] = k; }); + + // 5) 背景暗色 fallback(僅對「原本就有 inline 背景」的元素覆蓋) + const DARK_BG_FALLBACK = 'var(--mantine-color-body)'; + const norm = (s) => (s || '').trim().toLowerCase(); + + // 6) 只處理三種元素: + // - 有 inline color + // - 有 inline background/background-color + // - 或者主動標記 data-theme-aware 的元素(即使沒有 inline style 也會處理) + const candidates = document.querySelectorAll( + '[style*="color:"], [style*="background:"], [style*="background-color:"], [data-theme-aware]' + ); + + candidates.forEach(el => { + const cs = getComputedStyle(el); + const styleAttr = el.getAttribute('style') || ''; + + // A) 記錄原始文字色(第一次遇到時才記) + const hadInlineColor = /(^|;)\\s*color\\s*:/.test(styleAttr) || el.hasAttribute('data-theme-aware'); + if (hadInlineColor && !el.dataset.originalColor) { + // 優先記 inline,其次 computed + el.dataset.originalColor = norm(el.style.color || cs.color || ''); + } + + // B) 記錄原始背景(第一次遇到時才記) + const hadInlineBg = /(^|;)\\s*background(-color)?\\s*:/.test(styleAttr) || el.hasAttribute('data-theme-aware'); + if (hadInlineBg && !el.dataset.hadInlineBg) { + el.dataset.hadInlineBg = '1'; + el.dataset.originalInlineBg = norm(el.style.backgroundColor || cs.backgroundColor || ''); + } else if (!el.dataset.hadInlineBg) { + el.dataset.hadInlineBg = '0'; + } + + // === 文字色反轉:僅動「原來就有 inline color」或 data-theme-aware 的元素 === + if (el.dataset.originalColor) { + const cur = norm(el.style.color || cs.color || ''); + let nextColor; + if (isDark) { + nextColor = textLightToDark[cur] || textLightToDark[el.dataset.originalColor] || cur; + } else { + nextColor = textDarkToLight[cur] || el.dataset.originalColor || cur; + } + el.style.setProperty('color', nextColor, 'important'); + } + + // === 背景色反轉:僅動「原來就有 inline 背景」或 data-theme-aware === + if (el.dataset.hadInlineBg === '1') { + if (isDark) { + el.style.setProperty('background-color', DARK_BG_FALLBACK, 'important'); + } else { + const restore = el.dataset.originalInlineBg || ''; + if (restore) { + el.style.setProperty('background-color', restore, 'important'); + } else { + el.style.removeProperty('background-color'); + } + } + } + }); + + // 回傳字串避免 undefined(觸發 dash 更新) + return desired + ':' + Date.now(); + } + """, + Output("theme-dummy", "children"), + # 兩個輸入:切換開關 + 換頁/首次載入 + [Input("color-scheme-switch", "checked"), + Input("_pages_location", "pathname")] + ) + + diff --git a/layout/shell/footer.py b/layout/shell/footer.py new file mode 100644 index 0000000000000000000000000000000000000000..c8bc4f4adaf5f4d8a3339678eac44cfbe8ba4c53 --- /dev/null +++ b/layout/shell/footer.py @@ -0,0 +1,12 @@ +import dash +from dash import Dash, html, dcc +from dash import Input, Output, State, callback, clientside_callback +import dash_mantine_components as dmc +from dash_iconify import DashIconify + +def generate_footer(): + footer = dmc.AppShellFooter( + [ dmc.Text( "本網站由高雄大學應用數學系製作", c = "gray", size = "sm" ) ] + ) + return footer + diff --git a/layout/shell/header.py b/layout/shell/header.py new file mode 100644 index 0000000000000000000000000000000000000000..f5f034b8766cce86d6f21602f2c9dba5677a982c --- /dev/null +++ b/layout/shell/header.py @@ -0,0 +1,53 @@ +# header.py (或你專案中產生 header 的檔案) +from dash import html +import dash_mantine_components as dmc +from student_login import create_student_badge + +HEADER_H = 50 # 想大一點改 72/80 即可 + + + +def generate_header(): + # 漢堡:手機版才顯示 / 桌機版才顯示 + burger_mobile = dmc.Burger( + id="mobile-burger", size="sm", hiddenFrom="sm", opened=False, + style={"marginTop": "6px"} # 往下些 + ) + burger_desktop = dmc.Burger( + id="desktop-burger", size="sm", visibleFrom="sm", opened=True, + style={"marginTop": "6px"} # 往下些 + ) + + left = dmc.Group( + align="center", + gap="md", + wrap="nowrap", + children=[ + burger_mobile, + burger_desktop, + dmc.Image(src="/assets/logo.svg", h=HEADER_H - 20, fit="contain"), + dmc.Text( + "微積分教學網站", + fw=800, size="sm", + style={"whiteSpace": "nowrap", "textOverflow": "ellipsis"}, + ), + ], + style={"height": "100%"}, + ) + + right = dmc.Group( + align="center", + children=[ + create_student_badge(), + dmc.Switch( + id="color-scheme-switch", size="lg", color="gray", + onLabel="🌙", offLabel="☀️", persistence=True + ), + ], + style={"height": "100%"}, + ) + + return dmc.AppShellHeader( + h=HEADER_H, px="md", withBorder=True, + children=dmc.Group(justify="space-between", align="center", h="100%", children=[left, right]), + ) diff --git a/layout/shell/main.py b/layout/shell/main.py new file mode 100644 index 0000000000000000000000000000000000000000..103e8c108411476c354adf679280476ed2759442 --- /dev/null +++ b/layout/shell/main.py @@ -0,0 +1,15 @@ +import dash +from dash import Dash, html, dcc +from dash import Input, Output, State, callback, clientside_callback +import dash_mantine_components as dmc +from dash_iconify import DashIconify + + + +def generate_main(): + return dmc.AppShellMain( + children=[ + dcc.Location(id="page-url"), # ✅ 放進 layout 中 + dash.page_container + ] + ) \ No newline at end of file diff --git a/layout/shell/navbar.py b/layout/shell/navbar.py new file mode 100644 index 0000000000000000000000000000000000000000..7b7e52f2c722c848957450f3297504facc0ea587 --- /dev/null +++ b/layout/shell/navbar.py @@ -0,0 +1,103 @@ +import dash +from dash import html +import dash_mantine_components as dmc +from dash_iconify import DashIconify + +# 此檔案由 site_manager.py 自動生成,請勿手動修改 + +def generate_navbar(): + height = 16 + navbar_content = html.Div( + [ + dmc.NavLink( + label="首頁", + href="/", + leftSection=DashIconify(icon="bi:house-door-fill", height=height), + active="partial", + ), + dmc.NavLink( + label="第十四章:偏導數", + leftSection=DashIconify(icon="mdi:number-14-box-multiple-outline", height=height), + childrenOffset=28, + active="partial", + children=[ + dmc.NavLink( + label="第十四章總覽", + href="/Ch14", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-0", height=height), + ), + dmc.NavLink( + label="CH14_1:多變數函數", + href="/Ch14_1", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-1", height=height), + ), + dmc.NavLink( + label="CH14_2:極限和連續", + href="/Ch14_2", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-2", height=height), + ), + dmc.NavLink( + label="CH14_3:偏導數", + href="/Ch14_3", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-3", height=height), + ), + dmc.NavLink( + label="CH14_4:切平面和線性近似", + href="/Ch14_4", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-4", height=height), + ), + dmc.NavLink( + label="CH14_5:連鎖律", + href="/Ch14_5", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-5", height=height), + ), + dmc.NavLink( + label="CH14_6:方向導數和梯度向量", + href="/Ch14_6", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-6", height=height), + ), + dmc.NavLink( + label="CH14_7:極值", + href="/Ch14_7", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-7", height=height), + ), + dmc.NavLink( + label="CH14_8:拉格朗日乘數", + href="/Ch14_8", + active="exact", + childrenOffset=14, + leftSection=DashIconify(icon="tabler:square-rounded-number-8", height=height), + ), + ], + ), + ], + style={ + "width": {"xs": 200, "sm": 250, "md": 300, "lg": 300}, + "overflowY": "auto", + "maxHeight": "100vh", + }, + ) + return dmc.AppShellNavbar( + id="navbar", + children=[ + dmc.Divider(label="頁面導覽", variant="solid", labelPosition="left", size="md"), + navbar_content, + ], + p="md", + ) diff --git a/layout/toc.py b/layout/toc.py new file mode 100644 index 0000000000000000000000000000000000000000..fd238a78c3175e3ed43fb56c0d447d3cc99a1084 --- /dev/null +++ b/layout/toc.py @@ -0,0 +1,134 @@ +import dash_mantine_components as dmc +from dash import html, dcc, Input, Output, State, clientside_callback, ALL + +_TOC_CB_REGISTERED = False + + +def _indent_px_by_level(level: int, base_px: int = 14) -> int: + try: + lvl = int(level or 1) + except Exception: + lvl = 1 + + if lvl <= 1: + return 0 # H1 + elif lvl == 2: + return base_px # H2 + else: + return base_px * 2 # H3 以上 + + +def make_toc( + titles, + *, + top_offset: int = 80, + col_span=None, + visible_from: str = "md", +): + global _TOC_CB_REGISTERED + + if not _TOC_CB_REGISTERED: + clientside_callback( + """ + function(n_list, id_list, topOffset) { + if (!n_list || !Array.isArray(n_list) || !id_list) { + return window.dash_clientside.no_update; + } + const ctx = dash_clientside.callback_context; + if (!ctx.triggered.length) { + return window.dash_clientside.no_update; + } + const propId = ctx.triggered[0].prop_id; + const m = propId.match(/\\[(\\d+)\\]\\.n_clicks$/); + let idx = -1; + if (m) { + idx = parseInt(m[1]); + } else { + idx = n_list.findIndex(v => v); + } + if (idx < 0 || !id_list[idx]) { + return window.dash_clientside.no_update; + } + const targetId = id_list[idx].target; + const el = document.getElementById(targetId); + if (el) { + const y = el.getBoundingClientRect().top + window.scrollY - (parseInt(topOffset) || 0); + window.scrollTo({ top: y, behavior: 'smooth' }); + } + return new Array(n_list.length).fill(null); + } + """, + Output({"type": "toc-btn", "target": ALL}, "n_clicks"), + Input({"type": "toc-btn", "target": ALL}, "n_clicks"), + State({"type": "toc-btn", "target": ALL}, "id"), + State({"type": "toc-offset"}, "data"), + prevent_initial_call=True, + ) + _TOC_CB_REGISTERED = True + + if titles and isinstance(titles, (list, tuple)) and titles[0]: + first_label = titles[0].get("label") or "" + else: + first_label = "" + + if first_label: + toc_title = f"目錄({first_label})" + iter_titles = titles[1:] + else: + toc_title = "目錄" + iter_titles = titles + + buttons = [] + for t in iter_titles: + lvl = int(t.get("level", 1)) + pad_left = _indent_px_by_level(lvl, base_px=14) + + wrapper = html.Div( + dmc.Button( + t["label"], + id={"type": "toc-btn", "target": t["id"]}, + variant="subtle", + fullWidth=True, + fw=400, + className="toc-button", + style={ + "justifyContent": "flex-start", + "textAlign": "left", + "fontWeight": 400, + "fontSize": "16px", + "width": "100%", + "padding": "6px 0", + "display": "flex", + }, + ), + style={"paddingLeft": f"{pad_left}px"}, + **{ + "data-level": str(lvl), + "data-target": t["id"], + }, + className="toc-item", + ) + buttons.append(wrapper) + + scroll_box = html.Div( + dmc.Stack( + children=[ + dmc.Title(toc_title, order=3), + dcc.Store(id={"type": "toc-offset"}, data=int(top_offset)), + *buttons, + ], + gap="xs", + ), + className="toc-scroll", + id="toc-root", + **{"data-toc-offset": int(top_offset)}, + ) + + return dmc.Stack( + [scroll_box], + gap="xs", + className="toc-container", + style={ + "textAlign": "left", + }, + ) \ No newline at end of file diff --git a/pages/Ch14/C14_1/C14_1_ex1.py b/pages/Ch14/C14_1/C14_1_ex1.py new file mode 100644 index 0000000000000000000000000000000000000000..829a82d13378a9b76209f9aebd93044c6393e718 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex1.py @@ -0,0 +1,76 @@ +# ??? pages/xxx.py ? + +import dash +from dash import html, dcc +import numpy as np +import plotly.graph_objects as go + + +def make_surface_fig( + func, + x_range=(-1, 5), + y_range=(-1, 5), + n=80, + z_range=None, +): + + x = np.linspace(x_range[0], x_range[1], n) + y = np.linspace(y_range[0], y_range[1], n) + X, Y = np.meshgrid(x, y) + + + Z = func(X, Y) + + fig = go.Figure() + + + fig.add_surface( + x=X, + y=Y, + z=Z, + opacity=0.8, + showscale=False, + ) + + + scene = dict( + xaxis=dict(title="x", range=list(x_range)), + yaxis=dict(title="y", range=list(y_range)), + zaxis=dict(title="z"), + aspectmode="cube", # x, y, z ???? + ) + + if z_range is not None: + scene["zaxis"]["range"] = list(z_range) + + fig.update_layout( + scene=scene, + margin=dict(l=0, r=0, t=40, b=0), + ) + + return fig + +#------------------------------------------- +def f_xy(X, Y): + rad = X + Y + 1 + den = X - 1 + + Z = np.full_like(X, np.nan, dtype=float) + + mask = (rad >= 0) & (np.abs(den) > 0.3) + + Z[mask] = np.sqrt(rad[mask]) / den[mask] + + + + return Z + +def make_view(): + fig = make_surface_fig( + func=f_xy, + x_range=(-5, 5), + y_range=(-5, 5), + z_range=(-5, 5), + ) + + return fig diff --git a/pages/Ch14/C14_1/C14_1_ex10.py b/pages/Ch14/C14_1/C14_1_ex10.py new file mode 100644 index 0000000000000000000000000000000000000000..95c5eac24e7797bd89c5b2c1acbe736c50fb53fe --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex10.py @@ -0,0 +1,97 @@ +import numpy as np +import plotly.graph_objects as go + +def sphere_surface(radius, n_phi=40, n_theta=60): + phi = np.linspace(0, np.pi, n_phi) # 極角 [0, π] + theta = np.linspace(0, 2*np.pi, n_theta) # 方位角 [0, 2π] + Theta, Phi = np.meshgrid(theta, phi) + + X = radius * np.sin(Phi) * np.cos(Theta) + Y = radius * np.sin(Phi) * np.sin(Theta) + Z = radius * np.cos(Phi) + return X, Y, Z + + +def make_view(): + fig = go.Figure() + + # x^2 + y^2 + z^2 = k, k = 1,2,3 + ks = [1, 2, 3] + colors = ["#c6dbef", "#9ecae1", "#3182bd"] + opacities = [0.25, 0.35, 0.45] + + for k, color, opacity in zip(ks, colors, opacities): + r = np.sqrt(k) + X, Y, Z = sphere_surface(r) + + fig.add_trace(go.Surface( + x=X, y=Y, z=Z, + opacity=opacity, + showscale=False, + surfacecolor=np.full_like(X, k), + colorscale=[[0, color], [1, color]], + name=f"x² + y² + z² = {k}", + )) + + # ★ 在每個球面上標「k = ...」 + # 取一個看起來舒服的方向,例如 (1,1,1) 方向上的點 + u = 1 / np.sqrt(3) + x_lbl = r * u + y_lbl = r * u + z_lbl = r * u + + fig.add_trace(go.Scatter3d( + x=[x_lbl], + y=[y_lbl], + z=[z_lbl], + mode="text", + text=[f"k = {k}"], + textposition="middle right", + showlegend=False, + )) + + # ---- 畫 x, y, z 座標軸 ---- + L = np.sqrt(max(ks)) * 1.3 + + fig.add_trace(go.Scatter3d( + x=[0, L], y=[0, 0], z=[0, 0], + mode="lines", line=dict(width=4), + showlegend=False, + )) + fig.add_trace(go.Scatter3d( + x=[0, 0], y=[0, L], z=[0, 0], + mode="lines", line=dict(width=4), + showlegend=False, + )) + fig.add_trace(go.Scatter3d( + x=[0, 0], y=[0, 0], z=[0, L], + mode="lines", line=dict(width=4), + showlegend=False, + )) + + # 軸標籤 + fig.add_trace(go.Scatter3d( + x=[L], y=[0], z=[0], + mode="text", text=["x"], showlegend=False, + )) + fig.add_trace(go.Scatter3d( + x=[0], y=[L], z=[0], + mode="text", text=["y"], showlegend=False, + )) + fig.add_trace(go.Scatter3d( + x=[0], y=[0], z=[L], + mode="text", text=["z"], showlegend=False, + )) + + fig.update_layout( + scene=dict( + xaxis_title="x", + yaxis_title="y", + zaxis_title="z", + aspectmode="data", + ), + margin=dict(l=0, r=0, t=0, b=0), + showlegend=True, + ) + + return fig diff --git a/pages/Ch14/C14_1/C14_1_ex11.py b/pages/Ch14/C14_1/C14_1_ex11.py new file mode 100644 index 0000000000000000000000000000000000000000..ea1e5900905f24654b214f1bfa9522c18419de8b --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex11.py @@ -0,0 +1,46 @@ +import numpy as np +import plotly.graph_objects as go + +# f(x,y,z) = x^2 - y - z^2 ?????k = 5, 0, -5 +def make_view(x_range=(-3, 3), z_range=(-3, 3), n=80): + # ? x-z ???????? y = x^2 - z^2 - k ? y + x = np.linspace(x_range[0], x_range[1], n) + z = np.linspace(z_range[0], z_range[1], n) + X, Z = np.meshgrid(x, z) + + fig = go.Figure() + + ks = [5, 0, -5] # ??? k + colors = ["#9ecae1", "#cccccc", "#fdae6b"] # ?????????????????????? + opacities = [0.7, 0.7, 0.7] + + for k, color, opacity in zip(ks, colors, opacities): + Y = X**2 - Z**2 - k # ? x^2 - y - z^2 = k ?? y = x^2 - z^2 - k + + # ????? y ????????????????? + mask = np.abs(Y) > 8 + Y = np.where(mask, np.nan, Y) + + fig.add_trace(go.Surface( + x=X, + y=Y, + z=Z, + surfacecolor=np.full_like(X, k), # ???????? + colorscale=[[0, color], [1, color]], # ???? + opacity=opacity, + showscale=False, + name=f"k = {k}", + )) + + fig.update_layout( + scene=dict( + xaxis_title="x", + yaxis_title="y", + zaxis_title="z", + aspectmode="data", # ?? 1:1:1??????? + ), + margin=dict(l=0, r=0, t=0, b=0), + showlegend=True, + ) + + return fig diff --git a/pages/Ch14/C14_1/C14_1_ex1_2.py b/pages/Ch14/C14_1/C14_1_ex1_2.py new file mode 100644 index 0000000000000000000000000000000000000000..332da3474fa2c39f57ea3210b45e6eadf7f963ac --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex1_2.py @@ -0,0 +1,98 @@ +import numpy as np +import plotly.graph_objects as go + +def make_domain_fig( + func, + x_range=(-5, 5), + y_range=(-5,5), + n=300, +): + + # 1) ??? + x = np.linspace(x_range[0], x_range[1], n) + y = np.linspace(y_range[0], y_range[1], n) + X, Y = np.meshgrid(x, y) + + # 2) ??? Z???????????? + Z = func(X, Y) + + # 3) ????Z ????????? + mask = np.isfinite(Z) + + X_dom = X[mask] + Y_dom = Y[mask] + + # 4) ?????????? + fig = go.Figure() + + fig.add_trace( + go.Scatter( + x=X_dom, + y=Y_dom, + mode="markers", + marker=dict( + size=3, + opacity=0.5, + ), + name="Domain", + ) + ) + + fig.add_shape( + type="line", + x0=1, x1=1, + y0=y_range[0], y1=y_range[1], + xref="x", yref="y", + line=dict( + color="black", + width=2, + dash="dash", # ???? + ), + ) + fig.add_annotation( + x=1, + y=y_range[1], + text="x = 1", + showarrow=False, + yshift=10, + ), + + + fig.update_layout( + xaxis=dict(title="x", range=list(x_range), zeroline=True), + yaxis=dict( + title="y", + range=list(y_range), + zeroline=True, + ), + margin=dict(l=40, r=40, t=40, b=40), + ) + + return fig + + +def a_xy(X, Y): + # a(x,y) = sqrt(x+y+1) / (x-1) + rad = X + Y + 1 + den = X - 1 + + Z = np.full_like(X, np.nan, dtype=float) + + mask = (rad >= 0) & (np.abs(den) > 1e-6) + + Z[mask] = np.sqrt(rad[mask]) / den[mask] + return Z + +import dash +from dash import html, dcc + +def make_view(): + fig_dom = make_domain_fig( + func=a_xy, + x_range=(-5,5), + y_range=(-5,5 ), + + ) + + return fig_dom + diff --git a/pages/Ch14/C14_1/C14_1_ex2.py b/pages/Ch14/C14_1/C14_1_ex2.py new file mode 100644 index 0000000000000000000000000000000000000000..f5a14dae5b0a2154d285a1ca1196663361783cf2 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex2.py @@ -0,0 +1,73 @@ +# ??? pages/xxx.py ? + +import dash +from dash import html, dcc +import numpy as np +import plotly.graph_objects as go + + +def make_surface_fig( + func, + x_range=(-1, 5), + y_range=(-1, 5), + n=80, + z_range=None, +): + """ + ??????? func(X, Y) ? Z???? 3D ??? + + func : callable(X, Y) -> Z?X, Y, Z ?? numpy array + x_range, y_range : (min, max) + n : ???????? + z_range : ?? (zmin, zmax) ???? z ???????? + """ + # 1) ??? + x = np.linspace(x_range[0], x_range[1], n) + y = np.linspace(y_range[0], y_range[1], n) + X, Y = np.meshgrid(x, y) + + # 2) ?? Z = f(X, Y) + Z = func(X, Y) + + fig = go.Figure() + + # 3) ??? + fig.add_surface( + x=X, + y=Y, + z=Z, + opacity=0.8, + showscale=False, + ) + + # 4) ??????? + scene = dict( + xaxis=dict(title="x", range=list(x_range)), + yaxis=dict(title="y", range=list(y_range)), + zaxis=dict(title="z"), + aspectmode="cube", # x, y, z ???? + ) + + if z_range is not None: + scene["zaxis"]["range"] = list(z_range) + + fig.update_layout( + scene=scene, + margin=dict(l=0, r=0, t=40, b=0), + ) + + return fig + +#------------------------------------------- +def f_xy(X, Y): + return np.sin(X) + np.cos(X) + np.sin(Y) + np.cos(Y) + +def make_view(): + fig = make_surface_fig( + func=f_xy, + x_range=(-5, 5), + y_range=(-5, 5), + z_range=(-5, 5), + ) + + return fig \ No newline at end of file diff --git a/pages/Ch14/C14_1/C14_1_ex3.py b/pages/Ch14/C14_1/C14_1_ex3.py new file mode 100644 index 0000000000000000000000000000000000000000..7db7a3dc7acc12af903735708b18c92b1b849a30 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex3.py @@ -0,0 +1,59 @@ +import dash +from dash import html, dcc +import numpy as np +import plotly.graph_objects as go + + +def make_view(): + # 1) x, y 從 -1 到 5,讓平面看起來比較「完整」 + x = np.linspace(-1, 7, 60) + y = np.linspace(-1, 7, 60) + X, Y = np.meshgrid(x, y) + Z = 6 - 3*X - 2*Y + + fig = go.Figure() + + # 2) 畫整片平面(有限補丁,模擬整個無限平面) + fig.add_surface( + x=X, + y=Y, + z=Z, + opacity=0.7, + showscale=False, + name="z = 6 - 3x - 2y" + ) + + # 3) 三個截距點 + pts = np.array([ + [2, 0, 0], # (2,0,0) + [0, 3, 0], # (0,3,0) + [0, 0, 6], # (0,0,6) + ]) + + fig.add_trace( + go.Scatter3d( + x=pts[:, 0], + y=pts[:, 1], + z=pts[:, 2], + mode="markers+text", + marker=dict(size=6, color="red"), + text=["(2,0,0)", "(0,3,0)", "(0,0,6)"], + textposition="top center", + name="截距點" + ) + ) + + # 4) 視窗範圍都鎖在 -1 到 5 + fig.update_layout( + scene=dict( + xaxis=dict(title="x", range=[-1, 5]), + yaxis=dict(title="y", range=[-1, 5]), + zaxis=dict(title="z", range=[-1, 7]), + aspectmode="cube", # x, y, z 比例一致 + ), + margin=dict(l=0, r=0, t=40, b=0) + ) + + return fig + + diff --git a/pages/Ch14/C14_1/C14_1_ex4.py b/pages/Ch14/C14_1/C14_1_ex4.py new file mode 100644 index 0000000000000000000000000000000000000000..d7d33aa826b97d545afbaa8b8adc735729410868 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex4.py @@ -0,0 +1,207 @@ +import numpy as np +import plotly.graph_objects as go +import dash +from dash import html, dcc, Input, Output, callback + + +# 1) x-y 平面 (z=0):4x^2 + y^2 = 0,只剩一個點 (0,0) +def fig_xy_slice(): + fig = go.Figure() + fig.add_trace(go.Scatter( + x=[0], + y=[0], + mode="markers", + name="4x² + y² = 0 (z=0)", + marker=dict(size=8) + )) + + fig.update_layout( + xaxis_title="x", + yaxis_title="y", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + margin=dict(l=20, r=20, t=20, b=20), + ) + return fig + + +# 2) y-z 平面 (x=0):z = y^2 拋物線 +def fig_yz_parabola(y_range=(-2, 2)): + y = np.linspace(y_range[0], y_range[1], 400) + z = y**2 + + fig = go.Figure() + fig.add_trace(go.Scatter( + x=y, + y=z, + mode="lines", + name="z = y² (x=0)", + )) + + fig.update_layout( + xaxis_title="y", + yaxis_title="z", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + margin=dict(l=20, r=20, t=20, b=20), + ) + return fig + + +# 3) x-z 平面 (y=0):z = 4x^2 拋物線 +def fig_xz_parabola(x_range=(-2, 2)): + x = np.linspace(x_range[0], x_range[1], 400) + z = 4 * x**2 + + fig = go.Figure() + fig.add_trace(go.Scatter( + x=x, + y=z, + mode="lines", + name="z = 4x² (y=0)", + )) + + fig.update_layout( + xaxis_title="x", + yaxis_title="z", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + margin=dict(l=20, r=20, t=20, b=20), + ) + return fig + + +# 4) 3D:z = 4x^2 + y^2,並畫上三個截面的「外框」 +def fig_paraboloid_with_sections( + x_range=(-2, 2), + y_range=(-2, 2), + n=80, + show_surface=True, # ⭐ 新增:控制要不要畫曲面 +): + # 曲面本體 + x = np.linspace(x_range[0], x_range[1], n) + y = np.linspace(y_range[0], y_range[1], n) + X, Y = np.meshgrid(x, y) + Z = 4 * X**2 + Y**2 + + surface = go.Surface( + x=X, y=Y, z=Z, + showscale=False, + opacity=0.7, + name="z = 4x² + y²" + ) + + # 截面 1:z=0 (只有原點) + pt_xy = go.Scatter3d( + x=[0], y=[0], z=[0], + mode="markers", + marker=dict(size=4), + name="4x² + y² = 0, z=0" + ) + + # 截面 2:x=0 -> z = y^2 + yy = np.linspace(y_range[0], y_range[1], 400) + zz_y = yy**2 + sec_yz = go.Scatter3d( + x=np.zeros_like(yy), + y=yy, + z=zz_y, + mode="lines", + name="z = y² (x=0)", + line=dict(width=6) + ) + + # 截面 3:y=0 -> z = 4x^2 + xx = np.linspace(x_range[0], x_range[1], 400) + zz_x = 4 * xx**2 + sec_xz = go.Scatter3d( + x=xx, + y=np.zeros_like(xx), + z=zz_x, + mode="lines", + name="z = 4x² (y=0)", + line=dict(width=6) + ) + + # ⭐ 根據 show_surface 決定 trace 要不要包含 surface + traces = [] + if show_surface: + traces.append(surface) + traces.extend([pt_xy, sec_yz, sec_xz]) + + fig = go.Figure(data=traces) + + fig.update_layout( + scene=dict( + xaxis_title="x", + yaxis_title="y", + zaxis_title="z", + aspectmode="data", + xaxis=dict(range=[-2.5, 2.5]), + yaxis=dict(range=[-2.5, 2.5]), + zaxis=dict(range=[0, 3]), + ), + margin=dict(l=0, r=0, t=20, b=0), + ) + return fig + +# Dash 上排三張小圖、下排一張大圖(可切換曲面) +def make_view(): + small_style = { + "flex": "1 1 260px", + "minWidth": "180px", + "height": "260px", + } + + return html.Div([ + # 上排三張小圖 + html.Div( + [ + dcc.Graph(figure=fig_xy_slice(), style=small_style), + dcc.Graph(figure=fig_yz_parabola(), style=small_style), + dcc.Graph(figure=fig_xz_parabola(), style=small_style), + ], + style={ + "display": "flex", + "gap": "8px", + "justifyContent": "center", + "flexWrap": "wrap", + } + ), + + # 下排:按鈕 + 大圖 + html.Div( + [ + html.Button( + "顯示曲面", # 一開始是「顯示曲面」 + id="btn-toggle-surface", + n_clicks=0, + style={"marginBottom": "8px"} + ), + dcc.Graph( + id="paraboloid-graph", + figure=fig_paraboloid_with_sections(show_surface=False), + style={ + "height": "300px", + "width": "100%", + }, + ), + ], + style={"marginTop": "16px"} + ) + ]) + + +@callback( + Output("paraboloid-graph", "figure"), + Output("btn-toggle-surface", "children"), + Input("btn-toggle-surface", "n_clicks"), +) +def toggle_surface(n_clicks): + # 偶數次點擊:不顯示曲面;奇數次點擊:顯示曲面 + show_surface = ((n_clicks or 0) % 2 == 1) + + fig = fig_paraboloid_with_sections(show_surface=show_surface) + btn_text = "隱藏曲面" if show_surface else "顯示曲面" + + return fig, btn_text diff --git a/pages/Ch14/C14_1/C14_1_ex5.py b/pages/Ch14/C14_1/C14_1_ex5.py new file mode 100644 index 0000000000000000000000000000000000000000..3e61111140761f245248b064c7c73b1e853b29db --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex5.py @@ -0,0 +1,83 @@ +# 在某個 pages/xxx.py 裡 + +import dash +from dash import html, dcc +import numpy as np +import plotly.graph_objects as go + + +def make_surface_fig( + func, + x_range=(-1, 5), + y_range=(-1, 5), + n=80, + z_range=None, +): + """ + 通用版:給一個 func(X, Y) → Z,就畫出 3D 曲面。 + + func : callable(X, Y) -> Z,X, Y, Z 都是 numpy array + x_range, y_range : (min, max) + n : 每個方向網格點數 + z_range : 若給 (zmin, zmax) 就會固定 z 軸範圍,否則自動 + """ + # 1) 建網格 + x = np.linspace(x_range[0], x_range[1], n) + y = np.linspace(y_range[0], y_range[1], n) + X, Y = np.meshgrid(x, y) + + # 2) 計算 Z = f(X, Y) + Z = func(X, Y) + + fig = go.Figure() + + # 3) 畫曲面 + fig.add_surface( + x=X, + y=Y, + z=Z, + opacity=0.8, + showscale=False, + ) + + # 4) 設定座標軸範圍 + scene = dict( + xaxis=dict(title="x", range=list(x_range)), + yaxis=dict(title="y", range=list(y_range)), + zaxis=dict(title="z"), + aspectmode="cube", # x, y, z 比例一致 + ) + + if z_range is not None: + scene["zaxis"]["range"] = list(z_range) + + fig.update_layout( + scene=scene, + margin=dict(l=0, r=0, t=40, b=0), + ) + + return fig + +#------------------------------------------- +def f_xy(X, Y): + rad = 9 - X**2 - Y**2 # 根號裡 + + # 先全部設成 NaN + Z = np.full_like(X, np.nan, dtype=float) + + # 合法的點:根號 ≥ 0 且 分母不為 0 + mask = (rad >= 0) + + Z[mask] = np.sqrt(rad[mask]) + + return Z + +def make_view(): + fig = make_surface_fig( + func=f_xy, + x_range=(-5, 5), + y_range=(-5, 5), + z_range=(-5, 5), + ) + + return fig diff --git a/pages/Ch14/C14_1/C14_1_ex5_2.py b/pages/Ch14/C14_1/C14_1_ex5_2.py new file mode 100644 index 0000000000000000000000000000000000000000..09ae6d33a7daec2a2cab159103fb91ff4a3d2124 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex5_2.py @@ -0,0 +1,205 @@ +import numpy as np +import plotly.graph_objects as go +from dash import html, dcc, Input, Output, callback +import dash + + + + +def fig_xy_circle(r=3): + t = np.linspace(0, 2*np.pi, 400) + x = r * np.cos(t) + y = r * np.sin(t) + + fig = go.Figure() + fig.add_trace(go.Scatter( + x=x, y=y, + mode="lines", + + )) + + fig.update_layout( + xaxis_title="x", + yaxis_title="y", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + + ) + return fig +def fig_yz_semicircle(r=3): + t = np.linspace(0, np.pi, 400) # 0 ~ ? ??????? + y = r * np.cos(t) # ? 3 ? -3 + z = r * np.sin(t) # ? 0 ? 3??? ? 0 + + fig = go.Figure() + fig.add_trace(go.Scatter( + x=y, y=z, + mode="lines", + + )) + + fig.update_layout( + xaxis_title="y", + yaxis_title="z", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + ) + return fig + +def fig_xz_semicircle(r=3): + t = np.linspace(0, np.pi, 400) + x = r * np.cos(t) + z = r * np.sin(t) + + fig = go.Figure() + fig.add_trace(go.Scatter( + x=x, y=z, + mode="lines", + )) + + fig.update_layout( + xaxis_title="x", + yaxis_title="z", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + ) + return fig + +def fig_hemisphere_with_edges(r=3, show_surface=True): # ⭐ 新增 show_surface 參數 + theta = np.linspace(0, 2*np.pi, 100) + phi = np.linspace(0, np.pi/2, 50) + TH, PH = np.meshgrid(theta, phi) + + X = r * np.cos(TH) * np.sin(PH) + Y = r * np.sin(TH) * np.sin(PH) + Z = r * np.cos(PH) + + surface = go.Surface( + x=X, y=Y, z=Z, + showscale=False, + opacity=0.7, + name="上半球", + ) + + # x-y 平面上的圓 (z=0) + t = np.linspace(0, 2*np.pi, 400) + xc = r * np.cos(t) + yc = r * np.sin(t) + zc = np.zeros_like(t) + + circle_xy = go.Scatter3d( + x=xc, y=yc, z=zc, + mode="lines", + name="z = 0 (x-y 軸的圓)", + line=dict(width=6) + ) + + # y-z 半圓 (x=0) + s = np.linspace(0, np.pi, 200) + x2 = np.zeros_like(s) + y2 = r * np.cos(s) + z2 = r * np.sin(s) + + semicircle_yz = go.Scatter3d( + x=x2, y=y2, z=z2, + mode="lines", + name="x = 0 (y-z 軸的半圓)", + line=dict(width=6) + ) + + # x-z 半圓 (y=0) + x3 = r * np.cos(s) + y3 = np.zeros_like(s) + z3 = r * np.sin(s) + + semicircle_xz = go.Scatter3d( + x=x3, y=y3, z=z3, + mode="lines", + name="y = 0 (x-z 軸的半圓)", + line=dict(width=6) + ) + + # ⭐ 根據 show_surface 決定要不要把 surface 加進來 + traces = [] + if show_surface: + traces.append(surface) + traces.extend([circle_xy, semicircle_yz, semicircle_xz]) + + fig = go.Figure(data=traces) + + fig.update_layout( + scene=dict( + xaxis_title="x", + yaxis_title="y", + zaxis_title="z", + aspectmode="data", + ), + ) + return fig + + + +# 給這個卡片專用的 id,避免跟別的卡片撞到 +BTN_ID = "hemisphere-btn-toggle-surface" +GRAPH_ID = "hemisphere-graph" + + +def make_view(): + small_style = { + "flex": "1 1 260px", # 理想 260px,容器變窄時可以縮 / 換行 + "minWidth": "180px", + "height": "260px", + } + + return html.Div([ + # 第一排:三張小圖 + html.Div( + [ + dcc.Graph(figure=fig_xy_circle(), style=small_style), + dcc.Graph(figure=fig_yz_semicircle(), style=small_style), + dcc.Graph(figure=fig_xz_semicircle(), style=small_style), + ], + style={ + "display": "flex", + "gap": "8px", + "justifyContent": "center", + "flexWrap": "wrap", # ⭐ 小螢幕可以自動換行 + } + ), + + # 第二排:按鈕 + 3D 大圖 + html.Div( + [ + html.Button( + "顯示曲面", # 一開始沒有曲面 + id=BTN_ID, + n_clicks=0, + style={"marginBottom": "8px"} + ), + dcc.Graph( + id=GRAPH_ID, + figure=fig_hemisphere_with_edges(show_surface=False), + style={ + "height": "520px", + "width": "100%", + }, + ), + ], + style={"marginTop": "16px"} + ) + ]) + + +@callback( + Output(GRAPH_ID, "figure"), + Output(BTN_ID, "children"), + Input(BTN_ID, "n_clicks"), +) +def toggle_hemisphere_surface(n_clicks): + # 偶數次點擊:不顯示曲面;奇數次:顯示曲面 + show_surface = ((n_clicks or 0) % 2 == 1) + + fig = fig_hemisphere_with_edges(show_surface=show_surface) + btn_text = "隱藏曲面" if show_surface else "顯示曲面" + + return fig, btn_text diff --git a/pages/Ch14/C14_1/C14_1_ex6.py b/pages/Ch14/C14_1/C14_1_ex6.py new file mode 100644 index 0000000000000000000000000000000000000000..eb508f9f9ba1ece352068e3927915a666adc5b32 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex6.py @@ -0,0 +1,30 @@ +import numpy as np +import plotly.graph_objects as go + +def make_view(): + xs = np.linspace(-5, 5, 400) + ks = [12, 6, 0, -6] + names = [ + "3x + 2y - 12 = 0", + "3x + 2y - 6 = 0", + "3x + 2y = 0", + "3x + 2y + 6 = 0", + ] + + fig = go.Figure() + for k, name in zip(ks, names): + ys = (k - 3*xs) / 2 # 從 3x + 2y - k = 0 解 y + fig.add_trace(go.Scatter( + x=xs, + y=ys, + mode="lines", + name=name + )) + + fig.update_layout( + xaxis_title="x", + yaxis_title="y", + xaxis=dict(scaleanchor="y", scaleratio=1), + margin=dict(l=10, r=10, t=30, b=30) + ) + return fig diff --git a/pages/Ch14/C14_1/C14_1_ex7.py b/pages/Ch14/C14_1/C14_1_ex7.py new file mode 100644 index 0000000000000000000000000000000000000000..c896ac082dee663978396c13b2ec283c69be5fb6 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex7.py @@ -0,0 +1,41 @@ +import numpy as np +import plotly.graph_objects as go + +def make_view(): + fig = go.Figure() + ks = [0, 1, 2, 3] + theta = np.linspace(0, 2*np.pi, 400) + + for k in ks: + r2 = 9 - k**2 + if r2 < 0: + continue + r = np.sqrt(r2) + + if r == 0: + fig.add_trace(go.Scatter( + x=[0], + y=[0], + mode="markers", + name=f"k = {k}", + marker=dict(size=8) + )) + else: + x = r * np.cos(theta) + y = r * np.sin(theta) + fig.add_trace(go.Scatter( + x=x, + y=y, + mode="lines", + name=f"k = {k}" + )) + + fig.update_layout( + xaxis_title="x", + yaxis_title="y", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + margin=dict(l=40, r=40, t=40, b=40), + ) + return fig + diff --git a/pages/Ch14/C14_1/C14_1_ex8.py b/pages/Ch14/C14_1/C14_1_ex8.py new file mode 100644 index 0000000000000000000000000000000000000000..0aec88bc0ccfb259ba5aedcc4373962695cf3af4 --- /dev/null +++ b/pages/Ch14/C14_1/C14_1_ex8.py @@ -0,0 +1,62 @@ +import numpy as np +import plotly.graph_objects as go + +# f(x,y) = 4x^2 + y^2 的等高線圖(圖外 legend 顯示 k) +def make_view(x_range=(-2, 2), y_range=(-2.5, 2.5), n=300): + # 建網格 + x = np.linspace(x_range[0], x_range[1], n) + y = np.linspace(y_range[0], y_range[1], n) + X, Y = np.meshgrid(x, y) + Z = 4 * X**2 + Y**2 + + fig = go.Figure() + + ks = [0, 1, 2, 3] + colors = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728"] # 四個不同顏色 + + for i, k in enumerate(ks): + color = colors[i % len(colors)] + + if k == 0: + # 🔹 k = 0:等高線只有一個點 (0,0),改用 Scatter 畫 + fig.add_trace(go.Scatter( + x=[0], + y=[0], + mode="markers", + marker=dict(size=8, color=color), + name="k = 0", + showlegend=True, + )) + else: + # 🔹 k = 1,2,3:用單色 Contour 畫一條等高線 + fig.add_trace(go.Contour( + x=x, + y=y, + z=Z, + contours=dict( + start=k, + end=k, # 只畫這一個等高線 k + size=1, + coloring="lines" + ), + colorscale=[[0, color], [1, color]], # 這條線是同一個顏色 + showscale=False, + line=dict(width=3), + name=f"k = {k}", + showlegend=True, + )) + + fig.update_layout( + xaxis_title="x", + yaxis_title="y", + xaxis=dict(scaleanchor="y", scaleratio=1), + yaxis=dict(constrain="domain"), + margin=dict(l=40, r=40, t=40, b=40), + legend=dict( + x=1.02, y=1, + xanchor="left", + yanchor="top" + ) + ) + + return fig diff --git a/pages/Ch14/C14_1/Dash_Ch14_1.py b/pages/Ch14/C14_1/Dash_Ch14_1.py new file mode 100644 index 0000000000000000000000000000000000000000..d109406f4b2660d7b050c8b102edaa8e3c53f244 --- /dev/null +++ b/pages/Ch14/C14_1/Dash_Ch14_1.py @@ -0,0 +1,24 @@ +# pages/test_using_testpy.py +import dash +from dash import html, dcc, Output, Input, clientside_callback +import dash_mantine_components as dmc +from layout.page_builder import make_test_page + +from pathlib import Path +from pages.Ch14.C14_1.C14_1_ex4 import make_view +from pages.Ch14.C14_1.plot import make_view +from pages.Ch14.C14_1.C14_1_ex5_2 import make_view + + + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_1.json" + +dash.register_page(__name__, path="/Ch14_1", title="Ch14") + +def layout(): + page = make_test_page(str(JSON_PATH), top_offset=90, show_src=True) + return dmc.Stack( + page, + + ) diff --git a/pages/Ch14/C14_1/Md_14_1.md b/pages/Ch14/C14_1/Md_14_1.md new file mode 100644 index 0000000000000000000000000000000000000000..01452971cf3ee58165753eff36170c8e9b4edcfd --- /dev/null +++ b/pages/Ch14/C14_1/Md_14_1.md @@ -0,0 +1,555 @@ + +# 二變數函數 + +前面我們學的是**單變數**:沿著一條線看量怎麼變。但真實世界幾乎沒有只被一個因素決定的量。 +例如:氣溫同時受經度、緯度、時間、海拔影響;氣體壓力取決於溫度、體積、莫耳數;企業利潤跟價格、廣告、原料成本一起變;藥效依賴劑量與時間。 + +有同學可能會問:「既然如此,為什麼不一開始就學多變數?」 +因為多變數的微分與積分,最後都要落回單變數的工具:偏導數是「把其他變數視為常數」的單變數微分;路徑/重積分常要分解成單變數積分。**單變數是地基,多變數是把地基拓展到整片地形。** + +接下來我們先回答兩件事:什麼是多變數函數、怎麼把它畫出來。 + +--- + + +地球表面某點的溫度 $T$ 在任一時刻取決於該點的經度 $x$ 與緯度 $y$。我們可以把 $T$ 視為兩個變數 $x,y$ 的函數,記為 $T=f(x,y)$。 + +圓柱體的體積 $V$ 取決於半徑 $r$ 與高 $h$: +$$V = V(r,h) = \pi r^2 h$$ +我們說 $V$ 是 $r,h$ 的函數。 + + +--- + +## 1️⃣ 二變數函數 + + +定義 +二變數函數 +對集合 $D$ 中的每一個有序實數對 $(x,y)$ 指派一個唯一的實數,記為 $f(x,y)$。集合 $D$ 稱為 $f$ 的**定義域(domain)**,而 $f$ 的**值域(range)**是所有可能取到的值: +$$\{f(x,y) \mid (x,y) \in D\}$$ +我們常寫 $z = f(x,y)$。**變數 $x,y$ 為自變數(independent variable),$z$ 為應變數(dependent variable)。** + + +--- + +### Example 1 + +對函數 $f(x,y) = \dfrac{\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。 + +請先算出 $f(3,2)$: + + + + +**Step 1:計算 $f(3,2)$** + +$$f(3,2) = \frac{\sqrt{3+2+1}}{3-1} = \frac{\sqrt{6}}{2}$$ + +**Step 2:找定義域** + +函數要有意義,需要同時滿足: +- 分母不為零:$x \neq 1$ +- 根號內非負:$x + y + 1 \geq 0$ + +因此定義域為: +$$D = \{(x,y) \mid x+y+1 \geq 0,\ x \neq 1\}$$ + +也就是直線 $y = -x-1$ 上方(含直線本身)的區域,但要去掉 $x = 1$ 這條直線上的點。 + +函數圖形: + + +定義域圖形: + + + + + + +函數 $f$ 要有意義,分母需滿足什麼條件? + +a. 等於 0 +b. 不為 0 +c. 無法確定 + + + + +根號內需滿足什麼條件? + +a. 等於 0 +b. 大於 0 +c. 小於 0 +d. 大於等於 0 + + + + +因此定義域為 $D = \{(x,y) \mid x+y+1 \geq 0,\ x \neq 1\}$。 + +函數圖形: + + +定義域圖形: + + + + + +--- + +### Example 2 + +$f(x,y) = \sin x + \cos x + \sin y + \cos y$,$x \in [0,2\pi]$,$y \in [0,2\pi]$,找出其值域。 + +請先試著找出值域的最大值: + + + + +**Step 1:拆分觀察** + +$$f(x,y) = (\sin x + \cos x) + (\sin y + \cos y)$$ + +**Step 2:分析每一部分的範圍** + +利用 $\sin t + \cos t = \sqrt{2}\sin\!\left(t + \frac{\pi}{4}\right)$,得: + $-\sin t + \cos t$ 的最大值為 $\sqrt{2}$(在 $t = \frac{\pi}{4}$ 時),最小值為 $-\sqrt{2}$ + +**Step 3:合併得值域** + +$$f_{\min} = -\sqrt{2} + (-\sqrt{2}) = -2\sqrt{2}, \qquad f_{\max} = \sqrt{2} + \sqrt{2} = 2\sqrt{2}$$ + +因此值域為 $[-2\sqrt{2},\ 2\sqrt{2}]$。 + +函數圖: + + + + + + +$\sin x + \cos x$ 在 $[0,2\pi]$ 中,最大值出現在 $x = ?$(以 $\pi$(pi) 表示) + + + + + +在 $x = \dfrac{\pi}{4}$ 時最大值為 $\sqrt{2}$,最小值為 $-\sqrt{2}$。 + +則 $f(x,y)$ 的值域為? + +a. $[-2\sqrt{2},\ 2\sqrt{2}]$ +b. $[-\sqrt{2},\ \sqrt{2}]$ +c. $(-2\sqrt{2},\ 2\sqrt{2})$ +d. 好難喔我不知道 QQ + + + + +值域為 $[-2\sqrt{2},\ 2\sqrt{2}]$。 + +函數圖: + + + + + +--- + + +註解 +§1 小結 +- 二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$ +- **定義域**:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\neq 0$、根號內 $\geq 0$、對數內 $> 0$) +- **值域**:$f$ 所有可能取到的值的集合 + + +--- + +## 2️⃣ 函數圖 + + +定義 +圖(Graph) +函數 $f$ 的圖是 $\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \in D$: +$$\{(x,y,z) \mid (x,y) \in D,\ z = f(x,y)\}$$ + + +--- + +### Example 3 + +畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。 + + +**Step 1:找三個截距** + +令不同的兩個變數為 0,找截距: +- $y = z = 0 \Rightarrow x = 2$,即點 $(2,0,0)$ +- $x = z = 0 \Rightarrow y = 3$,即點 $(0,3,0)$ +- $x = y = 0 \Rightarrow z = 6$,即點 $(0,0,6)$ + +**Step 2:連接三點畫出平面** + + + + +其他 +備註 +$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。 + + + +--- + +### 投影法 + +投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。 + +--- + +### Example 4 + +畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法) + + +**Step 1:各平面截面** + +- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點 +- $yz$ 平面($x = 0$):$z = y^2$,拋物線 +- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線 + +**Step 2:組合想像立體形狀** + + + + +--- + +### Example 5 + +畫出函數 $g(x,y) = \sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。 + +請先算出值域的上界: + + + + +**Step 1:定義域** + +根號內需 $\geq 0$: +$$9 - x^2 - y^2 \geq 0 \implies x^2 + y^2 \leq 9$$ + +定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域: +$$D = \{(x,y) \mid x^2 + y^2 \leq 9\}$$ + +**Step 2:值域** + +- 平方根函數值 $\geq 0$,故最小值為 $0$ +- 因 $x^2 + y^2 \geq 0$,所以 $9 - x^2 - y^2 \leq 9$,故 $g \leq 3$ + +值域為 $[0, 3]$。 + +**Step 3:函數圖形** + + + + + + + +跟 Example 1 一樣,根號內需 $\geq 0$。 + +定義域 $D = \{(x,y) \mid x^2 + y^2 \leq 9\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。 + +$z = \sqrt{9 - x^2 - y^2} \geq 0$,所以最小值為 $0$。那 $z$ 的最大值是? + +a. $\infty$ +b. $3$ +c. $9$ +d. 好難喔我不知道 QQ + + + + +因為 $9 - x^2 - y^2 \leq 9$,所以 $\sqrt{9-x^2-y^2} \leq 3$。 + +值域為 $[0, 3]$。 + +函數圖形: + + + + + + +化簡:$g(x,y) = \sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。 + +各平面截面: +- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形 +- $yz$ 平面($x=0$):$z = \sqrt{9-y^2}$,半圓形 +- $xz$ 平面($y=0$):$z = \sqrt{9-x^2}$,半圓形 + + + + +--- + + +註解 +§2 小結 +- 函數圖在三維空間中是一個曲面 +- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀 +- 線性函數 $z = ax+by+c$ 的圖形是平面 + + +--- + +## 3️⃣ 等高線(Level Curve) + +等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。 + + +定義 +等高線(Level Curve) +函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。 + + +### 試試看 + +下面請大家輸入各函數,可以觀察該函數的等高線圖: + + + + + +其他 +備註 +在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。 + + +--- + +### Example 6 + +畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。 + +請先算出等高線的斜率: + + + + +**Step 1:寫出等高線方程式** + +令 $f(x,y) = k$: +$$6 - 3x - 2y = k \implies 3x + 2y + (k-6) = 0$$ + +改成斜截式: +$$y = -\frac{3}{2}x + \frac{6-k}{2}$$ + +**Step 2:各條等高線的方程** + +若取四個不同的 $k$ 值,例如對應下列方程式: +$$ +\begin{aligned} +3x+2y-12&=0 \\ +3x+2y-6&=0 \\ +3x+2y&=0 \\ +3x+2y+6&=0 +\end{aligned} +$$ + +所有等高線斜率均為 $-\dfrac{3}{2}$,彼此平行。 + + + + + + + +等高線方程式為 $f(x,y) = k$,即: + + + + + +化成斜截式後,這些等高線的斜率是? + + + + + +所有等高線斜率相同、截距不同,彼此平行。圖形如下: + + + + + + +--- + +### Example 7 + +畫出 Example 5 的函數 $g(x,y) = \sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。 + +請先算出 $k=1$ 時等高線圓的半徑: + + + + +**Step 1:寫出等高線方程式** + +令 $\sqrt{9-x^2-y^2} = k$,兩邊平方: +$$x^2 + y^2 = 9 - k^2$$ + +這是以 $(0,0)$ 為圓心、半徑 $\sqrt{9-k^2}$ 的圓(需要 $0 \leq k \leq 3$)。 + +**Step 2:各條等高線** + + + + +--- + +### Example 8 + +畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。 + + +**Step 1:等高線方程式** + +令 $4x^2 + y^2 = k$: +- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點) +- $k > 0$:$\dfrac{x^2}{(\frac{\sqrt{k}}{2})^2} + \dfrac{y^2}{(\sqrt{k})^2} = 1$,橢圓 + +**Step 2:圖形** + + + + +--- + +**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢? + + +對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。 + +這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。 + + +--- + + +註解 +§3 小結 +- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線 +- 等高線越密集 → 函數在該方向變化越快(坡度越陡) +- 不同等高線不會相交(函數性質保證) +- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓 + + +--- + +## 4️⃣ 三變數函數 + + +定義 +三變數函數 +對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。** + + +--- + +### Example 9 + +找到函數 $f(x,y,z) = \ln(z-y) + xy\sin(z)$ 的定義域。 + + +**Step 1:分析限制條件** + +$\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。 + +$xy\sin(z)$ 對任意實數都有意義,無額外限制。 + +**Step 2:寫出定義域** + +$$D = \{(x,y,z) \in \mathbb{R}^3 \mid z > y\}$$ + +這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。 + + +備註 +半空間(half-space) +三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。 + + + +--- + +## 5️⃣ 等值曲面(Level Surface) + +等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。 + + +定義 +等值曲面(Level Surface) +若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。 + + +--- + +### Example 10 + +找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。 + + +等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \geq 0$)。 + +這些曲面是一族**半徑為 $\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。 + + + + +--- + +### Example 11 + +描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。 + + +等值方程式為 $x^2 - y - z^2 = k$,整理後: +$$y = x^2 - z^2 - k$$ + +這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \pm 5$ 時的等值面: + + + +--- + +## 6️⃣ 延伸:多變數函數與向量記號 +### 多變數函數的一般形式 + +一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\ldots,x_n) \in \mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\ldots,x_n)$。 + +### 例子:成本函數 + +假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本: +$$C = f(x_1,x_2,\ldots,x_n) = c_1x_1 + c_2x_2 + \cdots + c_nx_n$$ + +### 用向量記號寫得更簡潔 + +令 $\mathbf{x} = (x_1,\ldots,x_n)$,$\mathbf{c} = (c_1,\ldots,c_n)$,則: +$$f(\mathbf{x}) = \mathbf{c} \cdot \mathbf{x}$$ +其中 $\mathbf{c} \cdot \mathbf{x}$ 為內積(dot product)。 + +### 看待多變數函數的三種觀點 + +同一個函數 $f$,有三種等價說法: + +- **$n$ 個實變數的函數**:$f(x_1,x_2,\ldots,x_n)$ +- **「一個點」的函數**:$(x_1,\ldots,x_n)$ 視為 $\mathbb{R}^n$ 中的一個點 +- **「一個向量」的函數**:$f(\mathbf{x})$,$\mathbf{x}=(x_1,\ldots,x_n)$ + +熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。 diff --git a/pages/Ch14/C14_1/exported_result_14_1.json b/pages/Ch14/C14_1/exported_result_14_1.json new file mode 100644 index 0000000000000000000000000000000000000000..4b4238db62cd417e950081e3d4b52bed62896437 --- /dev/null +++ b/pages/Ch14/C14_1/exported_result_14_1.json @@ -0,0 +1,14835 @@ +{ + "toc": [ + { + "label": "二變數函數", + "id": "CH14-P1_id1", + "level": 1 + }, + { + "label": "1️⃣ 二變數函數", + "id": "CH14-P1_id2", + "level": 2 + }, + { + "label": "Example 1", + "id": "CH14-P1_id3", + "level": 3 + }, + { + "label": "Example 2", + "id": "CH14-P1_id4", + "level": 3 + }, + { + "label": "2️⃣ 函數圖", + "id": "CH14-P1_id5", + "level": 2 + }, + { + "label": "Example 3", + "id": "CH14-P1_id6", + "level": 3 + }, + { + "label": "投影法", + "id": "CH14-P1_id7", + "level": 3 + }, + { + "label": "Example 4", + "id": "CH14-P1_id8", + "level": 3 + }, + { + "label": "Example 5", + "id": "CH14-P1_id9", + "level": 3 + }, + { + "label": "3️⃣ 等高線(Level Curve)", + "id": "CH14-P1_id10", + "level": 2 + }, + { + "label": "試試看", + "id": "CH14-P1_id11", + "level": 3 + }, + { + "label": "Example 6", + "id": "CH14-P1_id12", + "level": 3 + }, + { + "label": "Example 7", + "id": "CH14-P1_id13", + "level": 3 + }, + { + "label": "Example 8", + "id": "CH14-P1_id14", + "level": 3 + }, + { + "label": "4️⃣ 三變數函數", + "id": "CH14-P1_id15", + "level": 2 + }, + { + "label": "Example 9", + "id": "CH14-P1_id16", + "level": 3 + }, + { + "label": "5️⃣ 等值曲面(Level Surface)", + "id": "CH14-P1_id17", + "level": 2 + }, + { + "label": "Example 10", + "id": "CH14-P1_id18", + "level": 3 + }, + { + "label": "Example 11", + "id": "CH14-P1_id19", + "level": 3 + }, + { + "label": "6️⃣ 延伸:多變數函數與向量記號", + "id": "CH14-P1_id20", + "level": 2 + }, + { + "label": "多變數函數的一般形式", + "id": "CH14-P1_id21", + "level": 3 + }, + { + "label": "例子:成本函數", + "id": "CH14-P1_id22", + "level": 3 + }, + { + "label": "用向量記號寫得更簡潔", + "id": "CH14-P1_id23", + "level": 3 + }, + { + "label": "看待多變數函數的三種觀點", + "id": "CH14-P1_id24", + "level": 3 + } + ], + "blocks": [ + { + "type": "comment", + "content": "" + }, + { + "type": "heading", + "level": 1, + "content": "二變數函數", + "newline": "true", + "runs": [ + { + "text": "二變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id1" + }, + { + "type": "paragraph", + "content": "前面我們學的是單變數:沿著一條線看量怎麼變。但真實世界幾乎沒有只被一個因素決定的量。例如:氣溫同時受經度、緯度、時間、海拔影響;氣體壓力取決於溫度、體積、莫耳數;企業利潤跟價格、廣告、原料成本一起變;藥效依賴劑量與時間。", + "newline": "false", + "runs": [ + { + "text": "前面我們學的是" + }, + { + "text": "單變數", + "style": "bold" + }, + { + "text": ":沿著一條線看量怎麼變。但真實世界幾乎沒有只被一個因素決定的量。例如:氣溫同時受經度、緯度、時間、海拔影響;氣體壓力取決於溫度、體積、莫耳數;企業利潤跟價格、廣告、原料成本一起變;藥效依賴劑量與時間。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "有同學可能會問:「既然如此,為什麼不一開始就學多變數?」因為多變數的微分與積分,最後都要落回單變數的工具:偏導數是「把其他變數視為常數」的單變數微分;路徑/重積分常要分解成單變數積分。單變數是地基,多變數是把地基拓展到整片地形。", + "newline": "false", + "runs": [ + { + "text": "有同學可能會問:「既然如此,為什麼不一開始就學多變數?」因為多變數的微分與積分,最後都要落回單變數的工具:偏導數是「把其他變數視為常數」的單變數微分;路徑/重積分常要分解成單變數積分。" + }, + { + "text": "單變數是地基,多變數是把地基拓展到整片地形。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接下來我們先回答兩件事:什麼是多變數函數、怎麼把它畫出來。", + "newline": "false", + "runs": [ + { + "text": "接下來我們先回答兩件事:什麼是多變數函數、怎麼把它畫出來。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_f991b294c3", + "label": "生活上例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "地球表面某點的溫度 $T$ 在任一時刻取決於該點的經度 $x$ 與緯度 $y$。我們可以把 $T$ 視為兩個變數 $x,y$ 的函數,記為 $T=f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "地球表面某點的溫度 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 在任一時刻取決於該點的經度 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與緯度 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "。我們可以把 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 視為兩個變數 " + }, + { + "latex": "$x,y$", + "kind": "math" + }, + { + "text": " 的函數,記為 " + }, + { + "latex": "$T=f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "圓柱體的體積 $V$ 取決於半徑 $r$ 與高 $h$:$$\nV = V(r,h) = \\pi r^2 h\n$$我們說 $V$ 是 $r,h$ 的函數。", + "newline": "false", + "runs": [ + { + "text": "圓柱體的體積 " + }, + { + "latex": "$V$", + "kind": "math" + }, + { + "text": " 取決於半徑 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 與高 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\nV = V(r,h) = \\pi r^2 h\n$$", + "kind": "math_block" + }, + { + "text": "我們說 " + }, + { + "latex": "$V$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$r,h$", + "kind": "math" + }, + { + "text": " 的函數。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 二變數函數", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 二變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id2" + }, + { + "type": "card", + "kind": "定義", + "headline": "二變數函數", + "body": [ + { + "type": "paragraph", + "content": "對集合 $D$ 中的每一個有序實數對 $(x,y)$ 指派一個唯一的實數,記為 $f(x,y)$。集合 $D$ 稱為 $f$ 的定義域(domain),而 $f$ 的值域(range)是所有可能取到的值:$$\n\\{f(x,y) \\mid (x,y) \\in D\\}\n$$我們常寫 $z = f(x,y)$。變數 $x,y$ 為自變數(independent variable),$z$ 為應變數(dependent variable)。", + "newline": "false", + "runs": [ + { + "text": "對集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 中的每一個有序實數對 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 指派一個唯一的實數,記為 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 稱為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "定義域(domain)", + "style": "bold" + }, + { + "text": ",而 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "值域(range)", + "style": "bold" + }, + { + "text": "是所有可能取到的值:" + }, + { + "latex": "$$\n\\{f(x,y) \\mid (x,y) \\in D\\}\n$$", + "kind": "math_block" + }, + { + "text": "我們常寫 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "變數 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為自變數(independent variable),", + "style": "bold" + }, + { + "latex": "$z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為應變數(dependent variable)。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:\n\n\n\n\n**Step 1:計算 $f(3,2)$**\n\n$$f(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}$$\n\n**Step 2:找定義域**\n\n函數要有意義,需要同時滿足:\n- 分母不為零:$x \\neq 1$\n- 根號內非負:$x + y + 1 \\geq 0$\n\n因此定義域為:\n$$D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$$\n\n也就是直線 $y = -x-1$ 上方(含直線本身)的區域,但要去掉 $x = 1$ 這條直線上的點。\n\n函數圖形:\n\n\n定義域圖形:\n\n\n\n\n\n\n函數 $f$ 要有意義,分母需滿足什麼條件?\n\na. 等於 0\nb. 不為 0\nc. 無法確定\n\n\n\n\n根號內需滿足什麼條件?\n\na. 等於 0\nb. 大於 0\nc. 小於 0\nd. 大於等於 0\n\n\n\n\n因此定義域為 $D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$。\n\n函數圖形:\n\n\n定義域圖形:\n\n\n\n\n\n---\n\n### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n\n\n\n**Step 1:拆分觀察**\n\n$$f(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)$$\n\n**Step 2:分析每一部分的範圍**\n\n利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得:\n $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$\n\n**Step 3:合併得值域**\n\n$$f_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}$$\n\n因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n\n$\\sin x + \\cos x$ 在 $[0,2\\pi]$ 中,最大值出現在 $x = ?$(以 $\\pi$(pi) 表示)\n\n\n\n\n\n在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。\n\n則 $f(x,y)$ 的值域為?\n\na. $[-2\\sqrt{2},\\ 2\\sqrt{2}]$\nb. $[-\\sqrt{2},\\ \\sqrt{2}]$\nc. $(-2\\sqrt{2},\\ 2\\sqrt{2})$\nd. 好難喔我不知道 QQ\n\n\n\n\n值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n---\n\n\n註解\n§1 小結\n- 二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$\n- **定義域**:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)\n- **值域**:$f$ 所有可能取到的值的集合\n\n\n---\n\n## 2️⃣ 函數圖\n\n\n定義\n圖(Graph)\n函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:\n$$\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}$$\n\n\n---\n\n### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id3" + }, + { + "type": "paragraph", + "content": "對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。", + "newline": "false", + "runs": [ + { + "text": "對函數 " + }, + { + "latex": "$f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$", + "kind": "math" + }, + { + "text": ",計算 " + }, + { + "latex": "$f(3,2)$", + "kind": "math" + }, + { + "text": ",並找出其定義域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出 " + }, + { + "latex": "$f(3,2)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "sqrt(6)/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1dc21b0a15", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算 $f(3,2)$", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算 ", + "style": "bold" + }, + { + "latex": "$f(3,2)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:找定義域", + "newline": "false", + "runs": [ + { + "text": "Step 2:找定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數要有意義,需要同時滿足:", + "newline": "false", + "runs": [ + { + "text": "函數要有意義,需要同時滿足:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "分母不為零:" + }, + { + "latex": "$x \\neq 1$", + "kind": "math" + } + ], + "content": "分母不為零:$x \\neq 1$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "根號內非負:" + }, + { + "latex": "$x + y + 1 \\geq 0$", + "kind": "math" + } + ], + "content": "根號內非負:$x + y + 1 \\geq 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此定義域為:$$\nD = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "因此定義域為:" + }, + { + "latex": "$$\nD = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是直線 $y = -x-1$ 上方(含直線本身)的區域,但要去掉 $x = 1$ 這條直線上的點。", + "newline": "false", + "runs": [ + { + "text": "也就是直線 " + }, + { + "latex": "$y = -x-1$", + "kind": "math" + }, + { + "text": " 上方(含直線本身)的區域,但要去掉 " + }, + { + "latex": "$x = 1$", + "kind": "math" + }, + { + "text": " 這條直線上的點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域圖形:", + "newline": "false", + "runs": [ + { + "text": "定義域圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1_2.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ac0019c202", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-1", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-1::step-1::q1", + "prompt_runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 要有意義,分母需滿足什麼條件?" + } + ], + "options": [ + { + "key": "a", + "text": "等於 0" + }, + { + "key": "b", + "text": "不為 0" + }, + { + "key": "c", + "text": "無法確定" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-1", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-1::step-2::q2", + "prompt_runs": [ + { + "text": "根號內需滿足什麼條件?" + } + ], + "options": [ + { + "key": "a", + "text": "等於 0" + }, + { + "key": "b", + "text": "大於 0" + }, + { + "key": "c", + "text": "小於 0" + }, + { + "key": "d", + "text": "大於等於 0" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "flow": "flow-1", + "step": "step-2" + } + ], + "gate_from": "flow-1::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "因此定義域為 $D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$。", + "newline": "false", + "runs": [ + { + "text": "因此定義域為 " + }, + { + "latex": "$D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域圖形:", + "newline": "false", + "runs": [ + { + "text": "定義域圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1_2.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-1::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n\n\n\n**Step 1:拆分觀察**\n\n$$f(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)$$\n\n**Step 2:分析每一部分的範圍**\n\n利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得:\n $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$\n\n**Step 3:合併得值域**\n\n$$f_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}$$\n\n因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n\n$\\sin x + \\cos x$ 在 $[0,2\\pi]$ 中,最大值出現在 $x = ?$(以 $\\pi$(pi) 表示)\n\n\n\n\n\n在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。\n\n則 $f(x,y)$ 的值域為?\n\na. $[-2\\sqrt{2},\\ 2\\sqrt{2}]$\nb. $[-\\sqrt{2},\\ \\sqrt{2}]$\nc. $(-2\\sqrt{2},\\ 2\\sqrt{2})$\nd. 好難喔我不知道 QQ\n\n\n\n\n值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n---\n\n\n註解\n§1 小結\n- 二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$\n- **定義域**:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)\n- **值域**:$f$ 所有可能取到的值的集合\n\n\n---\n\n## 2️⃣ 函數圖\n\n\n定義\n圖(Graph)\n函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:\n$$\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}$$\n\n\n---\n\n### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id4" + }, + { + "type": "paragraph", + "content": "$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。", + "newline": "false", + "runs": [ + { + "latex": "$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x \\in [0,2\\pi]$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y \\in [0,2\\pi]$", + "kind": "math" + }, + { + "text": ",找出其值域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著找出值域的最大值:" + } + ], + "answers": [ + "2*sqrt(2)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入最大值", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f93a0cb03f", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:拆分觀察", + "newline": "false", + "runs": [ + { + "text": "Step 1:拆分觀察", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:分析每一部分的範圍", + "newline": "false", + "runs": [ + { + "text": "Step 2:分析每一部分的範圍", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得: $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$", + "newline": "false", + "runs": [ + { + "text": "利用 " + }, + { + "latex": "$\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$", + "kind": "math" + }, + { + "text": ",得: " + }, + { + "latex": "$-\\sin t + \\cos t$", + "kind": "math" + }, + { + "text": " 的最大值為 " + }, + { + "latex": "$\\sqrt{2}$", + "kind": "math" + }, + { + "text": "(在 " + }, + { + "latex": "$t = \\frac{\\pi}{4}$", + "kind": "math" + }, + { + "text": " 時),最小值為 " + }, + { + "latex": "$-\\sqrt{2}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:合併得值域", + "newline": "false", + "runs": [ + { + "text": "Step 3:合併得值域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。", + "newline": "false", + "runs": [ + { + "text": "因此值域為 " + }, + { + "latex": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖:", + "newline": "false", + "runs": [ + { + "text": "函數圖:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex2.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0c971f1354", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-2", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-2::step-1::q1", + "prompt_runs": [ + { + "latex": "$\\sin x + \\cos x$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$[0,2\\pi]$", + "kind": "math" + }, + { + "text": " 中,最大值出現在 " + }, + { + "latex": "$x = ?$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$\\pi$", + "kind": "math" + }, + { + "text": "(pi) 表示)" + } + ], + "answers": [ + "pi/4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入弧度", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-2", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。", + "newline": "false", + "runs": [ + { + "text": "在 " + }, + { + "latex": "$x = \\dfrac{\\pi}{4}$", + "kind": "math" + }, + { + "text": " 時最大值為 " + }, + { + "latex": "$\\sqrt{2}$", + "kind": "math" + }, + { + "text": ",最小值為 " + }, + { + "latex": "$-\\sqrt{2}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-2::step-2::q2", + "prompt_runs": [ + { + "text": "則 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值域為?" + } + ], + "options": [ + { + "key": "a", + "text": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$" + }, + { + "key": "b", + "text": "$[-\\sqrt{2},\\ \\sqrt{2}]$" + }, + { + "key": "c", + "text": "$(-2\\sqrt{2},\\ 2\\sqrt{2})$" + }, + { + "key": "d", + "text": "好難喔我不知道 QQ" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-2", + "step": "step-2" + } + ], + "gate_from": "flow-2::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖:", + "newline": "false", + "runs": [ + { + "text": "函數圖:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex2.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-2::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "二變數函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ":一個輸入對 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ",一個輸出 " + }, + { + "latex": "$z$", + "kind": "math" + } + ], + "content": "二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "定義域", + "style": "bold" + }, + { + "text": ":所有使函數有意義的 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的集合(注意分母 " + }, + { + "latex": "$\\neq 0$", + "kind": "math" + }, + { + "text": "、根號內 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": "、對數內 " + }, + { + "latex": "$> 0$", + "kind": "math" + }, + { + "text": ")" + } + ], + "content": "定義域:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "值域", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 所有可能取到的值的集合" + } + ], + "content": "值域:$f$ 所有可能取到的值的集合" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 函數圖", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 函數圖", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id5" + }, + { + "type": "card", + "kind": "定義", + "headline": "圖(Graph)", + "body": [ + { + "type": "paragraph", + "content": "函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:$$\n\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的圖是 " + }, + { + "latex": "$\\mathbb{R}^3$", + "kind": "math" + }, + { + "text": " 空間中所有點 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 的集合,使得 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id6" + }, + { + "type": "paragraph", + "content": "畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$f(x,y) = 6 - 3x - 2y$", + "kind": "math" + }, + { + "text": " 的圖。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0a6ce086fa", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:找三個截距", + "newline": "false", + "runs": [ + { + "text": "Step 1:找三個截距", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令不同的兩個變數為 0,找截距:", + "newline": "false", + "runs": [ + { + "text": "令不同的兩個變數為 0,找截距:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$y = z = 0 \\Rightarrow x = 2$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(2,0,0)$", + "kind": "math" + } + ], + "content": "$y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$x = z = 0 \\Rightarrow y = 3$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(0,3,0)$", + "kind": "math" + } + ], + "content": "$x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$x = y = 0 \\Rightarrow z = 6$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(0,0,6)$", + "kind": "math" + } + ], + "content": "$x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:連接三點畫出平面", + "newline": "false", + "runs": [ + { + "text": "Step 2:連接三點畫出平面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex3.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "其他", + "headline": "備註", + "body": [ + { + "type": "paragraph", + "content": "$f(x,y) = ax + by + c$ 這種函數稱為線性函數(Linear function),其圖形是一個平面,方程式為 $ax + by - z + c = 0$。", + "newline": "false", + "runs": [ + { + "latex": "$f(x,y) = ax + by + c$", + "kind": "math" + }, + { + "text": " 這種函數稱為" + }, + { + "text": "線性函數(Linear function)", + "style": "bold" + }, + { + "text": ",其圖形是一個平面,方程式為 " + }, + { + "latex": "$ax + by - z + c = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "投影法", + "newline": "true", + "runs": [ + { + "text": "投影法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id7" + }, + { + "type": "paragraph", + "content": "投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。", + "newline": "false", + "runs": [ + { + "text": "投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 " + }, + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面,就是讓 " + }, + { + "latex": "$z = 0$", + "kind": "math" + }, + { + "text": ",使空間點 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 變換為 " + }, + { + "latex": "$(x,y,0)$", + "kind": "math" + }, + { + "text": "。我們也可以投影在 " + }, + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面,有助於直觀地想像立體形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id8" + }, + { + "type": "paragraph", + "content": "畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$z = 4x^2 + y^2$", + "kind": "math" + }, + { + "text": " 的圖。(投影法)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ed5a7e4802", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:各平面截面", + "newline": "false", + "runs": [ + { + "text": "Step 1:各平面截面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$z = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$4x^2 + y^2 = 0$", + "kind": "math" + }, + { + "text": ",只有原點" + } + ], + "content": "$xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$x = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = y^2$", + "kind": "math" + }, + { + "text": ",拋物線" + } + ], + "content": "$yz$ 平面($x = 0$):$z = y^2$,拋物線" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$y = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = 4x^2$", + "kind": "math" + }, + { + "text": ",拋物線" + } + ], + "content": "$xz$ 平面($y = 0$):$z = 4x^2$,拋物線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:組合想像立體形狀", + "newline": "false", + "runs": [ + { + "text": "Step 2:組合想像立體形狀", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex4.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id9" + }, + { + "type": "paragraph", + "content": "畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$g(x,y) = \\sqrt{9 - x^2 - y^2}$", + "kind": "math" + }, + { + "text": " 的圖,並找出其定義域與值域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出值域的上界:" + } + ], + "answers": [ + "3" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "最大值為", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_06661825f3", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義域", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "根號內需 $\\geq 0$:$$\n9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9\n$$", + "newline": "false", + "runs": [ + { + "text": "根號內需 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:$$\nD = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "定義域為以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 為圓心、半徑為 " + }, + { + "latex": "$3$", + "kind": "math" + }, + { + "text": " 的圓形區域:" + }, + { + "latex": "$$\nD = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:值域", + "newline": "false", + "runs": [ + { + "text": "Step 2:值域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "平方根函數值 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": ",故最小值為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "平方根函數值 $\\geq 0$,故最小值為 $0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "因 " + }, + { + "latex": "$x^2 + y^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$9 - x^2 - y^2 \\leq 9$", + "kind": "math" + }, + { + "text": ",故 " + }, + { + "latex": "$g \\leq 3$", + "kind": "math" + } + ], + "content": "因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "值域為 $[0, 3]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[0, 3]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:函數圖形", + "newline": "false", + "runs": [ + { + "text": "Step 3:函數圖形", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f00059b902", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-3", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "跟 Example 1 一樣,根號內需 $\\geq 0$。", + "newline": "false", + "runs": [ + { + "text": "跟 Example 1 一樣,根號內需 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。", + "newline": "false", + "runs": [ + { + "text": "定義域 " + }, + { + "latex": "$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$", + "kind": "math" + }, + { + "text": ",這是圓心 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": "、半徑 " + }, + { + "latex": "$3$", + "kind": "math" + }, + { + "text": " 的圓。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-3::step-1::q1", + "prompt_runs": [ + { + "latex": "$z = \\sqrt{9 - x^2 - y^2} \\geq 0$", + "kind": "math" + }, + { + "text": ",所以最小值為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。那 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的最大值是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\infty$" + }, + { + "key": "b", + "text": "$3$" + }, + { + "key": "c", + "text": "$9$" + }, + { + "key": "d", + "text": "好難喔我不知道 QQ" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-3", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$9 - x^2 - y^2 \\leq 9$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$\\sqrt{9-x^2-y^2} \\leq 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "值域為 $[0, 3]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[0, 3]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-3::step-1::q1" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c22ef2c49f", + "label": "投影法畫圖", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。", + "newline": "false", + "runs": [ + { + "text": "化簡:" + }, + { + "latex": "$g(x,y) = \\sqrt{9-x^2-y^2}$", + "kind": "math" + }, + { + "text": " 等價於 " + }, + { + "latex": "$x^2 + y^2 + z^2 = 9$", + "kind": "math" + }, + { + "text": "(上半球)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "各平面截面:", + "newline": "false", + "runs": [ + { + "text": "各平面截面:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$z=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$x^2 + y^2 = 9$", + "kind": "math" + }, + { + "text": ",圓形" + } + ], + "content": "$xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = \\sqrt{9-y^2}$", + "kind": "math" + }, + { + "text": ",半圓形" + } + ], + "content": "$yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = \\sqrt{9-x^2}$", + "kind": "math" + }, + { + "text": ",半圓形" + } + ], + "content": "$xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5_2.py", + "call": "make_view", + "kwargs": {} + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§2 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "函數圖在三維空間中是一個曲面" + } + ], + "content": "函數圖在三維空間中是一個曲面" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "投影法:分別令 " + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$z=0$", + "kind": "math" + }, + { + "text": ",觀察各截面形狀,輔助想像立體形狀" + } + ], + "content": "投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "線性函數 " + }, + { + "latex": "$z = ax+by+c$", + "kind": "math" + }, + { + "text": " 的圖形是平面" + } + ], + "content": "線性函數 $z = ax+by+c$ 的圖形是平面" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 等高線(Level Curve)", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 等高線(Level Curve)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id10" + }, + { + "type": "paragraph", + "content": "等高線是地圖上把海拔高度相同的點連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。", + "newline": "false", + "runs": [ + { + "text": "等高線是地圖上把" + }, + { + "text": "海拔高度相同的點", + "style": "bold" + }, + { + "text": "連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "等高線(Level Curve)", + "body": [ + { + "type": "paragraph", + "content": "函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。", + "newline": "false", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的等高線(或稱等值線),就是所有滿足 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": " 的曲線,其中 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 是一個常數。" + } + ] + } + ] + }, + { + "type": "heading", + "level": 3, + "content": "試試看", + "newline": "true", + "runs": [ + { + "text": "試試看", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id11" + }, + { + "type": "paragraph", + "content": "下面請大家輸入各函數,可以觀察該函數的等高線圖:", + "newline": "false", + "runs": [ + { + "text": "下面請大家輸入各函數,可以觀察該函數的等高線圖:" + } + ] + }, + { + "type": "solution", + "uid": "sol_61bc0553d4", + "label": "等高線圖", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/plot.py", + "call": "make_view", + "kwargs": {} + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "其他", + "headline": "備註", + "body": [ + { + "type": "paragraph", + "content": "在畫等高線時,通常會把常數 $k$ 設定成等差遞增或遞減(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。", + "newline": "false", + "runs": [ + { + "text": "在畫等高線時,通常會把常數 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 設定成" + }, + { + "text": "等差遞增或遞減", + "style": "bold" + }, + { + "text": "(例如 " + }, + { + "latex": "$k = -4,-2,0,2,4,\\ldots$", + "kind": "math" + }, + { + "text": "),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id12" + }, + { + "type": "paragraph", + "content": "畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。", + "newline": "false", + "runs": [ + { + "text": "畫出 Example 3 的函數 " + }, + { + "latex": "$f(x,y) = 6 - 3x - 2y$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = -6, 0, 6, 12$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出等高線的斜率:" + } + ], + "answers": [ + "-3/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "斜率", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f739d2a15d", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $f(x,y) = k$:$$\n6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "改成斜截式:$$\ny = -\\frac{3}{2}x + \\frac{6-k}{2}\n$$", + "newline": "false", + "runs": [ + { + "text": "改成斜截式:" + }, + { + "latex": "$$\ny = -\\frac{3}{2}x + \\frac{6-k}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:各條等高線的方程", + "newline": "false", + "runs": [ + { + "text": "Step 2:各條等高線的方程", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若取四個不同的 $k$ 值,例如對應下列方程式:$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "若取四個不同的 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 值,例如對應下列方程式:" + }, + { + "latex": "$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。", + "newline": "false", + "runs": [ + { + "text": "所有等高線斜率均為 " + }, + { + "latex": "$-\\dfrac{3}{2}$", + "kind": "math" + }, + { + "text": ",彼此平行。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex6.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_691c422bc2", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-4", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-4::step-1::q1", + "prompt_runs": [ + { + "text": "等高線方程式為 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ",即:" + } + ], + "answers": [ + "6-3*x-2*y=k" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入方程式", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-4", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-4::step-2::q2", + "prompt_runs": [ + { + "text": "化成斜截式後,這些等高線的斜率是?" + } + ], + "answers": [ + "-3/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入斜率", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-4", + "step": "step-2" + } + ], + "gate_from": "flow-4::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所有等高線斜率相同、截距不同,彼此平行。圖形如下:", + "newline": "false", + "runs": [ + { + "text": "所有等高線斜率相同、截距不同,彼此平行。圖形如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex6.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-4::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id13" + }, + { + "type": "paragraph", + "content": "畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。", + "newline": "false", + "runs": [ + { + "text": "畫出 Example 5 的函數 " + }, + { + "latex": "$g(x,y) = \\sqrt{9 - x^2 - y^2}$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = 0, 1, 2, 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出 " + }, + { + "latex": "$k=1$", + "kind": "math" + }, + { + "text": " 時等高線圓的半徑:" + } + ], + "answers": [ + "2*sqrt(2)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "半徑", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_55d8689a20", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:$$\nx^2 + y^2 = 9 - k^2\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\sqrt{9-x^2-y^2} = k$", + "kind": "math" + }, + { + "text": ",兩邊平方:" + }, + { + "latex": "$$\nx^2 + y^2 = 9 - k^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。", + "newline": "false", + "runs": [ + { + "text": "這是以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 為圓心、半徑 " + }, + { + "latex": "$\\sqrt{9-k^2}$", + "kind": "math" + }, + { + "text": " 的圓(需要 " + }, + { + "latex": "$0 \\leq k \\leq 3$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:各條等高線", + "newline": "false", + "runs": [ + { + "text": "Step 2:各條等高線", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex7.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id14" + }, + { + "type": "paragraph", + "content": "畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$h(x,y) = 4x^2 + y^2$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = 0, 1, 2, 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dae4e9b84b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $4x^2 + y^2 = k$:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$4x^2 + y^2 = k$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$4x^2 + y^2 = 0$", + "kind": "math" + }, + { + "text": ",解為 " + }, + { + "latex": "$(x,y) = (0,0)$", + "kind": "math" + }, + { + "text": "(單點)" + } + ], + "content": "$k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$k > 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$", + "kind": "math" + }, + { + "text": ",橢圓" + } + ], + "content": "$k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:圖形", + "newline": "false", + "runs": [ + { + "text": "Step 2:圖形", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex8.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "提問:為什麼同一個函數的等高線不會重疊、也不會相交呢?", + "newline": "false", + "runs": [ + { + "text": "提問", + "style": "bold" + }, + { + "text": ":為什麼同一個函數的等高線不會重疊、也不會相交呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_25f08fb73e", + "label": "看答案", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。", + "newline": "false", + "runs": [ + { + "text": "對函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",等高線 " + }, + { + "latex": "$f(x,y) = c_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$f(x,y) = c_2$", + "kind": "math" + }, + { + "text": "(" + }, + { + "latex": "$c_1 \\neq c_2$", + "kind": "math" + }, + { + "text": ")若相交,代表存在某點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 同時滿足兩個方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了函數每一組輸入只能對應一個輸出的基本定義。因此等高線不會相交。", + "newline": "false", + "runs": [ + { + "text": "這表示同一個輸入 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": ",函數給出了兩個不同的輸出 " + }, + { + "latex": "$c_1 \\neq c_2$", + "kind": "math" + }, + { + "text": ",違反了" + }, + { + "text": "函數每一組輸入只能對應一個輸出", + "style": "bold" + }, + { + "text": "的基本定義。因此等高線不會相交。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§3 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "等高線 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ":固定函數值,觀察 " + }, + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面上的曲線" + } + ], + "content": "等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "等高線越密集 → 函數在該方向變化越快(坡度越陡)" + } + ], + "content": "等高線越密集 → 函數在該方向變化越快(坡度越陡)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "不同等高線不會相交(函數性質保證)" + } + ], + "content": "不同等高線不會相交(函數性質保證)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓" + } + ], + "content": "常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 三變數函數", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 三變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id15" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數函數", + "body": [ + { + "type": "paragraph", + "content": "對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。變數 $x,y,z$ 為自變數,$w$ 為應變數。", + "newline": "false", + "runs": [ + { + "text": "對集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 中的每一個有序三元組 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 指派一個唯一的實數,記為 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": "。我們常寫 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "變數 ", + "style": "bold" + }, + { + "latex": "$x,y,z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為自變數,", + "style": "bold" + }, + { + "latex": "$w$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為應變數。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id16" + }, + { + "type": "paragraph", + "content": "找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。", + "newline": "false", + "runs": [ + { + "text": "找到函數 " + }, + { + "latex": "$f(x,y,z) = \\ln(z-y) + xy\\sin(z)$", + "kind": "math" + }, + { + "text": " 的定義域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e43e2dbcb9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:分析限制條件", + "newline": "false", + "runs": [ + { + "text": "Step 1:分析限制條件", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。", + "newline": "false", + "runs": [ + { + "latex": "$\\ln$", + "kind": "math" + }, + { + "text": " 的定義域為所有正實數,因此需要 " + }, + { + "latex": "$z - y > 0$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$z > y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$xy\\sin(z)$ 對任意實數都有意義,無額外限制。", + "newline": "false", + "runs": [ + { + "latex": "$xy\\sin(z)$", + "kind": "math" + }, + { + "text": " 對任意實數都有意義,無額外限制。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:寫出定義域", + "newline": "false", + "runs": [ + { + "text": "Step 2:寫出定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是由所有位於平面 $y = z$ 上方的點所組成的半空間(half-space)。", + "newline": "false", + "runs": [ + { + "text": "這是由所有位於平面 " + }, + { + "latex": "$y = z$", + "kind": "math" + }, + { + "text": " 上方的點所組成的" + }, + { + "text": "半空間(half-space)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "備註", + "headline": "半空間(half-space)", + "body": [ + { + "type": "paragraph", + "content": "三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。", + "newline": "false", + "runs": [ + { + "text": "三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。" + } + ] + } + ] + } + ], + "ai_prompt_md": "### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 等值曲面(Level Surface)", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 等值曲面(Level Surface)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id17" + }, + { + "type": "paragraph", + "content": "等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。", + "newline": "false", + "runs": [ + { + "text": "等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": " 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "等值曲面(Level Surface)", + "body": [ + { + "type": "paragraph", + "content": "若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": " 是一個三變數函數,且 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 值域內的一個常數,則方程式 " + }, + { + "latex": "$f(x,y,z) = k$", + "kind": "math" + }, + { + "text": " 在三維空間中所構成的曲面,稱為函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "等值曲面", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id18" + }, + { + "type": "paragraph", + "content": "找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "找到函數 " + }, + { + "latex": "$f(x,y,z) = x^2 + y^2 + z^2$", + "kind": "math" + }, + { + "text": " 的等值曲面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_604b3f3eef", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。", + "newline": "false", + "runs": [ + { + "text": "等值方程式為 " + }, + { + "latex": "$x^2 + y^2 + z^2 = k$", + "kind": "math" + }, + { + "text": "(需 " + }, + { + "latex": "$k \\geq 0$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這些曲面是一族半徑為 $\\sqrt{k}$ 的同心球面。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。", + "newline": "false", + "runs": [ + { + "text": "這些曲面是一族" + }, + { + "text": "半徑為 ", + "style": "bold" + }, + { + "latex": "$\\sqrt{k}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的同心球面", + "style": "bold" + }, + { + "text": "。當 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 在任何一個以原點為球心的球面上變動時,函數值 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 保持不變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex10.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id19" + }, + { + "type": "paragraph", + "content": "描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "描述函數 " + }, + { + "latex": "$f(x,y,z) = x^2 - y - z^2$", + "kind": "math" + }, + { + "text": " 的等值曲面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ae067124a2", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "等值方程式為 $x^2 - y - z^2 = k$,整理後:$$\ny = x^2 - z^2 - k\n$$", + "newline": "false", + "runs": [ + { + "text": "等值方程式為 " + }, + { + "latex": "$x^2 - y - z^2 = k$", + "kind": "math" + }, + { + "text": ",整理後:" + }, + { + "latex": "$$\ny = x^2 - z^2 - k\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是一族雙曲拋物面(hyperbolic paraboloids),下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:", + "newline": "false", + "runs": [ + { + "text": "這是一族" + }, + { + "text": "雙曲拋物面(hyperbolic paraboloids)", + "style": "bold" + }, + { + "text": ",下圖為 " + }, + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$k = \\pm 5$", + "kind": "math" + }, + { + "text": " 時的等值面:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex11.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣ 延伸:多變數函數與向量記號", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 延伸:多變數函數與向量記號", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id20" + }, + { + "type": "heading", + "level": 3, + "content": "多變數函數的一般形式", + "newline": "true", + "runs": [ + { + "text": "多變數函數的一般形式", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id21" + }, + { + "type": "paragraph", + "content": "一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。", + "newline": "false", + "runs": [ + { + "text": "一個 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 變數的函數對每個 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 維向量 " + }, + { + "latex": "$(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$", + "kind": "math" + }, + { + "text": " 指派一個實數 " + }, + { + "latex": "$z = f(x_1,x_2,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "例子:成本函數", + "newline": "true", + "runs": [ + { + "text": "例子:成本函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id22" + }, + { + "type": "paragraph", + "content": "假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:$$\nC = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n\n$$", + "newline": "false", + "runs": [ + { + "text": "假設某產品的製作需要 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 種原料,第 " + }, + { + "latex": "$i$", + "kind": "math" + }, + { + "text": " 種的單位成本為 " + }, + { + "latex": "$c_i$", + "kind": "math" + }, + { + "text": ",使用量為 " + }, + { + "latex": "$x_i$", + "kind": "math" + }, + { + "text": ",則總成本:" + }, + { + "latex": "$$\nC = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "用向量記號寫得更簡潔", + "newline": "true", + "runs": [ + { + "text": "用向量記號寫得更簡潔", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id23" + }, + { + "type": "paragraph", + "content": "令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:$$\nf(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}\n$$其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\mathbf{x} = (x_1,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{c} = (c_1,\\ldots,c_n)$", + "kind": "math" + }, + { + "text": ",則:" + }, + { + "latex": "$$\nf(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\mathbf{c} \\cdot \\mathbf{x}$", + "kind": "math" + }, + { + "text": " 為內積(dot product)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "看待多變數函數的三種觀點", + "newline": "true", + "runs": [ + { + "text": "看待多變數函數的三種觀點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id24" + }, + { + "type": "paragraph", + "content": "同一個函數 $f$,有三種等價說法:", + "newline": "false", + "runs": [ + { + "text": "同一個函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": ",有三種等價說法:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$n$", + "kind": "math", + "style": "bold" + }, + { + "text": " 個實變數的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f(x_1,x_2,\\ldots,x_n)$", + "kind": "math" + } + ], + "content": "$n$ 個實變數的函數:$f(x_1,x_2,\\ldots,x_n)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "「一個點」的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$(x_1,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": " 視為 " + }, + { + "latex": "$\\mathbb{R}^n$", + "kind": "math" + }, + { + "text": " 中的一個點" + } + ], + "content": "「一個點」的函數:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "「一個向量」的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{x}=(x_1,\\ldots,x_n)$", + "kind": "math" + } + ], + "content": "「一個向量」的函數:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "newline": "false", + "runs": [ + { + "text": "熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。" + } + ] + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "comment", + "content": "" + }, + { + "type": "heading", + "level": 1, + "content": "二變數函數", + "newline": "true", + "runs": [ + { + "text": "二變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id1" + }, + { + "type": "paragraph", + "content": "前面我們學的是單變數:沿著一條線看量怎麼變。但真實世界幾乎沒有只被一個因素決定的量。例如:氣溫同時受經度、緯度、時間、海拔影響;氣體壓力取決於溫度、體積、莫耳數;企業利潤跟價格、廣告、原料成本一起變;藥效依賴劑量與時間。", + "newline": "false", + "runs": [ + { + "text": "前面我們學的是" + }, + { + "text": "單變數", + "style": "bold" + }, + { + "text": ":沿著一條線看量怎麼變。但真實世界幾乎沒有只被一個因素決定的量。例如:氣溫同時受經度、緯度、時間、海拔影響;氣體壓力取決於溫度、體積、莫耳數;企業利潤跟價格、廣告、原料成本一起變;藥效依賴劑量與時間。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "有同學可能會問:「既然如此,為什麼不一開始就學多變數?」因為多變數的微分與積分,最後都要落回單變數的工具:偏導數是「把其他變數視為常數」的單變數微分;路徑/重積分常要分解成單變數積分。單變數是地基,多變數是把地基拓展到整片地形。", + "newline": "false", + "runs": [ + { + "text": "有同學可能會問:「既然如此,為什麼不一開始就學多變數?」因為多變數的微分與積分,最後都要落回單變數的工具:偏導數是「把其他變數視為常數」的單變數微分;路徑/重積分常要分解成單變數積分。" + }, + { + "text": "單變數是地基,多變數是把地基拓展到整片地形。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接下來我們先回答兩件事:什麼是多變數函數、怎麼把它畫出來。", + "newline": "false", + "runs": [ + { + "text": "接下來我們先回答兩件事:什麼是多變數函數、怎麼把它畫出來。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_f991b294c3", + "label": "生活上例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "地球表面某點的溫度 $T$ 在任一時刻取決於該點的經度 $x$ 與緯度 $y$。我們可以把 $T$ 視為兩個變數 $x,y$ 的函數,記為 $T=f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "地球表面某點的溫度 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 在任一時刻取決於該點的經度 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與緯度 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "。我們可以把 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 視為兩個變數 " + }, + { + "latex": "$x,y$", + "kind": "math" + }, + { + "text": " 的函數,記為 " + }, + { + "latex": "$T=f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "圓柱體的體積 $V$ 取決於半徑 $r$ 與高 $h$:$$\nV = V(r,h) = \\pi r^2 h\n$$我們說 $V$ 是 $r,h$ 的函數。", + "newline": "false", + "runs": [ + { + "text": "圓柱體的體積 " + }, + { + "latex": "$V$", + "kind": "math" + }, + { + "text": " 取決於半徑 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 與高 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\nV = V(r,h) = \\pi r^2 h\n$$", + "kind": "math_block" + }, + { + "text": "我們說 " + }, + { + "latex": "$V$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$r,h$", + "kind": "math" + }, + { + "text": " 的函數。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 二變數函數", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 二變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id2" + }, + { + "type": "card", + "kind": "定義", + "headline": "二變數函數", + "body": [ + { + "type": "paragraph", + "content": "對集合 $D$ 中的每一個有序實數對 $(x,y)$ 指派一個唯一的實數,記為 $f(x,y)$。集合 $D$ 稱為 $f$ 的定義域(domain),而 $f$ 的值域(range)是所有可能取到的值:$$\n\\{f(x,y) \\mid (x,y) \\in D\\}\n$$我們常寫 $z = f(x,y)$。變數 $x,y$ 為自變數(independent variable),$z$ 為應變數(dependent variable)。", + "newline": "false", + "runs": [ + { + "text": "對集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 中的每一個有序實數對 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 指派一個唯一的實數,記為 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 稱為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "定義域(domain)", + "style": "bold" + }, + { + "text": ",而 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "值域(range)", + "style": "bold" + }, + { + "text": "是所有可能取到的值:" + }, + { + "latex": "$$\n\\{f(x,y) \\mid (x,y) \\in D\\}\n$$", + "kind": "math_block" + }, + { + "text": "我們常寫 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "變數 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為自變數(independent variable),", + "style": "bold" + }, + { + "latex": "$z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為應變數(dependent variable)。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:\n\n\n\n\n**Step 1:計算 $f(3,2)$**\n\n$$f(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}$$\n\n**Step 2:找定義域**\n\n函數要有意義,需要同時滿足:\n- 分母不為零:$x \\neq 1$\n- 根號內非負:$x + y + 1 \\geq 0$\n\n因此定義域為:\n$$D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$$\n\n也就是直線 $y = -x-1$ 上方(含直線本身)的區域,但要去掉 $x = 1$ 這條直線上的點。\n\n函數圖形:\n\n\n定義域圖形:\n\n\n\n\n\n\n函數 $f$ 要有意義,分母需滿足什麼條件?\n\na. 等於 0\nb. 不為 0\nc. 無法確定\n\n\n\n\n根號內需滿足什麼條件?\n\na. 等於 0\nb. 大於 0\nc. 小於 0\nd. 大於等於 0\n\n\n\n\n因此定義域為 $D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$。\n\n函數圖形:\n\n\n定義域圖形:\n\n\n\n\n\n---\n\n### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n\n\n\n**Step 1:拆分觀察**\n\n$$f(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)$$\n\n**Step 2:分析每一部分的範圍**\n\n利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得:\n $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$\n\n**Step 3:合併得值域**\n\n$$f_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}$$\n\n因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n\n$\\sin x + \\cos x$ 在 $[0,2\\pi]$ 中,最大值出現在 $x = ?$(以 $\\pi$(pi) 表示)\n\n\n\n\n\n在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。\n\n則 $f(x,y)$ 的值域為?\n\na. $[-2\\sqrt{2},\\ 2\\sqrt{2}]$\nb. $[-\\sqrt{2},\\ \\sqrt{2}]$\nc. $(-2\\sqrt{2},\\ 2\\sqrt{2})$\nd. 好難喔我不知道 QQ\n\n\n\n\n值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n---\n\n\n註解\n§1 小結\n- 二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$\n- **定義域**:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)\n- **值域**:$f$ 所有可能取到的值的集合\n\n\n---\n\n## 2️⃣ 函數圖\n\n\n定義\n圖(Graph)\n函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:\n$$\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}$$\n\n\n---\n\n### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id3" + }, + { + "type": "paragraph", + "content": "對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。", + "newline": "false", + "runs": [ + { + "text": "對函數 " + }, + { + "latex": "$f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$", + "kind": "math" + }, + { + "text": ",計算 " + }, + { + "latex": "$f(3,2)$", + "kind": "math" + }, + { + "text": ",並找出其定義域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出 " + }, + { + "latex": "$f(3,2)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "sqrt(6)/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1dc21b0a15", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算 $f(3,2)$", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算 ", + "style": "bold" + }, + { + "latex": "$f(3,2)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:找定義域", + "newline": "false", + "runs": [ + { + "text": "Step 2:找定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數要有意義,需要同時滿足:", + "newline": "false", + "runs": [ + { + "text": "函數要有意義,需要同時滿足:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "分母不為零:" + }, + { + "latex": "$x \\neq 1$", + "kind": "math" + } + ], + "content": "分母不為零:$x \\neq 1$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "根號內非負:" + }, + { + "latex": "$x + y + 1 \\geq 0$", + "kind": "math" + } + ], + "content": "根號內非負:$x + y + 1 \\geq 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此定義域為:$$\nD = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "因此定義域為:" + }, + { + "latex": "$$\nD = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是直線 $y = -x-1$ 上方(含直線本身)的區域,但要去掉 $x = 1$ 這條直線上的點。", + "newline": "false", + "runs": [ + { + "text": "也就是直線 " + }, + { + "latex": "$y = -x-1$", + "kind": "math" + }, + { + "text": " 上方(含直線本身)的區域,但要去掉 " + }, + { + "latex": "$x = 1$", + "kind": "math" + }, + { + "text": " 這條直線上的點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域圖形:", + "newline": "false", + "runs": [ + { + "text": "定義域圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1_2.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ac0019c202", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-1", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-1::step-1::q1", + "prompt_runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 要有意義,分母需滿足什麼條件?" + } + ], + "options": [ + { + "key": "a", + "text": "等於 0" + }, + { + "key": "b", + "text": "不為 0" + }, + { + "key": "c", + "text": "無法確定" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-1", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-1::step-2::q2", + "prompt_runs": [ + { + "text": "根號內需滿足什麼條件?" + } + ], + "options": [ + { + "key": "a", + "text": "等於 0" + }, + { + "key": "b", + "text": "大於 0" + }, + { + "key": "c", + "text": "小於 0" + }, + { + "key": "d", + "text": "大於等於 0" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "flow": "flow-1", + "step": "step-2" + } + ], + "gate_from": "flow-1::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "因此定義域為 $D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$。", + "newline": "false", + "runs": [ + { + "text": "因此定義域為 " + }, + { + "latex": "$D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域圖形:", + "newline": "false", + "runs": [ + { + "text": "定義域圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1_2.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-1::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n\n\n\n**Step 1:拆分觀察**\n\n$$f(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)$$\n\n**Step 2:分析每一部分的範圍**\n\n利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得:\n $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$\n\n**Step 3:合併得值域**\n\n$$f_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}$$\n\n因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n\n$\\sin x + \\cos x$ 在 $[0,2\\pi]$ 中,最大值出現在 $x = ?$(以 $\\pi$(pi) 表示)\n\n\n\n\n\n在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。\n\n則 $f(x,y)$ 的值域為?\n\na. $[-2\\sqrt{2},\\ 2\\sqrt{2}]$\nb. $[-\\sqrt{2},\\ \\sqrt{2}]$\nc. $(-2\\sqrt{2},\\ 2\\sqrt{2})$\nd. 好難喔我不知道 QQ\n\n\n\n\n值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n---\n\n\n註解\n§1 小結\n- 二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$\n- **定義域**:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)\n- **值域**:$f$ 所有可能取到的值的集合\n\n\n---\n\n## 2️⃣ 函數圖\n\n\n定義\n圖(Graph)\n函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:\n$$\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}$$\n\n\n---\n\n### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id4" + }, + { + "type": "paragraph", + "content": "$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。", + "newline": "false", + "runs": [ + { + "latex": "$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x \\in [0,2\\pi]$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y \\in [0,2\\pi]$", + "kind": "math" + }, + { + "text": ",找出其值域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著找出值域的最大值:" + } + ], + "answers": [ + "2*sqrt(2)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入最大值", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f93a0cb03f", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:拆分觀察", + "newline": "false", + "runs": [ + { + "text": "Step 1:拆分觀察", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:分析每一部分的範圍", + "newline": "false", + "runs": [ + { + "text": "Step 2:分析每一部分的範圍", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得: $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$", + "newline": "false", + "runs": [ + { + "text": "利用 " + }, + { + "latex": "$\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$", + "kind": "math" + }, + { + "text": ",得: " + }, + { + "latex": "$-\\sin t + \\cos t$", + "kind": "math" + }, + { + "text": " 的最大值為 " + }, + { + "latex": "$\\sqrt{2}$", + "kind": "math" + }, + { + "text": "(在 " + }, + { + "latex": "$t = \\frac{\\pi}{4}$", + "kind": "math" + }, + { + "text": " 時),最小值為 " + }, + { + "latex": "$-\\sqrt{2}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:合併得值域", + "newline": "false", + "runs": [ + { + "text": "Step 3:合併得值域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。", + "newline": "false", + "runs": [ + { + "text": "因此值域為 " + }, + { + "latex": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖:", + "newline": "false", + "runs": [ + { + "text": "函數圖:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex2.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0c971f1354", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-2", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-2::step-1::q1", + "prompt_runs": [ + { + "latex": "$\\sin x + \\cos x$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$[0,2\\pi]$", + "kind": "math" + }, + { + "text": " 中,最大值出現在 " + }, + { + "latex": "$x = ?$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$\\pi$", + "kind": "math" + }, + { + "text": "(pi) 表示)" + } + ], + "answers": [ + "pi/4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入弧度", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-2", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。", + "newline": "false", + "runs": [ + { + "text": "在 " + }, + { + "latex": "$x = \\dfrac{\\pi}{4}$", + "kind": "math" + }, + { + "text": " 時最大值為 " + }, + { + "latex": "$\\sqrt{2}$", + "kind": "math" + }, + { + "text": ",最小值為 " + }, + { + "latex": "$-\\sqrt{2}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-2::step-2::q2", + "prompt_runs": [ + { + "text": "則 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值域為?" + } + ], + "options": [ + { + "key": "a", + "text": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$" + }, + { + "key": "b", + "text": "$[-\\sqrt{2},\\ \\sqrt{2}]$" + }, + { + "key": "c", + "text": "$(-2\\sqrt{2},\\ 2\\sqrt{2})$" + }, + { + "key": "d", + "text": "好難喔我不知道 QQ" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-2", + "step": "step-2" + } + ], + "gate_from": "flow-2::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖:", + "newline": "false", + "runs": [ + { + "text": "函數圖:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex2.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-2::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "二變數函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ":一個輸入對 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ",一個輸出 " + }, + { + "latex": "$z$", + "kind": "math" + } + ], + "content": "二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "定義域", + "style": "bold" + }, + { + "text": ":所有使函數有意義的 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的集合(注意分母 " + }, + { + "latex": "$\\neq 0$", + "kind": "math" + }, + { + "text": "、根號內 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": "、對數內 " + }, + { + "latex": "$> 0$", + "kind": "math" + }, + { + "text": ")" + } + ], + "content": "定義域:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "值域", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 所有可能取到的值的集合" + } + ], + "content": "值域:$f$ 所有可能取到的值的集合" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 函數圖", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 函數圖", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id5" + }, + { + "type": "card", + "kind": "定義", + "headline": "圖(Graph)", + "body": [ + { + "type": "paragraph", + "content": "函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:$$\n\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的圖是 " + }, + { + "latex": "$\\mathbb{R}^3$", + "kind": "math" + }, + { + "text": " 空間中所有點 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 的集合,使得 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id6" + }, + { + "type": "paragraph", + "content": "畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$f(x,y) = 6 - 3x - 2y$", + "kind": "math" + }, + { + "text": " 的圖。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0a6ce086fa", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:找三個截距", + "newline": "false", + "runs": [ + { + "text": "Step 1:找三個截距", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令不同的兩個變數為 0,找截距:", + "newline": "false", + "runs": [ + { + "text": "令不同的兩個變數為 0,找截距:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$y = z = 0 \\Rightarrow x = 2$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(2,0,0)$", + "kind": "math" + } + ], + "content": "$y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$x = z = 0 \\Rightarrow y = 3$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(0,3,0)$", + "kind": "math" + } + ], + "content": "$x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$x = y = 0 \\Rightarrow z = 6$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(0,0,6)$", + "kind": "math" + } + ], + "content": "$x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:連接三點畫出平面", + "newline": "false", + "runs": [ + { + "text": "Step 2:連接三點畫出平面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex3.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "其他", + "headline": "備註", + "body": [ + { + "type": "paragraph", + "content": "$f(x,y) = ax + by + c$ 這種函數稱為線性函數(Linear function),其圖形是一個平面,方程式為 $ax + by - z + c = 0$。", + "newline": "false", + "runs": [ + { + "latex": "$f(x,y) = ax + by + c$", + "kind": "math" + }, + { + "text": " 這種函數稱為" + }, + { + "text": "線性函數(Linear function)", + "style": "bold" + }, + { + "text": ",其圖形是一個平面,方程式為 " + }, + { + "latex": "$ax + by - z + c = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "投影法", + "newline": "true", + "runs": [ + { + "text": "投影法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id7" + }, + { + "type": "paragraph", + "content": "投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。", + "newline": "false", + "runs": [ + { + "text": "投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 " + }, + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面,就是讓 " + }, + { + "latex": "$z = 0$", + "kind": "math" + }, + { + "text": ",使空間點 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 變換為 " + }, + { + "latex": "$(x,y,0)$", + "kind": "math" + }, + { + "text": "。我們也可以投影在 " + }, + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面,有助於直觀地想像立體形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id8" + }, + { + "type": "paragraph", + "content": "畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$z = 4x^2 + y^2$", + "kind": "math" + }, + { + "text": " 的圖。(投影法)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ed5a7e4802", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:各平面截面", + "newline": "false", + "runs": [ + { + "text": "Step 1:各平面截面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$z = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$4x^2 + y^2 = 0$", + "kind": "math" + }, + { + "text": ",只有原點" + } + ], + "content": "$xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$x = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = y^2$", + "kind": "math" + }, + { + "text": ",拋物線" + } + ], + "content": "$yz$ 平面($x = 0$):$z = y^2$,拋物線" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$y = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = 4x^2$", + "kind": "math" + }, + { + "text": ",拋物線" + } + ], + "content": "$xz$ 平面($y = 0$):$z = 4x^2$,拋物線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:組合想像立體形狀", + "newline": "false", + "runs": [ + { + "text": "Step 2:組合想像立體形狀", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex4.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id9" + }, + { + "type": "paragraph", + "content": "畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$g(x,y) = \\sqrt{9 - x^2 - y^2}$", + "kind": "math" + }, + { + "text": " 的圖,並找出其定義域與值域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出值域的上界:" + } + ], + "answers": [ + "3" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "最大值為", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_06661825f3", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義域", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "根號內需 $\\geq 0$:$$\n9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9\n$$", + "newline": "false", + "runs": [ + { + "text": "根號內需 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:$$\nD = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "定義域為以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 為圓心、半徑為 " + }, + { + "latex": "$3$", + "kind": "math" + }, + { + "text": " 的圓形區域:" + }, + { + "latex": "$$\nD = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:值域", + "newline": "false", + "runs": [ + { + "text": "Step 2:值域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "平方根函數值 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": ",故最小值為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "平方根函數值 $\\geq 0$,故最小值為 $0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "因 " + }, + { + "latex": "$x^2 + y^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$9 - x^2 - y^2 \\leq 9$", + "kind": "math" + }, + { + "text": ",故 " + }, + { + "latex": "$g \\leq 3$", + "kind": "math" + } + ], + "content": "因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "值域為 $[0, 3]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[0, 3]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:函數圖形", + "newline": "false", + "runs": [ + { + "text": "Step 3:函數圖形", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f00059b902", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-3", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "跟 Example 1 一樣,根號內需 $\\geq 0$。", + "newline": "false", + "runs": [ + { + "text": "跟 Example 1 一樣,根號內需 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。", + "newline": "false", + "runs": [ + { + "text": "定義域 " + }, + { + "latex": "$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$", + "kind": "math" + }, + { + "text": ",這是圓心 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": "、半徑 " + }, + { + "latex": "$3$", + "kind": "math" + }, + { + "text": " 的圓。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-3::step-1::q1", + "prompt_runs": [ + { + "latex": "$z = \\sqrt{9 - x^2 - y^2} \\geq 0$", + "kind": "math" + }, + { + "text": ",所以最小值為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。那 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的最大值是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\infty$" + }, + { + "key": "b", + "text": "$3$" + }, + { + "key": "c", + "text": "$9$" + }, + { + "key": "d", + "text": "好難喔我不知道 QQ" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-3", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$9 - x^2 - y^2 \\leq 9$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$\\sqrt{9-x^2-y^2} \\leq 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "值域為 $[0, 3]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[0, 3]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-3::step-1::q1" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c22ef2c49f", + "label": "投影法畫圖", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。", + "newline": "false", + "runs": [ + { + "text": "化簡:" + }, + { + "latex": "$g(x,y) = \\sqrt{9-x^2-y^2}$", + "kind": "math" + }, + { + "text": " 等價於 " + }, + { + "latex": "$x^2 + y^2 + z^2 = 9$", + "kind": "math" + }, + { + "text": "(上半球)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "各平面截面:", + "newline": "false", + "runs": [ + { + "text": "各平面截面:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$z=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$x^2 + y^2 = 9$", + "kind": "math" + }, + { + "text": ",圓形" + } + ], + "content": "$xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = \\sqrt{9-y^2}$", + "kind": "math" + }, + { + "text": ",半圓形" + } + ], + "content": "$yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = \\sqrt{9-x^2}$", + "kind": "math" + }, + { + "text": ",半圓形" + } + ], + "content": "$xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5_2.py", + "call": "make_view", + "kwargs": {} + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§2 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "函數圖在三維空間中是一個曲面" + } + ], + "content": "函數圖在三維空間中是一個曲面" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "投影法:分別令 " + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$z=0$", + "kind": "math" + }, + { + "text": ",觀察各截面形狀,輔助想像立體形狀" + } + ], + "content": "投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "線性函數 " + }, + { + "latex": "$z = ax+by+c$", + "kind": "math" + }, + { + "text": " 的圖形是平面" + } + ], + "content": "線性函數 $z = ax+by+c$ 的圖形是平面" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 等高線(Level Curve)", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 等高線(Level Curve)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id10" + }, + { + "type": "paragraph", + "content": "等高線是地圖上把海拔高度相同的點連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。", + "newline": "false", + "runs": [ + { + "text": "等高線是地圖上把" + }, + { + "text": "海拔高度相同的點", + "style": "bold" + }, + { + "text": "連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "等高線(Level Curve)", + "body": [ + { + "type": "paragraph", + "content": "函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。", + "newline": "false", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的等高線(或稱等值線),就是所有滿足 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": " 的曲線,其中 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 是一個常數。" + } + ] + } + ] + }, + { + "type": "heading", + "level": 3, + "content": "試試看", + "newline": "true", + "runs": [ + { + "text": "試試看", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id11" + }, + { + "type": "paragraph", + "content": "下面請大家輸入各函數,可以觀察該函數的等高線圖:", + "newline": "false", + "runs": [ + { + "text": "下面請大家輸入各函數,可以觀察該函數的等高線圖:" + } + ] + }, + { + "type": "solution", + "uid": "sol_61bc0553d4", + "label": "等高線圖", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/plot.py", + "call": "make_view", + "kwargs": {} + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "其他", + "headline": "備註", + "body": [ + { + "type": "paragraph", + "content": "在畫等高線時,通常會把常數 $k$ 設定成等差遞增或遞減(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。", + "newline": "false", + "runs": [ + { + "text": "在畫等高線時,通常會把常數 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 設定成" + }, + { + "text": "等差遞增或遞減", + "style": "bold" + }, + { + "text": "(例如 " + }, + { + "latex": "$k = -4,-2,0,2,4,\\ldots$", + "kind": "math" + }, + { + "text": "),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id12" + }, + { + "type": "paragraph", + "content": "畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。", + "newline": "false", + "runs": [ + { + "text": "畫出 Example 3 的函數 " + }, + { + "latex": "$f(x,y) = 6 - 3x - 2y$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = -6, 0, 6, 12$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出等高線的斜率:" + } + ], + "answers": [ + "-3/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "斜率", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f739d2a15d", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $f(x,y) = k$:$$\n6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "改成斜截式:$$\ny = -\\frac{3}{2}x + \\frac{6-k}{2}\n$$", + "newline": "false", + "runs": [ + { + "text": "改成斜截式:" + }, + { + "latex": "$$\ny = -\\frac{3}{2}x + \\frac{6-k}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:各條等高線的方程", + "newline": "false", + "runs": [ + { + "text": "Step 2:各條等高線的方程", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若取四個不同的 $k$ 值,例如對應下列方程式:$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "若取四個不同的 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 值,例如對應下列方程式:" + }, + { + "latex": "$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。", + "newline": "false", + "runs": [ + { + "text": "所有等高線斜率均為 " + }, + { + "latex": "$-\\dfrac{3}{2}$", + "kind": "math" + }, + { + "text": ",彼此平行。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex6.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_691c422bc2", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-4", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-4::step-1::q1", + "prompt_runs": [ + { + "text": "等高線方程式為 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ",即:" + } + ], + "answers": [ + "6-3*x-2*y=k" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入方程式", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-4", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-4::step-2::q2", + "prompt_runs": [ + { + "text": "化成斜截式後,這些等高線的斜率是?" + } + ], + "answers": [ + "-3/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入斜率", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-4", + "step": "step-2" + } + ], + "gate_from": "flow-4::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所有等高線斜率相同、截距不同,彼此平行。圖形如下:", + "newline": "false", + "runs": [ + { + "text": "所有等高線斜率相同、截距不同,彼此平行。圖形如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex6.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-4::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id13" + }, + { + "type": "paragraph", + "content": "畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。", + "newline": "false", + "runs": [ + { + "text": "畫出 Example 5 的函數 " + }, + { + "latex": "$g(x,y) = \\sqrt{9 - x^2 - y^2}$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = 0, 1, 2, 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出 " + }, + { + "latex": "$k=1$", + "kind": "math" + }, + { + "text": " 時等高線圓的半徑:" + } + ], + "answers": [ + "2*sqrt(2)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "半徑", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_55d8689a20", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:$$\nx^2 + y^2 = 9 - k^2\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\sqrt{9-x^2-y^2} = k$", + "kind": "math" + }, + { + "text": ",兩邊平方:" + }, + { + "latex": "$$\nx^2 + y^2 = 9 - k^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。", + "newline": "false", + "runs": [ + { + "text": "這是以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 為圓心、半徑 " + }, + { + "latex": "$\\sqrt{9-k^2}$", + "kind": "math" + }, + { + "text": " 的圓(需要 " + }, + { + "latex": "$0 \\leq k \\leq 3$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:各條等高線", + "newline": "false", + "runs": [ + { + "text": "Step 2:各條等高線", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex7.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id14" + }, + { + "type": "paragraph", + "content": "畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$h(x,y) = 4x^2 + y^2$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = 0, 1, 2, 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dae4e9b84b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $4x^2 + y^2 = k$:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$4x^2 + y^2 = k$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$4x^2 + y^2 = 0$", + "kind": "math" + }, + { + "text": ",解為 " + }, + { + "latex": "$(x,y) = (0,0)$", + "kind": "math" + }, + { + "text": "(單點)" + } + ], + "content": "$k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$k > 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$", + "kind": "math" + }, + { + "text": ",橢圓" + } + ], + "content": "$k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:圖形", + "newline": "false", + "runs": [ + { + "text": "Step 2:圖形", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex8.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "提問:為什麼同一個函數的等高線不會重疊、也不會相交呢?", + "newline": "false", + "runs": [ + { + "text": "提問", + "style": "bold" + }, + { + "text": ":為什麼同一個函數的等高線不會重疊、也不會相交呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_25f08fb73e", + "label": "看答案", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。", + "newline": "false", + "runs": [ + { + "text": "對函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",等高線 " + }, + { + "latex": "$f(x,y) = c_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$f(x,y) = c_2$", + "kind": "math" + }, + { + "text": "(" + }, + { + "latex": "$c_1 \\neq c_2$", + "kind": "math" + }, + { + "text": ")若相交,代表存在某點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 同時滿足兩個方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了函數每一組輸入只能對應一個輸出的基本定義。因此等高線不會相交。", + "newline": "false", + "runs": [ + { + "text": "這表示同一個輸入 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": ",函數給出了兩個不同的輸出 " + }, + { + "latex": "$c_1 \\neq c_2$", + "kind": "math" + }, + { + "text": ",違反了" + }, + { + "text": "函數每一組輸入只能對應一個輸出", + "style": "bold" + }, + { + "text": "的基本定義。因此等高線不會相交。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§3 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "等高線 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ":固定函數值,觀察 " + }, + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面上的曲線" + } + ], + "content": "等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "等高線越密集 → 函數在該方向變化越快(坡度越陡)" + } + ], + "content": "等高線越密集 → 函數在該方向變化越快(坡度越陡)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "不同等高線不會相交(函數性質保證)" + } + ], + "content": "不同等高線不會相交(函數性質保證)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓" + } + ], + "content": "常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 三變數函數", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 三變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id15" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數函數", + "body": [ + { + "type": "paragraph", + "content": "對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。變數 $x,y,z$ 為自變數,$w$ 為應變數。", + "newline": "false", + "runs": [ + { + "text": "對集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 中的每一個有序三元組 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 指派一個唯一的實數,記為 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": "。我們常寫 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "變數 ", + "style": "bold" + }, + { + "latex": "$x,y,z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為自變數,", + "style": "bold" + }, + { + "latex": "$w$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為應變數。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id16" + }, + { + "type": "paragraph", + "content": "找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。", + "newline": "false", + "runs": [ + { + "text": "找到函數 " + }, + { + "latex": "$f(x,y,z) = \\ln(z-y) + xy\\sin(z)$", + "kind": "math" + }, + { + "text": " 的定義域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e43e2dbcb9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:分析限制條件", + "newline": "false", + "runs": [ + { + "text": "Step 1:分析限制條件", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。", + "newline": "false", + "runs": [ + { + "latex": "$\\ln$", + "kind": "math" + }, + { + "text": " 的定義域為所有正實數,因此需要 " + }, + { + "latex": "$z - y > 0$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$z > y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$xy\\sin(z)$ 對任意實數都有意義,無額外限制。", + "newline": "false", + "runs": [ + { + "latex": "$xy\\sin(z)$", + "kind": "math" + }, + { + "text": " 對任意實數都有意義,無額外限制。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:寫出定義域", + "newline": "false", + "runs": [ + { + "text": "Step 2:寫出定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是由所有位於平面 $y = z$ 上方的點所組成的半空間(half-space)。", + "newline": "false", + "runs": [ + { + "text": "這是由所有位於平面 " + }, + { + "latex": "$y = z$", + "kind": "math" + }, + { + "text": " 上方的點所組成的" + }, + { + "text": "半空間(half-space)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "備註", + "headline": "半空間(half-space)", + "body": [ + { + "type": "paragraph", + "content": "三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。", + "newline": "false", + "runs": [ + { + "text": "三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。" + } + ] + } + ] + } + ], + "ai_prompt_md": "### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 等值曲面(Level Surface)", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 等值曲面(Level Surface)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id17" + }, + { + "type": "paragraph", + "content": "等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。", + "newline": "false", + "runs": [ + { + "text": "等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": " 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "等值曲面(Level Surface)", + "body": [ + { + "type": "paragraph", + "content": "若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": " 是一個三變數函數,且 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 值域內的一個常數,則方程式 " + }, + { + "latex": "$f(x,y,z) = k$", + "kind": "math" + }, + { + "text": " 在三維空間中所構成的曲面,稱為函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "等值曲面", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id18" + }, + { + "type": "paragraph", + "content": "找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "找到函數 " + }, + { + "latex": "$f(x,y,z) = x^2 + y^2 + z^2$", + "kind": "math" + }, + { + "text": " 的等值曲面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_604b3f3eef", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。", + "newline": "false", + "runs": [ + { + "text": "等值方程式為 " + }, + { + "latex": "$x^2 + y^2 + z^2 = k$", + "kind": "math" + }, + { + "text": "(需 " + }, + { + "latex": "$k \\geq 0$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這些曲面是一族半徑為 $\\sqrt{k}$ 的同心球面。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。", + "newline": "false", + "runs": [ + { + "text": "這些曲面是一族" + }, + { + "text": "半徑為 ", + "style": "bold" + }, + { + "latex": "$\\sqrt{k}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的同心球面", + "style": "bold" + }, + { + "text": "。當 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 在任何一個以原點為球心的球面上變動時,函數值 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 保持不變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex10.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id19" + }, + { + "type": "paragraph", + "content": "描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "描述函數 " + }, + { + "latex": "$f(x,y,z) = x^2 - y - z^2$", + "kind": "math" + }, + { + "text": " 的等值曲面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ae067124a2", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "等值方程式為 $x^2 - y - z^2 = k$,整理後:$$\ny = x^2 - z^2 - k\n$$", + "newline": "false", + "runs": [ + { + "text": "等值方程式為 " + }, + { + "latex": "$x^2 - y - z^2 = k$", + "kind": "math" + }, + { + "text": ",整理後:" + }, + { + "latex": "$$\ny = x^2 - z^2 - k\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是一族雙曲拋物面(hyperbolic paraboloids),下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:", + "newline": "false", + "runs": [ + { + "text": "這是一族" + }, + { + "text": "雙曲拋物面(hyperbolic paraboloids)", + "style": "bold" + }, + { + "text": ",下圖為 " + }, + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$k = \\pm 5$", + "kind": "math" + }, + { + "text": " 時的等值面:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex11.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣ 延伸:多變數函數與向量記號", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 延伸:多變數函數與向量記號", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id20" + }, + { + "type": "heading", + "level": 3, + "content": "多變數函數的一般形式", + "newline": "true", + "runs": [ + { + "text": "多變數函數的一般形式", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id21" + }, + { + "type": "paragraph", + "content": "一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。", + "newline": "false", + "runs": [ + { + "text": "一個 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 變數的函數對每個 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 維向量 " + }, + { + "latex": "$(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$", + "kind": "math" + }, + { + "text": " 指派一個實數 " + }, + { + "latex": "$z = f(x_1,x_2,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "例子:成本函數", + "newline": "true", + "runs": [ + { + "text": "例子:成本函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id22" + }, + { + "type": "paragraph", + "content": "假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:$$\nC = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n\n$$", + "newline": "false", + "runs": [ + { + "text": "假設某產品的製作需要 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 種原料,第 " + }, + { + "latex": "$i$", + "kind": "math" + }, + { + "text": " 種的單位成本為 " + }, + { + "latex": "$c_i$", + "kind": "math" + }, + { + "text": ",使用量為 " + }, + { + "latex": "$x_i$", + "kind": "math" + }, + { + "text": ",則總成本:" + }, + { + "latex": "$$\nC = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "用向量記號寫得更簡潔", + "newline": "true", + "runs": [ + { + "text": "用向量記號寫得更簡潔", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id23" + }, + { + "type": "paragraph", + "content": "令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:$$\nf(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}\n$$其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\mathbf{x} = (x_1,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{c} = (c_1,\\ldots,c_n)$", + "kind": "math" + }, + { + "text": ",則:" + }, + { + "latex": "$$\nf(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\mathbf{c} \\cdot \\mathbf{x}$", + "kind": "math" + }, + { + "text": " 為內積(dot product)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "看待多變數函數的三種觀點", + "newline": "true", + "runs": [ + { + "text": "看待多變數函數的三種觀點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id24" + }, + { + "type": "paragraph", + "content": "同一個函數 $f$,有三種等價說法:", + "newline": "false", + "runs": [ + { + "text": "同一個函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": ",有三種等價說法:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$n$", + "kind": "math", + "style": "bold" + }, + { + "text": " 個實變數的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f(x_1,x_2,\\ldots,x_n)$", + "kind": "math" + } + ], + "content": "$n$ 個實變數的函數:$f(x_1,x_2,\\ldots,x_n)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "「一個點」的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$(x_1,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": " 視為 " + }, + { + "latex": "$\\mathbb{R}^n$", + "kind": "math" + }, + { + "text": " 中的一個點" + } + ], + "content": "「一個點」的函數:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "「一個向量」的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{x}=(x_1,\\ldots,x_n)$", + "kind": "math" + } + ], + "content": "「一個向量」的函數:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "newline": "false", + "runs": [ + { + "text": "熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。" + } + ] + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣ 二變數函數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣ 二變數函數", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 二變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id2" + }, + { + "type": "card", + "kind": "定義", + "headline": "二變數函數", + "body": [ + { + "type": "paragraph", + "content": "對集合 $D$ 中的每一個有序實數對 $(x,y)$ 指派一個唯一的實數,記為 $f(x,y)$。集合 $D$ 稱為 $f$ 的定義域(domain),而 $f$ 的值域(range)是所有可能取到的值:$$\n\\{f(x,y) \\mid (x,y) \\in D\\}\n$$我們常寫 $z = f(x,y)$。變數 $x,y$ 為自變數(independent variable),$z$ 為應變數(dependent variable)。", + "newline": "false", + "runs": [ + { + "text": "對集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 中的每一個有序實數對 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 指派一個唯一的實數,記為 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 稱為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "定義域(domain)", + "style": "bold" + }, + { + "text": ",而 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "值域(range)", + "style": "bold" + }, + { + "text": "是所有可能取到的值:" + }, + { + "latex": "$$\n\\{f(x,y) \\mid (x,y) \\in D\\}\n$$", + "kind": "math_block" + }, + { + "text": "我們常寫 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "變數 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為自變數(independent variable),", + "style": "bold" + }, + { + "latex": "$z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為應變數(dependent variable)。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:\n\n\n\n\n**Step 1:計算 $f(3,2)$**\n\n$$f(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}$$\n\n**Step 2:找定義域**\n\n函數要有意義,需要同時滿足:\n- 分母不為零:$x \\neq 1$\n- 根號內非負:$x + y + 1 \\geq 0$\n\n因此定義域為:\n$$D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$$\n\n也就是直線 $y = -x-1$ 上方(含直線本身)的區域,但要去掉 $x = 1$ 這條直線上的點。\n\n函數圖形:\n\n\n定義域圖形:\n\n\n\n\n\n\n函數 $f$ 要有意義,分母需滿足什麼條件?\n\na. 等於 0\nb. 不為 0\nc. 無法確定\n\n\n\n\n根號內需滿足什麼條件?\n\na. 等於 0\nb. 大於 0\nc. 小於 0\nd. 大於等於 0\n\n\n\n\n因此定義域為 $D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$。\n\n函數圖形:\n\n\n定義域圖形:\n\n\n\n\n\n---\n\n### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n\n\n\n**Step 1:拆分觀察**\n\n$$f(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)$$\n\n**Step 2:分析每一部分的範圍**\n\n利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得:\n $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$\n\n**Step 3:合併得值域**\n\n$$f_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}$$\n\n因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n\n$\\sin x + \\cos x$ 在 $[0,2\\pi]$ 中,最大值出現在 $x = ?$(以 $\\pi$(pi) 表示)\n\n\n\n\n\n在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。\n\n則 $f(x,y)$ 的值域為?\n\na. $[-2\\sqrt{2},\\ 2\\sqrt{2}]$\nb. $[-\\sqrt{2},\\ \\sqrt{2}]$\nc. $(-2\\sqrt{2},\\ 2\\sqrt{2})$\nd. 好難喔我不知道 QQ\n\n\n\n\n值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n---\n\n\n註解\n§1 小結\n- 二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$\n- **定義域**:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)\n- **值域**:$f$ 所有可能取到的值的集合\n\n\n---\n\n## 2️⃣ 函數圖\n\n\n定義\n圖(Graph)\n函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:\n$$\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}$$\n\n\n---\n\n### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id3" + }, + { + "type": "paragraph", + "content": "對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。", + "newline": "false", + "runs": [ + { + "text": "對函數 " + }, + { + "latex": "$f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$", + "kind": "math" + }, + { + "text": ",計算 " + }, + { + "latex": "$f(3,2)$", + "kind": "math" + }, + { + "text": ",並找出其定義域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出 " + }, + { + "latex": "$f(3,2)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "sqrt(6)/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1dc21b0a15", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算 $f(3,2)$", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算 ", + "style": "bold" + }, + { + "latex": "$f(3,2)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(3,2) = \\frac{\\sqrt{3+2+1}}{3-1} = \\frac{\\sqrt{6}}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:找定義域", + "newline": "false", + "runs": [ + { + "text": "Step 2:找定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數要有意義,需要同時滿足:", + "newline": "false", + "runs": [ + { + "text": "函數要有意義,需要同時滿足:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "分母不為零:" + }, + { + "latex": "$x \\neq 1$", + "kind": "math" + } + ], + "content": "分母不為零:$x \\neq 1$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "根號內非負:" + }, + { + "latex": "$x + y + 1 \\geq 0$", + "kind": "math" + } + ], + "content": "根號內非負:$x + y + 1 \\geq 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此定義域為:$$\nD = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "因此定義域為:" + }, + { + "latex": "$$\nD = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是直線 $y = -x-1$ 上方(含直線本身)的區域,但要去掉 $x = 1$ 這條直線上的點。", + "newline": "false", + "runs": [ + { + "text": "也就是直線 " + }, + { + "latex": "$y = -x-1$", + "kind": "math" + }, + { + "text": " 上方(含直線本身)的區域,但要去掉 " + }, + { + "latex": "$x = 1$", + "kind": "math" + }, + { + "text": " 這條直線上的點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域圖形:", + "newline": "false", + "runs": [ + { + "text": "定義域圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1_2.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 1\n\n對函數 $f(x,y) = \\dfrac{\\sqrt{x+y+1}}{x-1}$,計算 $f(3,2)$,並找出其定義域。\n\n請先算出 $f(3,2)$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ac0019c202", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-1", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-1::step-1::q1", + "prompt_runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 要有意義,分母需滿足什麼條件?" + } + ], + "options": [ + { + "key": "a", + "text": "等於 0" + }, + { + "key": "b", + "text": "不為 0" + }, + { + "key": "c", + "text": "無法確定" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-1", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-1::step-2::q2", + "prompt_runs": [ + { + "text": "根號內需滿足什麼條件?" + } + ], + "options": [ + { + "key": "a", + "text": "等於 0" + }, + { + "key": "b", + "text": "大於 0" + }, + { + "key": "c", + "text": "小於 0" + }, + { + "key": "d", + "text": "大於等於 0" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "flow": "flow-1", + "step": "step-2" + } + ], + "gate_from": "flow-1::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "因此定義域為 $D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$。", + "newline": "false", + "runs": [ + { + "text": "因此定義域為 " + }, + { + "latex": "$D = \\{(x,y) \\mid x+y+1 \\geq 0,\\ x \\neq 1\\}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域圖形:", + "newline": "false", + "runs": [ + { + "text": "定義域圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex1_2.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-1::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n\n\n\n**Step 1:拆分觀察**\n\n$$f(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)$$\n\n**Step 2:分析每一部分的範圍**\n\n利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得:\n $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$\n\n**Step 3:合併得值域**\n\n$$f_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}$$\n\n因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n\n$\\sin x + \\cos x$ 在 $[0,2\\pi]$ 中,最大值出現在 $x = ?$(以 $\\pi$(pi) 表示)\n\n\n\n\n\n在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。\n\n則 $f(x,y)$ 的值域為?\n\na. $[-2\\sqrt{2},\\ 2\\sqrt{2}]$\nb. $[-\\sqrt{2},\\ \\sqrt{2}]$\nc. $(-2\\sqrt{2},\\ 2\\sqrt{2})$\nd. 好難喔我不知道 QQ\n\n\n\n\n值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。\n\n函數圖:\n\n\n\n\n\n---\n\n\n註解\n§1 小結\n- 二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$\n- **定義域**:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)\n- **值域**:$f$ 所有可能取到的值的集合\n\n\n---\n\n## 2️⃣ 函數圖\n\n\n定義\n圖(Graph)\n函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:\n$$\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}$$\n\n\n---\n\n### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id4" + }, + { + "type": "paragraph", + "content": "$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。", + "newline": "false", + "runs": [ + { + "latex": "$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x \\in [0,2\\pi]$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y \\in [0,2\\pi]$", + "kind": "math" + }, + { + "text": ",找出其值域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著找出值域的最大值:" + } + ], + "answers": [ + "2*sqrt(2)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入最大值", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f93a0cb03f", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:拆分觀察", + "newline": "false", + "runs": [ + { + "text": "Step 1:拆分觀察", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,y) = (\\sin x + \\cos x) + (\\sin y + \\cos y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:分析每一部分的範圍", + "newline": "false", + "runs": [ + { + "text": "Step 2:分析每一部分的範圍", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "利用 $\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$,得: $-\\sin t + \\cos t$ 的最大值為 $\\sqrt{2}$(在 $t = \\frac{\\pi}{4}$ 時),最小值為 $-\\sqrt{2}$", + "newline": "false", + "runs": [ + { + "text": "利用 " + }, + { + "latex": "$\\sin t + \\cos t = \\sqrt{2}\\sin\\!\\left(t + \\frac{\\pi}{4}\\right)$", + "kind": "math" + }, + { + "text": ",得: " + }, + { + "latex": "$-\\sin t + \\cos t$", + "kind": "math" + }, + { + "text": " 的最大值為 " + }, + { + "latex": "$\\sqrt{2}$", + "kind": "math" + }, + { + "text": "(在 " + }, + { + "latex": "$t = \\frac{\\pi}{4}$", + "kind": "math" + }, + { + "text": " 時),最小值為 " + }, + { + "latex": "$-\\sqrt{2}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:合併得值域", + "newline": "false", + "runs": [ + { + "text": "Step 3:合併得值域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_{\\min} = -\\sqrt{2} + (-\\sqrt{2}) = -2\\sqrt{2}, \\qquad f_{\\max} = \\sqrt{2} + \\sqrt{2} = 2\\sqrt{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。", + "newline": "false", + "runs": [ + { + "text": "因此值域為 " + }, + { + "latex": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖:", + "newline": "false", + "runs": [ + { + "text": "函數圖:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex2.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 2\n\n$f(x,y) = \\sin x + \\cos x + \\sin y + \\cos y$,$x \\in [0,2\\pi]$,$y \\in [0,2\\pi]$,找出其值域。\n\n請先試著找出值域的最大值:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0c971f1354", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-2", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-2::step-1::q1", + "prompt_runs": [ + { + "latex": "$\\sin x + \\cos x$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$[0,2\\pi]$", + "kind": "math" + }, + { + "text": " 中,最大值出現在 " + }, + { + "latex": "$x = ?$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$\\pi$", + "kind": "math" + }, + { + "text": "(pi) 表示)" + } + ], + "answers": [ + "pi/4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入弧度", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-2", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "在 $x = \\dfrac{\\pi}{4}$ 時最大值為 $\\sqrt{2}$,最小值為 $-\\sqrt{2}$。", + "newline": "false", + "runs": [ + { + "text": "在 " + }, + { + "latex": "$x = \\dfrac{\\pi}{4}$", + "kind": "math" + }, + { + "text": " 時最大值為 " + }, + { + "latex": "$\\sqrt{2}$", + "kind": "math" + }, + { + "text": ",最小值為 " + }, + { + "latex": "$-\\sqrt{2}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-2::step-2::q2", + "prompt_runs": [ + { + "text": "則 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值域為?" + } + ], + "options": [ + { + "key": "a", + "text": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$" + }, + { + "key": "b", + "text": "$[-\\sqrt{2},\\ \\sqrt{2}]$" + }, + { + "key": "c", + "text": "$(-2\\sqrt{2},\\ 2\\sqrt{2})$" + }, + { + "key": "d", + "text": "好難喔我不知道 QQ" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-2", + "step": "step-2" + } + ], + "gate_from": "flow-2::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "值域為 $[-2\\sqrt{2},\\ 2\\sqrt{2}]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[-2\\sqrt{2},\\ 2\\sqrt{2}]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖:", + "newline": "false", + "runs": [ + { + "text": "函數圖:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex2.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-2::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "二變數函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ":一個輸入對 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ",一個輸出 " + }, + { + "latex": "$z$", + "kind": "math" + } + ], + "content": "二變數函數 $z = f(x,y)$:一個輸入對 $(x,y)$,一個輸出 $z$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "定義域", + "style": "bold" + }, + { + "text": ":所有使函數有意義的 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的集合(注意分母 " + }, + { + "latex": "$\\neq 0$", + "kind": "math" + }, + { + "text": "、根號內 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": "、對數內 " + }, + { + "latex": "$> 0$", + "kind": "math" + }, + { + "text": ")" + } + ], + "content": "定義域:所有使函數有意義的 $(x,y)$ 的集合(注意分母 $\\neq 0$、根號內 $\\geq 0$、對數內 $> 0$)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "值域", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 所有可能取到的值的集合" + } + ], + "content": "值域:$f$ 所有可能取到的值的集合" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣ 函數圖", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣ 函數圖", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 函數圖", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id5" + }, + { + "type": "card", + "kind": "定義", + "headline": "圖(Graph)", + "body": [ + { + "type": "paragraph", + "content": "函數 $f$ 的圖是 $\\mathbb{R}^3$ 空間中所有點 $(x,y,z)$ 的集合,使得 $z = f(x,y)$ 且 $(x,y) \\in D$:$$\n\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的圖是 " + }, + { + "latex": "$\\mathbb{R}^3$", + "kind": "math" + }, + { + "text": " 空間中所有點 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 的集合,使得 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\{(x,y,z) \\mid (x,y) \\in D,\\ z = f(x,y)\\}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。\n\n\n**Step 1:找三個截距**\n\n令不同的兩個變數為 0,找截距:\n- $y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$\n- $x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$\n- $x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$\n\n**Step 2:連接三點畫出平面**\n\n\n\n\n其他\n備註\n$f(x,y) = ax + by + c$ 這種函數稱為**線性函數(Linear function)**,其圖形是一個平面,方程式為 $ax + by - z + c = 0$。\n\n\n\n---\n\n### 投影法\n\n投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。\n\n---\n\n### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id6" + }, + { + "type": "paragraph", + "content": "畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$f(x,y) = 6 - 3x - 2y$", + "kind": "math" + }, + { + "text": " 的圖。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0a6ce086fa", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:找三個截距", + "newline": "false", + "runs": [ + { + "text": "Step 1:找三個截距", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令不同的兩個變數為 0,找截距:", + "newline": "false", + "runs": [ + { + "text": "令不同的兩個變數為 0,找截距:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$y = z = 0 \\Rightarrow x = 2$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(2,0,0)$", + "kind": "math" + } + ], + "content": "$y = z = 0 \\Rightarrow x = 2$,即點 $(2,0,0)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$x = z = 0 \\Rightarrow y = 3$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(0,3,0)$", + "kind": "math" + } + ], + "content": "$x = z = 0 \\Rightarrow y = 3$,即點 $(0,3,0)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$x = y = 0 \\Rightarrow z = 6$", + "kind": "math" + }, + { + "text": ",即點 " + }, + { + "latex": "$(0,0,6)$", + "kind": "math" + } + ], + "content": "$x = y = 0 \\Rightarrow z = 6$,即點 $(0,0,6)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:連接三點畫出平面", + "newline": "false", + "runs": [ + { + "text": "Step 2:連接三點畫出平面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex3.py", + "call": "make_view", + "kwargs": {} + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "其他", + "headline": "備註", + "body": [ + { + "type": "paragraph", + "content": "$f(x,y) = ax + by + c$ 這種函數稱為線性函數(Linear function),其圖形是一個平面,方程式為 $ax + by - z + c = 0$。", + "newline": "false", + "runs": [ + { + "latex": "$f(x,y) = ax + by + c$", + "kind": "math" + }, + { + "text": " 這種函數稱為" + }, + { + "text": "線性函數(Linear function)", + "style": "bold" + }, + { + "text": ",其圖形是一個平面,方程式為 " + }, + { + "latex": "$ax + by - z + c = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n畫出函數 $f(x,y) = 6 - 3x - 2y$ 的圖。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "投影法", + "newline": "true", + "runs": [ + { + "text": "投影法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id7" + }, + { + "type": "paragraph", + "content": "投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 $xy$ 平面,就是讓 $z = 0$,使空間點 $(x,y,z)$ 變換為 $(x,y,0)$。我們也可以投影在 $xz$ 或 $yz$ 平面,有助於直觀地想像立體形狀。", + "newline": "false", + "runs": [ + { + "text": "投影法是將三維空間中的物體映射至二維平面的方式。若將物體正交投影至 " + }, + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面,就是讓 " + }, + { + "latex": "$z = 0$", + "kind": "math" + }, + { + "text": ",使空間點 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 變換為 " + }, + { + "latex": "$(x,y,0)$", + "kind": "math" + }, + { + "text": "。我們也可以投影在 " + }, + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面,有助於直觀地想像立體形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)\n\n\n**Step 1:各平面截面**\n\n- $xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點\n- $yz$ 平面($x = 0$):$z = y^2$,拋物線\n- $xz$ 平面($y = 0$):$z = 4x^2$,拋物線\n\n**Step 2:組合想像立體形狀**\n\n\n\n\n---\n\n### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id8" + }, + { + "type": "paragraph", + "content": "畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$z = 4x^2 + y^2$", + "kind": "math" + }, + { + "text": " 的圖。(投影法)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ed5a7e4802", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:各平面截面", + "newline": "false", + "runs": [ + { + "text": "Step 1:各平面截面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$z = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$4x^2 + y^2 = 0$", + "kind": "math" + }, + { + "text": ",只有原點" + } + ], + "content": "$xy$ 平面($z = 0$):$4x^2 + y^2 = 0$,只有原點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$x = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = y^2$", + "kind": "math" + }, + { + "text": ",拋物線" + } + ], + "content": "$yz$ 平面($x = 0$):$z = y^2$,拋物線" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$y = 0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = 4x^2$", + "kind": "math" + }, + { + "text": ",拋物線" + } + ], + "content": "$xz$ 平面($y = 0$):$z = 4x^2$,拋物線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:組合想像立體形狀", + "newline": "false", + "runs": [ + { + "text": "Step 2:組合想像立體形狀", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex4.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 4\n\n畫出函數 $z = 4x^2 + y^2$ 的圖。(投影法)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n\n\n\n**Step 1:定義域**\n\n根號內需 $\\geq 0$:\n$$9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9$$\n\n定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:\n$$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$$\n\n**Step 2:值域**\n\n- 平方根函數值 $\\geq 0$,故最小值為 $0$\n- 因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$\n\n值域為 $[0, 3]$。\n\n**Step 3:函數圖形**\n\n\n\n\n\n\n\n跟 Example 1 一樣,根號內需 $\\geq 0$。\n\n定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。\n\n$z = \\sqrt{9 - x^2 - y^2} \\geq 0$,所以最小值為 $0$。那 $z$ 的最大值是?\n\na. $\\infty$\nb. $3$\nc. $9$\nd. 好難喔我不知道 QQ\n\n\n\n\n因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。\n\n值域為 $[0, 3]$。\n\n函數圖形:\n\n\n\n\n\n\n化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。\n\n各平面截面:\n- $xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形\n- $yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形\n- $xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形\n\n\n\n\n---\n\n\n註解\n§2 小結\n- 函數圖在三維空間中是一個曲面\n- 投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀\n- 線性函數 $z = ax+by+c$ 的圖形是平面\n\n\n---\n\n## 3️⃣ 等高線(Level Curve)\n\n等高線是地圖上把**海拔高度相同的點**連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。\n\n\n定義\n等高線(Level Curve)\n函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。\n\n\n### 試試看\n\n下面請大家輸入各函數,可以觀察該函數的等高線圖:\n\n\n\n\n\n其他\n備註\n在畫等高線時,通常會把常數 $k$ 設定成**等差遞增或遞減**(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。\n\n\n---\n\n### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id9" + }, + { + "type": "paragraph", + "content": "畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$g(x,y) = \\sqrt{9 - x^2 - y^2}$", + "kind": "math" + }, + { + "text": " 的圖,並找出其定義域與值域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出值域的上界:" + } + ], + "answers": [ + "3" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "最大值為", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_06661825f3", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義域", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "根號內需 $\\geq 0$:$$\n9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9\n$$", + "newline": "false", + "runs": [ + { + "text": "根號內需 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n9 - x^2 - y^2 \\geq 0 \\implies x^2 + y^2 \\leq 9\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域為以 $(0,0)$ 為圓心、半徑為 $3$ 的圓形區域:$$\nD = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}\n$$", + "newline": "false", + "runs": [ + { + "text": "定義域為以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 為圓心、半徑為 " + }, + { + "latex": "$3$", + "kind": "math" + }, + { + "text": " 的圓形區域:" + }, + { + "latex": "$$\nD = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:值域", + "newline": "false", + "runs": [ + { + "text": "Step 2:值域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "平方根函數值 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": ",故最小值為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "平方根函數值 $\\geq 0$,故最小值為 $0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "因 " + }, + { + "latex": "$x^2 + y^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$9 - x^2 - y^2 \\leq 9$", + "kind": "math" + }, + { + "text": ",故 " + }, + { + "latex": "$g \\leq 3$", + "kind": "math" + } + ], + "content": "因 $x^2 + y^2 \\geq 0$,所以 $9 - x^2 - y^2 \\leq 9$,故 $g \\leq 3$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "值域為 $[0, 3]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[0, 3]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:函數圖形", + "newline": "false", + "runs": [ + { + "text": "Step 3:函數圖形", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 5\n\n畫出函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的圖,並找出其定義域與值域。\n\n請先算出值域的上界:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f00059b902", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-3", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "跟 Example 1 一樣,根號內需 $\\geq 0$。", + "newline": "false", + "runs": [ + { + "text": "跟 Example 1 一樣,根號內需 " + }, + { + "latex": "$\\geq 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "定義域 $D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$,這是圓心 $(0,0)$、半徑 $3$ 的圓。", + "newline": "false", + "runs": [ + { + "text": "定義域 " + }, + { + "latex": "$D = \\{(x,y) \\mid x^2 + y^2 \\leq 9\\}$", + "kind": "math" + }, + { + "text": ",這是圓心 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": "、半徑 " + }, + { + "latex": "$3$", + "kind": "math" + }, + { + "text": " 的圓。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-3::step-1::q1", + "prompt_runs": [ + { + "latex": "$z = \\sqrt{9 - x^2 - y^2} \\geq 0$", + "kind": "math" + }, + { + "text": ",所以最小值為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。那 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的最大值是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\infty$" + }, + { + "key": "b", + "text": "$3$" + }, + { + "key": "c", + "text": "$9$" + }, + { + "key": "d", + "text": "好難喔我不知道 QQ" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-3", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "因為 $9 - x^2 - y^2 \\leq 9$,所以 $\\sqrt{9-x^2-y^2} \\leq 3$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$9 - x^2 - y^2 \\leq 9$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$\\sqrt{9-x^2-y^2} \\leq 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "值域為 $[0, 3]$。", + "newline": "false", + "runs": [ + { + "text": "值域為 " + }, + { + "latex": "$[0, 3]$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "函數圖形:", + "newline": "false", + "runs": [ + { + "text": "函數圖形:" + } + ] + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-3::step-1::q1" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c22ef2c49f", + "label": "投影法畫圖", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "化簡:$g(x,y) = \\sqrt{9-x^2-y^2}$ 等價於 $x^2 + y^2 + z^2 = 9$(上半球)。", + "newline": "false", + "runs": [ + { + "text": "化簡:" + }, + { + "latex": "$g(x,y) = \\sqrt{9-x^2-y^2}$", + "kind": "math" + }, + { + "text": " 等價於 " + }, + { + "latex": "$x^2 + y^2 + z^2 = 9$", + "kind": "math" + }, + { + "text": "(上半球)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "各平面截面:", + "newline": "false", + "runs": [ + { + "text": "各平面截面:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$z=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$x^2 + y^2 = 9$", + "kind": "math" + }, + { + "text": ",圓形" + } + ], + "content": "$xy$ 平面($z=0$):$x^2 + y^2 = 9$,圓形" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$yz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = \\sqrt{9-y^2}$", + "kind": "math" + }, + { + "text": ",半圓形" + } + ], + "content": "$yz$ 平面($x=0$):$z = \\sqrt{9-y^2}$,半圓形" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$xz$", + "kind": "math" + }, + { + "text": " 平面(" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$z = \\sqrt{9-x^2}$", + "kind": "math" + }, + { + "text": ",半圓形" + } + ], + "content": "$xz$ 平面($y=0$):$z = \\sqrt{9-x^2}$,半圓形" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex5_2.py", + "call": "make_view", + "kwargs": {} + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§2 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "函數圖在三維空間中是一個曲面" + } + ], + "content": "函數圖在三維空間中是一個曲面" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "投影法:分別令 " + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$z=0$", + "kind": "math" + }, + { + "text": ",觀察各截面形狀,輔助想像立體形狀" + } + ], + "content": "投影法:分別令 $x=0$、$y=0$、$z=0$,觀察各截面形狀,輔助想像立體形狀" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "線性函數 " + }, + { + "latex": "$z = ax+by+c$", + "kind": "math" + }, + { + "text": " 的圖形是平面" + } + ], + "content": "線性函數 $z = ax+by+c$ 的圖形是平面" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣ 等高線(Level Curve)", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣ 等高線(Level Curve)", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 等高線(Level Curve)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id10" + }, + { + "type": "paragraph", + "content": "等高線是地圖上把海拔高度相同的點連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。", + "newline": "false", + "runs": [ + { + "text": "等高線是地圖上把" + }, + { + "text": "海拔高度相同的點", + "style": "bold" + }, + { + "text": "連起來得到的閉合曲線,用來描述地表的高低起伏。等高線越密集,代表坡度越陡。在天氣預報的等壓線圖中也能看到類似概念。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "等高線(Level Curve)", + "body": [ + { + "type": "paragraph", + "content": "函數 $f$ 的等高線(或稱等值線),就是所有滿足 $f(x,y) = k$ 的曲線,其中 $k$ 是一個常數。", + "newline": "false", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的等高線(或稱等值線),就是所有滿足 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": " 的曲線,其中 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 是一個常數。" + } + ] + } + ] + }, + { + "type": "heading", + "level": 3, + "content": "試試看", + "newline": "true", + "runs": [ + { + "text": "試試看", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id11" + }, + { + "type": "paragraph", + "content": "下面請大家輸入各函數,可以觀察該函數的等高線圖:", + "newline": "false", + "runs": [ + { + "text": "下面請大家輸入各函數,可以觀察該函數的等高線圖:" + } + ] + }, + { + "type": "solution", + "uid": "sol_61bc0553d4", + "label": "等高線圖", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/plot.py", + "call": "make_view", + "kwargs": {} + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "其他", + "headline": "備註", + "body": [ + { + "type": "paragraph", + "content": "在畫等高線時,通常會把常數 $k$ 設定成等差遞增或遞減(例如 $k = -4,-2,0,2,4,\\ldots$),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。", + "newline": "false", + "runs": [ + { + "text": "在畫等高線時,通常會把常數 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 設定成" + }, + { + "text": "等差遞增或遞減", + "style": "bold" + }, + { + "text": "(例如 " + }, + { + "latex": "$k = -4,-2,0,2,4,\\ldots$", + "kind": "math" + }, + { + "text": "),讓每一條等高線之間的函數值差距一樣大。這樣可以藉由等高線的疏密,直觀地比較哪裡變化快、哪裡變化慢。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $f(x,y) = k$:\n$$6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0$$\n\n改成斜截式:\n$$y = -\\frac{3}{2}x + \\frac{6-k}{2}$$\n\n**Step 2:各條等高線的方程**\n\n若取四個不同的 $k$ 值,例如對應下列方程式:\n$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$\n\n所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。\n\n\n\n\n\n\n\n等高線方程式為 $f(x,y) = k$,即:\n\n\n\n\n\n化成斜截式後,這些等高線的斜率是?\n\n\n\n\n\n所有等高線斜率相同、截距不同,彼此平行。圖形如下:\n\n\n\n\n\n\n---\n\n### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id12" + }, + { + "type": "paragraph", + "content": "畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。", + "newline": "false", + "runs": [ + { + "text": "畫出 Example 3 的函數 " + }, + { + "latex": "$f(x,y) = 6 - 3x - 2y$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = -6, 0, 6, 12$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出等高線的斜率:" + } + ], + "answers": [ + "-3/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "斜率", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f739d2a15d", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $f(x,y) = k$:$$\n6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n6 - 3x - 2y = k \\implies 3x + 2y + (k-6) = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "改成斜截式:$$\ny = -\\frac{3}{2}x + \\frac{6-k}{2}\n$$", + "newline": "false", + "runs": [ + { + "text": "改成斜截式:" + }, + { + "latex": "$$\ny = -\\frac{3}{2}x + \\frac{6-k}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:各條等高線的方程", + "newline": "false", + "runs": [ + { + "text": "Step 2:各條等高線的方程", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若取四個不同的 $k$ 值,例如對應下列方程式:$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "若取四個不同的 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 值,例如對應下列方程式:" + }, + { + "latex": "$$\n\\begin{aligned}\n3x+2y-12&=0 \\\\\n3x+2y-6&=0 \\\\\n3x+2y&=0 \\\\\n3x+2y+6&=0\n\\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所有等高線斜率均為 $-\\dfrac{3}{2}$,彼此平行。", + "newline": "false", + "runs": [ + { + "text": "所有等高線斜率均為 " + }, + { + "latex": "$-\\dfrac{3}{2}$", + "kind": "math" + }, + { + "text": ",彼此平行。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex6.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 6\n\n畫出 Example 3 的函數 $f(x,y) = 6 - 3x - 2y$ 的等高線圖,$k = -6, 0, 6, 12$。\n\n請先算出等高線的斜率:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_691c422bc2", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-4", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-4::step-1::q1", + "prompt_runs": [ + { + "text": "等高線方程式為 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ",即:" + } + ], + "answers": [ + "6-3*x-2*y=k" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入方程式", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-4", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-4::step-2::q2", + "prompt_runs": [ + { + "text": "化成斜截式後,這些等高線的斜率是?" + } + ], + "answers": [ + "-3/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入斜率", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-4", + "step": "step-2" + } + ], + "gate_from": "flow-4::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所有等高線斜率相同、截距不同,彼此平行。圖形如下:", + "newline": "false", + "runs": [ + { + "text": "所有等高線斜率相同、截距不同,彼此平行。圖形如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex6.py", + "call": "make_view", + "kwargs": {} + } + ], + "gate_from": "flow-4::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n\n\n\n**Step 1:寫出等高線方程式**\n\n令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:\n$$x^2 + y^2 = 9 - k^2$$\n\n這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。\n\n**Step 2:各條等高線**\n\n\n\n\n---\n\n### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id13" + }, + { + "type": "paragraph", + "content": "畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。", + "newline": "false", + "runs": [ + { + "text": "畫出 Example 5 的函數 " + }, + { + "latex": "$g(x,y) = \\sqrt{9 - x^2 - y^2}$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = 0, 1, 2, 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先算出 " + }, + { + "latex": "$k=1$", + "kind": "math" + }, + { + "text": " 時等高線圓的半徑:" + } + ], + "answers": [ + "2*sqrt(2)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "半徑", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_55d8689a20", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\sqrt{9-x^2-y^2} = k$,兩邊平方:$$\nx^2 + y^2 = 9 - k^2\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\sqrt{9-x^2-y^2} = k$", + "kind": "math" + }, + { + "text": ",兩邊平方:" + }, + { + "latex": "$$\nx^2 + y^2 = 9 - k^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是以 $(0,0)$ 為圓心、半徑 $\\sqrt{9-k^2}$ 的圓(需要 $0 \\leq k \\leq 3$)。", + "newline": "false", + "runs": [ + { + "text": "這是以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 為圓心、半徑 " + }, + { + "latex": "$\\sqrt{9-k^2}$", + "kind": "math" + }, + { + "text": " 的圓(需要 " + }, + { + "latex": "$0 \\leq k \\leq 3$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:各條等高線", + "newline": "false", + "runs": [ + { + "text": "Step 2:各條等高線", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex7.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 7\n\n畫出 Example 5 的函數 $g(x,y) = \\sqrt{9 - x^2 - y^2}$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n請先算出 $k=1$ 時等高線圓的半徑:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。\n\n\n**Step 1:等高線方程式**\n\n令 $4x^2 + y^2 = k$:\n- $k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)\n- $k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓\n\n**Step 2:圖形**\n\n\n\n\n---\n\n**提問**:為什麼同一個函數的等高線不會重疊、也不會相交呢?\n\n\n對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。\n\n這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了**函數每一組輸入只能對應一個輸出**的基本定義。因此等高線不會相交。\n\n\n---\n\n\n註解\n§3 小結\n- 等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線\n- 等高線越密集 → 函數在該方向變化越快(坡度越陡)\n- 不同等高線不會相交(函數性質保證)\n- 常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓\n\n\n---\n\n## 4️⃣ 三變數函數\n\n\n定義\n三變數函數\n對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。**變數 $x,y,z$ 為自變數,$w$ 為應變數。**\n\n\n---\n\n### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id14" + }, + { + "type": "paragraph", + "content": "畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。", + "newline": "false", + "runs": [ + { + "text": "畫出函數 " + }, + { + "latex": "$h(x,y) = 4x^2 + y^2$", + "kind": "math" + }, + { + "text": " 的等高線圖," + }, + { + "latex": "$k = 0, 1, 2, 3$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dae4e9b84b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:等高線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 1:等高線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $4x^2 + y^2 = k$:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$4x^2 + y^2 = k$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$4x^2 + y^2 = 0$", + "kind": "math" + }, + { + "text": ",解為 " + }, + { + "latex": "$(x,y) = (0,0)$", + "kind": "math" + }, + { + "text": "(單點)" + } + ], + "content": "$k = 0$:$4x^2 + y^2 = 0$,解為 $(x,y) = (0,0)$(單點)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$k > 0$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$", + "kind": "math" + }, + { + "text": ",橢圓" + } + ], + "content": "$k > 0$:$\\dfrac{x^2}{(\\frac{\\sqrt{k}}{2})^2} + \\dfrac{y^2}{(\\sqrt{k})^2} = 1$,橢圓" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:圖形", + "newline": "false", + "runs": [ + { + "text": "Step 2:圖形", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex8.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 8\n\n畫出函數 $h(x,y) = 4x^2 + y^2$ 的等高線圖,$k = 0, 1, 2, 3$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "提問:為什麼同一個函數的等高線不會重疊、也不會相交呢?", + "newline": "false", + "runs": [ + { + "text": "提問", + "style": "bold" + }, + { + "text": ":為什麼同一個函數的等高線不會重疊、也不會相交呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_25f08fb73e", + "label": "看答案", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "對函數 $z = f(x,y)$,等高線 $f(x,y) = c_1$ 和 $f(x,y) = c_2$($c_1 \\neq c_2$)若相交,代表存在某點 $(x_0, y_0)$ 同時滿足兩個方程式。", + "newline": "false", + "runs": [ + { + "text": "對函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",等高線 " + }, + { + "latex": "$f(x,y) = c_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$f(x,y) = c_2$", + "kind": "math" + }, + { + "text": "(" + }, + { + "latex": "$c_1 \\neq c_2$", + "kind": "math" + }, + { + "text": ")若相交,代表存在某點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 同時滿足兩個方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這表示同一個輸入 $(x_0,y_0)$,函數給出了兩個不同的輸出 $c_1 \\neq c_2$,違反了函數每一組輸入只能對應一個輸出的基本定義。因此等高線不會相交。", + "newline": "false", + "runs": [ + { + "text": "這表示同一個輸入 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": ",函數給出了兩個不同的輸出 " + }, + { + "latex": "$c_1 \\neq c_2$", + "kind": "math" + }, + { + "text": ",違反了" + }, + { + "text": "函數每一組輸入只能對應一個輸出", + "style": "bold" + }, + { + "text": "的基本定義。因此等高線不會相交。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§3 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "等高線 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + }, + { + "text": ":固定函數值,觀察 " + }, + { + "latex": "$xy$", + "kind": "math" + }, + { + "text": " 平面上的曲線" + } + ], + "content": "等高線 $f(x,y) = k$:固定函數值,觀察 $xy$ 平面上的曲線" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "等高線越密集 → 函數在該方向變化越快(坡度越陡)" + } + ], + "content": "等高線越密集 → 函數在該方向變化越快(坡度越陡)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "不同等高線不會相交(函數性質保證)" + } + ], + "content": "不同等高線不會相交(函數性質保證)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓" + } + ], + "content": "常見形狀:線性函數 → 平行直線;圓形函數 → 同心圓;橢圓形函數 → 同心橢圓" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-4", + "title": "4️⃣ 三變數函數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "4️⃣ 三變數函數", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 三變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id15" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數函數", + "body": [ + { + "type": "paragraph", + "content": "對集合 $D$ 中的每一個有序三元組 $(x,y,z)$ 指派一個唯一的實數,記為 $f(x,y,z)$。我們常寫 $w = f(x,y,z)$。變數 $x,y,z$ 為自變數,$w$ 為應變數。", + "newline": "false", + "runs": [ + { + "text": "對集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 中的每一個有序三元組 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 指派一個唯一的實數,記為 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": "。我們常寫 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "變數 ", + "style": "bold" + }, + { + "latex": "$x,y,z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為自變數,", + "style": "bold" + }, + { + "latex": "$w$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為應變數。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。\n\n\n**Step 1:分析限制條件**\n\n$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。\n\n$xy\\sin(z)$ 對任意實數都有意義,無額外限制。\n\n**Step 2:寫出定義域**\n\n$$D = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}$$\n\n這是由所有位於平面 $y = z$ 上方的點所組成的**半空間(half-space)**。\n\n\n備註\n半空間(half-space)\n三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。\n\n\n\n---\n\n## 5️⃣ 等值曲面(Level Surface)\n\n等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。\n\n\n定義\n等值曲面(Level Surface)\n若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的**等值曲面**。\n\n\n---\n\n### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id16" + }, + { + "type": "paragraph", + "content": "找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。", + "newline": "false", + "runs": [ + { + "text": "找到函數 " + }, + { + "latex": "$f(x,y,z) = \\ln(z-y) + xy\\sin(z)$", + "kind": "math" + }, + { + "text": " 的定義域。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e43e2dbcb9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:分析限制條件", + "newline": "false", + "runs": [ + { + "text": "Step 1:分析限制條件", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$\\ln$ 的定義域為所有正實數,因此需要 $z - y > 0$,即 $z > y$。", + "newline": "false", + "runs": [ + { + "latex": "$\\ln$", + "kind": "math" + }, + { + "text": " 的定義域為所有正實數,因此需要 " + }, + { + "latex": "$z - y > 0$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$z > y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$xy\\sin(z)$ 對任意實數都有意義,無額外限制。", + "newline": "false", + "runs": [ + { + "latex": "$xy\\sin(z)$", + "kind": "math" + }, + { + "text": " 對任意實數都有意義,無額外限制。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:寫出定義域", + "newline": "false", + "runs": [ + { + "text": "Step 2:寫出定義域", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD = \\{(x,y,z) \\in \\mathbb{R}^3 \\mid z > y\\}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是由所有位於平面 $y = z$ 上方的點所組成的半空間(half-space)。", + "newline": "false", + "runs": [ + { + "text": "這是由所有位於平面 " + }, + { + "latex": "$y = z$", + "kind": "math" + }, + { + "text": " 上方的點所組成的" + }, + { + "text": "半空間(half-space)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "備註", + "headline": "半空間(half-space)", + "body": [ + { + "type": "paragraph", + "content": "三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。", + "newline": "false", + "runs": [ + { + "text": "三維空間被某個平面切成兩半,其中的一整塊就叫做半空間。就像二維中直線把平面分成上下兩半一樣。" + } + ] + } + ] + } + ], + "ai_prompt_md": "### Example 9\n\n找到函數 $f(x,y,z) = \\ln(z-y) + xy\\sin(z)$ 的定義域。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-5", + "title": "5️⃣ 等值曲面(Level Surface)", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "5️⃣ 等值曲面(Level Surface)", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 等值曲面(Level Surface)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id17" + }, + { + "type": "paragraph", + "content": "等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 $w = f(x,y,z)$ 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。", + "newline": "false", + "runs": [ + { + "text": "等高線是二維的,等值曲面是把它推廣到三維。由於三變數函數 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": " 的圖形存在於四維空間,我們無法直接畫出,改為觀察固定函數值時的形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "等值曲面(Level Surface)", + "body": [ + { + "type": "paragraph", + "content": "若 $w = f(x,y,z)$ 是一個三變數函數,且 $k$ 是 $f$ 值域內的一個常數,則方程式 $f(x,y,z) = k$ 在三維空間中所構成的曲面,稱為函數 $f$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$w = f(x,y,z)$", + "kind": "math" + }, + { + "text": " 是一個三變數函數,且 " + }, + { + "latex": "$k$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 值域內的一個常數,則方程式 " + }, + { + "latex": "$f(x,y,z) = k$", + "kind": "math" + }, + { + "text": " 在三維空間中所構成的曲面,稱為函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "等值曲面", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。\n\n這些曲面是一族**半徑為 $\\sqrt{k}$ 的同心球面**。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。\n\n\n\n\n---\n\n### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id18" + }, + { + "type": "paragraph", + "content": "找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "找到函數 " + }, + { + "latex": "$f(x,y,z) = x^2 + y^2 + z^2$", + "kind": "math" + }, + { + "text": " 的等值曲面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_604b3f3eef", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "等值方程式為 $x^2 + y^2 + z^2 = k$(需 $k \\geq 0$)。", + "newline": "false", + "runs": [ + { + "text": "等值方程式為 " + }, + { + "latex": "$x^2 + y^2 + z^2 = k$", + "kind": "math" + }, + { + "text": "(需 " + }, + { + "latex": "$k \\geq 0$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這些曲面是一族半徑為 $\\sqrt{k}$ 的同心球面。當 $(x,y,z)$ 在任何一個以原點為球心的球面上變動時,函數值 $f$ 保持不變。", + "newline": "false", + "runs": [ + { + "text": "這些曲面是一族" + }, + { + "text": "半徑為 ", + "style": "bold" + }, + { + "latex": "$\\sqrt{k}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的同心球面", + "style": "bold" + }, + { + "text": "。當 " + }, + { + "latex": "$(x,y,z)$", + "kind": "math" + }, + { + "text": " 在任何一個以原點為球心的球面上變動時,函數值 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 保持不變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex10.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 10\n\n找到函數 $f(x,y,z) = x^2 + y^2 + z^2$ 的等值曲面。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。\n\n\n等值方程式為 $x^2 - y - z^2 = k$,整理後:\n$$y = x^2 - z^2 - k$$\n\n這是一族**雙曲拋物面(hyperbolic paraboloids)**,下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:\n\n\n\n---\n\n## 6️⃣ 延伸:多變數函數與向量記號\n### 多變數函數的一般形式\n\n一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。\n\n### 例子:成本函數\n\n假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:\n$$C = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n$$\n\n### 用向量記號寫得更簡潔\n\n令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:\n$$f(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}$$\n其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。\n\n### 看待多變數函數的三種觀點\n\n同一個函數 $f$,有三種等價說法:\n\n- **$n$ 個實變數的函數**:$f(x_1,x_2,\\ldots,x_n)$\n- **「一個點」的函數**:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點\n- **「一個向量」的函數**:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$\n\n熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "id": "CH14-P1_id19" + }, + { + "type": "paragraph", + "content": "描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。", + "newline": "false", + "runs": [ + { + "text": "描述函數 " + }, + { + "latex": "$f(x,y,z) = x^2 - y - z^2$", + "kind": "math" + }, + { + "text": " 的等值曲面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ae067124a2", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "等值方程式為 $x^2 - y - z^2 = k$,整理後:$$\ny = x^2 - z^2 - k\n$$", + "newline": "false", + "runs": [ + { + "text": "等值方程式為 " + }, + { + "latex": "$x^2 - y - z^2 = k$", + "kind": "math" + }, + { + "text": ",整理後:" + }, + { + "latex": "$$\ny = x^2 - z^2 - k\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是一族雙曲拋物面(hyperbolic paraboloids),下圖為 $k = 0$ 與 $k = \\pm 5$ 時的等值面:", + "newline": "false", + "runs": [ + { + "text": "這是一族" + }, + { + "text": "雙曲拋物面(hyperbolic paraboloids)", + "style": "bold" + }, + { + "text": ",下圖為 " + }, + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$k = \\pm 5$", + "kind": "math" + }, + { + "text": " 時的等值面:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "pyfunc", + "path": "pages/Ch14/C14_1/C14_1_ex11.py", + "call": "make_view", + "kwargs": {} + } + ], + "ai_prompt_md": "### Example 11\n\n描述函數 $f(x,y,z) = x^2 - y - z^2$ 的等值曲面。" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-6", + "title": "6️⃣ 延伸:多變數函數與向量記號", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "6️⃣ 延伸:多變數函數與向量記號", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 延伸:多變數函數與向量記號", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id20" + }, + { + "type": "heading", + "level": 3, + "content": "多變數函數的一般形式", + "newline": "true", + "runs": [ + { + "text": "多變數函數的一般形式", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id21" + }, + { + "type": "paragraph", + "content": "一個 $n$ 變數的函數對每個 $n$ 維向量 $(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$ 指派一個實數 $z = f(x_1,x_2,\\ldots,x_n)$。", + "newline": "false", + "runs": [ + { + "text": "一個 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 變數的函數對每個 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 維向量 " + }, + { + "latex": "$(x_1,x_2,\\ldots,x_n) \\in \\mathbb{R}^n$", + "kind": "math" + }, + { + "text": " 指派一個實數 " + }, + { + "latex": "$z = f(x_1,x_2,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "例子:成本函數", + "newline": "true", + "runs": [ + { + "text": "例子:成本函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id22" + }, + { + "type": "paragraph", + "content": "假設某產品的製作需要 $n$ 種原料,第 $i$ 種的單位成本為 $c_i$,使用量為 $x_i$,則總成本:$$\nC = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n\n$$", + "newline": "false", + "runs": [ + { + "text": "假設某產品的製作需要 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 種原料,第 " + }, + { + "latex": "$i$", + "kind": "math" + }, + { + "text": " 種的單位成本為 " + }, + { + "latex": "$c_i$", + "kind": "math" + }, + { + "text": ",使用量為 " + }, + { + "latex": "$x_i$", + "kind": "math" + }, + { + "text": ",則總成本:" + }, + { + "latex": "$$\nC = f(x_1,x_2,\\ldots,x_n) = c_1x_1 + c_2x_2 + \\cdots + c_nx_n\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "用向量記號寫得更簡潔", + "newline": "true", + "runs": [ + { + "text": "用向量記號寫得更簡潔", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id23" + }, + { + "type": "paragraph", + "content": "令 $\\mathbf{x} = (x_1,\\ldots,x_n)$,$\\mathbf{c} = (c_1,\\ldots,c_n)$,則:$$\nf(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}\n$$其中 $\\mathbf{c} \\cdot \\mathbf{x}$ 為內積(dot product)。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\mathbf{x} = (x_1,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{c} = (c_1,\\ldots,c_n)$", + "kind": "math" + }, + { + "text": ",則:" + }, + { + "latex": "$$\nf(\\mathbf{x}) = \\mathbf{c} \\cdot \\mathbf{x}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\mathbf{c} \\cdot \\mathbf{x}$", + "kind": "math" + }, + { + "text": " 為內積(dot product)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "看待多變數函數的三種觀點", + "newline": "true", + "runs": [ + { + "text": "看待多變數函數的三種觀點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "CH14-P1_id24" + }, + { + "type": "paragraph", + "content": "同一個函數 $f$,有三種等價說法:", + "newline": "false", + "runs": [ + { + "text": "同一個函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": ",有三種等價說法:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$n$", + "kind": "math", + "style": "bold" + }, + { + "text": " 個實變數的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f(x_1,x_2,\\ldots,x_n)$", + "kind": "math" + } + ], + "content": "$n$ 個實變數的函數:$f(x_1,x_2,\\ldots,x_n)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "「一個點」的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$(x_1,\\ldots,x_n)$", + "kind": "math" + }, + { + "text": " 視為 " + }, + { + "latex": "$\\mathbb{R}^n$", + "kind": "math" + }, + { + "text": " 中的一個點" + } + ], + "content": "「一個點」的函數:$(x_1,\\ldots,x_n)$ 視為 $\\mathbb{R}^n$ 中的一個點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "「一個向量」的函數", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{x}=(x_1,\\ldots,x_n)$", + "kind": "math" + } + ], + "content": "「一個向量」的函數:$f(\\mathbf{x})$,$\\mathbf{x}=(x_1,\\ldots,x_n)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。", + "newline": "false", + "runs": [ + { + "text": "熟悉這三種觀點,有助於在後面學偏微分、線性代數或機器學習時,用同一套語言連起來理解。" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/C14_1/plot.py b/pages/Ch14/C14_1/plot.py new file mode 100644 index 0000000000000000000000000000000000000000..5187dbd4d2961022144545c0b8873037fa578a84 --- /dev/null +++ b/pages/Ch14/C14_1/plot.py @@ -0,0 +1,503 @@ + +import dash +from dash import html, dcc, Input, Output, State, callback, no_update +import plotly.graph_objects as go +import plotly.io as pio +import numpy as np +import sympy as sp + +try: + from dash_latex import DashLatex +except Exception: + DashLatex = None + +pio.templates.default = "plotly_white" + +# ==== 下面全部直接沿用你原本的 helpers ==== +import sympy as sp +from layout.safe_sympy import x, y, get_allowed # 路徑依你的專案調整 + +_ALLOWED = get_allowed() + + +JSX_COLORS = ["#264653","#2a9d8f","#e9c46a","#f4a261","#e76f51", + "#8ab17d","#577590","#f94144","#f3722c","#f8961e"] + + +# ---------- helpers ---------- +def _compile_expr(expr_text: str): + try: + expr = sp.sympify(expr_text, locals=_ALLOWED) + except Exception as e: + return None, f"解析失敗:{e}" + free_syms = expr.free_symbols + if not free_syms.issubset({x, y}): + bad = ", ".join(sorted(str(s) for s in (free_syms - {x, y}))) + return None, f"不支援的符號:{bad}" + try: + f = sp.lambdify((x, y), expr, modules=["numpy"]) + except Exception as e: + return None, f"轉換失敗:{e}" + return f, None + +def _eval_grid(f, x_min, x_max, y_min, y_max, n=401): + X = np.linspace(x_min, x_max, n) + Y = np.linspace(y_min, y_max, n) + XX, YY = np.meshgrid(X, Y) + try: + Z = f(XX, YY) + except Exception: + Z = np.full_like(XX, np.nan, dtype=float) + if np.iscomplexobj(Z): + Z = np.where(np.isfinite(Z.real) & (np.abs(Z.imag) < 1e-9), Z.real, np.nan) + else: + Z = np.array(Z, dtype=float) + Z[~np.isfinite(Z)] = np.nan + return X, Y, Z + +def _colorscale_from_list(colors): + n = len(colors) + if n == 1: + return [[0, colors[0]], [1, colors[0]]] + return [[i/(n-1), c] for i, c in enumerate(colors)] + +def _pick_color_for_level(level, lv_start, lv_end, colors): + if lv_end == lv_start: + return colors[0] + t = (level - lv_start) / float(lv_end - lv_start) + t = min(1, max(0, t)) + idx = int(round(t * (len(colors)-1))) + return colors[idx] + +def _find_label_point_on_row(X, Y, Z, level, row_index): + """在固定 y-row 上尋找 z=level 的交點(回傳 (x0, y_row) 或 None)。""" + G = Z - level + H, W = G.shape + r = int(np.clip(row_index, 0, H-1)) + for c in range(W-1): + a, b = G[r, c], G[r, c+1] + if not (np.isfinite(a) and np.isfinite(b)): + continue + if a == 0: + return X[c], Y[r] + if a * b < 0: + t = abs(a) / (abs(a) + abs(b)) + x0 = (1 - t) * X[c] + t * X[c+1] + return x0, Y[r] + return None + +def _pick_label_point_spread(X, Y, Z, level, lvl_index, used_pts, min_sep_frac=0.10, max_tries=18): + """分散挑標籤點,與已放標籤保持距離。""" + H, W = Z.shape + xr = (X[-1] - X[0]) or 1.0 + yr = (Y[-1] - Y[0]) or 1.0 + min_dx = xr * min_sep_frac + min_dy = yr * min_sep_frac + phi = 0.61803398875 + base = (0.22 + (lvl_index * phi) % 0.56) # 0.22~0.78 + for t in range(max_tries): + frac = (base + t * phi) % 1.0 + r = int(round(frac * (H - 1))) + pt = _find_label_point_on_row(X, Y, Z, level, r) + if pt is None: + continue + x0, y0 = pt + ok = True + for (ux, uy) in used_pts: + if abs(x0 - ux) < min_dx and abs(y0 - uy) < min_dy: + ok = False + break + if ok: + return x0, y0 + return None + +# ---- 一勞永逸的 k=0 邊界處理(不改 NaN)---- +def _has_zero_crossing(Z): + Zf = Z[np.isfinite(Z)] + if Zf.size == 0: + return False + return (Zf.min() <= 0.0) and (Zf.max() >= 0.0) + +def _smooth_mask(mask): + """True/False 遮罩做 3x3 平均,回傳 0~1,用於畫 0.5 等值線。""" + M = mask.astype(float) + Mpad = np.pad(M, 1, mode="constant", constant_values=0.0) + acc = np.zeros_like(M, dtype=float) + for dy in (-1, 0, 1): + for dx in (-1, 0, 1): + acc += Mpad[1+dy:M.shape[0]+1+dy, 1+dx:M.shape[1]+1+dx] + return acc / 9.0 + +def _add_zero_level_line(fig, X, Y, Z, lv_start, lv_end, color="#495057", width=3): + """若 Levels 含 0:跨零就畫 Z 的 level=0;否則畫 domain 邊界(mask==0.5)。""" + if not (lv_start <= 0.0 <= lv_end): + return + finite = np.isfinite(Z) + if _has_zero_crossing(Z): + fig.add_trace(go.Contour( + x=X, y=Y, z=Z, + autocontour=False, + contours=dict(start=0, end=0, size=1, coloring="lines", showlines=True, showlabels=False), + line=dict(width=width, color=color), + showscale=False, hoverinfo="skip", name="k=0" + )) + else: + Ms = _smooth_mask(finite) + fig.add_trace(go.Contour( + x=X, y=Y, z=Ms, + autocontour=False, + contours=dict(start=0.5, end=0.5, size=1, coloring="lines", showlines=True, showlabels=False), + line=dict(width=width, color=color), + showscale=False, hoverinfo="skip", name="domain boundary (k=0)" + )) + +# ---------- Auto range & levels helpers ---------- +def _nice_step(span, target=12): + if not np.isfinite(span) or span <= 0: + return 1.0 + raw = span / float(target) + exp = np.floor(np.log10(raw)) + base = raw / (10 ** exp) + if base < 1.5: nice = 1.0 + elif base < 3: nice = 2.0 + elif base < 7: nice = 5.0 + else: nice = 10.0 + return nice * (10 ** exp) + +def _suggest_levels_from_Z(Z, prefer_zero=True, target=12): + Zf = Z[np.isfinite(Z)] + if Zf.size == 0: + return (-2.0, 2.0, 0.5) + zmin, zmax = float(np.min(Zf)), float(np.max(Zf)) + + all_nonneg = zmin >= -1e-12 + if prefer_zero and not all_nonneg: + M = max(abs(zmin), abs(zmax)) + zmin, zmax = -M, M + + span = max(zmax - zmin, 1e-12) + step = _nice_step(span, target=target) + start = np.floor(zmin / step) * step + end = np.ceil (zmax / step) * step + return float(start), float(end), float(step) + +def _tight_bbox_from_mask(mask, min_row_frac=0.02, pad_frac=0.08): + """從有限值遮罩抓緊外框,並左右上下各加 pad_frac 的邊界。""" + H, W = mask.shape + col_has = mask.sum(axis=0) >= (min_row_frac * H) + row_has = mask.sum(axis=1) >= (min_row_frac * W) + if not col_has.any() or not row_has.any(): + return 0, W-1, 0, H-1 + cmin, cmax = np.where(col_has)[0][[0, -1]] + rmin, rmax = np.where(row_has)[0][[0, -1]] + pw = int(round((cmax - cmin + 1) * pad_frac)) + ph = int(round((rmax - rmin + 1) * pad_frac)) + return max(0, cmin - pw), min(W-1, cmax + pw), max(0, rmin - ph), min(H-1, rmax + ph) + +def _auto_xy_range(f, n_try=6, init_half=6.0, grow=1.6, n_grid=301): + """自動找 XY 範圍;回傳 (xmin, xmax, ymin, ymax)。""" + a = float(init_half) + best = None + for _ in range(n_try): + X = np.linspace(-a, a, n_grid) + Y = np.linspace(-a, a, n_grid) + XX, YY = np.meshgrid(X, Y) + try: + Z = f(XX, YY) + except Exception: + Z = np.full_like(XX, np.nan, dtype=float) + if np.iscomplexobj(Z): + Z = np.where(np.isfinite(Z.real) & (np.abs(Z.imag) < 1e-9), Z.real, np.nan) + else: + Z = np.array(Z, dtype=float) + Z[~np.isfinite(Z)] = np.nan + + finite = np.isfinite(Z) + ratio = finite.mean() + Zf = Z[finite] + amp = (np.max(Zf) - np.min(Zf)) if Zf.size else 0.0 + + if ratio > 0.02 and amp > 1e-9: + best = (X, Y, Z, finite) + + if ratio < 0.10 or amp < 1e-6: + a *= grow + continue + else: + break + + if best is None: + return -a, a, -a, a + + X, Y, Z, finite = best + cmin, cmax, rmin, rmax = _tight_bbox_from_mask(finite, min_row_frac=0.02, pad_frac=0.08) + xmin1, xmax1 = X[cmin], X[cmax] + ymin1, ymax1 = Y[rmin], Y[rmax] + + Zabs = np.abs(Z) + if np.isfinite(Zabs).any(): + thr = 0.02 * np.nanmax(Zabs) + sig = np.isfinite(Zabs) & (Zabs >= thr) + if sig.any(): + cs, ce, rs, re = _tight_bbox_from_mask(sig, min_row_frac=0.01, pad_frac=0.10) + xmin2, xmax2 = X[cs], X[ce] + ymin2, ymax2 = Y[rs], Y[re] + xmin1, xmax1 = min(xmin1, xmin2), max(xmax1, xmax2) + ymin1, ymax1 = min(ymin1, ymin2), max(ymax1, ymax2) + + if xmin1 >= xmax1 or ymin1 >= ymax1: + return -a, a, -a, a + return float(xmin1), float(xmax1), float(ymin1), float(ymax1) + +# ---------- Figure builder ---------- +def _make_figure(X, Y, Z, lv_start, lv_end, lv_step): + cs = _colorscale_from_list(JSX_COLORS) + fig = go.Figure() + + # 主要等高線 + fig.add_trace(go.Contour( + x=X, y=Y, z=Z, + autocontour=False, + contours=dict(start=float(lv_start), end=float(lv_end), size=float(lv_step), + coloring="lines", showlines=True, showlabels=False), + line=dict(width=2.6), + colorscale=cs, + showscale=True, + # colorbar=dict(title="f(x,y)"), + zmin=lv_start if lv_start < 0 else 0.0, + zmax=lv_end + )) + + # 次要等高線(更密集:step/2) + minor_step = float(lv_step) / 2.0 + if minor_step > 0: + fig.add_trace(go.Contour( + x=X, y=Y, z=Z, + autocontour=False, + contours=dict(start=float(lv_start), end=float(lv_end), size=minor_step, + coloring="lines", showlines=True, showlabels=False), + line=dict(width=1.2), + opacity=0.35, + colorscale=cs, + showscale=False, + hoverinfo="skip" + )) + + # k=0 或定義域邊界 + _add_zero_level_line(fig, X, Y, Z, lv_start, lv_end, color="#495057", width=3) + + # 主要等高線上放 k=... 標籤(跳過 0) + levels = np.arange(lv_start, lv_end + 1e-12, lv_step, dtype=float) + used_pts = [] + for i, k in enumerate(levels): + if abs(k) < 1e-12: + continue + pt = _pick_label_point_spread(X, Y, Z, k, i, used_pts, min_sep_frac=0.12, max_tries=24) + if pt is None: + continue + x0, y0 = pt + used_pts.append((x0, y0)) + color_k = _pick_color_for_level(k, lv_start, lv_end, JSX_COLORS) + fig.add_trace(go.Scatter( + x=[x0], y=[y0], mode="text", + text=[f"k = {k:.3f}"], + textfont=dict(size=13, color=color_k), + textposition="top right", + hoverinfo="skip", + showlegend=False + )) + + fig.update_layout( + template="plotly_white", + paper_bgcolor="white", plot_bgcolor="white", + xaxis=dict(showgrid=True, gridcolor="#e9ecef", + zeroline=True, zerolinecolor="#adb5bd"), + yaxis=dict(showgrid=True, gridcolor="#e9ecef", + zeroline=True, zerolinecolor="#adb5bd", + scaleanchor="x", scaleratio=1), + margin=dict(l=40, r=20, t=40, b=40), + title="等高線圖" + ) + return fig + + +def _make_surface_figure(X, Y, Z, lv_start, lv_end): + cs = _colorscale_from_list(JSX_COLORS) + fig3d = go.Figure() + + fig3d.add_trace(go.Surface( + x=np.array(X, dtype=float), + y=np.array(Y, dtype=float), + z=np.array(Z, dtype=float), + colorscale=cs, + cmin=float(lv_start), + cmax=float(lv_end), + showscale=True, + # colorbar=dict(title="f(x,y)"), + contours=dict( + z=dict(show=True, usecolormap=True, highlightcolor="black", project_z=True) + ), + hovertemplate="x=%{x:.3g}
y=%{y:.3g}
z=%{z:.3g}" + )) + + fig3d.update_scenes( + xaxis_title="x", yaxis_title="y", zaxis_title="f(x,y)", + aspectmode="data" + ) + fig3d.update_layout( + template="plotly_white", + margin=dict(l=20, r=20, t=40, b=20), + title="3D 曲面圖" + ) + return fig3d + + +# ---- 圖外的 KaTeX 標題(DashLatex)---- +def _escape_tex_in_text(s: str) -> str: + return (s or "").replace("\\", r"\\").replace("{", r"\{").replace("}", r"\}") \ + .replace("_", r"\_").replace("^", r"\^{}") + +def _build_latex_title(expr_text, x_min, x_max, y_min, y_max, lv_step): + # 先把字串轉 Sympy,再轉 LaTeX;不顯示乘號 + tex_expr = None + try: + expr = sp.sympify(expr_text, locals=_ALLOWED) + tex_expr = sp.latex(expr, mul_symbol=None) # ← 不顯示乘號 + # 保險:把可能殘留的乘號都移除 + for pat in (r"\cdot{}", r"\cdot", r"\times"): + tex_expr = tex_expr.replace(pat, "") + except Exception: + safe = (expr_text or "").replace("\\", r"\\").replace("{", r"\{") \ + .replace("}", r"\}").replace("_", r"\_") \ + .replace("^", r"\^{}") + tex_expr = r"\text{" + safe + r"}" + + tex_line = ( + rf"$$f(x,y)= {tex_expr}\;\big|\; " + rf"x\in[{x_min:.3g},{x_max:.3g}],\; " + rf"y\in[{y_min:.3g},{y_max:.3g}],\; " + rf"\text{{step}}={lv_step:.3g}$$" + ) + + if DashLatex: + return html.Span(DashLatex(tex_line)) + else: + return html.Span( + f"f(x,y) = {expr_text} | x∈[{x_min:.3g},{x_max:.3g}], " + f"y∈[{y_min:.3g},{y_max:.3g}] | step {lv_step:.3g}" + ) + +# ==== 省略,完全沿用原本 ==== + +layout = html.Div([ + dcc.Markdown( + "> 範例:`sin(x)*exp(-0.1*(x**2+y**2))`、`sqrt(16 - 4*x**2 - y**2)`" + ), + + html.Div([ + (html.Span(DashLatex(r"$f(x,y) =$"), + style={"fontSize": "15px", "marginRight": "6px"}) + if DashLatex else html.Label("f(x,y) = ")), + dcc.Input( + id="expr", type="text", debounce=True, + value="-x*y*exp(-(x**2+y**2))", style={"width": "520px"} + ), + + (html.Span(DashLatex(r"$\text{Step} =$"), + style={"fontSize": "15px", "margin": "0 6px"}) + if DashLatex else html.Span(" Step = ")), + dcc.Input( + id="lv-step", type="number", value=None, step=0.01, + style={"width": "120px"} + ), + html.Span( + id="step-hint", + style={"marginLeft": "8px", "fontSize": "13px", "color": "#888"} + ), + + + html.Button("重繪", id="btn-redraw", n_clicks=0, style={"marginLeft": "8px"}), + ], style={"display": "flex", "alignItems": "center", "gap": "8px"}), + + html.Div(id="math-title", style={"margin": "8px 0", "fontSize": "15px"}), + + # 你要上下堆疊 or 左右並排都可以選一個 + html.Div([ + dcc.Graph(id="contour-graph", style={"height": "400px", "width": "100%"}), + ], style={"width": "100%"}), + + html.Div([ + dcc.Graph(id="surface-graph", style={"height": "400px", "width": "100%"}), + ], style={"width": "100%", "marginTop": "12px"}), + + html.Pre(id="err", style={"color": "#c00", "whiteSpace": "pre-wrap"}), +]) +@callback( + Output("contour-graph", "figure"), + Output("surface-graph", "figure"), + Output("err", "children"), + Output("math-title", "children"), + Output("step-hint", "children"), # 第 5 個 + Input("btn-redraw", "n_clicks"), + State("expr", "value"), + State("lv-step", "value"), + prevent_initial_call=False +) +def draw_both(n_clicks, expr_text, lv_step): + def _empty(err_msg=""): + # 回傳 5 個東西:兩個 figure + err + math-title + step-hint + return go.Figure(), go.Figure(), err_msg, "", "" + + f, err = _compile_expr(expr_text or "") + if err: + return _empty(err) + + x_min, x_max, y_min, y_max = _auto_xy_range( + f, n_try=6, init_half=6.0, grow=1.6, n_grid=301 + ) + + x_span = float(x_max) - float(x_min) + y_span = float(y_max) - float(y_min) + n = int(np.clip(max(x_span, y_span) / 0.03, 301, 801)) + X, Y, Z = _eval_grid(f, float(x_min), float(x_max), + float(y_min), float(y_max), n=n) + + Zf = Z[np.isfinite(Z)] + if Zf.size == 0: + return _empty("此範圍內函數皆無定義或數值皆為 NaN") + + zmin, zmax = float(np.min(Zf)), float(np.max(Zf)) + span = max(zmax - zmin, 1e-12) + + def _bad_step(st): + return (st is None) or (not np.isfinite(st)) or (st <= 0) or (st >= span/3) + + auto_step_msg = "" + + # 判斷使用者有沒有「真的自己輸入 step」 + user_provided_step = (lv_step is not None) + + if _bad_step(lv_step): + lv_start, lv_end, lv_step = _suggest_levels_from_Z( + Z, prefer_zero=True, target=12 + ) + # ✅ 只有「使用者有輸入 step 且有按過重繪」才顯示警告 + if user_provided_step and (n_clicks or 0) > 0: + auto_step_msg = f"Step 設定不良,已自動調整為 {lv_step:.3g}。" + else: + auto_step_msg = "" # 預設圖形 / 沒輸入 step → 不顯示 + else: + s0, e0, _ = _suggest_levels_from_Z(Z, prefer_zero=True, target=12) + lv_start, lv_end = s0, e0 + auto_step_msg = "" # 正常情況下也不一定要顯示 + + fig2d = _make_figure(X, Y, Z, float(lv_start), float(lv_end), float(lv_step)) + fig3d = _make_surface_figure(X, Y, Z, float(lv_start), float(lv_end)) + + title_children = _build_latex_title(expr_text, x_min, x_max, y_min, y_max, lv_step) + + return fig2d, fig3d, "", title_children, auto_step_msg + +# ✅ 給「別的頁面」重用的入口 +def make_view(): + return layout diff --git a/pages/Ch14/C14_2/Dash_Ch14_2.py b/pages/Ch14/C14_2/Dash_Ch14_2.py new file mode 100644 index 0000000000000000000000000000000000000000..53f45c1b62318dba5f1aaf0e61068af282e9dfd1 --- /dev/null +++ b/pages/Ch14/C14_2/Dash_Ch14_2.py @@ -0,0 +1,11 @@ +import dash +from layout.page_builder import make_test_page +from pathlib import Path + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_2.json" + +dash.register_page(__name__, path="/Ch14_2", title="Ch14_2") + +def layout(): + return make_test_page(str(JSON_PATH), top_offset=90) diff --git a/pages/Ch14/C14_2/Md_14_2.md b/pages/Ch14/C14_2/Md_14_2.md new file mode 100644 index 0000000000000000000000000000000000000000..be6f6291665fb33884a9e9c301731a4a7f21fb89 --- /dev/null +++ b/pages/Ch14/C14_2/Md_14_2.md @@ -0,0 +1,1435 @@ +# 極限與連續 + +## 1️⃣雙變數函數的極限(定義與圖形直覺) + +在第一章中,我們談過單變數函數 $f(x)$ 在某點 $a$ 的極限:請回想看看,當初我們探討的「極限」概念是什麼? + +a. 當 $x=a$ 時,$f(x)$ 的值是否存在; +b. 當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會趨近某個固定的實數 $L$; +c. 函數 $f(x)$在 $a$ 連續。 +d. 當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會等於 $f(a)$。 + + +這樣的概念可以自然地延伸到雙變數,甚至多變數的情況。下面我們先以雙變數函數 $f(x,y)$ 為例,定義多變數函數的「極限」。 + + +定義 +多變數函數的極限 +對於一個雙變數函數 $f(x,y)$ 而言,我們說 $f(x,y)$ 在某點 $(a,b)$ 的**極限(limit)**存在, +如果,當 $(x,y)$ 越來越接近點 $(a,b)$ 時,函數值 $f(x,y)$ 會趨近某個固定的實數 $L$。此外,我們記作 +$$ + \lim_{(x,y)\to (a,b)} f(x,y) = L。 +$$ +我們也同樣稱「 $f(x,y)$ 的**極限**為 $L$,當 $(x,y)$ 趨近於 $(a,b)$ 時」。或標記為 +$$ + f(x,y) \to L\; \text{ as } (x,y) \to (a,b)。 +$$ + + +換句話說,我們想觀察 $(a,b)$ 附近的小區域(neighborhood)但不包含 $(a,b)$ 本身這點。 +是否當這樣的區域越來越集中於 $(a,b)$ 時,$f(x,y)$ 的值會越來越接近某個固定的數 $L$? +如果是,便稱函數 $f(x,y)$ 在點 $(a,b)$ 的極限存在。 + + +為了更直覺地理解多變數函數的極限的概念,讓我們考慮下面兩個例子。 +--- +### Example 1 +請透過觀察函數 $f(x,y) = \dfrac{\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限 +$$ + \lim_{(x,y)\to (0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2} +$$ +是否存在?如果存在,請寫下其極限值 $L$。 + + +請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。 + +**畫一張函數圖** + + +試問 + +1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值? +會,且值為 $1$ + +2. 因此,我們會標記 + $$ + \hspace{60pt} \lim_{(x,y)\to (0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2} + $$ +$=1$ + +3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \frac{\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。 + + + +請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。 + +**畫一張函數圖** + + +試問 + +1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值? + + a. 會,且值為 $0$; + b. 會,且值為 $1$; + c. 不會,$f(x,y)$ 的值會趨近 $\infty$,因為分母會趨近 $0$; + d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。 + + +2. 因此,我們會標記 + $$ + \hspace{60pt} \lim_{(x,y)\to (0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2} + $$ + + a. $=0$; + b. $=1$; + c. $=\infty$; + d. 不存在; + + +3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \frac{\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。 + + + +--- +### Example 2 +請透過觀察函數 $g(x,y) = \frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答 +$$ + \lim_{(x,y)\to (0,0)} \frac{x^2-y^2}{x^2+y^2} +$$ +是否存在?如果存在,請寫出其極限值 $L$。 + + +請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。 + + +1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值? +不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值 + +2. 因此,我們會標記 + $$ + \hspace{60pt} \lim_{(x,y)\to (0,0)} \frac{x^2-y^2}{x^2+y^2} + $$ +不存在 + + + + +請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。 + + +1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值? + + a. 會,且值為 $0$; + b. 會,且值為 $1$; + c. 不會,$g(x,y)$ 的值會趨近 $\infty$,因為分母會趨近 $0$; + d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。 + + +2. 因此,我們會標記 + $$ + \hspace{60pt} \lim_{(x,y)\to (0,0)} \frac{x^2-y^2}{x^2+y^2} + $$ + + a. $=0$; + b. $=1$; + c. $=\infty$; + d. 不存在; + + + + +--- +## 2️⃣極限的四則運算法則與多項式/有理函數 + +前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢? + +在這裡,我們將採取 「**由簡入繁、以簡馭繁**」 的方式,建立一套能處理大部分極限問題的方法。 + +下面這三個極限,是最基本、也最沒有爭議的: +$$ + \lim_{(x,y)\to (a,b)} x = a, \; \lim_{(x,y)\to (a,b)} y = b,\; \lim_{(x,y)\to (a,b)} c = c。 +$$ +透過這三個簡單的基礎極限,再結合「**極限的四則運算法則**」,我們便能推算出更複雜組合函數的極限。 + + +特性 +極限的四則運算法則 +如果 +$$ + \lim_{(x,y)\to (a,b)} f(x,y) = L \text{ 而 } \lim_{(x,y)\to (a,b)} g(x,y) = M, +$$ +則有: +1. 加法法則: + $\lim\limits_{(x,y)\to (a,b)} \left[ f(x,y) + g(x,y) \right] = L+M。$ +2. 減法法則: $\lim\limits_{(x,y)\to (a,b)} \left[ f(x,y) - g(x,y) \right] = L-M$。 +3. 乘法法則: $\lim\limits_{(x,y)\to (a,b)} \left[ f(x,y) \cdot g(x,y) \right]= L\cdot M$。 +4. 常數積法則: $\lim\limits_{(x,y)\to (a,b)} \left[ c \cdot f(x,y) \right] = c \cdot L$,其中 $c$ 為任意常數。 +5. 除法法則(須 $M\neq 0$): $\lim\limits_{(x,y)\to (a,b)} \left[ \dfrac{f(x,y)}{g(x,y)} \right] = \dfrac{L}{M}$。 + + +***注意 1:*** 上面極限的四則運算法則允許我們 **把複雜的極限拆成較簡單的極限** 來計算。比方,加法法則可寫成 +$$ + \lim\limits_{(x,y)\to (a,b)} \left[ f(x,y) + g(x,y) \right] + = \lim\limits_{(x,y)\to (a,b)} f(x,y) + \lim\limits_{(x,y)\to (a,b)} g(x,y)。 +$$ +其餘各法則亦然。 + +***注意 2:*** 除法法則中,極限公式成立,條件 $M\neq 0$ 至關重要! +一旦 $M = 0$,除法法則便「**派不上用場**」,而極限 +$$ + \lim\limits_{(x,y)\to (a,b)} \left[ \dfrac{f(x,y)}{g(x,y)} \right] +$$ +是否存在、如何判斷、如何計算,都必須***另外分析***!請參考本節後半部「**分式極限處理三招**」。 + +--- +### Example 3 +求下列極限的值: +$$ + \lim_{(x,y)\to (1,2)} 3x^2+y^2。 +$$ + + +由於 +$$ + \lim_{(x,y)\to (1,2)} x = 1, \; \lim_{(x,y)\to (1,2)} y = 2, +$$ +因此,我們可以利用極限的四則與乘法法則,將原式拆解如下 +$$ + \begin{aligned} + \lim_{(x,y)\to (1,2)} 3x^2+y^2 + &= \lim_{(x,y)\to (1,2)} 3x^2 + \lim_{(x,y)\to (1,2)} y^2 \\ + &= 3 \lim_{(x,y)\to (1,2)} x^2 + \lim_{(x,y)\to (1,2)} y^2 \\ + &= 3 \lim_{(x,y)\to (1,2)} \left[ x \cdot x \right] + + \lim_{(x,y)\to (1,2)} \left[ y \cdot y \right] \\ + &= 3 \lim_{(x,y)\to (1,2)} x \cdot \lim_{(x,y)\to (1,2)} x + + \lim_{(x,y)\to (1,2)} y \cdot \lim_{(x,y)\to (1,2)} y + \end{aligned} +$$ +最後,透過極限的四則運算,我們可以得到: +$$ + \lim_{(x,y)\to (1,2)} 3x^2+y^2 = 7 +$$ + + + +由於 +$$ + \lim_{(x,y)\to (1,2)} x = 1, \; \lim_{(x,y)\to (1,2)} y = 2, +$$ +因此,我們可以利用極限的四則與乘法法則,將原式拆解如下 +$$ + \begin{aligned} + \lim_{(x,y)\to (1,2)} 3x^2+y^2 + &= \lim_{(x,y)\to (1,2)} 3x^2 + \lim_{(x,y)\to (1,2)} y^2 \\ + &= 3 \lim_{(x,y)\to (1,2)} x^2 + \lim_{(x,y)\to (1,2)} y^2 \\ + &= 3 \lim_{(x,y)\to (1,2)} \left[ x \cdot x \right] + + \lim_{(x,y)\to (1,2)} \left[ y \cdot y \right] \\ + &= 3 \lim_{(x,y)\to (1,2)} x \cdot \lim_{(x,y)\to (1,2)} x + + \lim_{(x,y)\to (1,2)} y \cdot \lim_{(x,y)\to (1,2)} y + \end{aligned} +$$ +最後,透過極限的四則運算,我們可以得到: +$$ + \lim_{(x,y)\to (1,2)} 3x^2+y^2 = ? +$$ + + + + + +--- +聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了! + + +註解 +二元多項式函數的極限 +如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有: +$$ + \lim_{(x,y)\to (a,b)} p(x,y) = p(a,b)。 +$$ +換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可! + + +--- +### Example 4 +求下列極限的值: +$$ + \lim_{(x,y)\to (1,2)} \frac{3x^2+y^2}{x^2+y^2}。 +$$ + + +由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。 +因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為: +$$ + \begin{aligned} + \lim_{(x,y)\to (1,2)} \frac{3x^2+y^2}{x^2+y^2} + &= \frac{ \lim\limits_{(x,y)\to (1,2)} 3x^2+y^2 }{ \lim\limits_{(x,y)\to (1,2)} x^2+y^2 } + \end{aligned}。 +$$ +因此, +$$ + \lim_{(x,y)\to (1,2)} \frac{3x^2+y^2}{x^2+y^2} = \frac{7}{5} +$$ + + + +由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。 +因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為: +$$ + \begin{aligned} + \lim_{(x,y)\to (1,2)} \frac{3x^2+y^2}{x^2+y^2} + &= \frac{ \lim\limits_{(x,y)\to (1,2)} 3x^2+y^2 }{ \lim\limits_{(x,y)\to (1,2)} x^2+y^2 } + \end{aligned}。 +$$ +因此, +$$ + \lim_{(x,y)\to (1,2)} \frac{3x^2+y^2}{x^2+y^2} = ? +$$ + + + + + +--- +### Example 5 +試問下面的推導是否正確: +$$ + \lim_{(x,y)\to (0,0)} \frac{x^2-y^2}{x^2+y^2} + = \frac{ \lim\limits_{(x,y)\to (0,0)} x^2-y^2}{ \lim\limits_{(x,y)\to (0,0)} x^2+y^2} + = \frac{0}{0} 。 +$$ + + +不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$ + + + + + +a. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\dfrac{0}{0}$; +b. 正確。因此極限不存在; +c. 正確。因此極限值是 $\infty$; +d. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。 + + + + +--- +聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論! + + +註解 +有理函數的極限 +如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如 +$$ +r(x,y) = \frac{p(x,y)}{q(x,y)}, +$$ +其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有: +$$ + \lim_{(x,y)\to (a,b)} r(x,y) + = \lim_{(x,y)\to (a,b)} \dfrac{p(x,y)}{q(x,y)} + = \dfrac{p(a,b)}{q(a,b)} + = r(a,b), +$$ +如果 $q(a,b)\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零! + + +--- +## 3️⃣分式極限處理三招:第一招:化簡法 + +接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形: +$$ + \lim_{(x,y)\to (a,b)} \frac{g(x,y)}{h(x,y)} +$$ +如果 $\lim\limits_{(x,y)\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值? + +記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。 + +--- +### Example 6 +判斷下面極限是否存在。如果存在,找出極限值: +1. $\lim\limits_{(x,y)\to (0,0)} \frac{(x^2+y^2)^2}{x^2+y^2}$。 +2. $\lim\limits_{(x,y)\to (0,0)} \frac{x^2+y^2}{x^2+y^2}$。 +3. $\lim\limits_{(x,y)\to (0,0)} \frac{x^2+y^2}{(x^2+y^2)^2}$。 + + +1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式** + $$ + \lim_{(x,y)\to (0,0)} \frac{(x^2+y^2)^2}{x^2+y^2} + = \lim_{(x,y)\to (0,0)} x^2+y^2。 + $$ + 這時,問題就回到求取一個二元多項式的極限。因此 +極限存在,且值為 $0$ + +2. 這題同理,我們先通過**化簡分式**的方法,得到 + $$ + \hspace{60pt} \lim_{(x,y)\to (0,0)} \frac{x^2+y^2}{x^2+y^2} + = \lim_{(x,y)\to (0,0)} 1。 + $$ + 因此 +極限存在,且值為 $1$ + +3. 同理,我們先通過**化簡分式**的方法,得到 + $$ + \lim_{(x,y)\to (0,0)} \frac{x^2+y^2}{(x^2+y^2)^2} + = \lim_{(x,y)\to (0,0)} \frac{1}{x^2+y^2}。 + $$ + 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。 + +4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\lim\limits_{x\to 0} \frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是? + $$ + \lim_{x\to 0} \frac{1}{x} = ? + $$ +極限不存在,因為 $\lim\limits_{x\to 0^-} \frac{1}{x}= -\infty$ 但 $\lim\limits_{x\to 0^+} \frac{1}{x}= \infty$,左右極限不相等 + +5. 現在回到本題: $\lim\limits_{(x,y)\to (0,0)} \frac{1}{x^2+y^2}$。 + 令 + $$ + r = x^2+y^2 \,(\geq 0), + $$ + 則 + $$ + (x,y)\to (0,0) \Longleftrightarrow \boxed{r= x^2+y^2 \to 0^+}。 + $$ + 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\to 0^+$。因此, + $$ + \lim_{(x,y)\to (0,0)} \frac{1}{x^2+y^2} = \lim_{r\to 0^+} \frac{1}{r}= ? + $$ +極限不存在,但 $\lim\limits_{(x,y)\to (0,0)} \frac{1}{x^2+y^2} = \infty$ + + + + +1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式** + $$ + \lim_{(x,y)\to (0,0)} \frac{(x^2+y^2)^2}{x^2+y^2} + = \lim_{(x,y)\to (0,0)} x^2+y^2。 + $$ + 這時,問題就回到求取一個二元多項式的極限。因此 + + a. 極限不存在,因為原式是 $\dfrac{0}{0}$; + b. 極限存在,且值為 $0$; + c. 極限存在,且值為 $1$; + d. 無法判斷,因為分母趨近於 $0$。 + + +2. 這題同理,我們先通過**化簡分式**的方法,得到 + $$ + \hspace{60pt} \lim_{(x,y)\to (0,0)} \frac{x^2+y^2}{x^2+y^2} + = \lim_{(x,y)\to (0,0)} 1。 + $$ + 因此 + + a. 極限不存在,因為原式是 $\dfrac{0}{0}$; + b. 極限存在,且值為 $0$; + c. 極限存在,且值為 $1$; + d. 無法判斷,因為分母趨近於 $0$。 + + +3. 同理,我們先通過**化簡分式**的方法,得到 + $$ + \lim_{(x,y)\to (0,0)} \frac{x^2+y^2}{(x^2+y^2)^2} + = \lim_{(x,y)\to (0,0)} \frac{1}{x^2+y^2}。 + $$ + 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。 + +4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\lim\limits_{x\to 0} \frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是? + $$ + \lim_{x\to 0} \frac{1}{x} = ? + $$ + + a. 極限存在,且極限值為 $\infty$。 + b. 極限不存在,但 $\lim\limits_{x\to 0} \frac{1}{x}= \infty$。 + c. 極限不存在,但 $\lim\limits_{x\to 0} \frac{1}{x}= -\infty$。 + d. 極限不存在,因為 $\lim\limits_{x\to 0^-} \frac{1}{x}= -\infty$ 但 $\lim\limits_{x\to 0^+} \frac{1}{x}= \infty$,左右極限不相等。 + + +5. 現在回到本題: $\lim\limits_{(x,y)\to (0,0)} \frac{1}{x^2+y^2}$。 + 令 + $$ + r = x^2+y^2 \,(\geq 0), + $$ + 則 + $$ + (x,y)\to (0,0) \Longleftrightarrow \boxed{r= x^2+y^2 \to 0^+}。 + $$ + 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\to 0^+$。因此, + $$ + \lim_{(x,y)\to (0,0)} \frac{1}{x^2+y^2} = \lim_{r\to 0^+} \frac{1}{r}= ? + $$ + + a. 極限存在,且極限值為 $\infty$。 + b. 極限不存在,但 $\lim\limits_{(x,y)\to (0,0)} \frac{1}{x^2+y^2} = \infty$。 + c. 極限不存在,但 $\lim\limits_{(x,y)\to (0,0)} \frac{1}{x^2+y^2} = -\infty$。 + d. 極限不存在,因為左右極限不相同。 + + + + +--- +## 4️⃣分式極限處理三招:第二招:路徑比較法 + +這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。 + +我們先回憶一下,在單變數情境中,若要說明 +$$ + \lim_{x\to a} f(x) +$$ +不存在,可以檢查左右極限是否一致: +$$ + \lim_{x\to a^-} f(x) \neq \lim_{x\to a^+} f(x) \Longrightarrow \lim_{x\to a} f(x) 不存在。 +$$ +換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。 + +對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \to (a,b)$ 的「方向(路徑)」遠不只左右兩個: +可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。 + +因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定: +$\lim\limits_{(x,y)\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。 + + +定理 +路徑比較法 +對於雙變數函數 $f(x,y)$, +1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得 + $$ + \begin{aligned} + \hspace{60pt} f(x,y) \to L_1, \;\;\text{當} \;\; (x,y) \to (a,b) \;\; 沿著\;\; C_1,\\ + \hspace{60pt} f(x,y) \to L_2, \;\;當 \;\; (x,y) \to (a,b) \;\; 沿著\;\; C_2, + \end{aligned} + $$ + 其中 $L_1 \neq L_2$,則極限 $\lim\limits_{(x,y)\to (a,b)} f(x,y)$ 不存在。 +2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\lim\limits_{(x,y)\to (a,b)} f(x,y) = L$。 + + +**注意:** 由於在平面中,$(x,y) \to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。 + +--- +### Example 7 +請說明 +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} \;不存在。 +$$ + + +**Step 1. (思考方向):** + +簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。 + +也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \frac{x^2-y^2}{x^2+y^2}$ +沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。 + +**Step 2. (選擇路徑):** + +當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 +$$ + C: \boxed{y = m(x-0)+0}, 當中\;\; m \;\;為任意實數! +$$ +接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。 + +**Step 3. (計算沿路徑的極限):** + +在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此 +$$ + \begin{aligned} + \lim_{(x,y)\to (0,0) \; 沿著 \; C} f(x,y) + &= \lim_{(x,mx)\to (0,0)} f(x,mx) \\ + &= \lim_{x\to 0} f(x,mx) \\ + &= \lim_{x\to 0} \frac{x^2-(mx)^2}{x^2+(mx)^2} \\ + &= \frac{1-m^2}{1+m^2}。 + \end{aligned} +$$ +可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此: +$$ +\lim\limits_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} +$$ +極限不存在,因為不同路徑算出的函數極限值不相同 + + + + +**Step 1. (思考方向):** + +簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。 + +也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \frac{x^2-y^2}{x^2+y^2}$ +沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。 + +**Step 2. (選擇路徑):** + +當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 +$$ + C: \boxed{y = m(x-0)+0}, 當中\;\; m \;\;為任意實數! +$$ +接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。 + +**Step 3. (計算沿路徑的極限):** + +在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此 +$$ + \begin{aligned} + \lim_{(x,y)\to (0,0) \; 沿著 \; C} f(x,y) + &= \lim_{(x,mx)\to (0,0)} f(x,mx) \\ + &= \lim_{x\to 0} f(x,mx) \\ + &= \lim_{x\to 0} \frac{x^2-(mx)^2}{x^2+(mx)^2} \\ + &= \frac{1-m^2}{1+m^2}。 + \end{aligned} +$$ +可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此: +$$ +\lim\limits_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} +$$ + +a. 極限存在,且極限值為 $\dfrac{1-m^2}{1+m^2}$。 +b. 極限不存在,因為不同路徑算出的函數極限值不相同。 + + + + +--- +### Example 8 +請說明 +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4} 不存在。 +$$ + + +**Step 1. (選擇路徑:先試直線):** + +考慮通過 $(0,0)$ 的直線 +$$ + C: \boxed{y=m(x-0)+0}。 +$$ +沿著此路徑,函數 $f(x,y) = \frac{xy^2}{x^2+y^4}$ 的極限變成: +$$ + \begin{aligned} + \lim_{(x,y)\to (0,0) \; 沿著 \; C} f(x,y) = \lim_{(x,mx)\to (0,0)} \frac{x(mx)^2}{x^2+(mx)^4} = ? + \end{aligned} +$$ +$0$ + +由路徑比較法與上面的結果,我們可以為極限 +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4} +$$ +做出什麼結論: +革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否 + +**Step 2. (重新挑選路徑)** + +既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如: +$$ + \begin{aligned} + C&: y = m (x-0)^a+0, \; a 某個常數( = 1, 2, 3, 1/2, 1/3, \cdots); 或\\ + C&: x = m (y-0)^a+0, \; a 某個常數( = 1, 2, 3, 1/2, 1/3, \cdots); + \end{aligned} +$$ +當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢? + +我們注意到現在考慮的極限是 +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4} +$$ +因此,或許可以優先考慮 +$$ + C: \boxed{x= m y^2}, +$$ +因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧! +$$ + \begin{aligned} + \lim\limits_{(x,y)\to(0,0) 沿著 C} \frac{xy^2}{x^2+y^4} + &= \lim\limits_{(my^2, y)\to(0,0)} \frac{(my^2)y^2}{(my^2)^2+y^4} \\ + &= \lim\limits_{y\to 0} \frac{my^4}{(m+1)y^4} + = \frac{m}{m+1} + \end{aligned} +$$ +因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此: +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4} +$$ +極限不存在,因為不同路徑算出的函數極限值不相同 + + + + +**Step 1. (選擇路徑:先試直線):** + +考慮通過 $(0,0)$ 的直線 +$$ + C: \boxed{y=m(x-0)+0}。 +$$ +沿著此路徑,函數 $f(x,y) = \frac{xy^2}{x^2+y^4}$ 的極限變成: +$$ + \begin{aligned} + \lim_{(x,y)\to (0,0) \; 沿著 \; C} f(x,y) = \lim_{(x,mx)\to (0,0)} \frac{x(mx)^2}{x^2+(mx)^4} = ? + \end{aligned} +$$ + +a. $\frac{m^2}{1+m^4}$; +b. $\frac{m^3}{1+m^4}$; +c. $0$; +d. $1$。 + + +由路徑比較法與上面的結果,我們可以為極限 +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4} +$$ +做出什麼結論: + +a. 此極限為 $0$; +b. 此極限不存在; +c. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。 + + +**Step 2. (重新挑選路徑)** + +既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如: +$$ + \begin{aligned} + C&: y = m (x-0)^a+0, \; a 某個常數( = 1, 2, 3, 1/2, 1/3, \cdots); 或\\ + C&: x = m (y-0)^a+0, \; a 某個常數( = 1, 2, 3, 1/2, 1/3, \cdots); + \end{aligned} +$$ +當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢? + +我們注意到現在考慮的極限是 +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4} +$$ +因此,或許可以優先考慮 +$$ + C: \boxed{x= m y^2}, +$$ +因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧! +$$ + \begin{aligned} + \lim\limits_{(x,y)\to(0,0) 沿著 C} \frac{xy^2}{x^2+y^4} + &= \lim\limits_{(my^2, y)\to(0,0)} \frac{(my^2)y^2}{(my^2)^2+y^4} \\ + &= \lim\limits_{y\to 0} \frac{my^4}{(m+1)y^4} + = \frac{m}{m+1} + \end{aligned} +$$ +因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此: +$$ + \lim\limits_{(x,y)\to(0,0)} \frac{xy^2}{x^2+y^4} +$$ + +a. 極限存在,且極限值為 $\dfrac{m}{m+1}$。 +b. 極限不存在,因為不同路徑算出的函數極限值不相同。 + + + + + + +--- +## 5️⃣分式極限處理三招:第三招:極座標法 + +在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。 +現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。 + + +定理 +極座標法 +**Step 1.(變數變換)** 令 +$$ + \boxed{x = r \cos(\theta)},\;\; \boxed{y = r \sin(\theta)}。 +$$ +**Step 2.(變換極限)** 由於 +$$ + \boxed{(x,y)\to (0,0) \Longleftrightarrow r \to 0^+}, +$$ +因此 +$$ + \begin{aligned} + \lim_{(x,y)\to (0,0)} f(x,y) + &\boxed{= \lim_{ r \to 0^+ } f( r \cos(\theta), r \sin(\theta) )}。 + \end{aligned} +$$ +**Step 3.(極限判斷)** 如果 +$$ + \lim_{ r \to 0^+ } f( r \cos(\theta), r \sin(\theta) ) = L, +$$ +其中 $L$ 與 $\theta$ 無關,則 +$$ + \lim_{(x,y)\to (0,0)} f(x,y) = L。 +$$ +反之,若 $L$ 與 $\theta$ 有關(或極限不存在),則 +$$ + \lim\limits_{(x,y)\to (0,0)} f(x,y) \; 不存在。 +$$ + + +極座標法的方法說明如下: +1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。 +2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限! +3. 第 3 步:如果極限與 $\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。 + + +**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\theta)$ 重新表示,使極限行為更容易分析。 +**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。 + +--- +### Example 9 +求下列極限的值: +$$ + \lim_{(x,y)\to(0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2}。 +$$ +此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。 + + +利用極座標法:令 +$$ + \boxed{x = r \cos(\theta)},\;\; \boxed{y = r \sin(\theta)}, +$$ +則 +$$ + \begin{aligned} + \lim_{(x,y)\to(0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2} + &= \lim_{r\to 0^+ } \frac{\sin(r^2)}{r^2} \\ + &= \lim_{R\to 0^+ } \frac{\sin(R)}{R} \;\;( R:=r^2,變數變換) \\ + &= \lim_{R\to 0^+ } \cos(R) \;\; (羅必達法,單變數) \\ + &= \cos(0) = 1 + \end{aligned} +$$ +因此, +$$ + \lim_{(x,y)\to(0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2} +$$ +存在,且極限值為 $1$ + + + + +利用極座標法:令 +$$ + \boxed{x = r \cos(\theta)},\;\; \boxed{y = r \sin(\theta)}, +$$ +則 +$$ + \begin{aligned} + \lim_{(x,y)\to(0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2} + &= \lim_{r\to 0^+ } \frac{\sin(r^2)}{r^2} \\ + &= \lim_{R\to 0^+ } \frac{\sin(R)}{R} \;\;( R:=r^2,變數變換) \\ + &= \lim_{R\to 0^+ } \cos(R) \;\; (羅必達法,單變數) \\ + &= \cos(0) = 1 + \end{aligned} +$$ +因此, +$$ + \lim_{(x,y)\to(0,0)} \frac{\sin(x^2+y^2)}{x^2+y^2} +$$ + +a. 存在,且極限值為 $1$; +b. 不存在; +c. 無法判斷; + + + + + +--- +### Example 10 +求下列極限的值: +$$ + \lim_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2}。 +$$ +此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。 + + +利用極座標法:令 +$$ + \boxed{x = r \cos(\theta)},\;\; \boxed{y = r \sin(\theta)}, +$$ +則 +$$ + \begin{aligned} + \lim_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} + &= \lim_{r\to 0^+ } \frac{r^2 (\cos^2(\theta) - \sin^2(\theta))}{r^2} \\ + &= \lim_{r\to 0^+ } \cos^2(\theta) - \sin^2(\theta) \\ + &= \cos^2(\theta) - \sin^2(\theta) + \end{aligned} +$$ +因此, +$$ + \lim_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} +$$ +不存在,因為不同的角度 $\theta$,得到不同的極限值 + + + + +利用極座標法:令 +$$ + \boxed{x = r \cos(\theta)},\;\; \boxed{y = r \sin(\theta)}, +$$ +則 +$$ + \begin{aligned} + \lim_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} + &= \lim_{r\to 0^+ } \frac{r^2 (\cos^2(\theta) - \sin^2(\theta))}{r^2} \\ + &= \lim_{r\to 0^+ } \cos^2(\theta) - \sin^2(\theta) \\ + &= \cos^2(\theta) - \sin^2(\theta) + \end{aligned} +$$ +因此, +$$ + \lim_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} +$$ + +a. 存在,且極限值為 $\cos^2(\theta) - \sin^2(\theta)$; +b. 不存在,因為不同的角度 $\theta$,得到不同的極限值; +c. 無法判斷; + + + + + +--- +## 6️⃣連續的定義與「補洞」範例 + +在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果 +$$ + \lim_{x\to a} f(x) = f(a)。 +$$ +這個等式能成立,必須同時滿足: +1. 極限存在:$\lim\limits_{x\to a} f(x)$ 存在; +2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain); +3. 兩者相同: 極限值等於函數值。 + +在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。 + +這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀: +若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。 + + +定義 +多變數函數的連續 +對於一個雙變數函數 $f(x,y)$ 而言, +1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**, +如果 +$$ + \lim_{(x,y)\to (a,b)} f(x,y) = f(a,b)。 +$$ +2. 我們說 $f(x,y)$ 在一個集合 $D\subseteq \mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。 + + +同樣的,等式 +$$ + \lim_{(x,y)\to (a,b)} f(x,y) = f(a,b) +$$ +成立,必須同時滿足: +1. 極限存在:$\lim\limits_{(x,y)\to (a,b)} f(x,y)$ 存在; +2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain); +3. 兩者相同: 極限值等於函數值。 + + +--- +### Example 11 +試問函數 +$$ + f(x,y) = \frac{x^2-y^2}{x^2+y^2}。 +$$ +在哪個(最大的)集合 $D$ 上是連續的? + + +1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得 +$$ + \lim_{(x,y)\to(a,b)} f(x,y) = f(a,b) + \Longleftrightarrow \lim_{(x,y)\to(a,b)} \frac{x^2-y^2}{x^2+y^2} = \frac{a^2-b^2}{a^2+b^2}。 +$$ +成立。因此,你的答案是: +$a,b$ 皆可為任意任意實數,但不能同時等於 $0$ + +2. 由上, $D$,作為函數連續點的收集。答案是: +$D= \{ (x,y) \in \mathbb{R}^2 \vert (x,y)\neq (0,0) \}$ + + + + +1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得 +$$ + \lim_{(x,y)\to(a,b)} f(x,y) = f(a,b) + \Longleftrightarrow \lim_{(x,y)\to(a,b)} \frac{x^2-y^2}{x^2+y^2} = \frac{a^2-b^2}{a^2+b^2}。 +$$ +成立。因此,你的答案是: + +a. $a,b$ 皆可為任意實數; +b. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。 +c. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。 + + +2. 由上, $D$,作為函數連續點的收集。答案是: + +a. $D= \mathbb{R}^2$。 +b. $\{ (x,y) \vert (x,y)\neq (0,0) \} \subseteq D$。而是否 $(0,0)\in D$ 須做額外判斷。 +c. $D= \{ (x,y) \in \mathbb{R}^2 \vert (x,y)\neq (0,0) \}$。 +d. $D= f(x,y)$ 的定義域。 + + + + + + + + +註解 +多項式函數與有理函數的連續性 +1. 任意的二元多項式函數 $p(x,y)$ 在 $\mathbb{R}^2$ 都是連續的。 +2. 任意的有理函數 $r(x,y) = \dfrac{p(x,y)}{q(x,y)}$,在其定義域 + $$ + D= \{ (x,y) \in \mathbb{R}^2 \vert q(x,y)\neq 0 \} + $$ + 上,都是連續的。 + + +--- +### Example 12 +試問函數 +$$ + f(x,y) = + \begin{cases} + \dfrac{x^2-y^2}{x^2+y^2} & \text{if } (x,y) \neq (0,0),\\ + 0 & \text{if } (x,y) = (0,0), + \end{cases} +$$ +在哪個(最大的)集合 $D$ 上是連續的? + + +1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查 +$$ + \lim_{(x,y)\to(a,b)} f(x,y) = f(a,b)。 +$$ +2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \neq (0,0)$ 的定義不同,因此必須「分開討論」。 + +3. **情況 1:** 當 $(a,b) \neq (0,0)$ 時,連續的判斷變成是檢查? +$\lim\limits_{(x,y)\to(a,b)} \frac{x^2-y^2}{x^2+y^2} = \frac{a^2-b^2}{a^2+b^2}$ + + 由極限四則運算中的除法法則,當 $(a,b) \neq (0,0)$ 時, +$f(x,y)$ 在 $(a,b) \neq (0,0)$ 處都是連續的 + +4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查? +$\lim\limits_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} = 0$ + + 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時, +$f(x,y)$ 在 $(0,0)$ 是不連續的 + +5. 由上, $D$,作為函數連續點的收集。答案是: +$D= \mathbb{R}^2 - \{ (0,0) \}$ + + + + +1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查 +$$ + \lim_{(x,y)\to(a,b)} f(x,y) = f(a,b)。 +$$ +2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \neq (0,0)$ 的定義不同,因此必須「分開討論」。 + +3. **情況 1:** 當 $(a,b) \neq (0,0)$ 時,連續的判斷變成是檢查? + + a. $\lim\limits_{(x,y)\to(a,b)} \frac{x^2-y^2}{x^2+y^2} = \frac{a^2-b^2}{a^2+b^2}$; + b. $\lim\limits_{(x,y)\to(a,b)} 0 = \frac{a^2-b^2}{a^2+b^2}$。 + + + 由極限四則運算中的除法法則,當 $(a,b) \neq (0,0)$ 時, + + a. $f(x,y)$ 在 $(a,b) \neq (0,0)$ 處都是連續的; + b. 還無法判斷。 + + +4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查? + + a. $\lim\limits_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2} = 0$; + b. $\lim\limits_{(x,y)\to(0,0)} 0 = 0$。 + + + 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時, + + a. $f(x,y)$ 在 $(0,0)$ 是連續的; + b. $f(x,y)$ 在 $(0,0)$ 是不連續的。 + + +5. 由上, $D$,作為函數連續點的收集。答案是: + + a. $D= \mathbb{R}^2$。 + b. $D= \mathbb{R}^2 - \{ (0,0) \}$。 + c. $D= \{(0,0)\}$。 + + + + + +--- +### Example 13 +試問函數 +$$ + f(x,y) = + \begin{cases} + \dfrac{x^2y}{x^2+y^2} & \text{if } (x,y) \neq (0,0),\\ + 0 & \text{if } (x,y) = (0,0), + \end{cases} +$$ +在哪個(最大的)集合 $D$ 上是連續的? + + +1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查 +$$ + \lim_{(x,y)\to(a,b)} f(x,y) = f(a,b)。 +$$ +2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \neq (0,0)$ 的定義不同,因此必須「分開討論」。 + +3. **情況 1:** 當 $(a,b) \neq (0,0)$ 時,連續的判斷變成是檢查? +$\lim\limits_{(x,y)\to(a,b)} \frac{x^2y}{x^2+y^2} = \frac{a^2b}{a^2+b^2}$ + + 由極限四則運算中的除法法則,當 $(a,b) \neq (0,0)$ 時, +$f(x,y)$ 在 $(a,b) \neq (0,0)$ 處都是連續的 + +4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查? +$\lim\limits_{(x,y)\to(0,0)} \frac{x^2y}{x^2+y^2} = 1$ + + 透過極座標法,我們有 + $$ + \lim\limits_{(x,y)\to(0,0)} \frac{x^2y}{x^2+y^2} = ? + $$ +$0$ + + 因此,得到的結果是,當 $(a,b) = (0,0)$ 時, +$f(x,y)$ 在 $(0,0)$ 是連續的 + +5. 由上, $D$,作為函數連續點的收集。答案是: +$D= \mathbb{R}^2$ + + + + +1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查 +$$ + \lim_{(x,y)\to(a,b)} f(x,y) = f(a,b)。 +$$ +2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \neq (0,0)$ 的定義不同,因此必須「分開討論」。 + +3. **情況 1:** 當 $(a,b) \neq (0,0)$ 時,連續的判斷變成是檢查? + + a. $\lim\limits_{(x,y)\to(a,b)} \frac{x^2y}{x^2+y^2} = \frac{a^2b}{a^2+b^2}$; + b. $\lim\limits_{(x,y)\to(a,b)} 0 = \frac{a^2b}{a^2+b^2}$。 + + + 由極限四則運算中的除法法則,當 $(a,b) \neq (0,0)$ 時, + + a. $f(x,y)$ 在 $(a,b) \neq (0,0)$ 處都是連續的; + b. 還無法判斷。 + + +4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查? + + a. $\lim\limits_{(x,y)\to(0,0)} \frac{x^2y}{x^2+y^2} = 1$; + b. $\lim\limits_{(x,y)\to(0,0)} 0 = 0$。 + + + 透過極座標法,我們有 + $$ + \lim\limits_{(x,y)\to(0,0)} \frac{x^2y}{x^2+y^2} = ? + $$ + + a. $0$; + b. $1$。 + c. 不存在 + + + 因此,得到的結果是,當 $(a,b) = (0,0)$ 時, + + a. $f(x,y)$ 在 $(0,0)$ 是連續的; + b. $f(x,y)$ 在 $(0,0)$ 是不連續的。 + + +5. 由上, $D$,作為函數連續點的收集。答案是: + + a. $D= \mathbb{R}^2$。 + b. $D= \mathbb{R}^2 - \{ (0,0) \}$。 + c. $D= \{(0,0)\}$。 + + + + + + +--- +## 7️⃣合成函數的連續性 + +這一部分,我們要探討一些常見形式的二元函數,例如: +$$ + f(x,y) = \sin(x^2+y^2),\, e^{-(x^2+y^2)} +$$ +這類函數,都具有 **「合成(composition)」** 的結構。 + +還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。 +也就是說,對於合成函數 +$$ + h(x) := g\bigl(f(x)\bigr), +$$ +如果以下兩個條件符合: +1. 函數 $f(x)$ 在 $x=a$ 是連續的, +2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的, +那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的, +$$ + \lim\limits_{x\to a} h(x) = \lim\limits_{x\to a} g\bigl(f(x)\bigr) = g\bigl(f(a)\bigr) = h(a)。 +$$ + +在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理: + + +定理 +合成函數的連續性 +對於合成函數 +$$ + h(x,y) := g\bigl(f(x,y)\bigr), +$$ +如果以下兩個條件符合: +1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的, +2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的 +那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的, +$$ + \lim\limits_{(x,y)\to (a,b)} h(x,y) = \lim\limits_{(x,y)\to (a,b)} g\bigl(f(x,y)\bigr) = g\bigl(f(a,b)\bigr) = h(a,b)。 +$$ + + + +下面給一個簡單的說明。由於 +$$ + \begin{aligned} + (x,y) \to (a,b) + &\Longrightarrow f(x,y) \to f(a,b) \;\; (\because f \; 在\; (a,b) \; 連續 )\\ + &\Longrightarrow g\bigl( f(x,y) \bigr) \to g\bigl( f(a,b) \bigr) \;\; (\because g \; 在\; f(a,b) \; 連續 )\\ + &\Longrightarrow h(x,y) \to h(a,b)。 + \end{aligned} +$$ +因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。 + + + + +--- +### Example 14 +試問函數 +$$ + h(x,y) = \sin(x^2+y^2) +$$ +在哪個(最大的)集合 $D$ 上是連續的? + + +1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成? + $$ + h(x,y) = g\bigl( f(x,y) \bigr) + $$ + 其中 $f(x,y)=?$ +$\boxed{x^2 +y^2}$ + 而 $g(u)=?$ +$\boxed{sin(u)}$ +2. 由於: + $$ + \begin{aligned} + &函數\; f(x,y) \;在\; D_1 \;上是連續的;\\ + &函數\; g(u) \; 在\; D_2 \;上是連續的;\\ + \end{aligned} + $$ + 其中 $(D_1,D_2)=?$ +$\left( \mathbb{R}^2, \mathbb{R} \right)$ + +3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足 + $$ + (a,b) \in D_1, \; f(a,b)\in D_2, + $$ + 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。 + + 由上面的回答,$(a,b)$ 所須滿足的條件為? +$(a,b)\in \mathbb{R}^2$ + + +4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的? +$\mathbb{R}^2$ + +**備註**:$h(x,y) = \sin (x^2+y^2)$ 在 $\mathbb{R}^2$ 上連續,這等價於 +$$ + \lim_{(x,y)\to (a,b)} \sin (x^2+y^2) = \sin (a^2+b^2), \; \forall (x,y)\in \mathbb{R}^2。 +$$ + + + +1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成? + $$ + h(x,y) = g\bigl( f(x,y) \bigr) + $$ + 其中 $f(x,y)=?$ + + + 而 $g(u)=?$ + + +2. 由於: + $$ + \begin{aligned} + &函數\; f(x,y) \;在\; D_1 \;上是連續的;\\ + &函數\; g(u) \; 在\; D_2 \;上是連續的;\\ + \end{aligned} + $$ + 其中 $(D_1,D_2)=?$ + + a. $\left( \mathbb{R}, \mathbb{R}^2 \right)$。 + b. $\left( \mathbb{R}^2, \mathbb{R} \right)$。 + c. $\left( \mathbb{R}^2, \mathbb{R}^2 \right)$。 + + +3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足 + $$ + (a,b) \in D_1, \; f(a,b)\in D_2, + $$ + 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。 + + 由上面的回答,$(a,b)$ 所須滿足的條件為? + + a. $(a,b)\in \mathbb{R}^2$。 + b. $(a,b)= (0,0)$。 + c. $(a,b)\in \mathbb{R}^2 - \{ (0,0) \}$。 + + +4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的? + + a. $\mathbb{R}^2$。 + b. $\{ (0,0) \}$。 + c. $\mathbb{R}^2 - \{ (0,0) \}$。 + + + +**備註**:$h(x,y) = \sin (x^2+y^2)$ 在 $\mathbb{R}^2$ 上連續,這等價於 +$$ + \lim_{(x,y)\to (a,b)} \sin (x^2+y^2) = \sin (a^2+b^2), \; \forall (x,y)\in \mathbb{R}^2。 +$$ + + + + + +--- +### Example 15 +試問函數 +$$ + h(x,y) = \ln \left( \dfrac{y}{x} \right) +$$ +在哪個(最大的)集合 $D$ 上是連續的? + + +1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成? + $$ + h(x,y) = g\bigl( f(x,y) \bigr) + $$ + 其中 $f(x,y)=?$ +$\boxed{y/x}$ + 而 $g(u)=?$ +$\boxed{ln(u)}$ +2. 由於: + $$ + \begin{aligned} + &函數\; f(x,y) \;在\; D_1 \;上是連續的;\\ + &函數\; g(u) \; 在\; D_2 \;上是連續的;\\ + \end{aligned} + $$ + 其中 $(D_1,D_2)=?$ +$\left( \{(x,y)\in\mathbb{R}^2 \mid x\neq 0\},\; (0,\infty) \right)$ + +3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足 + $$ + (a,b) \in D_1, \; f(a,b)\in D_2, + $$ + 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。 + + 由上面的回答,$(a,b)$ 所須滿足的條件為? +$a\neq 0$ 且 $b/a >0$ + +4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的? +$\left\{ (a,b)\in \mathbb{R}^2 \vert a\neq 0,\; b/a > 0 \right\}$ + +**備註**:$h(x,y) = \ln \left( \dfrac{y}{x} \right)$ 在 $D$ 上連續,這等價於 +$$ + \lim_{(x,y)\to (a,b)} \ln \left( \dfrac{y}{x} \right) + = \ln \left( \dfrac{b}{a} \right) , \; \forall (x,y)\in D。 +$$ + + + +1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成? + $$ + h(x,y) = g\bigl( f(x,y) \bigr) + $$ + 其中 $f(x,y)=?$ + + + 而 $g(u)=?$ + + +2. 由於: + $$ + \begin{aligned} + &函數\; f(x,y) \;在\; D_1 \;上是連續的;\\ + &函數\; g(u) \; 在\; D_2 \;上是連續的;\\ + \end{aligned} + $$ + 其中 $(D_1,D_2)=?$ + + a. $\left( \mathbb{R}^2,\; \mathbb{R} \right)$。 + b. $\left( \{(x,y)\in\mathbb{R}^2 \mid x=0\},\; \mathbb{R} \right)$。 + c. $\left( \{(x,y)\in\mathbb{R}^2 \mid x\neq 0\},\; (0,\infty) \right)$。 + +3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足 + $$ + (a,b) \in D_1, \; f(a,b)\in D_2, + $$ + 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。 + + 由上面的回答,$(a,b)$ 所須滿足的條件為? + + a. $(a,b)\in \mathbb{R}^2$。 + b. $a\neq 0$。 + c. $a\neq 0$ 且 $b/a >0$。 + +4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的? + + a. $\mathbb{R}^2$。 + b. $\left\{ (a,b)\in \mathbb{R}^2 \vert a\neq 0,\; b/a > 0 \right\}$。 + c. 以上皆非。 + + +**備註**:$h(x,y) = \ln \left( \dfrac{y}{x} \right)$ 在 $D$ 上連續,這等價於 +$$ + \lim_{(x,y)\to (a,b)} \ln \left( \dfrac{y}{x} \right) + = \ln \left( \dfrac{b}{a} \right) , \; \forall (x,y)\in D。 +$$ + + + + +--- +## 8️⃣推廣到多變數函數 + +對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如, + +1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為 + $$ + \lim_{(x,y,z)\to (a,b,c)} f(x,y,z) = L + $$ + 也可記作 + $$ + f(x,y,z) \to L\; 當\; (x,y,z) \to (a,b,c)。 + $$ + 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。 +2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果 + $$ + \lim_{(x,y,z)\to (a,b,c)} f(x,y,z) = f(a,b,c)。 + $$ + 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。 + +另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。 + + diff --git a/pages/Ch14/C14_2/exported_result_14_2.json b/pages/Ch14/C14_2/exported_result_14_2.json new file mode 100644 index 0000000000000000000000000000000000000000..b7561d99b3662b2ed35049d01b514adfb986c0d2 --- /dev/null +++ b/pages/Ch14/C14_2/exported_result_14_2.json @@ -0,0 +1,27883 @@ +{ + "toc": [ + { + "label": "極限與連續", + "id": "sec", + "level": 1 + }, + { + "label": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "id": "1", + "level": 2 + }, + { + "label": "Example 1", + "id": "Example-1", + "level": 3 + }, + { + "label": "Example 2", + "id": "Example-2", + "level": 3 + }, + { + "label": "2️⃣極限的四則運算法則與多項式/有理函數", + "id": "2", + "level": 2 + }, + { + "label": "Example 3", + "id": "Example-3", + "level": 3 + }, + { + "label": "Example 4", + "id": "Example-4", + "level": 3 + }, + { + "label": "Example 5", + "id": "Example-5", + "level": 3 + }, + { + "label": "3️⃣分式極限處理三招:第一招:化簡法", + "id": "3", + "level": 2 + }, + { + "label": "Example 6", + "id": "Example-6", + "level": 3 + }, + { + "label": "4️⃣分式極限處理三招:第二招:路徑比較法", + "id": "4", + "level": 2 + }, + { + "label": "Example 7", + "id": "Example-7", + "level": 3 + }, + { + "label": "Example 8", + "id": "Example-8", + "level": 3 + }, + { + "label": "5️⃣分式極限處理三招:第三招:極座標法", + "id": "5", + "level": 2 + }, + { + "label": "Example 9", + "id": "Example-9", + "level": 3 + }, + { + "label": "Example 10", + "id": "Example-10", + "level": 3 + }, + { + "label": "6️⃣連續的定義與「補洞」範例", + "id": "6", + "level": 2 + }, + { + "label": "Example 11", + "id": "Example-11", + "level": 3 + }, + { + "label": "Example 12", + "id": "Example-12", + "level": 3 + }, + { + "label": "Example 13", + "id": "Example-13", + "level": 3 + }, + { + "label": "7️⃣合成函數的連續性", + "id": "7", + "level": 2 + }, + { + "label": "Example 14", + "id": "Example-14", + "level": 3 + }, + { + "label": "Example 15", + "id": "Example-15", + "level": 3 + }, + { + "label": "8️⃣推廣到多變數函數", + "id": "8", + "level": 2 + } + ], + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "極限與連續", + "newline": "true", + "runs": [ + { + "text": "極限與連續", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "newline": "true", + "runs": [ + { + "text": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在第一章中,我們談過單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在某點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的極限:請回想看看,當初我們探討的「極限」概念是什麼?" + } + ], + "options": [ + { + "key": "a", + "text": "當 $x=a$ 時,$f(x)$ 的值是否存在;" + }, + { + "key": "b", + "text": "當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會趨近某個固定的實數 $L$;" + }, + { + "key": "c", + "text": "函數 $f(x)$在 $a$ 連續。" + }, + { + "key": "d", + "text": "當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會等於 $f(a)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣的概念可以自然地延伸到雙變數,甚至多變數的情況。下面我們先以雙變數函數 $f(x,y)$ 為例,定義多變數函數的「極限」。", + "newline": "false", + "runs": [ + { + "text": "這樣的概念可以自然地延伸到雙變數,甚至多變數的情況。下面我們先以雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 為例,定義多變數函數的「極限」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "多變數函數的極限", + "body": [ + { + "type": "paragraph", + "content": "對於一個雙變數函數 $f(x,y)$ 而言,我們說 $f(x,y)$ 在某點 $(a,b)$ 的極限(limit)存在,如果,當 $(x,y)$ 越來越接近點 $(a,b)$ 時,函數值 $f(x,y)$ 會趨近某個固定的實數 $L$。此外,我們記作$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L。\n$$我們也同樣稱「 $f(x,y)$ 的極限為 $L$,當 $(x,y)$ 趨近於 $(a,b)$ 時」。或標記為$$\nf(x,y) \\to L\\; \\text{ as } (x,y) \\to (a,b)。\n$$", + "newline": "false", + "runs": [ + { + "text": "對於一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言,我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在某點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限(limit)", + "style": "bold" + }, + { + "text": "存在,如果,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 越來越接近點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時,函數值 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 會趨近某個固定的實數 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。此外,我們記作" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L。\n$$", + "kind": "math_block" + }, + { + "text": "我們也同樣稱「 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限", + "style": "bold" + }, + { + "text": "為 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時」。或標記為" + }, + { + "latex": "$$\nf(x,y) \\to L\\; \\text{ as } (x,y) \\to (a,b)。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "換句話說,我們想觀察 $(a,b)$ 附近的小區域(neighborhood)但不包含 $(a,b)$ 本身這點。是否當這樣的區域越來越集中於 $(a,b)$ 時,$f(x,y)$ 的值會越來越接近某個固定的數 $L$?如果是,便稱函數 $f(x,y)$ 在點 $(a,b)$ 的極限存在。", + "newline": "false", + "runs": [ + { + "text": "換句話說,我們想觀察 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近的小區域(neighborhood)但不包含 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 本身這點。是否當這樣的區域越來越集中於 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值會越來越接近某個固定的數 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "?如果是,便稱函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "為了更直覺地理解多變數函數的極限的概念,讓我們考慮下面兩個例子。", + "newline": "false", + "runs": [ + { + "text": "為了更直覺地理解多變數函數的極限的概念,讓我們考慮下面兩個例子。" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n$=1$\n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。\n\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$f(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。\n\n\n\n---\n### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n不存在\n\n\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n\n\n---\n## 2️⃣極限的四則運算法則與多項式/有理函數\n\n前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?\n\n在這裡,我們將採取 「**由簡入繁、以簡馭繁**」 的方式,建立一套能處理大部分極限問題的方法。\n\n下面這三個極限,是最基本、也最沒有爭議的:\n$$\n \\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$\n透過這三個簡單的基礎極限,再結合「**極限的四則運算法則**」,我們便能推算出更複雜組合函數的極限。\n\n\n特性\n極限的四則運算法則\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$\n則有:\n1. 加法法則: \n $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$\n2. 減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。\n3. 乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。\n4. 常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。\n5. 除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。\n\n\n***注意 1:*** 上面極限的四則運算法則允許我們 **把複雜的極限拆成較簡單的極限** 來計算。比方,加法法則可寫成\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$\n其餘各法則亦然。\n\n***注意 2:*** 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!\n一旦 $M = 0$,除法法則便「**派不上用場**」,而極限\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$\n是否存在、如何判斷、如何計算,都必須***另外分析***!請參考本節後半部「**分式極限處理三招**」。\n\n---\n### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限$$\n\\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$是否存在?如果存在,請寫下其極限值 $L$。", + "newline": "false", + "runs": [ + { + "text": "請透過觀察函數 " + }, + { + "latex": "$f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 的圖形,回答極限" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "是否存在?如果存在,請寫下其極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_25aa35fc86", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "畫一張函數圖", + "newline": "false", + "runs": [ + { + "text": "畫一張函數圖", + "style": "bold" + } + ] + }, + { + "type": "geogebra", + "id": "yv3p945m", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "試問", + "newline": "false", + "runs": [ + { + "text": "試問" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + }, + { + "text": "會,且值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?會,且值為 $1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "latex": "$=1$", + "kind": "math" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$$=1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "最後,我們特別提醒一點,雖然這題的函數 " + }, + { + "latex": "$f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)=(0,0)$", + "kind": "math" + }, + { + "text": " 上是沒有定義的,但是這完全不影響我們的對函數極限在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的判斷。" + } + ], + "content": "最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b1b3a81539", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "畫一張函數圖", + "newline": "false", + "runs": [ + { + "text": "畫一張函數圖", + "style": "bold" + } + ] + }, + { + "type": "geogebra", + "id": "yv3p945m", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "試問", + "newline": "false", + "runs": [ + { + "text": "試問" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "會,且值為 $0$;" + }, + { + "key": "b", + "text": "會,且值為 $1$;" + }, + { + "key": "c", + "text": "不會,$f(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;" + }, + { + "key": "d", + "text": "不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$=0$;" + }, + { + "key": "b", + "text": "$=1$;" + }, + { + "key": "c", + "text": "$=\\infty$;" + }, + { + "key": "d", + "text": "不存在;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "最後,我們特別提醒一點,雖然這題的函數 " + }, + { + "latex": "$f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)=(0,0)$", + "kind": "math" + }, + { + "text": " 上是沒有定義的,但是這完全不影響我們的對函數極限在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的判斷。" + } + ], + "content": "最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n不存在\n\n\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n\n\n---\n## 2️⃣極限的四則運算法則與多項式/有理函數\n\n前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?\n\n在這裡,我們將採取 「**由簡入繁、以簡馭繁**」 的方式,建立一套能處理大部分極限問題的方法。\n\n下面這三個極限,是最基本、也最沒有爭議的:\n$$\n \\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$\n透過這三個簡單的基礎極限,再結合「**極限的四則運算法則**」,我們便能推算出更複雜組合函數的極限。\n\n\n特性\n極限的四則運算法則\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$\n則有:\n1. 加法法則: \n $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$\n2. 減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。\n3. 乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。\n4. 常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。\n5. 除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。\n\n\n***注意 1:*** 上面極限的四則運算法則允許我們 **把複雜的極限拆成較簡單的極限** 來計算。比方,加法法則可寫成\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$\n其餘各法則亦然。\n\n***注意 2:*** 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!\n一旦 $M = 0$,除法法則便「**派不上用場**」,而極限\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$\n是否存在、如何判斷、如何計算,都必須***另外分析***!請參考本節後半部「**分式極限處理三招**」。\n\n---\n### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$是否存在?如果存在,請寫出其極限值 $L$。", + "newline": "false", + "runs": [ + { + "text": "請透過觀察函數 " + }, + { + "latex": "$g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 的圖形,回答" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "是否存在?如果存在,請寫出其極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6f0e3406e4", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "geogebra", + "id": "sppdazxm", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$g(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + }, + { + "text": "不會,因為不同方向觀察 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,會看到到不同的趨近值" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "不存在" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$不存在" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_75bd76c9e6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "geogebra", + "id": "sppdazxm", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$g(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "會,且值為 $0$;" + }, + { + "key": "b", + "text": "會,且值為 $1$;" + }, + { + "key": "c", + "text": "不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;" + }, + { + "key": "d", + "text": "不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$=0$;" + }, + { + "key": "b", + "text": "$=1$;" + }, + { + "key": "c", + "text": "$=\\infty$;" + }, + { + "key": "d", + "text": "不存在;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣極限的四則運算法則與多項式/有理函數", + "newline": "true", + "runs": [ + { + "text": "2️⃣極限的四則運算法則與多項式/有理函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?", + "newline": "false", + "runs": [ + { + "text": "前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在這裡,我們將採取 「由簡入繁、以簡馭繁」 的方式,建立一套能處理大部分極限問題的方法。", + "newline": "false", + "runs": [ + { + "text": "在這裡,我們將採取 「" + }, + { + "text": "由簡入繁、以簡馭繁", + "style": "bold" + }, + { + "text": "」 的方式,建立一套能處理大部分極限問題的方法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面這三個極限,是最基本、也最沒有爭議的:$$\n\\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$透過這三個簡單的基礎極限,再結合「極限的四則運算法則」,我們便能推算出更複雜組合函數的極限。", + "newline": "false", + "runs": [ + { + "text": "下面這三個極限,是最基本、也最沒有爭議的:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$", + "kind": "math_block" + }, + { + "text": "透過這三個簡單的基礎極限,再結合「" + }, + { + "text": "極限的四則運算法則", + "style": "bold" + }, + { + "text": "」,我們便能推算出更複雜組合函數的極限。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "極限的四則運算法則", + "body": [ + { + "type": "paragraph", + "content": "如果$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$則有:", + "newline": "false", + "runs": [ + { + "text": "如果" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$", + "kind": "math_block" + }, + { + "text": "則有:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "加法法則:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$", + "kind": "math" + } + ], + "content": "加法法則:$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "減法法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "乘法法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "常數積法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為任意常數。" + } + ], + "content": "常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "除法法則(須 " + }, + { + "latex": "$M\\neq 0$", + "kind": "math" + }, + { + "text": "): " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1: 上面極限的四則運算法則允許我們 把複雜的極限拆成較簡單的極限 來計算。比方,加法法則可寫成$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$其餘各法則亦然。", + "newline": "false", + "runs": [ + { + "text": "注意 1:", + "style": "bold-italic" + }, + { + "text": " 上面極限的四則運算法則允許我們 " + }, + { + "text": "把複雜的極限拆成較簡單的極限", + "style": "bold" + }, + { + "text": " 來計算。比方,加法法則可寫成" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "其餘各法則亦然。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2: 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!一旦 $M = 0$,除法法則便「派不上用場」,而極限$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$是否存在、如何判斷、如何計算,都必須另外分析!請參考本節後半部「分式極限處理三招」。", + "newline": "false", + "runs": [ + { + "text": "注意 2:", + "style": "bold-italic" + }, + { + "text": " 除法法則中,極限公式成立,條件 " + }, + { + "latex": "$M\\neq 0$", + "kind": "math" + }, + { + "text": " 至關重要!一旦 " + }, + { + "latex": "$M = 0$", + "kind": "math" + }, + { + "text": ",除法法則便「" + }, + { + "text": "派不上用場", + "style": "bold" + }, + { + "text": "」,而極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$", + "kind": "math_block" + }, + { + "text": "是否存在、如何判斷、如何計算,都必須" + }, + { + "text": "另外分析", + "style": "bold-italic" + }, + { + "text": "!請參考本節後半部「" + }, + { + "text": "分式極限處理三招", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f03dcf5f9c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$因此,我們可以利用極限的四則與乘法法則,將原式拆解如下$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$最後,透過極限的四則運算,我們可以得到: $$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$", + "newline": "false", + "runs": [ + { + "text": "由於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們可以利用極限的四則與乘法法則,將原式拆解如下" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "最後,透過極限的四則運算,我們可以得到: " + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ce8c86523d", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "由於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們可以利用極限的四則與乘法法則,將原式拆解如下" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "最後,透過極限的四則運算,我們可以得到: " + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "7" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!", + "newline": "false", + "runs": [ + { + "text": "聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "二元多項式函數的極限", + "body": [ + { + "type": "paragraph", + "content": "如果雙變數函數 $p(x,y)$ 是二元多項式函數(polynomial function of two variables),也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:$$\n\\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 直接代入 二元多項式即可!", + "newline": "false", + "runs": [ + { + "text": "如果雙變數函數 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "二元多項式函數(polynomial function of two variables)", + "style": "bold" + }, + { + "text": ",也就是由若干型式為 " + }, + { + "latex": "$c\\,x^n y^m$", + "kind": "math" + }, + { + "text": " 的項所組成,當中 " + }, + { + "latex": "$n,m$", + "kind": "math" + }, + { + "text": " 為非負整數,例如 " + }, + { + "latex": "$p(x,y)= 2x + 3y - 5x^2y$", + "kind": "math" + }, + { + "text": ",那麼有:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$", + "kind": "math_block" + }, + { + "text": "換句話說,二元多項式函數在任意一個點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限,就是把這個點 " + }, + { + "text": "直接代入", + "style": "bold" + }, + { + "text": " 二元多項式即可!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1dd27674d4", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$因此,$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$", + "newline": "false", + "runs": [ + { + "text": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "),將極限拆解為:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_fba777d8a5", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "),將極限拆解為:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "7/5" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "試問下面的推導是否正確:$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$", + "newline": "false", + "runs": [ + { + "text": "試問下面的推導是否正確:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cdb6627478", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$", + "newline": "false", + "runs": [ + { + "text": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 " + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7bea5f4612", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "正確。因此極限不存在;" + }, + { + "key": "c", + "text": "正確。因此極限值是 $\\infty$;" + }, + { + "key": "d", + "text": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!", + "newline": "false", + "runs": [ + { + "text": "聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "有理函數的極限", + "body": [ + { + "type": "paragraph", + "content": "如果雙變數函數 $r(x,y)$ 是有理函數(rational function),也就是形如$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:$$\n\\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,直接代入就好,只要分母在該點不為零!", + "newline": "false", + "runs": [ + { + "text": "如果雙變數函數 " + }, + { + "latex": "$r(x,y)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "有理函數(rational function)", + "style": "bold" + }, + { + "text": ",也就是形如" + }, + { + "latex": "$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$q(x,y)$", + "kind": "math" + }, + { + "text": " 都是二元多項式,則有:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$", + "kind": "math_block" + }, + { + "text": "如果 " + }, + { + "latex": "$q(a,b)\\neq 0$", + "kind": "math" + }, + { + "text": "。換句話說,有理函數在任意一個點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限," + }, + { + "text": "直接代入", + "style": "bold" + }, + { + "text": "就好,只要分母在該點不為零!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣分式極限處理三招:第一招:化簡法", + "newline": "true", + "runs": [ + { + "text": "3️⃣分式極限處理三招:第一招:化簡法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:$$\n\\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?", + "newline": "false", + "runs": [ + { + "text": "接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "」的狀況。也就是考慮下列情形:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$", + "kind": "math_block" + }, + { + "text": "如果 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$", + "kind": "math" + }, + { + "text": ",極限是否存在?如何找出極限值?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:「化簡極限式」。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,使分母轉換成一個極限不為 $0$ 的表達式,這樣四則運算法則重新變得可用。", + "newline": "false", + "runs": [ + { + "text": "記得,當分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:" + }, + { + "text": "「化簡極限式」", + "style": "bold" + }, + { + "text": "。這個方法的想法其實非常簡單:既然問題出在分母極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們就嘗試透過代數的化簡方式," + }, + { + "text": "使分母轉換成一個極限不為 ", + "style": "bold" + }, + { + "latex": "$0$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的表達式", + "style": "bold" + }, + { + "text": ",這樣四則運算法則重新變得可用。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "判斷下面極限是否存在。如果存在,找出極限值:", + "newline": "false", + "runs": [ + { + "text": "判斷下面極限是否存在。如果存在,找出極限值:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9c89d9ff39", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$", + "kind": "math_block" + }, + { + "text": "這時,問題就回到求取一個二元多項式的極限。因此" + }, + { + "text": "極限存在,且值為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過化簡分式$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$這時,問題就回到求取一個二元多項式的極限。因此極限存在,且值為 $0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "這題同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "text": "極限存在,且值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ], + "content": "這題同理,我們先通過化簡分式的方法,得到$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$因此極限存在,且值為 $1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "這時,雖然分母的極限還是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。但是,分子的極限由 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "同理,我們先通過化簡分式的方法,得到$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "回憶:", + "style": "bold" + }, + { + "text": " 還記得在單變數的情況中,我們處理過類似問題,例如 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0} \\frac{1}{x}$", + "kind": "math" + }, + { + "text": ",分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "、分子的極限為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。這樣的答案是?" + }, + { + "latex": "$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$", + "kind": "math" + }, + { + "text": " 但 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$", + "kind": "math" + }, + { + "text": ",左右極限不相等" + } + ], + "content": "回憶: 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "現在回到本題: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "令" + }, + { + "latex": "$$\nr = x^2+y^2 \\,(\\geq 0),\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$", + "kind": "math_block" + }, + { + "text": "請特別注意:由於 " + }, + { + "latex": "$r>0$", + "kind": "math" + }, + { + "text": ",這裡只剩下「單邊極限」 " + }, + { + "latex": "$r\\to 0^+$", + "kind": "math" + }, + { + "text": "。因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,但 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$", + "kind": "math" + } + ], + "content": "現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。令$$\nr = x^2+y^2 \\,(\\geq 0),\n$$則$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7164d1e1b5", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$", + "kind": "math_block" + }, + { + "text": "這時,問題就回到求取一個二元多項式的極限。因此" + } + ], + "content": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過化簡分式$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$這時,問題就回到求取一個二元多項式的極限。因此" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限不存在,因為原式是 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "極限存在,且值為 $0$;" + }, + { + "key": "c", + "text": "極限存在,且值為 $1$;" + }, + { + "key": "d", + "text": "無法判斷,因為分母趨近於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "這題同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$", + "kind": "math_block" + }, + { + "text": "因此" + } + ], + "content": "這題同理,我們先通過化簡分式的方法,得到$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$因此" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限不存在,因為原式是 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "極限存在,且值為 $0$;" + }, + { + "key": "c", + "text": "極限存在,且值為 $1$;" + }, + { + "key": "d", + "text": "無法判斷,因為分母趨近於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "這時,雖然分母的極限還是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。但是,分子的極限由 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "同理,我們先通過化簡分式的方法,得到$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "回憶:", + "style": "bold" + }, + { + "text": " 還記得在單變數的情況中,我們處理過類似問題,例如 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0} \\frac{1}{x}$", + "kind": "math" + }, + { + "text": ",分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "、分子的極限為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。這樣的答案是?" + }, + { + "latex": "$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$", + "kind": "math_block" + } + ], + "content": "回憶: 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\infty$。" + }, + { + "key": "b", + "text": "極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。" + }, + { + "key": "c", + "text": "極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。" + }, + { + "key": "d", + "text": "極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "現在回到本題: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "令" + }, + { + "latex": "$$\nr = x^2+y^2 \\,(\\geq 0),\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$", + "kind": "math_block" + }, + { + "text": "請特別注意:由於 " + }, + { + "latex": "$r>0$", + "kind": "math" + }, + { + "text": ",這裡只剩下「單邊極限」 " + }, + { + "latex": "$r\\to 0^+$", + "kind": "math" + }, + { + "text": "。因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$", + "kind": "math_block" + } + ], + "content": "現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。令$$\nr = x^2+y^2 \\,(\\geq 0),\n$$則$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\infty$。" + }, + { + "key": "b", + "text": "極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。" + }, + { + "key": "c", + "text": "極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。" + }, + { + "key": "d", + "text": "極限不存在,因為左右極限不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣分式極限處理三招:第二招:路徑比較法", + "newline": "true", + "runs": [ + { + "text": "4️⃣分式極限處理三招:第二招:路徑比較法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:路徑比較法(Path Comparison Method)。", + "newline": "false", + "runs": [ + { + "text": "這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時:" + }, + { + "text": "路徑比較法(Path Comparison Method)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們先回憶一下,在單變數情境中,若要說明$$\n\\lim_{x\\to a} f(x)\n$$不存在,可以檢查左右極限是否一致:$$\n\\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。", + "newline": "false", + "runs": [ + { + "text": "我們先回憶一下,在單變數情境中,若要說明" + }, + { + "latex": "$$\n\\lim_{x\\to a} f(x)\n$$", + "kind": "math_block" + }, + { + "text": "不存在,可以檢查左右極限是否一致:" + }, + { + "latex": "$$\n\\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$", + "kind": "math_block" + }, + { + "text": "換句話說,如果當 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 從「左邊」與「右邊」趨近 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 時,函數值趨近不同數字,那麼該極限就不存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。", + "newline": "false", + "runs": [ + { + "text": "對多變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中," + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": " 的「方向(路徑)」遠不只左右兩個:可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「路徑比較法」的核心思想。", + "newline": "false", + "runs": [ + { + "text": "因此,如果沿著兩條不同的路徑趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 得到不同的極限值,那就能判定:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在。這就是「" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "」的核心思想。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "路徑比較法", + "body": [ + { + "type": "paragraph", + "content": "對於雙變數函數 $f(x,y)$,", + "newline": "false", + "runs": [ + { + "text": "對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果存在兩條不同趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": ",使得" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$L_1 \\neq L_2$", + "kind": "math" + }, + { + "text": ",則極限 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在。" + } + ], + "content": "如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得$$\n\\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n$$其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "若對所有趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的趨近值皆相同且等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意: 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 所有 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,「路徑比較法」通常只拿來說明「極限不存在」。", + "newline": "false", + "runs": [ + { + "text": "注意:", + "style": "bold" + }, + { + "text": " 由於在平面中," + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": " 的方向(路徑)太多了!要檢查 " + }, + { + "text": "所有", + "style": "bold" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的趨近值皆相同且等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",實務上不太可能。因此," + }, + { + "text": "「路徑比較法」通常只拿來說明「極限不存在」", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "請說明$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "請說明" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cef57a662e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (思考方向): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (思考方向):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。", + "newline": "false", + "runs": [ + { + "text": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。", + "newline": "false", + "runs": [ + { + "text": "也就是說,我們要找出兩條不同的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 使得,函數 " + }, + { + "latex": "$f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 沿著這兩條路徑趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,計算得到的極限值不相同。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (選擇路徑): ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (選擇路徑):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:通過 $(0,0)$ 的直線。即 $$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。", + "newline": "false", + "runs": [ + { + "text": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:" + }, + { + "text": "通過 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的直線", + "style": "bold" + }, + { + "text": "。即 " + }, + { + "latex": "$$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$", + "kind": "math_block" + }, + { + "text": "接著可以考慮 " + }, + { + "latex": "$C_1: y= 2x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$C_2: y= 3x$", + "kind": "math" + }, + { + "text": " 等等,取不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3. (計算沿路徑的極限): ", + "newline": "false", + "runs": [ + { + "text": "Step 3. (計算沿路徑的極限):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$極限不存在,因為不同路徑算出的函數極限值不相同", + "newline": "false", + "runs": [ + { + "text": "在路徑 " + }, + { + "latex": "$C: y = mx$", + "kind": "math" + }, + { + "text": " 上,函數值 " + }, + { + "latex": "$f(x,y)= f(x, mx)$", + "kind": "math" + }, + { + "text": "。因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "可以看到:不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為不同路徑算出的函數極限值不相同" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_84893894c6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (思考方向): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (思考方向):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。", + "newline": "false", + "runs": [ + { + "text": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。", + "newline": "false", + "runs": [ + { + "text": "也就是說,我們要找出兩條不同的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 使得,函數 " + }, + { + "latex": "$f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 沿著這兩條路徑趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,計算得到的極限值不相同。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (選擇路徑): ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (選擇路徑):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:通過 $(0,0)$ 的直線。即 $$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。", + "newline": "false", + "runs": [ + { + "text": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:" + }, + { + "text": "通過 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的直線", + "style": "bold" + }, + { + "text": "。即 " + }, + { + "latex": "$$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$", + "kind": "math_block" + }, + { + "text": "接著可以考慮 " + }, + { + "latex": "$C_1: y= 2x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$C_2: y= 3x$", + "kind": "math" + }, + { + "text": " 等等,取不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3. (計算沿路徑的極限): ", + "newline": "false", + "runs": [ + { + "text": "Step 3. (計算沿路徑的極限):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在路徑 " + }, + { + "latex": "$C: y = mx$", + "kind": "math" + }, + { + "text": " 上,函數值 " + }, + { + "latex": "$f(x,y)= f(x, mx)$", + "kind": "math" + }, + { + "text": "。因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "可以看到:不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。" + }, + { + "key": "b", + "text": "極限不存在,因為不同路徑算出的函數極限值不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "請說明$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "請說明" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_51b88e67c9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (選擇路徑:先試直線): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (選擇路徑:先試直線):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮通過 $(0,0)$ 的直線 $$\nC: \\boxed{y=m(x-0)+0}。\n$$沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$$0$", + "newline": "false", + "runs": [ + { + "text": "考慮通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$$\nC: \\boxed{y=m(x-0)+0}。\n$$", + "kind": "math_block" + }, + { + "text": "沿著此路徑,函數 " + }, + { + "latex": "$f(x,y) = \\frac{xy^2}{x^2+y^4}$", + "kind": "math" + }, + { + "text": " 的極限變成:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由路徑比較法與上面的結果,我們可以為極限$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$做出什麼結論:革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否", + "newline": "false", + "runs": [ + { + "text": "由路徑比較法與上面的結果,我們可以為極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "做出什麼結論:革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (重新挑選路徑) ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (重新挑選路徑)", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?", + "newline": "false", + "runs": [ + { + "text": "既然所有通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$C: y=m(x-0)+0$", + "kind": "math" + }, + { + "text": " 都得到極限,我們應該改用「不同型態」的路徑,例如:" + }, + { + "latex": "$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們注意到現在考慮的極限是 $$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$因此,或許可以優先考慮$$\nC: \\boxed{x= m y^2},\n$$因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$極限不存在,因為不同路徑算出的函數極限值不相同", + "newline": "false", + "runs": [ + { + "text": "我們注意到現在考慮的極限是 " + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "因此,或許可以優先考慮" + }, + { + "latex": "$$\nC: \\boxed{x= m y^2},\n$$", + "kind": "math_block" + }, + { + "text": "因為這樣分母部份就能合併成一項(都是 " + }, + { + "latex": "$y^4$", + "kind": "math" + }, + { + "text": "),或許之後能夠比較好化簡。算算看吧!" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此,不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": "(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為不同路徑算出的函數極限值不相同" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_819afdf3ea", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (選擇路徑:先試直線): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (選擇路徑:先試直線):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "考慮通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$$\nC: \\boxed{y=m(x-0)+0}。\n$$", + "kind": "math_block" + }, + { + "text": "沿著此路徑,函數 " + }, + { + "latex": "$f(x,y) = \\frac{xy^2}{x^2+y^4}$", + "kind": "math" + }, + { + "text": " 的極限變成:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$\\frac{m^2}{1+m^4}$;" + }, + { + "key": "b", + "text": "$\\frac{m^3}{1+m^4}$;" + }, + { + "key": "c", + "text": "$0$;" + }, + { + "key": "d", + "text": "$1$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "由路徑比較法與上面的結果,我們可以為極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "做出什麼結論:" + } + ], + "options": [ + { + "key": "a", + "text": "此極限為 $0$;" + }, + { + "key": "b", + "text": "此極限不存在;" + }, + { + "key": "c", + "text": "革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (重新挑選路徑) ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (重新挑選路徑)", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?", + "newline": "false", + "runs": [ + { + "text": "既然所有通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$C: y=m(x-0)+0$", + "kind": "math" + }, + { + "text": " 都得到極限,我們應該改用「不同型態」的路徑,例如:" + }, + { + "latex": "$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "我們注意到現在考慮的極限是 " + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "因此,或許可以優先考慮" + }, + { + "latex": "$$\nC: \\boxed{x= m y^2},\n$$", + "kind": "math_block" + }, + { + "text": "因為這樣分母部份就能合併成一項(都是 " + }, + { + "latex": "$y^4$", + "kind": "math" + }, + { + "text": "),或許之後能夠比較好化簡。算算看吧!" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此,不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": "(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\dfrac{m}{m+1}$。" + }, + { + "key": "b", + "text": "極限不存在,因為不同路徑算出的函數極限值不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n$=1$\n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣分式極限處理三招:第三招:極座標法", + "newline": "true", + "runs": [ + { + "text": "5️⃣分式極限處理三招:第三招:極座標法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "在前面,我們介紹了兩個處理分式極限的技巧,包含化簡法與路徑比較法。現在,我們將介紹第三個技巧——極座標法。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。", + "newline": "false", + "runs": [ + { + "text": "在前面,我們介紹了兩個處理分式極限的技巧,包含" + }, + { + "text": "化簡法", + "style": "bold" + }, + { + "text": "與" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "。現在,我們將介紹第三個技巧——" + }, + { + "text": "極座標法", + "style": "bold" + }, + { + "text": "。這個方法,特別適用在當函數的分母部份為 " + }, + { + "latex": "$cx^2+dy^2$", + "kind": "math" + }, + { + "text": " 時。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "極座標法", + "body": [ + { + "type": "paragraph", + "content": "Step 1.(變數變換) 令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$Step 2.(變換極限) 由於$$\n\\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$因此$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$Step 3.(極限判斷) 如果$$\n\\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$其中 $L$ 與 $\\theta$ 無關,則$$\n\\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則$$\n\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "Step 1.(變數變換)", + "style": "bold" + }, + { + "text": " 令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$", + "kind": "math_block" + }, + { + "text": "Step 2.(變換極限)", + "style": "bold" + }, + { + "text": " 由於" + }, + { + "latex": "$$\n\\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "Step 3.(極限判斷)", + "style": "bold" + }, + { + "text": " 如果" + }, + { + "latex": "$$\n\\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 無關,則" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$", + "kind": "math_block" + }, + { + "text": "反之,若 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 有關(或極限不存在),則" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "極座標法的方法說明如下:", + "newline": "false", + "runs": [ + { + "text": "極座標法的方法說明如下:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 為點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的距離、" + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 為向量 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸方向的夾角。" + } + ], + "content": "第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "第 2 步:這樣的轉換,我們將極限問題轉化為單變數 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 的極限問題,尚帶有一個參數:角度 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": "。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!" + } + ], + "content": "第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "第 3 步:如果極限與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。" + } + ], + "content": "第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 極座標法,本質上就是 「變數變換法」 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。注意 2. 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 極座標法,本質上就是 " + }, + { + "text": "「變數變換法」", + "style": "bold" + }, + { + "text": " 的一種。我們只是將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 用 " + }, + { + "latex": "$(r,\\theta)$", + "kind": "math" + }, + { + "text": " 重新表示,使極限行為更容易分析。" + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5e78b84f28", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "利用極座標法:令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$則$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$因此,$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$存在,且極限值為 $1$", + "newline": "false", + "runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "存在,且極限值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a5737ce33f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "存在,且極限值為 $1$;" + }, + { + "key": "b", + "text": "不存在;" + }, + { + "key": "c", + "text": "無法判斷;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-10" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1a5d960e1e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "利用極座標法:令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$則$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$因此,$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$不存在,因為不同的角度 $\\theta$,得到不同的極限值", + "newline": "false", + "runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "不存在,因為不同的角度 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",得到不同的極限值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_35382ca2ce", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;" + }, + { + "key": "b", + "text": "不存在,因為不同的角度 $\\theta$,得到不同的極限值;" + }, + { + "key": "c", + "text": "無法判斷;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣連續的定義與「補洞」範例", + "newline": "true", + "runs": [ + { + "text": "6️⃣連續的定義與「補洞」範例", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果$$\n\\lim_{x\\to a} f(x) = f(a)。\n$$這個等式能成立,必須同時滿足: ", + "newline": "false", + "runs": [ + { + "text": "在單變數函數中,我們說一個函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 點連續,如果" + }, + { + "latex": "$$\n\\lim_{x\\to a} f(x) = f(a)。\n$$", + "kind": "math_block" + }, + { + "text": "這個等式能成立,必須同時滿足: " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "極限存在:" + }, + { + "latex": "$\\lim\\limits_{x\\to a} f(x)$", + "kind": "math" + }, + { + "text": " 存在;" + } + ], + "content": "極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數值存在:" + }, + { + "latex": "$f(a)$", + "kind": "math" + }, + { + "text": " 存在,即 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 落在 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的定義域(Domain);" + } + ], + "content": "函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "兩者相同: 極限值等於函數值。" + } + ], + "content": "兩者相同: 極限值等於函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在圖形上,這相當於:函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」。", + "newline": "false", + "runs": [ + { + "text": "在圖形上,這相當於:" + }, + { + "text": "函數在 ", + "style": "bold" + }, + { + "latex": "$x=a$", + "kind": "math", + "style": "bold" + }, + { + "text": " 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。", + "newline": "false", + "runs": [ + { + "text": "這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "多變數函數的連續", + "body": [ + { + "type": "paragraph", + "content": "對於一個雙變數函數 $f(x,y)$ 而言,", + "newline": "false", + "runs": [ + { + "text": "對於一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "連續的(continuous)", + "style": "bold" + }, + { + "text": "," + }, + { + "text": "如果" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "我們說 $f(x,y)$ 在點 $(a,b)$ 是連續的(continuous),如果$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在一個集合 " + }, + { + "latex": "$D\\subseteq \\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上是連續的,如果 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上的任一點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 皆是連續的。" + } + ], + "content": "我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣的,等式$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$成立,必須同時滿足: ", + "newline": "false", + "runs": [ + { + "text": "同樣的,等式" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "成立,必須同時滿足: " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "極限存在:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 存在;" + } + ], + "content": "極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數值存在:" + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": " 存在,即 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 落在 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的定義域(Domain);" + } + ], + "content": "函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "兩者相同: 極限值等於函數值。" + } + ], + "content": "兩者相同: 極限值等於函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-11" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_74175140dc", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,我們要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的。依照連續的定義,點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須使得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$", + "kind": "math_block" + }, + { + "text": "成立。因此,你的答案是:" + }, + { + "latex": "$a,b$", + "kind": "math" + }, + { + "text": " 皆可為任意任意實數,但不能同時等於 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$成立。因此,你的答案是:$a,b$ 皆可為任意任意實數,但不能同時等於 $0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9bf6fbc2c3", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,我們要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的。依照連續的定義,點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須使得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$", + "kind": "math_block" + }, + { + "text": "成立。因此,你的答案是:" + } + ], + "content": "首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$成立。因此,你的答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$a,b$ 皆可為任意實數;" + }, + { + "key": "b", + "text": "$a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。" + }, + { + "key": "c", + "text": "$a,b$ 皆可為任意任意實數,但不能同時等於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。" + }, + { + "key": "c", + "text": "$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。" + }, + { + "key": "d", + "text": "$D= f(x,y)$ 的定義域。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "多項式函數與有理函數的連續性", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "任意的二元多項式函數 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 都是連續的。" + } + ], + "content": "任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "任意的有理函數 " + }, + { + "latex": "$r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$", + "kind": "math" + }, + { + "text": ",在其定義域" + }, + { + "latex": "$$\nD= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n$$", + "kind": "math_block" + }, + { + "text": "上,都是連續的。" + } + ], + "content": "任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域$$\nD= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n$$上,都是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 12", + "newline": "true", + "runs": [ + { + "text": "Example 12", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 12, + "ai_prompt_md": "### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-12" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e39ddd3715", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$", + "kind": "math" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的", + "newline": "false", + "runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 處都是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$", + "kind": "math" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,$f(x,y)$ 在 $(0,0)$ 是不連續的", + "newline": "false", + "runs": [ + { + "text": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是不連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\mathbb{R}^2 - \\{ (0,0) \\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cdab41ee5a", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;" + }, + { + "key": "b", + "text": "還無法判斷。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(0,0)$ 是連續的;" + }, + { + "key": "b", + "text": "$f(x,y)$ 在 $(0,0)$ 是不連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$D= \\{(0,0)\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 13", + "newline": "true", + "runs": [ + { + "text": "Example 13", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 13, + "ai_prompt_md": "### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-13" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ba15448fd2", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$", + "kind": "math" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的", + "newline": "false", + "runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 處都是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$", + "kind": "math" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 透過極座標法,我們有$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$$0$", + "newline": "false", + "runs": [ + { + "text": " 透過極座標法,我們有" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,$f(x,y)$ 在 $(0,0)$ 是連續的", + "newline": "false", + "runs": [ + { + "text": " 因此,得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1f65bf1592", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;" + }, + { + "key": "b", + "text": "還無法判斷。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 透過極座標法,我們有" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$1$。" + }, + { + "key": "c", + "text": "不存在" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 因此,得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(0,0)$ 是連續的;" + }, + { + "key": "b", + "text": "$f(x,y)$ 在 $(0,0)$ 是不連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$D= \\{(0,0)\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "7️⃣合成函數的連續性", + "newline": "true", + "runs": [ + { + "text": "7️⃣合成函數的連續性", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "這一部分,我們要探討一些常見形式的二元函數,例如:$$\nf(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$這類函數,都具有 「合成(composition)」 的結構。", + "newline": "false", + "runs": [ + { + "text": "這一部分,我們要探討一些常見形式的二元函數,例如:" + }, + { + "latex": "$$\nf(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$", + "kind": "math_block" + }, + { + "text": "這類函數,都具有 " + }, + { + "text": "「合成(composition)」", + "style": "bold" + }, + { + "text": " 的結構。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:連續函數的合成仍然是連續的。也就是說,對於合成函數$$\nh(x) := g\\bigl(f(x)\\bigr),\n$$如果以下兩個條件符合:", + "newline": "false", + "runs": [ + { + "text": "還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:" + }, + { + "text": "連續函數的合成仍然是連續的", + "style": "bold" + }, + { + "text": "。也就是說,對於合成函數" + }, + { + "latex": "$$\nh(x) := g\\bigl(f(x)\\bigr),\n$$", + "kind": "math_block" + }, + { + "text": "如果以下兩個條件符合:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 是連續的," + } + ], + "content": "函數 $f(x)$ 在 $x=a$ 是連續的," + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$g(u)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$u=f(a)$", + "kind": "math" + }, + { + "text": " 也是連續的," + }, + { + "text": "那麼函數 " + }, + { + "latex": "$h(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 也連續。等價的," + }, + { + "latex": "$$\n\\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$", + "kind": "math_block" + } + ], + "content": "函數 $g(u)$ 在 $u=f(a)$ 也是連續的,那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,$$\n\\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:", + "newline": "false", + "runs": [ + { + "text": "在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "合成函數的連續性", + "body": [ + { + "type": "paragraph", + "content": "對於合成函數$$\nh(x,y) := g\\bigl(f(x,y)\\bigr),\n$$如果以下兩個條件符合:", + "newline": "false", + "runs": [ + { + "text": "對於合成函數" + }, + { + "latex": "$$\nh(x,y) := g\\bigl(f(x,y)\\bigr),\n$$", + "kind": "math_block" + }, + { + "text": "如果以下兩個條件符合:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 是連續的," + } + ], + "content": "函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的," + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$g(u)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$u=f(a,b)$", + "kind": "math" + }, + { + "text": " 也是連續的" + }, + { + "text": "那麼函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 也是連續的。等價的," + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,$$\n\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9e78a4cd64", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "下面給一個簡單的說明。由於$$\n\\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。", + "newline": "false", + "runs": [ + { + "text": "下面給一個簡單的說明。由於" + }, + { + "latex": "$$\n\\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 14", + "newline": "true", + "runs": [ + { + "text": "Example 14", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 14, + "ai_prompt_md": "### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-14" + }, + { + "type": "paragraph", + "content": "試問函數$$\nh(x,y) = \\sin(x^2+y^2)\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nh(x,y) = \\sin(x^2+y^2)\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c111de229c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{x^2 +y^2}$", + "kind": "math" + }, + { + "text": "而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{sin(u)}$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$$\\boxed{x^2 +y^2}$而 $g(u)=?$$\\boxed{sin(u)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + }, + { + "latex": "$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + }, + { + "latex": "$(a,b)\\in \\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?$(a,b)\\in \\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?$\\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\sin (x^2+y^2)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f66780624b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "x^2 +y^2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": " 而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "text": " " + } + ], + "answers": [ + "sin(u)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。" + }, + { + "key": "b", + "text": "$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。" + }, + { + "key": "c", + "text": "$\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b)\\in \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$(a,b)= (0,0)$。" + }, + { + "key": "c", + "text": "$(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$\\mathbb{R}^2 - \\{ (0,0) \\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\sin (x^2+y^2)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 15", + "newline": "true", + "runs": [ + { + "text": "Example 15", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 15, + "ai_prompt_md": "### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-15" + }, + { + "type": "paragraph", + "content": "試問函數$$\nh(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nh(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dfc5d11b89", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{y/x}$", + "kind": "math" + }, + { + "text": "而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{ln(u)}$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$$\\boxed{y/x}$而 $g(u)=?$$\\boxed{ln(u)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + }, + { + "latex": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + }, + { + "latex": "$a\\neq 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$b/a >0$", + "kind": "math" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?$a\\neq 0$ 且 $b/a >0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + }, + { + "latex": "$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$", + "kind": "math" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_3ae1a79829", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "y/x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": " 而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "text": " " + } + ], + "answers": [ + "ln(u)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。" + }, + { + "key": "b", + "text": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。" + }, + { + "key": "c", + "text": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b)\\in \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$a\\neq 0$。" + }, + { + "key": "c", + "text": "$a\\neq 0$ 且 $b/a >0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n請透過觀" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。" + }, + { + "key": "c", + "text": "以上皆非。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "8️⃣推廣到多變數函數", + "newline": "true", + "runs": [ + { + "text": "8️⃣推廣到多變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,", + "newline": "false", + "runs": [ + { + "text": "對於多變數函數(不限於二變數),例如三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們對其在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的極限、連續等定義與符號都是一樣的。比如," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限", + "style": "bold" + }, + { + "text": "等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",記為" + }, + { + "latex": "$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n$$", + "kind": "math_block" + }, + { + "text": "也可記作" + }, + { + "latex": "$$\nf(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n$$", + "kind": "math_block" + }, + { + "text": "其含義與二變數完全相同:" + }, + { + "text": "只要 ", + "style": "bold" + }, + { + "latex": "$(x,y,z)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 趨近 ", + "style": "bold" + }, + { + "latex": "$(a,b,c)$", + "kind": "math", + "style": "bold" + }, + { + "text": "(從任意方向、任意曲線、任意空間路徑),", + "style": "bold" + }, + { + "latex": "$f(x,y,z)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的值便會趨近於 ", + "style": "bold" + }, + { + "latex": "$L$", + "kind": "math", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的極限等於 $L$,記為$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n$$也可記作$$\nf(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n$$其含義與二變數完全相同:只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們說函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是連續的,如果" + }, + { + "latex": "$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n$$", + "kind": "math_block" + }, + { + "text": "其意義與二變數、單變數完全一致:" + }, + { + "text": "函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n$$其意義與二變數、單變數完全一致:函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "newline": "false", + "runs": [ + { + "text": "另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "極限與連續", + "newline": "true", + "runs": [ + { + "text": "極限與連續", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "newline": "true", + "runs": [ + { + "text": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在第一章中,我們談過單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在某點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的極限:請回想看看,當初我們探討的「極限」概念是什麼?" + } + ], + "options": [ + { + "key": "a", + "text": "當 $x=a$ 時,$f(x)$ 的值是否存在;" + }, + { + "key": "b", + "text": "當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會趨近某個固定的實數 $L$;" + }, + { + "key": "c", + "text": "函數 $f(x)$在 $a$ 連續。" + }, + { + "key": "d", + "text": "當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會等於 $f(a)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣的概念可以自然地延伸到雙變數,甚至多變數的情況。下面我們先以雙變數函數 $f(x,y)$ 為例,定義多變數函數的「極限」。", + "newline": "false", + "runs": [ + { + "text": "這樣的概念可以自然地延伸到雙變數,甚至多變數的情況。下面我們先以雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 為例,定義多變數函數的「極限」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "多變數函數的極限", + "body": [ + { + "type": "paragraph", + "content": "對於一個雙變數函數 $f(x,y)$ 而言,我們說 $f(x,y)$ 在某點 $(a,b)$ 的極限(limit)存在,如果,當 $(x,y)$ 越來越接近點 $(a,b)$ 時,函數值 $f(x,y)$ 會趨近某個固定的實數 $L$。此外,我們記作$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L。\n$$我們也同樣稱「 $f(x,y)$ 的極限為 $L$,當 $(x,y)$ 趨近於 $(a,b)$ 時」。或標記為$$\nf(x,y) \\to L\\; \\text{ as } (x,y) \\to (a,b)。\n$$", + "newline": "false", + "runs": [ + { + "text": "對於一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言,我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在某點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限(limit)", + "style": "bold" + }, + { + "text": "存在,如果,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 越來越接近點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時,函數值 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 會趨近某個固定的實數 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。此外,我們記作" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L。\n$$", + "kind": "math_block" + }, + { + "text": "我們也同樣稱「 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限", + "style": "bold" + }, + { + "text": "為 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時」。或標記為" + }, + { + "latex": "$$\nf(x,y) \\to L\\; \\text{ as } (x,y) \\to (a,b)。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "換句話說,我們想觀察 $(a,b)$ 附近的小區域(neighborhood)但不包含 $(a,b)$ 本身這點。是否當這樣的區域越來越集中於 $(a,b)$ 時,$f(x,y)$ 的值會越來越接近某個固定的數 $L$?如果是,便稱函數 $f(x,y)$ 在點 $(a,b)$ 的極限存在。", + "newline": "false", + "runs": [ + { + "text": "換句話說,我們想觀察 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近的小區域(neighborhood)但不包含 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 本身這點。是否當這樣的區域越來越集中於 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值會越來越接近某個固定的數 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "?如果是,便稱函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "為了更直覺地理解多變數函數的極限的概念,讓我們考慮下面兩個例子。", + "newline": "false", + "runs": [ + { + "text": "為了更直覺地理解多變數函數的極限的概念,讓我們考慮下面兩個例子。" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n$=1$\n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。\n\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$f(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。\n\n\n\n---\n### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n不存在\n\n\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n\n\n---\n## 2️⃣極限的四則運算法則與多項式/有理函數\n\n前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?\n\n在這裡,我們將採取 「**由簡入繁、以簡馭繁**」 的方式,建立一套能處理大部分極限問題的方法。\n\n下面這三個極限,是最基本、也最沒有爭議的:\n$$\n \\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$\n透過這三個簡單的基礎極限,再結合「**極限的四則運算法則**」,我們便能推算出更複雜組合函數的極限。\n\n\n特性\n極限的四則運算法則\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$\n則有:\n1. 加法法則: \n $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$\n2. 減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。\n3. 乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。\n4. 常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。\n5. 除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。\n\n\n***注意 1:*** 上面極限的四則運算法則允許我們 **把複雜的極限拆成較簡單的極限** 來計算。比方,加法法則可寫成\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$\n其餘各法則亦然。\n\n***注意 2:*** 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!\n一旦 $M = 0$,除法法則便「**派不上用場**」,而極限\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$\n是否存在、如何判斷、如何計算,都必須***另外分析***!請參考本節後半部「**分式極限處理三招**」。\n\n---\n### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限$$\n\\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$是否存在?如果存在,請寫下其極限值 $L$。", + "newline": "false", + "runs": [ + { + "text": "請透過觀察函數 " + }, + { + "latex": "$f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 的圖形,回答極限" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "是否存在?如果存在,請寫下其極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_25aa35fc86", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "畫一張函數圖", + "newline": "false", + "runs": [ + { + "text": "畫一張函數圖", + "style": "bold" + } + ] + }, + { + "type": "geogebra", + "id": "yv3p945m", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "試問", + "newline": "false", + "runs": [ + { + "text": "試問" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + }, + { + "text": "會,且值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?會,且值為 $1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "latex": "$=1$", + "kind": "math" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$$=1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "最後,我們特別提醒一點,雖然這題的函數 " + }, + { + "latex": "$f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)=(0,0)$", + "kind": "math" + }, + { + "text": " 上是沒有定義的,但是這完全不影響我們的對函數極限在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的判斷。" + } + ], + "content": "最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b1b3a81539", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "畫一張函數圖", + "newline": "false", + "runs": [ + { + "text": "畫一張函數圖", + "style": "bold" + } + ] + }, + { + "type": "geogebra", + "id": "yv3p945m", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "試問", + "newline": "false", + "runs": [ + { + "text": "試問" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "會,且值為 $0$;" + }, + { + "key": "b", + "text": "會,且值為 $1$;" + }, + { + "key": "c", + "text": "不會,$f(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;" + }, + { + "key": "d", + "text": "不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$=0$;" + }, + { + "key": "b", + "text": "$=1$;" + }, + { + "key": "c", + "text": "$=\\infty$;" + }, + { + "key": "d", + "text": "不存在;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "最後,我們特別提醒一點,雖然這題的函數 " + }, + { + "latex": "$f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)=(0,0)$", + "kind": "math" + }, + { + "text": " 上是沒有定義的,但是這完全不影響我們的對函數極限在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的判斷。" + } + ], + "content": "最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n不存在\n\n\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n\n\n---\n## 2️⃣極限的四則運算法則與多項式/有理函數\n\n前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?\n\n在這裡,我們將採取 「**由簡入繁、以簡馭繁**」 的方式,建立一套能處理大部分極限問題的方法。\n\n下面這三個極限,是最基本、也最沒有爭議的:\n$$\n \\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$\n透過這三個簡單的基礎極限,再結合「**極限的四則運算法則**」,我們便能推算出更複雜組合函數的極限。\n\n\n特性\n極限的四則運算法則\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$\n則有:\n1. 加法法則: \n $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$\n2. 減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。\n3. 乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。\n4. 常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。\n5. 除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。\n\n\n***注意 1:*** 上面極限的四則運算法則允許我們 **把複雜的極限拆成較簡單的極限** 來計算。比方,加法法則可寫成\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$\n其餘各法則亦然。\n\n***注意 2:*** 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!\n一旦 $M = 0$,除法法則便「**派不上用場**」,而極限\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$\n是否存在、如何判斷、如何計算,都必須***另外分析***!請參考本節後半部「**分式極限處理三招**」。\n\n---\n### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$是否存在?如果存在,請寫出其極限值 $L$。", + "newline": "false", + "runs": [ + { + "text": "請透過觀察函數 " + }, + { + "latex": "$g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 的圖形,回答" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "是否存在?如果存在,請寫出其極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6f0e3406e4", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "geogebra", + "id": "sppdazxm", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$g(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + }, + { + "text": "不會,因為不同方向觀察 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,會看到到不同的趨近值" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "不存在" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$不存在" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_75bd76c9e6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "geogebra", + "id": "sppdazxm", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$g(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "會,且值為 $0$;" + }, + { + "key": "b", + "text": "會,且值為 $1$;" + }, + { + "key": "c", + "text": "不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;" + }, + { + "key": "d", + "text": "不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$=0$;" + }, + { + "key": "b", + "text": "$=1$;" + }, + { + "key": "c", + "text": "$=\\infty$;" + }, + { + "key": "d", + "text": "不存在;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣極限的四則運算法則與多項式/有理函數", + "newline": "true", + "runs": [ + { + "text": "2️⃣極限的四則運算法則與多項式/有理函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?", + "newline": "false", + "runs": [ + { + "text": "前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在這裡,我們將採取 「由簡入繁、以簡馭繁」 的方式,建立一套能處理大部分極限問題的方法。", + "newline": "false", + "runs": [ + { + "text": "在這裡,我們將採取 「" + }, + { + "text": "由簡入繁、以簡馭繁", + "style": "bold" + }, + { + "text": "」 的方式,建立一套能處理大部分極限問題的方法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面這三個極限,是最基本、也最沒有爭議的:$$\n\\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$透過這三個簡單的基礎極限,再結合「極限的四則運算法則」,我們便能推算出更複雜組合函數的極限。", + "newline": "false", + "runs": [ + { + "text": "下面這三個極限,是最基本、也最沒有爭議的:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$", + "kind": "math_block" + }, + { + "text": "透過這三個簡單的基礎極限,再結合「" + }, + { + "text": "極限的四則運算法則", + "style": "bold" + }, + { + "text": "」,我們便能推算出更複雜組合函數的極限。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "極限的四則運算法則", + "body": [ + { + "type": "paragraph", + "content": "如果$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$則有:", + "newline": "false", + "runs": [ + { + "text": "如果" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$", + "kind": "math_block" + }, + { + "text": "則有:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "加法法則:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$", + "kind": "math" + } + ], + "content": "加法法則:$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "減法法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "乘法法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "常數積法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為任意常數。" + } + ], + "content": "常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "除法法則(須 " + }, + { + "latex": "$M\\neq 0$", + "kind": "math" + }, + { + "text": "): " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1: 上面極限的四則運算法則允許我們 把複雜的極限拆成較簡單的極限 來計算。比方,加法法則可寫成$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$其餘各法則亦然。", + "newline": "false", + "runs": [ + { + "text": "注意 1:", + "style": "bold-italic" + }, + { + "text": " 上面極限的四則運算法則允許我們 " + }, + { + "text": "把複雜的極限拆成較簡單的極限", + "style": "bold" + }, + { + "text": " 來計算。比方,加法法則可寫成" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "其餘各法則亦然。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2: 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!一旦 $M = 0$,除法法則便「派不上用場」,而極限$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$是否存在、如何判斷、如何計算,都必須另外分析!請參考本節後半部「分式極限處理三招」。", + "newline": "false", + "runs": [ + { + "text": "注意 2:", + "style": "bold-italic" + }, + { + "text": " 除法法則中,極限公式成立,條件 " + }, + { + "latex": "$M\\neq 0$", + "kind": "math" + }, + { + "text": " 至關重要!一旦 " + }, + { + "latex": "$M = 0$", + "kind": "math" + }, + { + "text": ",除法法則便「" + }, + { + "text": "派不上用場", + "style": "bold" + }, + { + "text": "」,而極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$", + "kind": "math_block" + }, + { + "text": "是否存在、如何判斷、如何計算,都必須" + }, + { + "text": "另外分析", + "style": "bold-italic" + }, + { + "text": "!請參考本節後半部「" + }, + { + "text": "分式極限處理三招", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f03dcf5f9c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$因此,我們可以利用極限的四則與乘法法則,將原式拆解如下$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$最後,透過極限的四則運算,我們可以得到: $$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$", + "newline": "false", + "runs": [ + { + "text": "由於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們可以利用極限的四則與乘法法則,將原式拆解如下" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "最後,透過極限的四則運算,我們可以得到: " + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ce8c86523d", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "由於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們可以利用極限的四則與乘法法則,將原式拆解如下" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "最後,透過極限的四則運算,我們可以得到: " + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "7" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!", + "newline": "false", + "runs": [ + { + "text": "聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "二元多項式函數的極限", + "body": [ + { + "type": "paragraph", + "content": "如果雙變數函數 $p(x,y)$ 是二元多項式函數(polynomial function of two variables),也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:$$\n\\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 直接代入 二元多項式即可!", + "newline": "false", + "runs": [ + { + "text": "如果雙變數函數 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "二元多項式函數(polynomial function of two variables)", + "style": "bold" + }, + { + "text": ",也就是由若干型式為 " + }, + { + "latex": "$c\\,x^n y^m$", + "kind": "math" + }, + { + "text": " 的項所組成,當中 " + }, + { + "latex": "$n,m$", + "kind": "math" + }, + { + "text": " 為非負整數,例如 " + }, + { + "latex": "$p(x,y)= 2x + 3y - 5x^2y$", + "kind": "math" + }, + { + "text": ",那麼有:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$", + "kind": "math_block" + }, + { + "text": "換句話說,二元多項式函數在任意一個點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限,就是把這個點 " + }, + { + "text": "直接代入", + "style": "bold" + }, + { + "text": " 二元多項式即可!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1dd27674d4", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$因此,$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$", + "newline": "false", + "runs": [ + { + "text": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "),將極限拆解為:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_fba777d8a5", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "),將極限拆解為:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "7/5" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "試問下面的推導是否正確:$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$", + "newline": "false", + "runs": [ + { + "text": "試問下面的推導是否正確:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cdb6627478", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$", + "newline": "false", + "runs": [ + { + "text": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 " + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7bea5f4612", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "正確。因此極限不存在;" + }, + { + "key": "c", + "text": "正確。因此極限值是 $\\infty$;" + }, + { + "key": "d", + "text": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!", + "newline": "false", + "runs": [ + { + "text": "聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "有理函數的極限", + "body": [ + { + "type": "paragraph", + "content": "如果雙變數函數 $r(x,y)$ 是有理函數(rational function),也就是形如$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:$$\n\\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,直接代入就好,只要分母在該點不為零!", + "newline": "false", + "runs": [ + { + "text": "如果雙變數函數 " + }, + { + "latex": "$r(x,y)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "有理函數(rational function)", + "style": "bold" + }, + { + "text": ",也就是形如" + }, + { + "latex": "$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$q(x,y)$", + "kind": "math" + }, + { + "text": " 都是二元多項式,則有:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$", + "kind": "math_block" + }, + { + "text": "如果 " + }, + { + "latex": "$q(a,b)\\neq 0$", + "kind": "math" + }, + { + "text": "。換句話說,有理函數在任意一個點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限," + }, + { + "text": "直接代入", + "style": "bold" + }, + { + "text": "就好,只要分母在該點不為零!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣分式極限處理三招:第一招:化簡法", + "newline": "true", + "runs": [ + { + "text": "3️⃣分式極限處理三招:第一招:化簡法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:$$\n\\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?", + "newline": "false", + "runs": [ + { + "text": "接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "」的狀況。也就是考慮下列情形:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$", + "kind": "math_block" + }, + { + "text": "如果 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$", + "kind": "math" + }, + { + "text": ",極限是否存在?如何找出極限值?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:「化簡極限式」。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,使分母轉換成一個極限不為 $0$ 的表達式,這樣四則運算法則重新變得可用。", + "newline": "false", + "runs": [ + { + "text": "記得,當分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:" + }, + { + "text": "「化簡極限式」", + "style": "bold" + }, + { + "text": "。這個方法的想法其實非常簡單:既然問題出在分母極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們就嘗試透過代數的化簡方式," + }, + { + "text": "使分母轉換成一個極限不為 ", + "style": "bold" + }, + { + "latex": "$0$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的表達式", + "style": "bold" + }, + { + "text": ",這樣四則運算法則重新變得可用。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "判斷下面極限是否存在。如果存在,找出極限值:", + "newline": "false", + "runs": [ + { + "text": "判斷下面極限是否存在。如果存在,找出極限值:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9c89d9ff39", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$", + "kind": "math_block" + }, + { + "text": "這時,問題就回到求取一個二元多項式的極限。因此" + }, + { + "text": "極限存在,且值為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過化簡分式$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$這時,問題就回到求取一個二元多項式的極限。因此極限存在,且值為 $0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "這題同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "text": "極限存在,且值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ], + "content": "這題同理,我們先通過化簡分式的方法,得到$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$因此極限存在,且值為 $1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "這時,雖然分母的極限還是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。但是,分子的極限由 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "同理,我們先通過化簡分式的方法,得到$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "回憶:", + "style": "bold" + }, + { + "text": " 還記得在單變數的情況中,我們處理過類似問題,例如 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0} \\frac{1}{x}$", + "kind": "math" + }, + { + "text": ",分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "、分子的極限為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。這樣的答案是?" + }, + { + "latex": "$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$", + "kind": "math" + }, + { + "text": " 但 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$", + "kind": "math" + }, + { + "text": ",左右極限不相等" + } + ], + "content": "回憶: 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "現在回到本題: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "令" + }, + { + "latex": "$$\nr = x^2+y^2 \\,(\\geq 0),\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$", + "kind": "math_block" + }, + { + "text": "請特別注意:由於 " + }, + { + "latex": "$r>0$", + "kind": "math" + }, + { + "text": ",這裡只剩下「單邊極限」 " + }, + { + "latex": "$r\\to 0^+$", + "kind": "math" + }, + { + "text": "。因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,但 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$", + "kind": "math" + } + ], + "content": "現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。令$$\nr = x^2+y^2 \\,(\\geq 0),\n$$則$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7164d1e1b5", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$", + "kind": "math_block" + }, + { + "text": "這時,問題就回到求取一個二元多項式的極限。因此" + } + ], + "content": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過化簡分式$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$這時,問題就回到求取一個二元多項式的極限。因此" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限不存在,因為原式是 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "極限存在,且值為 $0$;" + }, + { + "key": "c", + "text": "極限存在,且值為 $1$;" + }, + { + "key": "d", + "text": "無法判斷,因為分母趨近於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "這題同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$", + "kind": "math_block" + }, + { + "text": "因此" + } + ], + "content": "這題同理,我們先通過化簡分式的方法,得到$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$因此" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限不存在,因為原式是 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "極限存在,且值為 $0$;" + }, + { + "key": "c", + "text": "極限存在,且值為 $1$;" + }, + { + "key": "d", + "text": "無法判斷,因為分母趨近於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "這時,雖然分母的極限還是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。但是,分子的極限由 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "同理,我們先通過化簡分式的方法,得到$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "回憶:", + "style": "bold" + }, + { + "text": " 還記得在單變數的情況中,我們處理過類似問題,例如 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0} \\frac{1}{x}$", + "kind": "math" + }, + { + "text": ",分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "、分子的極限為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。這樣的答案是?" + }, + { + "latex": "$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$", + "kind": "math_block" + } + ], + "content": "回憶: 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\infty$。" + }, + { + "key": "b", + "text": "極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。" + }, + { + "key": "c", + "text": "極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。" + }, + { + "key": "d", + "text": "極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "現在回到本題: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "令" + }, + { + "latex": "$$\nr = x^2+y^2 \\,(\\geq 0),\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$", + "kind": "math_block" + }, + { + "text": "請特別注意:由於 " + }, + { + "latex": "$r>0$", + "kind": "math" + }, + { + "text": ",這裡只剩下「單邊極限」 " + }, + { + "latex": "$r\\to 0^+$", + "kind": "math" + }, + { + "text": "。因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$", + "kind": "math_block" + } + ], + "content": "現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。令$$\nr = x^2+y^2 \\,(\\geq 0),\n$$則$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\infty$。" + }, + { + "key": "b", + "text": "極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。" + }, + { + "key": "c", + "text": "極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。" + }, + { + "key": "d", + "text": "極限不存在,因為左右極限不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣分式極限處理三招:第二招:路徑比較法", + "newline": "true", + "runs": [ + { + "text": "4️⃣分式極限處理三招:第二招:路徑比較法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:路徑比較法(Path Comparison Method)。", + "newline": "false", + "runs": [ + { + "text": "這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時:" + }, + { + "text": "路徑比較法(Path Comparison Method)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們先回憶一下,在單變數情境中,若要說明$$\n\\lim_{x\\to a} f(x)\n$$不存在,可以檢查左右極限是否一致:$$\n\\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。", + "newline": "false", + "runs": [ + { + "text": "我們先回憶一下,在單變數情境中,若要說明" + }, + { + "latex": "$$\n\\lim_{x\\to a} f(x)\n$$", + "kind": "math_block" + }, + { + "text": "不存在,可以檢查左右極限是否一致:" + }, + { + "latex": "$$\n\\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$", + "kind": "math_block" + }, + { + "text": "換句話說,如果當 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 從「左邊」與「右邊」趨近 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 時,函數值趨近不同數字,那麼該極限就不存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。", + "newline": "false", + "runs": [ + { + "text": "對多變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中," + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": " 的「方向(路徑)」遠不只左右兩個:可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「路徑比較法」的核心思想。", + "newline": "false", + "runs": [ + { + "text": "因此,如果沿著兩條不同的路徑趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 得到不同的極限值,那就能判定:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在。這就是「" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "」的核心思想。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "路徑比較法", + "body": [ + { + "type": "paragraph", + "content": "對於雙變數函數 $f(x,y)$,", + "newline": "false", + "runs": [ + { + "text": "對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果存在兩條不同趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": ",使得" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$L_1 \\neq L_2$", + "kind": "math" + }, + { + "text": ",則極限 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在。" + } + ], + "content": "如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得$$\n\\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n$$其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "若對所有趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的趨近值皆相同且等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意: 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 所有 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,「路徑比較法」通常只拿來說明「極限不存在」。", + "newline": "false", + "runs": [ + { + "text": "注意:", + "style": "bold" + }, + { + "text": " 由於在平面中," + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": " 的方向(路徑)太多了!要檢查 " + }, + { + "text": "所有", + "style": "bold" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的趨近值皆相同且等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",實務上不太可能。因此," + }, + { + "text": "「路徑比較法」通常只拿來說明「極限不存在」", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "請說明$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "請說明" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cef57a662e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (思考方向): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (思考方向):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。", + "newline": "false", + "runs": [ + { + "text": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。", + "newline": "false", + "runs": [ + { + "text": "也就是說,我們要找出兩條不同的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 使得,函數 " + }, + { + "latex": "$f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 沿著這兩條路徑趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,計算得到的極限值不相同。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (選擇路徑): ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (選擇路徑):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:通過 $(0,0)$ 的直線。即 $$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。", + "newline": "false", + "runs": [ + { + "text": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:" + }, + { + "text": "通過 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的直線", + "style": "bold" + }, + { + "text": "。即 " + }, + { + "latex": "$$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$", + "kind": "math_block" + }, + { + "text": "接著可以考慮 " + }, + { + "latex": "$C_1: y= 2x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$C_2: y= 3x$", + "kind": "math" + }, + { + "text": " 等等,取不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3. (計算沿路徑的極限): ", + "newline": "false", + "runs": [ + { + "text": "Step 3. (計算沿路徑的極限):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$極限不存在,因為不同路徑算出的函數極限值不相同", + "newline": "false", + "runs": [ + { + "text": "在路徑 " + }, + { + "latex": "$C: y = mx$", + "kind": "math" + }, + { + "text": " 上,函數值 " + }, + { + "latex": "$f(x,y)= f(x, mx)$", + "kind": "math" + }, + { + "text": "。因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "可以看到:不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為不同路徑算出的函數極限值不相同" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_84893894c6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (思考方向): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (思考方向):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。", + "newline": "false", + "runs": [ + { + "text": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。", + "newline": "false", + "runs": [ + { + "text": "也就是說,我們要找出兩條不同的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 使得,函數 " + }, + { + "latex": "$f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 沿著這兩條路徑趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,計算得到的極限值不相同。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (選擇路徑): ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (選擇路徑):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:通過 $(0,0)$ 的直線。即 $$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。", + "newline": "false", + "runs": [ + { + "text": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:" + }, + { + "text": "通過 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的直線", + "style": "bold" + }, + { + "text": "。即 " + }, + { + "latex": "$$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$", + "kind": "math_block" + }, + { + "text": "接著可以考慮 " + }, + { + "latex": "$C_1: y= 2x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$C_2: y= 3x$", + "kind": "math" + }, + { + "text": " 等等,取不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3. (計算沿路徑的極限): ", + "newline": "false", + "runs": [ + { + "text": "Step 3. (計算沿路徑的極限):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在路徑 " + }, + { + "latex": "$C: y = mx$", + "kind": "math" + }, + { + "text": " 上,函數值 " + }, + { + "latex": "$f(x,y)= f(x, mx)$", + "kind": "math" + }, + { + "text": "。因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "可以看到:不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。" + }, + { + "key": "b", + "text": "極限不存在,因為不同路徑算出的函數極限值不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "請說明$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "請說明" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_51b88e67c9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (選擇路徑:先試直線): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (選擇路徑:先試直線):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮通過 $(0,0)$ 的直線 $$\nC: \\boxed{y=m(x-0)+0}。\n$$沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$$0$", + "newline": "false", + "runs": [ + { + "text": "考慮通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$$\nC: \\boxed{y=m(x-0)+0}。\n$$", + "kind": "math_block" + }, + { + "text": "沿著此路徑,函數 " + }, + { + "latex": "$f(x,y) = \\frac{xy^2}{x^2+y^4}$", + "kind": "math" + }, + { + "text": " 的極限變成:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由路徑比較法與上面的結果,我們可以為極限$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$做出什麼結論:革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否", + "newline": "false", + "runs": [ + { + "text": "由路徑比較法與上面的結果,我們可以為極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "做出什麼結論:革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (重新挑選路徑) ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (重新挑選路徑)", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?", + "newline": "false", + "runs": [ + { + "text": "既然所有通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$C: y=m(x-0)+0$", + "kind": "math" + }, + { + "text": " 都得到極限,我們應該改用「不同型態」的路徑,例如:" + }, + { + "latex": "$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們注意到現在考慮的極限是 $$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$因此,或許可以優先考慮$$\nC: \\boxed{x= m y^2},\n$$因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$極限不存在,因為不同路徑算出的函數極限值不相同", + "newline": "false", + "runs": [ + { + "text": "我們注意到現在考慮的極限是 " + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "因此,或許可以優先考慮" + }, + { + "latex": "$$\nC: \\boxed{x= m y^2},\n$$", + "kind": "math_block" + }, + { + "text": "因為這樣分母部份就能合併成一項(都是 " + }, + { + "latex": "$y^4$", + "kind": "math" + }, + { + "text": "),或許之後能夠比較好化簡。算算看吧!" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此,不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": "(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為不同路徑算出的函數極限值不相同" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_819afdf3ea", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (選擇路徑:先試直線): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (選擇路徑:先試直線):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "考慮通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$$\nC: \\boxed{y=m(x-0)+0}。\n$$", + "kind": "math_block" + }, + { + "text": "沿著此路徑,函數 " + }, + { + "latex": "$f(x,y) = \\frac{xy^2}{x^2+y^4}$", + "kind": "math" + }, + { + "text": " 的極限變成:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$\\frac{m^2}{1+m^4}$;" + }, + { + "key": "b", + "text": "$\\frac{m^3}{1+m^4}$;" + }, + { + "key": "c", + "text": "$0$;" + }, + { + "key": "d", + "text": "$1$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "由路徑比較法與上面的結果,我們可以為極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "做出什麼結論:" + } + ], + "options": [ + { + "key": "a", + "text": "此極限為 $0$;" + }, + { + "key": "b", + "text": "此極限不存在;" + }, + { + "key": "c", + "text": "革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (重新挑選路徑) ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (重新挑選路徑)", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?", + "newline": "false", + "runs": [ + { + "text": "既然所有通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$C: y=m(x-0)+0$", + "kind": "math" + }, + { + "text": " 都得到極限,我們應該改用「不同型態」的路徑,例如:" + }, + { + "latex": "$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "我們注意到現在考慮的極限是 " + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "因此,或許可以優先考慮" + }, + { + "latex": "$$\nC: \\boxed{x= m y^2},\n$$", + "kind": "math_block" + }, + { + "text": "因為這樣分母部份就能合併成一項(都是 " + }, + { + "latex": "$y^4$", + "kind": "math" + }, + { + "text": "),或許之後能夠比較好化簡。算算看吧!" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此,不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": "(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\dfrac{m}{m+1}$。" + }, + { + "key": "b", + "text": "極限不存在,因為不同路徑算出的函數極限值不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n$=1$\n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣分式極限處理三招:第三招:極座標法", + "newline": "true", + "runs": [ + { + "text": "5️⃣分式極限處理三招:第三招:極座標法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "在前面,我們介紹了兩個處理分式極限的技巧,包含化簡法與路徑比較法。現在,我們將介紹第三個技巧——極座標法。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。", + "newline": "false", + "runs": [ + { + "text": "在前面,我們介紹了兩個處理分式極限的技巧,包含" + }, + { + "text": "化簡法", + "style": "bold" + }, + { + "text": "與" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "。現在,我們將介紹第三個技巧——" + }, + { + "text": "極座標法", + "style": "bold" + }, + { + "text": "。這個方法,特別適用在當函數的分母部份為 " + }, + { + "latex": "$cx^2+dy^2$", + "kind": "math" + }, + { + "text": " 時。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "極座標法", + "body": [ + { + "type": "paragraph", + "content": "Step 1.(變數變換) 令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$Step 2.(變換極限) 由於$$\n\\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$因此$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$Step 3.(極限判斷) 如果$$\n\\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$其中 $L$ 與 $\\theta$ 無關,則$$\n\\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則$$\n\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "Step 1.(變數變換)", + "style": "bold" + }, + { + "text": " 令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$", + "kind": "math_block" + }, + { + "text": "Step 2.(變換極限)", + "style": "bold" + }, + { + "text": " 由於" + }, + { + "latex": "$$\n\\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "Step 3.(極限判斷)", + "style": "bold" + }, + { + "text": " 如果" + }, + { + "latex": "$$\n\\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 無關,則" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$", + "kind": "math_block" + }, + { + "text": "反之,若 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 有關(或極限不存在),則" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "極座標法的方法說明如下:", + "newline": "false", + "runs": [ + { + "text": "極座標法的方法說明如下:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 為點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的距離、" + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 為向量 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸方向的夾角。" + } + ], + "content": "第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "第 2 步:這樣的轉換,我們將極限問題轉化為單變數 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 的極限問題,尚帶有一個參數:角度 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": "。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!" + } + ], + "content": "第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "第 3 步:如果極限與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。" + } + ], + "content": "第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 極座標法,本質上就是 「變數變換法」 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。注意 2. 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 極座標法,本質上就是 " + }, + { + "text": "「變數變換法」", + "style": "bold" + }, + { + "text": " 的一種。我們只是將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 用 " + }, + { + "latex": "$(r,\\theta)$", + "kind": "math" + }, + { + "text": " 重新表示,使極限行為更容易分析。" + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5e78b84f28", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "利用極座標法:令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$則$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$因此,$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$存在,且極限值為 $1$", + "newline": "false", + "runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "存在,且極限值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a5737ce33f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "存在,且極限值為 $1$;" + }, + { + "key": "b", + "text": "不存在;" + }, + { + "key": "c", + "text": "無法判斷;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-10" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1a5d960e1e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "利用極座標法:令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$則$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$因此,$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$不存在,因為不同的角度 $\\theta$,得到不同的極限值", + "newline": "false", + "runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "不存在,因為不同的角度 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",得到不同的極限值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_35382ca2ce", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;" + }, + { + "key": "b", + "text": "不存在,因為不同的角度 $\\theta$,得到不同的極限值;" + }, + { + "key": "c", + "text": "無法判斷;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣連續的定義與「補洞」範例", + "newline": "true", + "runs": [ + { + "text": "6️⃣連續的定義與「補洞」範例", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果$$\n\\lim_{x\\to a} f(x) = f(a)。\n$$這個等式能成立,必須同時滿足: ", + "newline": "false", + "runs": [ + { + "text": "在單變數函數中,我們說一個函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 點連續,如果" + }, + { + "latex": "$$\n\\lim_{x\\to a} f(x) = f(a)。\n$$", + "kind": "math_block" + }, + { + "text": "這個等式能成立,必須同時滿足: " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "極限存在:" + }, + { + "latex": "$\\lim\\limits_{x\\to a} f(x)$", + "kind": "math" + }, + { + "text": " 存在;" + } + ], + "content": "極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數值存在:" + }, + { + "latex": "$f(a)$", + "kind": "math" + }, + { + "text": " 存在,即 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 落在 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的定義域(Domain);" + } + ], + "content": "函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "兩者相同: 極限值等於函數值。" + } + ], + "content": "兩者相同: 極限值等於函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在圖形上,這相當於:函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」。", + "newline": "false", + "runs": [ + { + "text": "在圖形上,這相當於:" + }, + { + "text": "函數在 ", + "style": "bold" + }, + { + "latex": "$x=a$", + "kind": "math", + "style": "bold" + }, + { + "text": " 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。", + "newline": "false", + "runs": [ + { + "text": "這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "多變數函數的連續", + "body": [ + { + "type": "paragraph", + "content": "對於一個雙變數函數 $f(x,y)$ 而言,", + "newline": "false", + "runs": [ + { + "text": "對於一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "連續的(continuous)", + "style": "bold" + }, + { + "text": "," + }, + { + "text": "如果" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "我們說 $f(x,y)$ 在點 $(a,b)$ 是連續的(continuous),如果$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在一個集合 " + }, + { + "latex": "$D\\subseteq \\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上是連續的,如果 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上的任一點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 皆是連續的。" + } + ], + "content": "我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣的,等式$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$成立,必須同時滿足: ", + "newline": "false", + "runs": [ + { + "text": "同樣的,等式" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "成立,必須同時滿足: " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "極限存在:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 存在;" + } + ], + "content": "極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數值存在:" + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": " 存在,即 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 落在 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的定義域(Domain);" + } + ], + "content": "函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "兩者相同: 極限值等於函數值。" + } + ], + "content": "兩者相同: 極限值等於函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-11" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_74175140dc", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,我們要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的。依照連續的定義,點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須使得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$", + "kind": "math_block" + }, + { + "text": "成立。因此,你的答案是:" + }, + { + "latex": "$a,b$", + "kind": "math" + }, + { + "text": " 皆可為任意任意實數,但不能同時等於 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$成立。因此,你的答案是:$a,b$ 皆可為任意任意實數,但不能同時等於 $0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9bf6fbc2c3", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,我們要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的。依照連續的定義,點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須使得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$", + "kind": "math_block" + }, + { + "text": "成立。因此,你的答案是:" + } + ], + "content": "首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$成立。因此,你的答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$a,b$ 皆可為任意實數;" + }, + { + "key": "b", + "text": "$a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。" + }, + { + "key": "c", + "text": "$a,b$ 皆可為任意任意實數,但不能同時等於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。" + }, + { + "key": "c", + "text": "$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。" + }, + { + "key": "d", + "text": "$D= f(x,y)$ 的定義域。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "多項式函數與有理函數的連續性", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "任意的二元多項式函數 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 都是連續的。" + } + ], + "content": "任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "任意的有理函數 " + }, + { + "latex": "$r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$", + "kind": "math" + }, + { + "text": ",在其定義域" + }, + { + "latex": "$$\nD= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n$$", + "kind": "math_block" + }, + { + "text": "上,都是連續的。" + } + ], + "content": "任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域$$\nD= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n$$上,都是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 12", + "newline": "true", + "runs": [ + { + "text": "Example 12", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 12, + "ai_prompt_md": "### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-12" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e39ddd3715", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$", + "kind": "math" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的", + "newline": "false", + "runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 處都是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$", + "kind": "math" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,$f(x,y)$ 在 $(0,0)$ 是不連續的", + "newline": "false", + "runs": [ + { + "text": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是不連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\mathbb{R}^2 - \\{ (0,0) \\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cdab41ee5a", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;" + }, + { + "key": "b", + "text": "還無法判斷。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(0,0)$ 是連續的;" + }, + { + "key": "b", + "text": "$f(x,y)$ 在 $(0,0)$ 是不連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$D= \\{(0,0)\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 13", + "newline": "true", + "runs": [ + { + "text": "Example 13", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 13, + "ai_prompt_md": "### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-13" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ba15448fd2", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$", + "kind": "math" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的", + "newline": "false", + "runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 處都是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$", + "kind": "math" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 透過極座標法,我們有$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$$0$", + "newline": "false", + "runs": [ + { + "text": " 透過極座標法,我們有" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,$f(x,y)$ 在 $(0,0)$ 是連續的", + "newline": "false", + "runs": [ + { + "text": " 因此,得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1f65bf1592", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;" + }, + { + "key": "b", + "text": "還無法判斷。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 透過極座標法,我們有" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$1$。" + }, + { + "key": "c", + "text": "不存在" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 因此,得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(0,0)$ 是連續的;" + }, + { + "key": "b", + "text": "$f(x,y)$ 在 $(0,0)$ 是不連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$D= \\{(0,0)\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "7️⃣合成函數的連續性", + "newline": "true", + "runs": [ + { + "text": "7️⃣合成函數的連續性", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "這一部分,我們要探討一些常見形式的二元函數,例如:$$\nf(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$這類函數,都具有 「合成(composition)」 的結構。", + "newline": "false", + "runs": [ + { + "text": "這一部分,我們要探討一些常見形式的二元函數,例如:" + }, + { + "latex": "$$\nf(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$", + "kind": "math_block" + }, + { + "text": "這類函數,都具有 " + }, + { + "text": "「合成(composition)」", + "style": "bold" + }, + { + "text": " 的結構。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:連續函數的合成仍然是連續的。也就是說,對於合成函數$$\nh(x) := g\\bigl(f(x)\\bigr),\n$$如果以下兩個條件符合:", + "newline": "false", + "runs": [ + { + "text": "還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:" + }, + { + "text": "連續函數的合成仍然是連續的", + "style": "bold" + }, + { + "text": "。也就是說,對於合成函數" + }, + { + "latex": "$$\nh(x) := g\\bigl(f(x)\\bigr),\n$$", + "kind": "math_block" + }, + { + "text": "如果以下兩個條件符合:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 是連續的," + } + ], + "content": "函數 $f(x)$ 在 $x=a$ 是連續的," + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$g(u)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$u=f(a)$", + "kind": "math" + }, + { + "text": " 也是連續的," + }, + { + "text": "那麼函數 " + }, + { + "latex": "$h(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 也連續。等價的," + }, + { + "latex": "$$\n\\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$", + "kind": "math_block" + } + ], + "content": "函數 $g(u)$ 在 $u=f(a)$ 也是連續的,那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,$$\n\\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:", + "newline": "false", + "runs": [ + { + "text": "在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "合成函數的連續性", + "body": [ + { + "type": "paragraph", + "content": "對於合成函數$$\nh(x,y) := g\\bigl(f(x,y)\\bigr),\n$$如果以下兩個條件符合:", + "newline": "false", + "runs": [ + { + "text": "對於合成函數" + }, + { + "latex": "$$\nh(x,y) := g\\bigl(f(x,y)\\bigr),\n$$", + "kind": "math_block" + }, + { + "text": "如果以下兩個條件符合:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 是連續的," + } + ], + "content": "函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的," + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$g(u)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$u=f(a,b)$", + "kind": "math" + }, + { + "text": " 也是連續的" + }, + { + "text": "那麼函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 也是連續的。等價的," + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,$$\n\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9e78a4cd64", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "下面給一個簡單的說明。由於$$\n\\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。", + "newline": "false", + "runs": [ + { + "text": "下面給一個簡單的說明。由於" + }, + { + "latex": "$$\n\\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 14", + "newline": "true", + "runs": [ + { + "text": "Example 14", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 14, + "ai_prompt_md": "### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-14" + }, + { + "type": "paragraph", + "content": "試問函數$$\nh(x,y) = \\sin(x^2+y^2)\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nh(x,y) = \\sin(x^2+y^2)\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c111de229c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{x^2 +y^2}$", + "kind": "math" + }, + { + "text": "而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{sin(u)}$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$$\\boxed{x^2 +y^2}$而 $g(u)=?$$\\boxed{sin(u)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + }, + { + "latex": "$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + }, + { + "latex": "$(a,b)\\in \\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?$(a,b)\\in \\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?$\\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\sin (x^2+y^2)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f66780624b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "x^2 +y^2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": " 而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "text": " " + } + ], + "answers": [ + "sin(u)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。" + }, + { + "key": "b", + "text": "$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。" + }, + { + "key": "c", + "text": "$\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b)\\in \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$(a,b)= (0,0)$。" + }, + { + "key": "c", + "text": "$(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$\\mathbb{R}^2 - \\{ (0,0) \\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\sin (x^2+y^2)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 15", + "newline": "true", + "runs": [ + { + "text": "Example 15", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 15, + "ai_prompt_md": "### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-15" + }, + { + "type": "paragraph", + "content": "試問函數$$\nh(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nh(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dfc5d11b89", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{y/x}$", + "kind": "math" + }, + { + "text": "而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{ln(u)}$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$$\\boxed{y/x}$而 $g(u)=?$$\\boxed{ln(u)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + }, + { + "latex": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + }, + { + "latex": "$a\\neq 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$b/a >0$", + "kind": "math" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?$a\\neq 0$ 且 $b/a >0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + }, + { + "latex": "$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$", + "kind": "math" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_3ae1a79829", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "y/x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": " 而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "text": " " + } + ], + "answers": [ + "ln(u)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。" + }, + { + "key": "b", + "text": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。" + }, + { + "key": "c", + "text": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b)\\in \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$a\\neq 0$。" + }, + { + "key": "c", + "text": "$a\\neq 0$ 且 $b/a >0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n請透過觀" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。" + }, + { + "key": "c", + "text": "以上皆非。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "8️⃣推廣到多變數函數", + "newline": "true", + "runs": [ + { + "text": "8️⃣推廣到多變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,", + "newline": "false", + "runs": [ + { + "text": "對於多變數函數(不限於二變數),例如三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們對其在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的極限、連續等定義與符號都是一樣的。比如," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限", + "style": "bold" + }, + { + "text": "等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",記為" + }, + { + "latex": "$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n$$", + "kind": "math_block" + }, + { + "text": "也可記作" + }, + { + "latex": "$$\nf(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n$$", + "kind": "math_block" + }, + { + "text": "其含義與二變數完全相同:" + }, + { + "text": "只要 ", + "style": "bold" + }, + { + "latex": "$(x,y,z)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 趨近 ", + "style": "bold" + }, + { + "latex": "$(a,b,c)$", + "kind": "math", + "style": "bold" + }, + { + "text": "(從任意方向、任意曲線、任意空間路徑),", + "style": "bold" + }, + { + "latex": "$f(x,y,z)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的值便會趨近於 ", + "style": "bold" + }, + { + "latex": "$L$", + "kind": "math", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的極限等於 $L$,記為$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n$$也可記作$$\nf(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n$$其含義與二變數完全相同:只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們說函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是連續的,如果" + }, + { + "latex": "$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n$$", + "kind": "math_block" + }, + { + "text": "其意義與二變數、單變數完全一致:" + }, + { + "text": "函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n$$其意義與二變數、單變數完全一致:函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "newline": "false", + "runs": [ + { + "text": "另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "newline": "true", + "runs": [ + { + "text": "1️⃣雙變數函數的極限(定義與圖形直覺)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在第一章中,我們談過單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在某點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的極限:請回想看看,當初我們探討的「極限」概念是什麼?" + } + ], + "options": [ + { + "key": "a", + "text": "當 $x=a$ 時,$f(x)$ 的值是否存在;" + }, + { + "key": "b", + "text": "當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會趨近某個固定的實數 $L$;" + }, + { + "key": "c", + "text": "函數 $f(x)$在 $a$ 連續。" + }, + { + "key": "d", + "text": "當 $x$ 越來越接近 $a$ 時,$f(x)$ 是否會等於 $f(a)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣的概念可以自然地延伸到雙變數,甚至多變數的情況。下面我們先以雙變數函數 $f(x,y)$ 為例,定義多變數函數的「極限」。", + "newline": "false", + "runs": [ + { + "text": "這樣的概念可以自然地延伸到雙變數,甚至多變數的情況。下面我們先以雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 為例,定義多變數函數的「極限」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "多變數函數的極限", + "body": [ + { + "type": "paragraph", + "content": "對於一個雙變數函數 $f(x,y)$ 而言,我們說 $f(x,y)$ 在某點 $(a,b)$ 的極限(limit)存在,如果,當 $(x,y)$ 越來越接近點 $(a,b)$ 時,函數值 $f(x,y)$ 會趨近某個固定的實數 $L$。此外,我們記作$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L。\n$$我們也同樣稱「 $f(x,y)$ 的極限為 $L$,當 $(x,y)$ 趨近於 $(a,b)$ 時」。或標記為$$\nf(x,y) \\to L\\; \\text{ as } (x,y) \\to (a,b)。\n$$", + "newline": "false", + "runs": [ + { + "text": "對於一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言,我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在某點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限(limit)", + "style": "bold" + }, + { + "text": "存在,如果,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 越來越接近點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時,函數值 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 會趨近某個固定的實數 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。此外,我們記作" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L。\n$$", + "kind": "math_block" + }, + { + "text": "我們也同樣稱「 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限", + "style": "bold" + }, + { + "text": "為 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時」。或標記為" + }, + { + "latex": "$$\nf(x,y) \\to L\\; \\text{ as } (x,y) \\to (a,b)。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "換句話說,我們想觀察 $(a,b)$ 附近的小區域(neighborhood)但不包含 $(a,b)$ 本身這點。是否當這樣的區域越來越集中於 $(a,b)$ 時,$f(x,y)$ 的值會越來越接近某個固定的數 $L$?如果是,便稱函數 $f(x,y)$ 在點 $(a,b)$ 的極限存在。", + "newline": "false", + "runs": [ + { + "text": "換句話說,我們想觀察 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近的小區域(neighborhood)但不包含 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 本身這點。是否當這樣的區域越來越集中於 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值會越來越接近某個固定的數 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "?如果是,便稱函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "為了更直覺地理解多變數函數的極限的概念,讓我們考慮下面兩個例子。", + "newline": "false", + "runs": [ + { + "text": "為了更直覺地理解多變數函數的極限的概念,讓我們考慮下面兩個例子。" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n$=1$\n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。\n\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$f(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。\n\n\n\n---\n### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n不存在\n\n\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n\n\n---\n## 2️⃣極限的四則運算法則與多項式/有理函數\n\n前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?\n\n在這裡,我們將採取 「**由簡入繁、以簡馭繁**」 的方式,建立一套能處理大部分極限問題的方法。\n\n下面這三個極限,是最基本、也最沒有爭議的:\n$$\n \\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$\n透過這三個簡單的基礎極限,再結合「**極限的四則運算法則**」,我們便能推算出更複雜組合函數的極限。\n\n\n特性\n極限的四則運算法則\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$\n則有:\n1. 加法法則: \n $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$\n2. 減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。\n3. 乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。\n4. 常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。\n5. 除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。\n\n\n***注意 1:*** 上面極限的四則運算法則允許我們 **把複雜的極限拆成較簡單的極限** 來計算。比方,加法法則可寫成\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$\n其餘各法則亦然。\n\n***注意 2:*** 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!\n一旦 $M = 0$,除法法則便「**派不上用場**」,而極限\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$\n是否存在、如何判斷、如何計算,都必須***另外分析***!請參考本節後半部「**分式極限處理三招**」。\n\n---\n### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限$$\n\\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$是否存在?如果存在,請寫下其極限值 $L$。", + "newline": "false", + "runs": [ + { + "text": "請透過觀察函數 " + }, + { + "latex": "$f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 的圖形,回答極限" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "是否存在?如果存在,請寫下其極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_25aa35fc86", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "畫一張函數圖", + "newline": "false", + "runs": [ + { + "text": "畫一張函數圖", + "style": "bold" + } + ] + }, + { + "type": "geogebra", + "id": "yv3p945m", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "試問", + "newline": "false", + "runs": [ + { + "text": "試問" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + }, + { + "text": "會,且值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?會,且值為 $1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "latex": "$=1$", + "kind": "math" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$$=1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "最後,我們特別提醒一點,雖然這題的函數 " + }, + { + "latex": "$f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)=(0,0)$", + "kind": "math" + }, + { + "text": " 上是沒有定義的,但是這完全不影響我們的對函數極限在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的判斷。" + } + ], + "content": "最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b1b3a81539", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "畫一張函數圖", + "newline": "false", + "runs": [ + { + "text": "畫一張函數圖", + "style": "bold" + } + ] + }, + { + "type": "geogebra", + "id": "yv3p945m", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "試問", + "newline": "false", + "runs": [ + { + "text": "試問" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "會,且值為 $0$;" + }, + { + "key": "b", + "text": "會,且值為 $1$;" + }, + { + "key": "c", + "text": "不會,$f(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;" + }, + { + "key": "d", + "text": "不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$=0$;" + }, + { + "key": "b", + "text": "$=1$;" + }, + { + "key": "c", + "text": "$=\\infty$;" + }, + { + "key": "d", + "text": "不存在;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "最後,我們特別提醒一點,雖然這題的函數 " + }, + { + "latex": "$f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)=(0,0)$", + "kind": "math" + }, + { + "text": " 上是沒有定義的,但是這完全不影響我們的對函數極限在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的判斷。" + } + ], + "content": "最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響我們的對函數極限在點 $(0,0)$ 的判斷。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n不存在\n\n\n\n\n請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。\n\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?\n \n a. 會,且值為 $0$;\n b. 會,且值為 $1$;\n c. 不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;\n d. 不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。\n \n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n $$\n \n a. $=0$;\n b. $=1$;\n c. $=\\infty$;\n d. 不存在;\n \n\n\n\n---\n## 2️⃣極限的四則運算法則與多項式/有理函數\n\n前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?\n\n在這裡,我們將採取 「**由簡入繁、以簡馭繁**」 的方式,建立一套能處理大部分極限問題的方法。\n\n下面這三個極限,是最基本、也最沒有爭議的:\n$$\n \\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$\n透過這三個簡單的基礎極限,再結合「**極限的四則運算法則**」,我們便能推算出更複雜組合函數的極限。\n\n\n特性\n極限的四則運算法則\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$\n則有:\n1. 加法法則: \n $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$\n2. 減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。\n3. 乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。\n4. 常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。\n5. 除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。\n\n\n***注意 1:*** 上面極限的四則運算法則允許我們 **把複雜的極限拆成較簡單的極限** 來計算。比方,加法法則可寫成\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$\n其餘各法則亦然。\n\n***注意 2:*** 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!\n一旦 $M = 0$,除法法則便「**派不上用場**」,而極限\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$\n是否存在、如何判斷、如何計算,都必須***另外分析***!請參考本節後半部「**分式極限處理三招**」。\n\n---\n### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$是否存在?如果存在,請寫出其極限值 $L$。", + "newline": "false", + "runs": [ + { + "text": "請透過觀察函數 " + }, + { + "latex": "$g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 的圖形,回答" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "是否存在?如果存在,請寫出其極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6f0e3406e4", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "geogebra", + "id": "sppdazxm", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$g(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + }, + { + "text": "不會,因為不同方向觀察 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,會看到到不同的趨近值" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "不存在" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$不存在" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 2\n請透過觀察函數 $g(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 的圖形,回答\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n是否存在?如果存在,請寫出其極限值 $L$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_75bd76c9e6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "請由下圖,觀察函數在 $(0,0)$ 附近區域的圖形。", + "newline": "false", + "runs": [ + { + "text": "請由下圖,觀察函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 附近區域的圖形。" + } + ] + }, + { + "type": "geogebra", + "id": "sppdazxm", + "width": "800", + "height": "600", + "border": "0", + "caption": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "當區域越來越集中於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 但不包含 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$g(x,y)$", + "kind": "math" + }, + { + "text": " 的值是否會越來越接近某個值?" + } + ], + "content": "當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$g(x,y)$ 的值是否會越來越接近某個值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "會,且值為 $0$;" + }, + { + "key": "b", + "text": "會,且值為 $1$;" + }, + { + "key": "c", + "text": "不會,$g(x,y)$ 的值會趨近 $\\infty$,因為分母會趨近 $0$;" + }, + { + "key": "d", + "text": "不會,因為不同方向觀察 $(x,y)$ 趨近 $(0,0)$ 時,會看到到不同的趨近值。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,我們會標記" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "content": "因此,我們會標記$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$=0$;" + }, + { + "key": "b", + "text": "$=1$;" + }, + { + "key": "c", + "text": "$=\\infty$;" + }, + { + "key": "d", + "text": "不存在;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣極限的四則運算法則與多項式/有理函數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣極限的四則運算法則與多項式/有理函數", + "newline": "true", + "runs": [ + { + "text": "2️⃣極限的四則運算法則與多項式/有理函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 $L$。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?", + "newline": "false", + "runs": [ + { + "text": "前面,我們談到了雙變數函數極限的定義,以及如何透過圖形判斷極限是否存在,甚至直接從圖形估計出極限值 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": "。但若沒有繪圖軟體,我們該如何有效地判斷極限、或計算出它的值呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在這裡,我們將採取 「由簡入繁、以簡馭繁」 的方式,建立一套能處理大部分極限問題的方法。", + "newline": "false", + "runs": [ + { + "text": "在這裡,我們將採取 「" + }, + { + "text": "由簡入繁、以簡馭繁", + "style": "bold" + }, + { + "text": "」 的方式,建立一套能處理大部分極限問題的方法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面這三個極限,是最基本、也最沒有爭議的:$$\n\\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$透過這三個簡單的基礎極限,再結合「極限的四則運算法則」,我們便能推算出更複雜組合函數的極限。", + "newline": "false", + "runs": [ + { + "text": "下面這三個極限,是最基本、也最沒有爭議的:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} x = a, \\; \\lim_{(x,y)\\to (a,b)} y = b,\\; \\lim_{(x,y)\\to (a,b)} c = c。\n$$", + "kind": "math_block" + }, + { + "text": "透過這三個簡單的基礎極限,再結合「" + }, + { + "text": "極限的四則運算法則", + "style": "bold" + }, + { + "text": "」,我們便能推算出更複雜組合函數的極限。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "極限的四則運算法則", + "body": [ + { + "type": "paragraph", + "content": "如果$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$則有:", + "newline": "false", + "runs": [ + { + "text": "如果" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = L \\text{ 而 } \\lim_{(x,y)\\to (a,b)} g(x,y) = M,\n$$", + "kind": "math_block" + }, + { + "text": "則有:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "加法法則:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$", + "kind": "math" + } + ], + "content": "加法法則:$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] = L+M。$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "減法法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "減法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) - g(x,y) \\right] = L-M$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "乘法法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "乘法法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) \\cdot g(x,y) \\right]= L\\cdot M$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "常數積法則: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為任意常數。" + } + ], + "content": "常數積法則: $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ c \\cdot f(x,y) \\right] = c \\cdot L$,其中 $c$ 為任意常數。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "除法法則(須 " + }, + { + "latex": "$M\\neq 0$", + "kind": "math" + }, + { + "text": "): " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "除法法則(須 $M\\neq 0$): $\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right] = \\dfrac{L}{M}$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1: 上面極限的四則運算法則允許我們 把複雜的極限拆成較簡單的極限 來計算。比方,加法法則可寫成$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$其餘各法則亦然。", + "newline": "false", + "runs": [ + { + "text": "注意 1:", + "style": "bold-italic" + }, + { + "text": " 上面極限的四則運算法則允許我們 " + }, + { + "text": "把複雜的極限拆成較簡單的極限", + "style": "bold" + }, + { + "text": " 來計算。比方,加法法則可寫成" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ f(x,y) + g(x,y) \\right] \n = \\lim\\limits_{(x,y)\\to (a,b)} f(x,y) + \\lim\\limits_{(x,y)\\to (a,b)} g(x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "其餘各法則亦然。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2: 除法法則中,極限公式成立,條件 $M\\neq 0$ 至關重要!一旦 $M = 0$,除法法則便「派不上用場」,而極限$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$是否存在、如何判斷、如何計算,都必須另外分析!請參考本節後半部「分式極限處理三招」。", + "newline": "false", + "runs": [ + { + "text": "注意 2:", + "style": "bold-italic" + }, + { + "text": " 除法法則中,極限公式成立,條件 " + }, + { + "latex": "$M\\neq 0$", + "kind": "math" + }, + { + "text": " 至關重要!一旦 " + }, + { + "latex": "$M = 0$", + "kind": "math" + }, + { + "text": ",除法法則便「" + }, + { + "text": "派不上用場", + "style": "bold" + }, + { + "text": "」,而極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} \\left[ \\dfrac{f(x,y)}{g(x,y)} \\right]\n$$", + "kind": "math_block" + }, + { + "text": "是否存在、如何判斷、如何計算,都必須" + }, + { + "text": "另外分析", + "style": "bold-italic" + }, + { + "text": "!請參考本節後半部「" + }, + { + "text": "分式極限處理三招", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$\n\n\n\n由於\n$$\n \\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$\n因此,我們可以利用極限的四則與乘法法則,將原式拆解如下\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$\n最後,透過極限的四則運算,我們可以得到: \n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$\n \n\n\n\n\n---\n聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!\n\n\n註解\n二元多項式函數的極限\n如果雙變數函數 $p(x,y)$ 是**二元多項式函數(polynomial function of two variables)**,也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:\n$$\n \\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$\n換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 **直接代入** 二元多項式即可!\n\n\n---\n### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f03dcf5f9c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$因此,我們可以利用極限的四則與乘法法則,將原式拆解如下$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$最後,透過極限的四則運算,我們可以得到: $$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$", + "newline": "false", + "runs": [ + { + "text": "由於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們可以利用極限的四則與乘法法則,將原式拆解如下" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "最後,透過極限的四則運算,我們可以得到: " + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = 7\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ce8c86523d", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "由於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} x = 1, \\; \\lim_{(x,y)\\to (1,2)} y = 2,\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們可以利用極限的四則與乘法法則,將原式拆解如下" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} 3x^2+y^2 \n &= \\lim_{(x,y)\\to (1,2)} 3x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x^2 + \\lim_{(x,y)\\to (1,2)} y^2 \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} \\left[ x \\cdot x \\right] + \n \\lim_{(x,y)\\to (1,2)} \\left[ y \\cdot y \\right] \\\\\n &= 3 \\lim_{(x,y)\\to (1,2)} x \\cdot \\lim_{(x,y)\\to (1,2)} x + \n \\lim_{(x,y)\\to (1,2)} y \\cdot \\lim_{(x,y)\\to (1,2)} y\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "最後,透過極限的四則運算,我們可以得到: " + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} 3x^2+y^2 = ?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "7" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!", + "newline": "false", + "runs": [ + { + "text": "聰明的你,從上面的例子應該已經可以聯想到一個更一般性的結論了!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "二元多項式函數的極限", + "body": [ + { + "type": "paragraph", + "content": "如果雙變數函數 $p(x,y)$ 是二元多項式函數(polynomial function of two variables),也就是由若干型式為 $c\\,x^n y^m$ 的項所組成,當中 $n,m$ 為非負整數,例如 $p(x,y)= 2x + 3y - 5x^2y$,那麼有:$$\n\\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$換句話說,二元多項式函數在任意一個點 $(a,b)$ 的極限,就是把這個點 直接代入 二元多項式即可!", + "newline": "false", + "runs": [ + { + "text": "如果雙變數函數 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "二元多項式函數(polynomial function of two variables)", + "style": "bold" + }, + { + "text": ",也就是由若干型式為 " + }, + { + "latex": "$c\\,x^n y^m$", + "kind": "math" + }, + { + "text": " 的項所組成,當中 " + }, + { + "latex": "$n,m$", + "kind": "math" + }, + { + "text": " 為非負整數,例如 " + }, + { + "latex": "$p(x,y)= 2x + 3y - 5x^2y$", + "kind": "math" + }, + { + "text": ",那麼有:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} p(x,y) = p(a,b)。\n$$", + "kind": "math_block" + }, + { + "text": "換句話說,二元多項式函數在任意一個點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限,就是把這個點 " + }, + { + "text": "直接代入", + "style": "bold" + }, + { + "text": " 二元多項式即可!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$\n\n\n\n由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。\n因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$\n因此,\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$\n \n\n\n\n\n---\n### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1dd27674d4", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 $0$),將極限拆解為:$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$因此,$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$", + "newline": "false", + "runs": [ + { + "text": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "),將極限拆解為:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = \\frac{7}{5}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_fba777d8a5", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "由於題目中的函數是「兩個二元多項式函數的相除」,而我們已經知道二元多項式的極限可以直接代入。因此,可以先利用除法法則(前提:分母極限不為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "),將極限拆解為:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2}\n &= \\frac{ \\lim\\limits_{(x,y)\\to (1,2)} 3x^2+y^2 }{ \\lim\\limits_{(x,y)\\to (1,2)} x^2+y^2 } \n \\end{aligned}。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (1,2)} \\frac{3x^2+y^2}{x^2+y^2} = ?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "7/5" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$\n\n\n不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$\n\n\n\n\n\na. 正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;\nb. 正確。因此極限不存在;\nc. 正確。因此極限值是 $\\infty$;\nd. 不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。\n\n\n\n\n---\n聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!\n\n\n註解\n有理函數的極限\n如果雙變數函數 $r(x,y)$ 是**有理函數(rational function)**,也就是形如\n$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$\n其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:\n$$\n \\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$\n如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,**直接代入**就好,只要分母在該點不為零!\n\n\n---\n## 3️⃣分式極限處理三招:第一招:化簡法\n\n接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:\n$$\n \\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$\n如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?\n\n記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:**「化簡極限式」**。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,**使分母轉換成一個極限不為 $0$ 的表達式**,這樣四則運算法則重新變得可用。\n\n---\n### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "試問下面的推導是否正確:$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$", + "newline": "false", + "runs": [ + { + "text": "試問下面的推導是否正確:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cdb6627478", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$", + "newline": "false", + "runs": [ + { + "text": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 " + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 5\n試問下面的推導是否正確:\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2-y^2}{x^2+y^2} \n = \\frac{ \\lim\\limits_{(x,y)\\to (0,0)} x^2-y^2}{ \\lim\\limits_{(x,y)\\to (0,0)} x^2+y^2}\n = \\frac{0}{0} 。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7bea5f4612", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "正確,因為分子與分母的極限都趨近 $0$,所以原極限等於 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "正確。因此極限不存在;" + }, + { + "key": "c", + "text": "正確。因此極限值是 $\\infty$;" + }, + { + "key": "d", + "text": "不正確,因為極限四則運算的除法法則,只適用於分母的極限值不等於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!", + "newline": "false", + "runs": [ + { + "text": "聰明的你,從上面的結果應該也可以聯想到一個更一般性的結論!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "有理函數的極限", + "body": [ + { + "type": "paragraph", + "content": "如果雙變數函數 $r(x,y)$ 是有理函數(rational function),也就是形如$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$其中 $p(x,y)$ 與 $q(x,y)$ 都是二元多項式,則有:$$\n\\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$如果 $q(a,b)\\neq 0$。換句話說,有理函數在任意一個點 $(a,b)$ 的極限,直接代入就好,只要分母在該點不為零!", + "newline": "false", + "runs": [ + { + "text": "如果雙變數函數 " + }, + { + "latex": "$r(x,y)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "有理函數(rational function)", + "style": "bold" + }, + { + "text": ",也就是形如" + }, + { + "latex": "$$\nr(x,y) = \\frac{p(x,y)}{q(x,y)},\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$q(x,y)$", + "kind": "math" + }, + { + "text": " 都是二元多項式,則有:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} r(x,y) \n = \\lim_{(x,y)\\to (a,b)} \\dfrac{p(x,y)}{q(x,y)} \n = \\dfrac{p(a,b)}{q(a,b)} \n = r(a,b),\n$$", + "kind": "math_block" + }, + { + "text": "如果 " + }, + { + "latex": "$q(a,b)\\neq 0$", + "kind": "math" + }, + { + "text": "。換句話說,有理函數在任意一個點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的極限," + }, + { + "text": "直接代入", + "style": "bold" + }, + { + "text": "就好,只要分母在該點不為零!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣分式極限處理三招:第一招:化簡法", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣分式極限處理三招:第一招:化簡法", + "newline": "true", + "runs": [ + { + "text": "3️⃣分式極限處理三招:第一招:化簡法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 $0$」的狀況。也就是考慮下列情形:$$\n\\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$如果 $\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$,極限是否存在?如何找出極限值?", + "newline": "false", + "runs": [ + { + "text": "接下來,我們要討論分式函數的極限計算,特別是當「分母的極限趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "」的狀況。也就是考慮下列情形:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\frac{g(x,y)}{h(x,y)}\n$$", + "kind": "math_block" + }, + { + "text": "如果 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = 0$", + "kind": "math" + }, + { + "text": ",極限是否存在?如何找出極限值?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "記得,當分母的極限為 $0$ 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:「化簡極限式」。這個方法的想法其實非常簡單:既然問題出在分母極限為 $0$,我們就嘗試透過代數的化簡方式,使分母轉換成一個極限不為 $0$ 的表達式,這樣四則運算法則重新變得可用。", + "newline": "false", + "runs": [ + { + "text": "記得,當分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,「除法法則」便無法直接使用,因此我們需要額外的技巧。在這裡,我們要介紹第一個技巧:" + }, + { + "text": "「化簡極限式」", + "style": "bold" + }, + { + "text": "。這個方法的想法其實非常簡單:既然問題出在分母極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們就嘗試透過代數的化簡方式," + }, + { + "text": "使分母轉換成一個極限不為 ", + "style": "bold" + }, + { + "latex": "$0$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的表達式", + "style": "bold" + }, + { + "text": ",這樣四則運算法則重新變得可用。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n極限存在,且值為 $0$\n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n極限存在,且值為 $1$\n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等\n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$\n\n\n\n\n1. 如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過**化簡分式**\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n $$\n 這時,問題就回到求取一個二元多項式的極限。因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$; \n d. 無法判斷,因為分母趨近於 $0$。\n \n\n2. 這題同理,我們先通過**化簡分式**的方法,得到\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n $$\n 因此\n \n a. 極限不存在,因為原式是 $\\dfrac{0}{0}$;\n b. 極限存在,且值為 $0$;\n c. 極限存在,且值為 $1$;\n d. 無法判斷,因為分母趨近於 $0$。\n \n\n3. 同理,我們先通過**化簡分式**的方法,得到\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n $$\n 這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。\n\n4. **回憶:** 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?\n $$\n \\lim_{x\\to 0} \\frac{1}{x} = ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。\n d. 極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。\n \n\n5. 現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。\n 令\n $$\n r = x^2+y^2 \\,(\\geq 0),\n $$\n 則\n $$\n (x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n $$\n 請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,\n $$\n \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n $$\n \n a. 極限存在,且極限值為 $\\infty$。\n b. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。\n c. 極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。\n d. 極限不存在,因為左右極限不相同。\n \n\n\n\n---\n## 4️⃣分式極限處理三招:第二招:路徑比較法\n\n這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:**路徑比較法(Path Comparison Method)**。\n\n我們先回憶一下,在單變數情境中,若要說明\n$$\n \\lim_{x\\to a} f(x)\n$$\n不存在,可以檢查左右極限是否一致:\n$$\n \\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$\n換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。\n\n對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:\n可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。\n\n因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:\n$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「**路徑比較法**」的核心思想。\n\n\n定理\n路徑比較法\n對於雙變數函數 $f(x,y)$,\n1. 如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得\n $$\n \\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n $$\n 其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。\n2. 若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。\n\n\n**注意:** 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 **所有** 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,**「路徑比較法」通常只拿來說明「極限不存在」**。\n\n---\n### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "判斷下面極限是否存在。如果存在,找出極限值:", + "newline": "false", + "runs": [ + { + "text": "判斷下面極限是否存在。如果存在,找出極限值:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9c89d9ff39", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$", + "kind": "math_block" + }, + { + "text": "這時,問題就回到求取一個二元多項式的極限。因此" + }, + { + "text": "極限存在,且值為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過化簡分式$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$這時,問題就回到求取一個二元多項式的極限。因此極限存在,且值為 $0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "這題同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "text": "極限存在,且值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ], + "content": "這題同理,我們先通過化簡分式的方法,得到$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$因此極限存在,且值為 $1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "這時,雖然分母的極限還是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。但是,分子的極限由 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "同理,我們先通過化簡分式的方法,得到$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "回憶:", + "style": "bold" + }, + { + "text": " 還記得在單變數的情況中,我們處理過類似問題,例如 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0} \\frac{1}{x}$", + "kind": "math" + }, + { + "text": ",分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "、分子的極限為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。這樣的答案是?" + }, + { + "latex": "$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$", + "kind": "math" + }, + { + "text": " 但 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$", + "kind": "math" + }, + { + "text": ",左右極限不相等" + } + ], + "content": "回憶: 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "現在回到本題: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "令" + }, + { + "latex": "$$\nr = x^2+y^2 \\,(\\geq 0),\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$", + "kind": "math_block" + }, + { + "text": "請特別注意:由於 " + }, + { + "latex": "$r>0$", + "kind": "math" + }, + { + "text": ",這裡只剩下「單邊極限」 " + }, + { + "latex": "$r\\to 0^+$", + "kind": "math" + }, + { + "text": "。因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,但 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$", + "kind": "math" + } + ], + "content": "現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。令$$\nr = x^2+y^2 \\,(\\geq 0),\n$$則$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 6\n判斷下面極限是否存在。如果存在,找出極限值:\n1. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}$。\n2. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}$。\n3. $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7164d1e1b5", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$", + "kind": "math_block" + }, + { + "text": "這時,問題就回到求取一個二元多項式的極限。因此" + } + ], + "content": "如果我們直接套用四則運算的除法法則,我們會發現分母的極限為 $0$。因此,這題若用除法法則處理,結果是「失敗」!但是我們可以發現這題的分子與分母有公因式可以消掉,通過化簡分式$$\n\\lim_{(x,y)\\to (0,0)} \\frac{(x^2+y^2)^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} x^2+y^2。\n$$這時,問題就回到求取一個二元多項式的極限。因此" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限不存在,因為原式是 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "極限存在,且值為 $0$;" + }, + { + "key": "c", + "text": "極限存在,且值為 $1$;" + }, + { + "key": "d", + "text": "無法判斷,因為分母趨近於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "這題同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$", + "kind": "math_block" + }, + { + "text": "因此" + } + ], + "content": "這題同理,我們先通過化簡分式的方法,得到$$\n\\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{x^2+y^2}\n = \\lim_{(x,y)\\to (0,0)} 1。\n$$因此" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限不存在,因為原式是 $\\dfrac{0}{0}$;" + }, + { + "key": "b", + "text": "極限存在,且值為 $0$;" + }, + { + "key": "c", + "text": "極限存在,且值為 $1$;" + }, + { + "key": "d", + "text": "無法判斷,因為分母趨近於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,我們先通過" + }, + { + "text": "化簡分式", + "style": "bold" + }, + { + "text": "的方法,得到" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "這時,雖然分母的極限還是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。但是,分子的極限由 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "同理,我們先通過化簡分式的方法,得到$$\n\\lim_{(x,y)\\to (0,0)} \\frac{x^2+y^2}{(x^2+y^2)^2}\n = \\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}。\n$$這時,雖然分母的極限還是 $0$。但是,分子的極限由 $0$ 變成 $1$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "回憶:", + "style": "bold" + }, + { + "text": " 還記得在單變數的情況中,我們處理過類似問題,例如 " + }, + { + "latex": "$\\lim\\limits_{x\\to 0} \\frac{1}{x}$", + "kind": "math" + }, + { + "text": ",分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "、分子的極限為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "。這樣的答案是?" + }, + { + "latex": "$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$", + "kind": "math_block" + } + ], + "content": "回憶: 還記得在單變數的情況中,我們處理過類似問題,例如 $\\lim\\limits_{x\\to 0} \\frac{1}{x}$,分母的極限為 $0$、分子的極限為 $1$。這樣的答案是?$$\n\\lim_{x\\to 0} \\frac{1}{x} = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\infty$。" + }, + { + "key": "b", + "text": "極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= \\infty$。" + }, + { + "key": "c", + "text": "極限不存在,但 $\\lim\\limits_{x\\to 0} \\frac{1}{x}= -\\infty$。" + }, + { + "key": "d", + "text": "極限不存在,因為 $\\lim\\limits_{x\\to 0^-} \\frac{1}{x}= -\\infty$ 但 $\\lim\\limits_{x\\to 0^+} \\frac{1}{x}= \\infty$,左右極限不相等。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "現在回到本題: " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$", + "kind": "math" + }, + { + "text": "。" + }, + { + "text": "令" + }, + { + "latex": "$$\nr = x^2+y^2 \\,(\\geq 0),\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$", + "kind": "math_block" + }, + { + "text": "請特別注意:由於 " + }, + { + "latex": "$r>0$", + "kind": "math" + }, + { + "text": ",這裡只剩下「單邊極限」 " + }, + { + "latex": "$r\\to 0^+$", + "kind": "math" + }, + { + "text": "。因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$", + "kind": "math_block" + } + ], + "content": "現在回到本題: $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2}$。令$$\nr = x^2+y^2 \\,(\\geq 0),\n$$則$$\n(x,y)\\to (0,0) \\Longleftrightarrow \\boxed{r= x^2+y^2 \\to 0^+}。\n$$請特別注意:由於 $r>0$,這裡只剩下「單邊極限」 $r\\to 0^+$。因此,$$\n\\lim_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\lim_{r\\to 0^+} \\frac{1}{r}= ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\infty$。" + }, + { + "key": "b", + "text": "極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = \\infty$。" + }, + { + "key": "c", + "text": "極限不存在,但 $\\lim\\limits_{(x,y)\\to (0,0)} \\frac{1}{x^2+y^2} = -\\infty$。" + }, + { + "key": "d", + "text": "極限不存在,因為左右極限不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-4", + "title": "4️⃣分式極限處理三招:第二招:路徑比較法", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "4️⃣分式極限處理三招:第二招:路徑比較法", + "newline": "true", + "runs": [ + { + "text": "4️⃣分式極限處理三招:第二招:路徑比較法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 $0$ 時:路徑比較法(Path Comparison Method)。", + "newline": "false", + "runs": [ + { + "text": "這一部分,我們要介紹第二個處理分式函數極限的技巧,特別適用於分母的極限趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時:" + }, + { + "text": "路徑比較法(Path Comparison Method)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們先回憶一下,在單變數情境中,若要說明$$\n\\lim_{x\\to a} f(x)\n$$不存在,可以檢查左右極限是否一致:$$\n\\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$換句話說,如果當 $x$ 從「左邊」與「右邊」趨近 $a$ 時,函數值趨近不同數字,那麼該極限就不存在。", + "newline": "false", + "runs": [ + { + "text": "我們先回憶一下,在單變數情境中,若要說明" + }, + { + "latex": "$$\n\\lim_{x\\to a} f(x)\n$$", + "kind": "math_block" + }, + { + "text": "不存在,可以檢查左右極限是否一致:" + }, + { + "latex": "$$\n\\lim_{x\\to a^-} f(x) \\neq \\lim_{x\\to a^+} f(x) \\Longrightarrow \\lim_{x\\to a} f(x) 不存在。\n$$", + "kind": "math_block" + }, + { + "text": "換句話說,如果當 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 從「左邊」與「右邊」趨近 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 時,函數值趨近不同數字,那麼該極限就不存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對多變數函數 $f(x,y)$,而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中,$(x,y) \\to (a,b)$ 的「方向(路徑)」遠不只左右兩個:可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。", + "newline": "false", + "runs": [ + { + "text": "對多變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",而言,我們也能利用類似概念來判斷極限不存在。不同的是,在平面中," + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": " 的「方向(路徑)」遠不只左右兩個:可能從上方、下方、斜方向、圓弧軌跡、或各種不同曲線接近該點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,如果沿著兩條不同的路徑趨近 $(a,b)$ 得到不同的極限值,那就能判定:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。這就是「路徑比較法」的核心思想。", + "newline": "false", + "runs": [ + { + "text": "因此,如果沿著兩條不同的路徑趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 得到不同的極限值,那就能判定:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在。這就是「" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "」的核心思想。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "路徑比較法", + "body": [ + { + "type": "paragraph", + "content": "對於雙變數函數 $f(x,y)$,", + "newline": "false", + "runs": [ + { + "text": "對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果存在兩條不同趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": ",使得" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$L_1 \\neq L_2$", + "kind": "math" + }, + { + "text": ",則極限 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在。" + } + ], + "content": "如果存在兩條不同趨近 $(a,b)$ 的路徑 $C_1$ 與 $C_2$,使得$$\n\\begin{aligned}\n \\hspace{60pt} f(x,y) \\to L_1, \\;\\;\\text{當} \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_1,\\\\\n \\hspace{60pt} f(x,y) \\to L_2, \\;\\;當 \\;\\; (x,y) \\to (a,b) \\;\\; 沿著\\;\\; C_2,\n \\end{aligned}\n$$其中 $L_1 \\neq L_2$,則極限 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 不存在。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "若對所有趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的趨近值皆相同且等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "若對所有趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,則 $\\lim\\limits_{(x,y)\\to (a,b)} f(x,y) = L$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意: 由於在平面中,$(x,y) \\to (a,b)$ 的方向(路徑)太多了!要檢查 所有 趨近 $(a,b)$ 的路徑 $C$,$f(x,y)$ 的趨近值皆相同且等於 $L$,實務上不太可能。因此,「路徑比較法」通常只拿來說明「極限不存在」。", + "newline": "false", + "runs": [ + { + "text": "注意:", + "style": "bold" + }, + { + "text": " 由於在平面中," + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": " 的方向(路徑)太多了!要檢查 " + }, + { + "text": "所有", + "style": "bold" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的路徑 " + }, + { + "latex": "$C$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的趨近值皆相同且等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",實務上不太可能。因此," + }, + { + "text": "「路徑比較法」通常只拿來說明「極限不存在」", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (思考方向):** \n\n簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。\n\n也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ \n沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。\n\n**Step 2. (選擇路徑):** \n\n當我們不確定要選哪條路徑時,可以先從最簡單的開始:**通過 $(0,0)$ 的直線**。即 \n$$\n C: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$\n接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。\n\n**Step 3. (計算沿路徑的極限):** \n\n在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$\n可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:\n$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n---\n### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "請說明$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "請說明" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cef57a662e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (思考方向): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (思考方向):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。", + "newline": "false", + "runs": [ + { + "text": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。", + "newline": "false", + "runs": [ + { + "text": "也就是說,我們要找出兩條不同的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 使得,函數 " + }, + { + "latex": "$f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 沿著這兩條路徑趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,計算得到的極限值不相同。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (選擇路徑): ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (選擇路徑):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:通過 $(0,0)$ 的直線。即 $$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。", + "newline": "false", + "runs": [ + { + "text": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:" + }, + { + "text": "通過 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的直線", + "style": "bold" + }, + { + "text": "。即 " + }, + { + "latex": "$$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$", + "kind": "math_block" + }, + { + "text": "接著可以考慮 " + }, + { + "latex": "$C_1: y= 2x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$C_2: y= 3x$", + "kind": "math" + }, + { + "text": " 等等,取不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3. (計算沿路徑的極限): ", + "newline": "false", + "runs": [ + { + "text": "Step 3. (計算沿路徑的極限):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在路徑 $C: y = mx$ 上,函數值 $f(x,y)= f(x, mx)$。因此$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$可以看到:不同的 $m$ 值(不同的路徑),會得到不同的極限值。因此:$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$極限不存在,因為不同路徑算出的函數極限值不相同", + "newline": "false", + "runs": [ + { + "text": "在路徑 " + }, + { + "latex": "$C: y = mx$", + "kind": "math" + }, + { + "text": " 上,函數值 " + }, + { + "latex": "$f(x,y)= f(x, mx)$", + "kind": "math" + }, + { + "text": "。因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "可以看到:不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為不同路徑算出的函數極限值不相同" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 7\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} \\;不存在。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_84893894c6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (思考方向): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (思考方向):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。", + "newline": "false", + "runs": [ + { + "text": "簡單觀察一下這個分式函數,可以發現它沒有公因式可化簡。因此,我們考慮現在介紹的方法:路徑比較法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,我們要找出兩條不同的路徑 $C_1$ 與 $C_2$ 使得,函數 $f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$ 沿著這兩條路徑趨近於 $(0,0)$ 時,計算得到的極限值不相同。", + "newline": "false", + "runs": [ + { + "text": "也就是說,我們要找出兩條不同的路徑 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 使得,函數 " + }, + { + "latex": "$f(x,y) = \\frac{x^2-y^2}{x^2+y^2}$", + "kind": "math" + }, + { + "text": " 沿著這兩條路徑趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,計算得到的極限值不相同。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (選擇路徑): ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (選擇路徑):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:通過 $(0,0)$ 的直線。即 $$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$接著可以考慮 $C_1: y= 2x$, $C_2: y= 3x$ 等等,取不同的 $m$ 值。", + "newline": "false", + "runs": [ + { + "text": "當我們不確定要選哪條路徑時,可以先從最簡單的開始:" + }, + { + "text": "通過 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的直線", + "style": "bold" + }, + { + "text": "。即 " + }, + { + "latex": "$$\nC: \\boxed{y = m(x-0)+0}, 當中\\;\\; m \\;\\;為任意實數!\n$$", + "kind": "math_block" + }, + { + "text": "接著可以考慮 " + }, + { + "latex": "$C_1: y= 2x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$C_2: y= 3x$", + "kind": "math" + }, + { + "text": " 等等,取不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3. (計算沿路徑的極限): ", + "newline": "false", + "runs": [ + { + "text": "Step 3. (計算沿路徑的極限):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在路徑 " + }, + { + "latex": "$C: y = mx$", + "kind": "math" + }, + { + "text": " 上,函數值 " + }, + { + "latex": "$f(x,y)= f(x, mx)$", + "kind": "math" + }, + { + "text": "。因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) \n &= \\lim_{(x,mx)\\to (0,0)} f(x,mx) \\\\\n &= \\lim_{x\\to 0} f(x,mx) \\\\\n &= \\lim_{x\\to 0} \\frac{x^2-(mx)^2}{x^2+(mx)^2} \\\\\n &= \\frac{1-m^2}{1+m^2}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "可以看到:不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 值(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\dfrac{1-m^2}{1+m^2}$。" + }, + { + "key": "b", + "text": "極限不存在,因為不同路徑算出的函數極限值不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n$0$\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n極限不存在,因為不同路徑算出的函數極限值不相同\n\n\n\n\n**Step 1. (選擇路徑:先試直線):** \n\n考慮通過 $(0,0)$ 的直線 \n$$\n C: \\boxed{y=m(x-0)+0}。\n$$\n沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$\n\na. $\\frac{m^2}{1+m^4}$;\nb. $\\frac{m^3}{1+m^4}$;\nc. $0$;\nd. $1$。\n\n\n由路徑比較法與上面的結果,我們可以為極限\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n做出什麼結論:\n\na. 此極限為 $0$;\nb. 此極限不存在;\nc. 革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。\n\n\n**Step 2. (重新挑選路徑)** \n\n既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:\n$$\n \\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$\n當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?\n\n我們注意到現在考慮的極限是 \n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$\n因此,或許可以優先考慮\n$$\n C: \\boxed{x= m y^2},\n$$\n因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!\n$$\n \\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$\n因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$ \n\na. 極限存在,且極限值為 $\\dfrac{m}{m+1}$。\nb. 極限不存在,因為不同路徑算出的函數極限值不相同。\n\n\n\n\n\n\n---\n## 5️⃣分式極限處理三招:第三招:極座標法\n\n在前面,我們介紹了兩個處理分式極限的技巧,包含**化簡法**與**路徑比較法**。\n現在,我們將介紹第三個技巧——**極座標法**。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。\n\n\n定理\n極座標法\n**Step 1.(變數變換)** 令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$\n**Step 2.(變換極限)** 由於\n$$\n \\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$\n因此\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$\n**Step 3.(極限判斷)** 如果\n$$\n \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$\n其中 $L$ 與 $\\theta$ 無關,則\n$$\n \\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$\n反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則\n$$\n \\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$\n\n\n極座標法的方法說明如下:\n1. 第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。\n2. 第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!\n3. 第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。\n\n\n**注意 1.** 極座標法,本質上就是 **「變數變換法」** 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。\n**注意 2.** 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。\n\n---\n### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "請說明$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "請說明" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_51b88e67c9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (選擇路徑:先試直線): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (選擇路徑:先試直線):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮通過 $(0,0)$ 的直線 $$\nC: \\boxed{y=m(x-0)+0}。\n$$沿著此路徑,函數 $f(x,y) = \\frac{xy^2}{x^2+y^4}$ 的極限變成:$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$$0$", + "newline": "false", + "runs": [ + { + "text": "考慮通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$$\nC: \\boxed{y=m(x-0)+0}。\n$$", + "kind": "math_block" + }, + { + "text": "沿著此路徑,函數 " + }, + { + "latex": "$f(x,y) = \\frac{xy^2}{x^2+y^4}$", + "kind": "math" + }, + { + "text": " 的極限變成:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由路徑比較法與上面的結果,我們可以為極限$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$做出什麼結論:革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否", + "newline": "false", + "runs": [ + { + "text": "由路徑比較法與上面的結果,我們可以為極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "做出什麼結論:革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (重新挑選路徑) ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (重新挑選路徑)", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?", + "newline": "false", + "runs": [ + { + "text": "既然所有通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$C: y=m(x-0)+0$", + "kind": "math" + }, + { + "text": " 都得到極限,我們應該改用「不同型態」的路徑,例如:" + }, + { + "latex": "$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們注意到現在考慮的極限是 $$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$因此,或許可以優先考慮$$\nC: \\boxed{x= m y^2},\n$$因為這樣分母部份就能合併成一項(都是 $y^4$),或許之後能夠比較好化簡。算算看吧!$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$因此,不同的 $m$(不同的路徑),會得到不同的極限值。因此:$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$極限不存在,因為不同路徑算出的函數極限值不相同", + "newline": "false", + "runs": [ + { + "text": "我們注意到現在考慮的極限是 " + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "因此,或許可以優先考慮" + }, + { + "latex": "$$\nC: \\boxed{x= m y^2},\n$$", + "kind": "math_block" + }, + { + "text": "因為這樣分母部份就能合併成一項(都是 " + }, + { + "latex": "$y^4$", + "kind": "math" + }, + { + "text": "),或許之後能夠比較好化簡。算算看吧!" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此,不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": "(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "極限不存在,因為不同路徑算出的函數極限值不相同" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 8\n請說明\n$$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4} 不存在。\n$$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_819afdf3ea", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1. (選擇路徑:先試直線): ", + "newline": "false", + "runs": [ + { + "text": "Step 1. (選擇路徑:先試直線):", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "考慮通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$$\nC: \\boxed{y=m(x-0)+0}。\n$$", + "kind": "math_block" + }, + { + "text": "沿著此路徑,函數 " + }, + { + "latex": "$f(x,y) = \\frac{xy^2}{x^2+y^4}$", + "kind": "math" + }, + { + "text": " 的極限變成:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0) \\; 沿著 \\; C} f(x,y) = \\lim_{(x,mx)\\to (0,0)} \\frac{x(mx)^2}{x^2+(mx)^4} = ?\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$\\frac{m^2}{1+m^4}$;" + }, + { + "key": "b", + "text": "$\\frac{m^3}{1+m^4}$;" + }, + { + "key": "c", + "text": "$0$;" + }, + { + "key": "d", + "text": "$1$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "由路徑比較法與上面的結果,我們可以為極限" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "做出什麼結論:" + } + ], + "options": [ + { + "key": "a", + "text": "此極限為 $0$;" + }, + { + "key": "b", + "text": "此極限不存在;" + }, + { + "key": "c", + "text": "革命尚未成功!仍須檢查不同路徑,才能斷定極限的存在與否。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2. (重新挑選路徑) ", + "newline": "false", + "runs": [ + { + "text": "Step 2. (重新挑選路徑)", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "既然所有通過 $(0,0)$ 的直線 $C: y=m(x-0)+0$ 都得到極限,我們應該改用「不同型態」的路徑,例如:$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?", + "newline": "false", + "runs": [ + { + "text": "既然所有通過 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的直線 " + }, + { + "latex": "$C: y=m(x-0)+0$", + "kind": "math" + }, + { + "text": " 都得到極限,我們應該改用「不同型態」的路徑,例如:" + }, + { + "latex": "$$\n\\begin{aligned}\n C&: y = m (x-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots); 或\\\\\n C&: x = m (y-0)^a+0, \\; a 某個常數( = 1, 2, 3, 1/2, 1/3, \\cdots);\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "當然可以更複雜(但我們先試簡單的)。但是這麼多型態的函數,要從哪個先嘗試考慮呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "我們注意到現在考慮的極限是 " + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + }, + { + "text": "因此,或許可以優先考慮" + }, + { + "latex": "$$\nC: \\boxed{x= m y^2},\n$$", + "kind": "math_block" + }, + { + "text": "因為這樣分母部份就能合併成一項(都是 " + }, + { + "latex": "$y^4$", + "kind": "math" + }, + { + "text": "),或許之後能夠比較好化簡。算算看吧!" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim\\limits_{(x,y)\\to(0,0) 沿著 C} \\frac{xy^2}{x^2+y^4}\n &= \\lim\\limits_{(my^2, y)\\to(0,0)} \\frac{(my^2)y^2}{(my^2)^2+y^4} \\\\\n &= \\lim\\limits_{y\\to 0} \\frac{my^4}{(m+1)y^4}\n = \\frac{m}{m+1}\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此,不同的 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": "(不同的路徑),會得到不同的極限值。因此:" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{xy^2}{x^2+y^4}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "極限存在,且極限值為 $\\dfrac{m}{m+1}$。" + }, + { + "key": "b", + "text": "極限不存在,因為不同路徑算出的函數極限值不相同。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標記\n $$\n \\hspace{60pt} \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n $$\n$=1$\n\n3. 最後,我們特別提醒一點,雖然這題的函數 $f(x,y) = \\frac{\\sin(x^2+y^2)}{x^2+y^2}$ 在 $(x,y)=(0,0)$ 上是沒有定義的,但是這完全不影響" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-5", + "title": "5️⃣分式極限處理三招:第三招:極座標法", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "5️⃣分式極限處理三招:第三招:極座標法", + "newline": "true", + "runs": [ + { + "text": "5️⃣分式極限處理三招:第三招:極座標法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "在前面,我們介紹了兩個處理分式極限的技巧,包含化簡法與路徑比較法。現在,我們將介紹第三個技巧——極座標法。這個方法,特別適用在當函數的分母部份為 $cx^2+dy^2$ 時。", + "newline": "false", + "runs": [ + { + "text": "在前面,我們介紹了兩個處理分式極限的技巧,包含" + }, + { + "text": "化簡法", + "style": "bold" + }, + { + "text": "與" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "。現在,我們將介紹第三個技巧——" + }, + { + "text": "極座標法", + "style": "bold" + }, + { + "text": "。這個方法,特別適用在當函數的分母部份為 " + }, + { + "latex": "$cx^2+dy^2$", + "kind": "math" + }, + { + "text": " 時。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "極座標法", + "body": [ + { + "type": "paragraph", + "content": "Step 1.(變數變換) 令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$Step 2.(變換極限) 由於$$\n\\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$因此$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$Step 3.(極限判斷) 如果$$\n\\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$其中 $L$ 與 $\\theta$ 無關,則$$\n\\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$反之,若 $L$ 與 $\\theta$ 有關(或極限不存在),則$$\n\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$", + "newline": "false", + "runs": [ + { + "text": "Step 1.(變數變換)", + "style": "bold" + }, + { + "text": " 令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)}。\n$$", + "kind": "math_block" + }, + { + "text": "Step 2.(變換極限)", + "style": "bold" + }, + { + "text": " 由於" + }, + { + "latex": "$$\n\\boxed{(x,y)\\to (0,0) \\Longleftrightarrow r \\to 0^+},\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to (0,0)} f(x,y) \n &\\boxed{= \\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) )}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "Step 3.(極限判斷)", + "style": "bold" + }, + { + "text": " 如果" + }, + { + "latex": "$$\n\\lim_{ r \\to 0^+ } f( r \\cos(\\theta), r \\sin(\\theta) ) = L,\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 無關,則" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (0,0)} f(x,y) = L。\n$$", + "kind": "math_block" + }, + { + "text": "反之,若 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 有關(或極限不存在),則" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) \\; 不存在。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "極座標法的方法說明如下:", + "newline": "false", + "runs": [ + { + "text": "極座標法的方法說明如下:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 為點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的距離、" + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 為向量 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸方向的夾角。" + } + ], + "content": "第 1 步:我們將笛卡兒座標系轉換成極座標系。當中 $r$ 為點 $(x,y)$ 的距離、$\\theta$ 為向量 $(x,y)$ 與正 $x$ 軸方向的夾角。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "第 2 步:這樣的轉換,我們將極限問題轉化為單變數 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 的極限問題,尚帶有一個參數:角度 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": "。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!" + } + ], + "content": "第 2 步:這樣的轉換,我們將極限問題轉化為單變數 $r$ 的極限問題,尚帶有一個參數:角度 $\\theta$。這樣的優點,在於我們將有更多之前學的工具可以套用在後續的極限計算,比如羅必達法去求極限!" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "第 3 步:如果極限與 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。" + } + ], + "content": "第 3 步:如果極限與 $\\theta$ 有關,代表不同角度(路徑)得到不同極限值,因此極限不存在。反之,極限存在。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 極座標法,本質上就是 「變數變換法」 的一種。我們只是將 $(x,y)$ 用 $(r,\\theta)$ 重新表示,使極限行為更容易分析。注意 2. 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 極座標法,本質上就是 " + }, + { + "text": "「變數變換法」", + "style": "bold" + }, + { + "text": " 的一種。我們只是將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 用 " + }, + { + "latex": "$(r,\\theta)$", + "kind": "math" + }, + { + "text": " 重新表示,使極限行為更容易分析。" + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 「變數變換法」即使在多變數微積分中,也是一個很重要的技巧。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n存在,且極限值為 $1$\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $1$;\nb. 不存在;\nc. 無法判斷;\n\n\n\n\n\n---\n### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5e78b84f28", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "利用極座標法:令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$則$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$因此,$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$存在,且極限值為 $1$", + "newline": "false", + "runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "存在,且極限值為 " + }, + { + "latex": "$1$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 9\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}。\n$$\n此題問題與 Example 1 相同,只是當時我們是透過圖形觀察得到答案,現在我們將使用代數法得到答案。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a5737ce33f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{\\sin(r^2)}{r^2} \\\\\n &= \\lim_{R\\to 0^+ } \\frac{\\sin(R)}{R} \\;\\;( R:=r^2,變數變換) \\\\\n &= \\lim_{R\\to 0^+ } \\cos(R) \\;\\; (羅必達法,單變數) \\\\\n &= \\cos(0) = 1\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "存在,且極限值為 $1$;" + }, + { + "key": "b", + "text": "不存在;" + }, + { + "key": "c", + "text": "無法判斷;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n不存在,因為不同的角度 $\\theta$,得到不同的極限值\n\n\n\n\n利用極座標法:令\n$$\n \\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$\n則\n$$\n \\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$\n因此,\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$\n\na. 存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;\nb. 不存在,因為不同的角度 $\\theta$,得到不同的極限值;\nc. 無法判斷;\n\n\n\n\n\n---\n## 6️⃣連續的定義與「補洞」範例\n\n在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果\n$$\n \\lim_{x\\to a} f(x) = f(a)。\n$$\n這個等式能成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;\n2. 函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n在圖形上,這相當於:**函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」**。\n\n這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:\n若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。\n\n\n定義\n多變數函數的連續\n對於一個雙變數函數 $f(x,y)$ 而言,\n1. 我們說 $f(x,y)$ 在點 $(a,b)$ 是**連續的(continuous)**,\n如果\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$\n2. 我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。\n\n\n同樣的,等式\n$$\n \\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$\n成立,必須同時滿足: \n1. 極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;\n2. 函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);\n3. 兩者相同: 極限值等於函數值。\n\n\n---\n### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-10" + }, + { + "type": "paragraph", + "content": "求下列極限的值:$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。", + "newline": "false", + "runs": [ + { + "text": "求下列極限的值:" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1a5d960e1e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "利用極座標法:令$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$則$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$因此,$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$不存在,因為不同的角度 $\\theta$,得到不同的極限值", + "newline": "false", + "runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + }, + { + "text": "不存在,因為不同的角度 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",得到不同的極限值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 10\n求下列極限的值:\n$$\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}。\n$$\n此題問題與 Example 1, 7 相同,只是當時我們是分別透過圖形觀察、路徑比較法得到答案,現在我們將使用極座標法得到答案。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_35382ca2ce", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "利用極座標法:令" + }, + { + "latex": "$$\n\\boxed{x = r \\cos(\\theta)},\\;\\; \\boxed{y = r \\sin(\\theta)},\n$$", + "kind": "math_block" + }, + { + "text": "則" + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n &= \\lim_{r\\to 0^+ } \\frac{r^2 (\\cos^2(\\theta) - \\sin^2(\\theta))}{r^2} \\\\\n &= \\lim_{r\\to 0^+ } \\cos^2(\\theta) - \\sin^2(\\theta) \\\\\n &= \\cos^2(\\theta) - \\sin^2(\\theta) \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2}\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "存在,且極限值為 $\\cos^2(\\theta) - \\sin^2(\\theta)$;" + }, + { + "key": "b", + "text": "不存在,因為不同的角度 $\\theta$,得到不同的極限值;" + }, + { + "key": "c", + "text": "無法判斷;" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-6", + "title": "6️⃣連續的定義與「補洞」範例", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "6️⃣連續的定義與「補洞」範例", + "newline": "true", + "runs": [ + { + "text": "6️⃣連續的定義與「補洞」範例", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "在單變數函數中,我們說一個函數 $f(x)$ 在 $a$ 點連續,如果$$\n\\lim_{x\\to a} f(x) = f(a)。\n$$這個等式能成立,必須同時滿足: ", + "newline": "false", + "runs": [ + { + "text": "在單變數函數中,我們說一個函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 點連續,如果" + }, + { + "latex": "$$\n\\lim_{x\\to a} f(x) = f(a)。\n$$", + "kind": "math_block" + }, + { + "text": "這個等式能成立,必須同時滿足: " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "極限存在:" + }, + { + "latex": "$\\lim\\limits_{x\\to a} f(x)$", + "kind": "math" + }, + { + "text": " 存在;" + } + ], + "content": "極限存在:$\\lim\\limits_{x\\to a} f(x)$ 存在;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數值存在:" + }, + { + "latex": "$f(a)$", + "kind": "math" + }, + { + "text": " 存在,即 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 落在 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的定義域(Domain);" + } + ], + "content": "函數值存在:$f(a)$ 存在,即 $a$ 落在 $f$ 的定義域(Domain);" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "兩者相同: 極限值等於函數值。" + } + ], + "content": "兩者相同: 極限值等於函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在圖形上,這相當於:函數在 $x=a$ 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」。", + "newline": "false", + "runs": [ + { + "text": "在圖形上,這相當於:" + }, + { + "text": "函數在 ", + "style": "bold" + }, + { + "latex": "$x=a$", + "kind": "math", + "style": "bold" + }, + { + "text": " 附近的圖形沒有「破洞(不可有洞、不可有跳躍)」", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。", + "newline": "false", + "runs": [ + { + "text": "這樣的連續性,是描述函數性質時非常重要的概念。在多變數情況中,我們也希望保留相同的直觀:若雙變數函數在某點連續,其圖形在該點附近也不應出現任何「斷裂」的現象,因此我們有如下的定義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "多變數函數的連續", + "body": [ + { + "type": "paragraph", + "content": "對於一個雙變數函數 $f(x,y)$ 而言,", + "newline": "false", + "runs": [ + { + "text": "對於一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "連續的(continuous)", + "style": "bold" + }, + { + "text": "," + }, + { + "text": "如果" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "我們說 $f(x,y)$ 在點 $(a,b)$ 是連續的(continuous),如果$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在一個集合 " + }, + { + "latex": "$D\\subseteq \\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上是連續的,如果 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上的任一點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 皆是連續的。" + } + ], + "content": "我們說 $f(x,y)$ 在一個集合 $D\\subseteq \\mathbb{R}^2$ 上是連續的,如果 $f$ 在 $D$ 上的任一點 $(a,b)$ 皆是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣的,等式$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$成立,必須同時滿足: ", + "newline": "false", + "runs": [ + { + "text": "同樣的,等式" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x,y) = f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "成立,必須同時滿足: " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "極限存在:" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$", + "kind": "math" + }, + { + "text": " 存在;" + } + ], + "content": "極限存在:$\\lim\\limits_{(x,y)\\to (a,b)} f(x,y)$ 存在;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數值存在:" + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": " 存在,即 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 落在 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的定義域(Domain);" + } + ], + "content": "函數值存在:$f(a,b)$ 存在,即 $(a,b)$ 落在 $f$ 的定義域(Domain);" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "兩者相同: 極限值等於函數值。" + } + ], + "content": "兩者相同: 極限值等於函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n$a,b$ 皆可為任意任意實數,但不能同時等於 $0$\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$\n\n\n\n\n1. 首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$\n成立。因此,你的答案是:\n\na. $a,b$ 皆可為任意實數;\nb. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。\nc. $a,b$ 皆可為任意任意實數,但不能同時等於 $0$。\n\n\n2. 由上, $D$,作為函數連續點的收集。答案是:\n\na. $D= \\mathbb{R}^2$。\nb. $\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。\nc. $D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。\nd. $D= f(x,y)$ 的定義域。\n\n\n\n\n\n\n\n\n註解\n多項式函數與有理函數的連續性\n1. 任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。\n2. 任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域\n $$\n D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n $$ \n 上,都是連續的。\n\n\n---\n### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-11" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_74175140dc", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,我們要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的。依照連續的定義,點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須使得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$", + "kind": "math_block" + }, + { + "text": "成立。因此,你的答案是:" + }, + { + "latex": "$a,b$", + "kind": "math" + }, + { + "text": " 皆可為任意任意實數,但不能同時等於 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$成立。因此,你的答案是:$a,b$ 皆可為任意任意實數,但不能同時等於 $0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 11\n試問函數\n$$\n f(x,y) = \\frac{x^2-y^2}{x^2+y^2}。\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9bf6fbc2c3", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,我們要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的。依照連續的定義,點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須使得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$", + "kind": "math_block" + }, + { + "text": "成立。因此,你的答案是:" + } + ], + "content": "首先,我們要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的。依照連續的定義,點 $(a,b)$ 必須使得$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)\n \\Longleftrightarrow \\lim_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}。\n$$成立。因此,你的答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$a,b$ 皆可為任意實數;" + }, + { + "key": "b", + "text": "$a,b$ 皆可為任意任意實數,但不能同時等於 $0$。而是否 $(a,b)$ 可為 $(0,0)$,須再做額外判斷。" + }, + { + "key": "c", + "text": "$a,b$ 皆可為任意任意實數,但不能同時等於 $0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\{ (x,y) \\vert (x,y)\\neq (0,0) \\} \\subseteq D$。而是否 $(0,0)\\in D$ 須做額外判斷。" + }, + { + "key": "c", + "text": "$D= \\{ (x,y) \\in \\mathbb{R}^2 \\vert (x,y)\\neq (0,0) \\}$。" + }, + { + "key": "d", + "text": "$D= f(x,y)$ 的定義域。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "多項式函數與有理函數的連續性", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "任意的二元多項式函數 " + }, + { + "latex": "$p(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 都是連續的。" + } + ], + "content": "任意的二元多項式函數 $p(x,y)$ 在 $\\mathbb{R}^2$ 都是連續的。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "任意的有理函數 " + }, + { + "latex": "$r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$", + "kind": "math" + }, + { + "text": ",在其定義域" + }, + { + "latex": "$$\nD= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n$$", + "kind": "math_block" + }, + { + "text": "上,都是連續的。" + } + ], + "content": "任意的有理函數 $r(x,y) = \\dfrac{p(x,y)}{q(x,y)}$,在其定義域$$\nD= \\{ (x,y) \\in \\mathbb{R}^2 \\vert q(x,y)\\neq 0 \\}\n$$上,都是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 12", + "newline": "true", + "runs": [ + { + "text": "Example 12", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 12, + "ai_prompt_md": "### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$\n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是不連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2 - \\{ (0,0) \\}$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n---\n### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-12" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e39ddd3715", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$", + "kind": "math" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的", + "newline": "false", + "runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 處都是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$", + "kind": "math" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 $(a,b) = (0,0)$ 時,$f(x,y)$ 在 $(0,0)$ 是不連續的", + "newline": "false", + "runs": [ + { + "text": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是不連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\mathbb{R}^2 - \\{ (0,0) \\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 12\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2-y^2}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cdab41ee5a", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2-y^2}{x^2+y^2} = \\frac{a^2-b^2}{a^2+b^2}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2-b^2}{a^2+b^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;" + }, + { + "key": "b", + "text": "還無法判斷。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2-y^2}{x^2+y^2} = 0$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由上面的路徑比較法或極座標法,我們得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(0,0)$ 是連續的;" + }, + { + "key": "b", + "text": "$f(x,y)$ 在 $(0,0)$ 是不連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$D= \\{(0,0)\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 13", + "newline": "true", + "runs": [ + { + "text": "Example 13", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 13, + "ai_prompt_md": "### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$\n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的\n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$\n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n$0$\n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n$f(x,y)$ 在 $(0,0)$ 是連續的\n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n$D= \\mathbb{R}^2$\n\n\n\n\n1. 首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查\n$$\n \\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$\n2. 由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。\n\n3. **情況 1:** 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;\n b. $\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。\n \n\n 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;\n b. 還無法判斷。\n \n\n4. **情況 2:** 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?\n \n a. $\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;\n b. $\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。\n \n\n 透過極座標法,我們有\n $$\n \\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n $$\n \n a. $0$;\n b. $1$。\n c. 不存在\n \n\n 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,\n \n a. $f(x,y)$ 在 $(0,0)$ 是連續的;\n b. $f(x,y)$ 在 $(0,0)$ 是不連續的。\n \n\n5. 由上, $D$,作為函數連續點的收集。答案是:\n \n a. $D= \\mathbb{R}^2$。\n b. $D= \\mathbb{R}^2 - \\{ (0,0) \\}$。\n c. $D= \\{(0,0)\\}$。\n \n\n\n\n\n\n---\n## 7️⃣合成函數的連續性\n\n這一部分,我們要探討一些常見形式的二元函數,例如:\n$$\n f(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$ \n這類函數,都具有 **「合成(composition)」** 的結構。\n\n還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:**連續函數的合成仍然是連續的**。\n也就是說,對於合成函數\n$$\n h(x) := g\\bigl(f(x)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x)$ 在 $x=a$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a)$ 也是連續的,\n那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,\n$$\n \\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$\n\n在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:\n\n\n定理\n合成函數的連續性\n對於合成函數\n$$\n h(x,y) := g\\bigl(f(x,y)\\bigr),\n$$\n如果以下兩個條件符合:\n1. 函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的,\n2. 函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的\n那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,\n$$\n \\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$\n\n\n\n下面給一個簡單的說明。由於\n$$\n \\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$\n因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。\n\n\n\n\n---\n### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-13" + }, + { + "type": "paragraph", + "content": "試問函數$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nf(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ba15448fd2", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$", + "kind": "math" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 由極限四則運算中的除法法則,當 $(a,b) \\neq (0,0)$ 時,$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的", + "newline": "false", + "runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 處都是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$", + "kind": "math" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 透過極座標法,我們有$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$$0$", + "newline": "false", + "runs": [ + { + "text": " 透過極座標法,我們有" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 因此,得到的結果是,當 $(a,b) = (0,0)$ 時,$f(x,y)$ 在 $(0,0)$ 是連續的", + "newline": "false", + "runs": [ + { + "text": " 因此,得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是連續的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + }, + { + "latex": "$D= \\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:$D= \\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 13\n試問函數\n$$\n f(x,y) = \n \\begin{cases}\n \\dfrac{x^2y}{x^2+y^2} & \\text{if } (x,y) \\neq (0,0),\\\\\n 0 & \\text{if } (x,y) = (0,0),\n \\end{cases}\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1f65bf1592", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,要判斷函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在哪些點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上是連續的,我們需要檢查" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "首先,要判斷函數 $f(x,y)$ 在哪些點 $(a,b)$ 上是連續的,我們需要檢查$$\n\\lim_{(x,y)\\to(a,b)} f(x,y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於此函數在 " + }, + { + "latex": "$(a,b)= (0,0)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 的定義不同,因此必須「分開討論」。" + } + ], + "content": "由於此函數在 $(a,b)= (0,0)$ 與 $(a,b) \\neq (0,0)$ 的定義不同,因此必須「分開討論」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "情況 1:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 1: 當 $(a,b) \\neq (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} \\frac{x^2y}{x^2+y^2} = \\frac{a^2b}{a^2+b^2}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(a,b)} 0 = \\frac{a^2b}{a^2+b^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 由極限四則運算中的除法法則,當 " + }, + { + "latex": "$(a,b) \\neq (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(a,b) \\neq (0,0)$ 處都是連續的;" + }, + { + "key": "b", + "text": "還無法判斷。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "情況 2:", + "style": "bold" + }, + { + "text": " 當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時,連續的判斷變成是檢查?" + } + ], + "content": "情況 2: 當 $(a,b) = (0,0)$ 時,連續的判斷變成是檢查?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = 1$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{(x,y)\\to(0,0)} 0 = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 透過極座標法,我們有" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to(0,0)} \\frac{x^2y}{x^2+y^2} = ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$1$。" + }, + { + "key": "c", + "text": "不存在" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 因此,得到的結果是,當 " + }, + { + "latex": "$(a,b) = (0,0)$", + "kind": "math" + }, + { + "text": " 時, " + } + ], + "options": [ + { + "key": "a", + "text": "$f(x,y)$ 在 $(0,0)$ 是連續的;" + }, + { + "key": "b", + "text": "$f(x,y)$ 在 $(0,0)$ 是不連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上, " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": ",作為函數連續點的收集。答案是:" + } + ], + "content": "由上, $D$,作為函數連續點的收集。答案是:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$D= \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$D= \\mathbb{R}^2 - \\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$D= \\{(0,0)\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近區域的圖形。\n\n**畫一張函數圖**\n\n\n試問\n\n1. 當區域越來越集中於 $(0,0)$ 但不包含 $(0,0)$ 時,$f(x,y)$ 的值是否會越來越接近某個值?\n會,且值為 $1$\n\n2. 因此,我們會標" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-7", + "title": "7️⃣合成函數的連續性", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "7️⃣合成函數的連續性", + "newline": "true", + "runs": [ + { + "text": "7️⃣合成函數的連續性", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "這一部分,我們要探討一些常見形式的二元函數,例如:$$\nf(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$這類函數,都具有 「合成(composition)」 的結構。", + "newline": "false", + "runs": [ + { + "text": "這一部分,我們要探討一些常見形式的二元函數,例如:" + }, + { + "latex": "$$\nf(x,y) = \\sin(x^2+y^2),\\, e^{-(x^2+y^2)}\n$$", + "kind": "math_block" + }, + { + "text": "這類函數,都具有 " + }, + { + "text": "「合成(composition)」", + "style": "bold" + }, + { + "text": " 的結構。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:連續函數的合成仍然是連續的。也就是說,對於合成函數$$\nh(x) := g\\bigl(f(x)\\bigr),\n$$如果以下兩個條件符合:", + "newline": "false", + "runs": [ + { + "text": "還記得第一章嗎?在單變數情境中,我們曾學過一個非常重要的事實:" + }, + { + "text": "連續函數的合成仍然是連續的", + "style": "bold" + }, + { + "text": "。也就是說,對於合成函數" + }, + { + "latex": "$$\nh(x) := g\\bigl(f(x)\\bigr),\n$$", + "kind": "math_block" + }, + { + "text": "如果以下兩個條件符合:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 是連續的," + } + ], + "content": "函數 $f(x)$ 在 $x=a$ 是連續的," + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$g(u)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$u=f(a)$", + "kind": "math" + }, + { + "text": " 也是連續的," + }, + { + "text": "那麼函數 " + }, + { + "latex": "$h(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 也連續。等價的," + }, + { + "latex": "$$\n\\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$", + "kind": "math_block" + } + ], + "content": "函數 $g(u)$ 在 $u=f(a)$ 也是連續的,那麼函數 $h(x)$ 在點 $x=a$ 也連續。等價的,$$\n\\lim\\limits_{x\\to a} h(x) = \\lim\\limits_{x\\to a} g\\bigl(f(x)\\bigr) = g\\bigl(f(a)\\bigr) = h(a)。\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:", + "newline": "false", + "runs": [ + { + "text": "在雙變數情況下,這個結論仍然適用。我們將結果紀錄在下面定理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "合成函數的連續性", + "body": [ + { + "type": "paragraph", + "content": "對於合成函數$$\nh(x,y) := g\\bigl(f(x,y)\\bigr),\n$$如果以下兩個條件符合:", + "newline": "false", + "runs": [ + { + "text": "對於合成函數" + }, + { + "latex": "$$\nh(x,y) := g\\bigl(f(x,y)\\bigr),\n$$", + "kind": "math_block" + }, + { + "text": "如果以下兩個條件符合:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 是連續的," + } + ], + "content": "函數 $f(x,y)$ 在 $(x,y)= (a,b)$ 是連續的," + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$g(u)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$u=f(a,b)$", + "kind": "math" + }, + { + "text": " 也是連續的" + }, + { + "text": "那麼函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 也是連續的。等價的," + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "函數 $g(u)$ 在 $u=f(a,b)$ 也是連續的那麼函數 $h(x,y)$ 在 $(x,y)= (a,b)$ 也是連續的。等價的,$$\n\\lim\\limits_{(x,y)\\to (a,b)} h(x,y) = \\lim\\limits_{(x,y)\\to (a,b)} g\\bigl(f(x,y)\\bigr) = g\\bigl(f(a,b)\\bigr) = h(a,b)。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9e78a4cd64", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "下面給一個簡單的說明。由於$$\n\\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$因此,$h(x,y)$ 在 $(x,y)= (a,b)$ 是連續的。", + "newline": "false", + "runs": [ + { + "text": "下面給一個簡單的說明。由於" + }, + { + "latex": "$$\n\\begin{aligned}\n (x,y) \\to (a,b) \n &\\Longrightarrow f(x,y) \\to f(a,b) \\;\\; (\\because f \\; 在\\; (a,b) \\; 連續 )\\\\\n &\\Longrightarrow g\\bigl( f(x,y) \\bigr) \\to g\\bigl( f(a,b) \\bigr) \\;\\; (\\because g \\; 在\\; f(a,b) \\; 連續 )\\\\\n &\\Longrightarrow h(x,y) \\to h(a,b)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y)= (a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 14", + "newline": "true", + "runs": [ + { + "text": "Example 14", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 14, + "ai_prompt_md": "### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{x^2 +y^2}$\n 而 $g(u)=?$\n$\\boxed{sin(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$(a,b)\\in \\mathbb{R}^2$\n\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\mathbb{R}^2$\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。\n b. $\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。\n c. $\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。\n \n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $(a,b)= (0,0)$。\n c. $(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\{ (0,0) \\}$。\n c. $\\mathbb{R}^2 - \\{ (0,0) \\}$。\n \n\n\n**備註**:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$\n\n\n\n\n\n---\n### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-14" + }, + { + "type": "paragraph", + "content": "試問函數$$\nh(x,y) = \\sin(x^2+y^2)\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nh(x,y) = \\sin(x^2+y^2)\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c111de229c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{x^2 +y^2}$", + "kind": "math" + }, + { + "text": "而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{sin(u)}$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$$\\boxed{x^2 +y^2}$而 $g(u)=?$$\\boxed{sin(u)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + }, + { + "latex": "$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + }, + { + "latex": "$(a,b)\\in \\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?$(a,b)\\in \\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?$\\mathbb{R}^2$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\sin (x^2+y^2)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 14\n試問函數\n$$\n h(x,y) = \\sin(x^2+y^2)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f66780624b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "x^2 +y^2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": " 而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "text": " " + } + ], + "answers": [ + "sin(u)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\left( \\mathbb{R}, \\mathbb{R}^2 \\right)$。" + }, + { + "key": "b", + "text": "$\\left( \\mathbb{R}^2, \\mathbb{R} \\right)$。" + }, + { + "key": "c", + "text": "$\\left( \\mathbb{R}^2, \\mathbb{R}^2 \\right)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b)\\in \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$(a,b)= (0,0)$。" + }, + { + "key": "c", + "text": "$(a,b)\\in \\mathbb{R}^2 - \\{ (0,0) \\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\{ (0,0) \\}$。" + }, + { + "key": "c", + "text": "$\\mathbb{R}^2 - \\{ (0,0) \\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\sin (x^2+y^2)$ 在 $\\mathbb{R}^2$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\sin (x^2+y^2)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$\\mathbb{R}^2$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\sin (x^2+y^2) = \\sin (a^2+b^2), \\; \\forall (x,y)\\in \\mathbb{R}^2。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 15", + "newline": "true", + "runs": [ + { + "text": "Example 15", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 15, + "ai_prompt_md": "### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n$\\boxed{y/x}$\n 而 $g(u)=?$\n$\\boxed{ln(u)}$\n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$\n\n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n$a\\neq 0$ 且 $b/a >0$\n\n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$\n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n1. 首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?\n $$\n h(x,y) = g\\bigl( f(x,y) \\bigr)\n $$\n 其中 $f(x,y)=?$\n \n \n 而 $g(u)=?$\n \n \n2. 由於:\n $$\n \\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n $$\n 其中 $(D_1,D_2)=?$\n \n a. $\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。\n b. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。\n c. $\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。\n \n3. 因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足\n $$\n (a,b) \\in D_1, \\; f(a,b)\\in D_2,\n $$\n 則 $h(x,y)$ 在 $(a,b)$ 就是連續的。\n \n 由上面的回答,$(a,b)$ 所須滿足的條件為?\n \n a. $(a,b)\\in \\mathbb{R}^2$。\n b. $a\\neq 0$。\n c. $a\\neq 0$ 且 $b/a >0$。\n \n4. 結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?\n \n a. $\\mathbb{R}^2$。\n b. $\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。\n c. 以上皆非。\n \n\n**備註**:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於\n$$\n \\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$\n\n\n\n\n---\n## 8️⃣推廣到多變數函數\n\n對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,\n\n1. 我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的**極限**等於 $L$,記為\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n $$\n 也可記作 \n $$\n f(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n $$\n 其含義與二變數完全相同:**只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$**。\n2. 我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果\n $$\n \\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n $$\n 其意義與二變數、單變數完全一致:**函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞**。\n\n另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "id": "Example-15" + }, + { + "type": "paragraph", + "content": "試問函數$$\nh(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$在哪個(最大的)集合 $D$ 上是連續的?", + "newline": "false", + "runs": [ + { + "text": "試問函數" + }, + { + "latex": "$$\nh(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$", + "kind": "math_block" + }, + { + "text": "在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dfc5d11b89", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{y/x}$", + "kind": "math" + }, + { + "text": "而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{ln(u)}$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$$\\boxed{y/x}$而 $g(u)=?$$\\boxed{ln(u)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + }, + { + "latex": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + }, + { + "latex": "$a\\neq 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$b/a >0$", + "kind": "math" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?$a\\neq 0$ 且 $b/a >0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + }, + { + "latex": "$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$", + "kind": "math" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 15\n試問函數\n$$\n h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)\n$$\n在哪個(最大的)集合 $D$ 上是連續的?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_3ae1a79829", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,觀察函數 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 可以寫成哪兩個函數 " + }, + { + "latex": "$f,g$", + "kind": "math" + }, + { + "text": " 的合成?" + }, + { + "latex": "$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$f(x,y)=?$", + "kind": "math" + } + ], + "content": "首先,觀察函數 $h(x,y)$ 可以寫成哪兩個函數 $f,g$ 的合成?$$\nh(x,y) = g\\bigl( f(x,y) \\bigr)\n$$其中 $f(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "y/x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": " 而 " + }, + { + "latex": "$g(u)=?$", + "kind": "math" + }, + { + "text": " " + } + ], + "answers": [ + "ln(u)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於:" + }, + { + "latex": "$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$(D_1,D_2)=?$", + "kind": "math" + } + ], + "content": "由於:$$\n\\begin{aligned}\n &函數\\; f(x,y) \\;在\\; D_1 \\;上是連續的;\\\\\n &函數\\; g(u) \\; 在\\; D_2 \\;上是連續的;\\\\\n \\end{aligned}\n$$其中 $(D_1,D_2)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\left( \\mathbb{R}^2,\\; \\mathbb{R} \\right)$。" + }, + { + "key": "b", + "text": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x=0\\},\\; \\mathbb{R} \\right)$。" + }, + { + "key": "c", + "text": "$\\left( \\{(x,y)\\in\\mathbb{R}^2 \\mid x\\neq 0\\},\\; (0,\\infty) \\right)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此,由上述「合成函數的連續性」定理,對於任意的點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",只要滿足" + }, + { + "latex": "$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$", + "kind": "math_block" + }, + { + "text": "則 " + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 就是連續的。" + }, + { + "text": "由上面的回答," + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 所須滿足的條件為?" + } + ], + "content": "因此,由上述「合成函數的連續性」定理,對於任意的點 $(a,b)$,只要滿足$$\n(a,b) \\in D_1, \\; f(a,b)\\in D_2,\n$$則 $h(x,y)$ 在 $(a,b)$ 就是連續的。由上面的回答,$(a,b)$ 所須滿足的條件為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b)\\in \\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$a\\neq 0$。" + }, + { + "key": "c", + "text": "$a\\neq 0$ 且 $b/a >0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n請透過觀" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "結論:" + }, + { + "latex": "$h(x,y)$", + "kind": "math" + }, + { + "text": " 在哪個(最大的)集合 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上是連續的?" + } + ], + "content": "結論:$h(x,y)$ 在哪個(最大的)集合 $D$ 上是連續的?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\mathbb{R}^2$。" + }, + { + "key": "b", + "text": "$\\left\\{ (a,b)\\in \\mathbb{R}^2 \\vert a\\neq 0,\\; b/a > 0 \\right\\}$。" + }, + { + "key": "c", + "text": "以上皆非。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請透過觀察函數 $f(x,y) = \\dfrac{\\sin(x^2+y^2)}{x^2+y^2}$ 的圖形,回答極限\n$$\n \\lim_{(x,y)\\to (0,0)} \\frac{\\sin(x^2+y^2)}{x^2+y^2}\n$$\n是否存在?如果存在,請寫下其極限值 $L$。\n\n\n請由下圖,觀察函數 $f(x,y)$ 在 $(0,0)$ 附近" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "備註:$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$ 在 $D$ 上連續,這等價於$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$h(x,y) = \\ln \\left( \\dfrac{y}{x} \\right)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,這等價於" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} \\ln \\left( \\dfrac{y}{x} \\right) \n = \\ln \\left( \\dfrac{b}{a} \\right) , \\; \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-8", + "title": "8️⃣推廣到多變數函數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "8️⃣推廣到多變數函數", + "newline": "true", + "runs": [ + { + "text": "8️⃣推廣到多變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "對於多變數函數(不限於二變數),例如三變數函數 $f(x,y,z)$,我們對其在點 $(a,b,c)$ 的極限、連續等定義與符號都是一樣的。比如,", + "newline": "false", + "runs": [ + { + "text": "對於多變數函數(不限於二變數),例如三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們對其在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的極限、連續等定義與符號都是一樣的。比如," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們說 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "極限", + "style": "bold" + }, + { + "text": "等於 " + }, + { + "latex": "$L$", + "kind": "math" + }, + { + "text": ",記為" + }, + { + "latex": "$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n$$", + "kind": "math_block" + }, + { + "text": "也可記作" + }, + { + "latex": "$$\nf(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n$$", + "kind": "math_block" + }, + { + "text": "其含義與二變數完全相同:" + }, + { + "text": "只要 ", + "style": "bold" + }, + { + "latex": "$(x,y,z)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 趨近 ", + "style": "bold" + }, + { + "latex": "$(a,b,c)$", + "kind": "math", + "style": "bold" + }, + { + "text": "(從任意方向、任意曲線、任意空間路徑),", + "style": "bold" + }, + { + "latex": "$f(x,y,z)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的值便會趨近於 ", + "style": "bold" + }, + { + "latex": "$L$", + "kind": "math", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "我們說 $f(x,y,z)$ 在 $(a,b,c)$ 的極限等於 $L$,記為$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = L\n$$也可記作$$\nf(x,y,z) \\to L\\; 當\\; (x,y,z) \\to (a,b,c)。\n$$其含義與二變數完全相同:只要 $(x,y,z)$ 趨近 $(a,b,c)$(從任意方向、任意曲線、任意空間路徑),$f(x,y,z)$ 的值便會趨近於 $L$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們說函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是連續的,如果" + }, + { + "latex": "$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n$$", + "kind": "math_block" + }, + { + "text": "其意義與二變數、單變數完全一致:" + }, + { + "text": "函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "我們說函數 $f(x,y,z)$ 在 $(a,b,c)$ 是連續的,如果$$\n\\lim_{(x,y,z)\\to (a,b,c)} f(x,y,z) = f(a,b,c)。\n$$其意義與二變數、單變數完全一致:函數圖形在該點附近不能「破掉」、不能跳躍,也不能有洞。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。", + "newline": "false", + "runs": [ + { + "text": "另外,像是前面提到的各種技巧,諸如極限的四則運算法則、路徑比較法、極座標法(可推廣成球座標法)、合成函數的連續性等等在三變數或更多變數時仍然成立。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/C14_2/jsx_contour.py b/pages/Ch14/C14_2/jsx_contour.py new file mode 100644 index 0000000000000000000000000000000000000000..89c7b2a7b12cb4dcaa57a7dfe9773f7b977e89df --- /dev/null +++ b/pages/Ch14/C14_2/jsx_contour.py @@ -0,0 +1,190 @@ +# pages/jsx_contour.py +import dash +from dash import html, dcc, Input, Output, clientside_callback + +dash.register_page(__name__, path="/jsx-contour", title="JSXGraph 等高線") + +# --- CDN(若你專案已全域載入 JSXGraph,這兩行可移除) --- +JSX_CSS = "https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraph.css" +JSX_JS = "https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore.js" + +layout = html.Div([ + # JSXGraph CDN + html.Link(rel="stylesheet", href=JSX_CSS), + html.Script(src=JSX_JS), + + html.H3("JSXGraph:輸入 f(x,y) → 畫等高線"), + + html.Div([ + html.Label("f(x,y) = "), + dcc.Input(id="expr", type="text", value="cos(2*x)*cos(3*y)", + debounce=True, style={"width": "520px"}), + ], style={"display": "flex", "alignItems": "center", "gap": "8px"}), + + html.Div([ + html.Div([ + html.Label("Levels:start, end, step"), + dcc.Input(id="lv-start", type="number", value=-2.0, step=0.5, style={"width": "90px"}), + dcc.Input(id="lv-end", type="number", value= 2.0, step=0.5, style={"width": "90px", "marginLeft": "6px"}), + dcc.Input(id="lv-step", type="number", value= 0.5, step=0.5, style={"width": "90px", "marginLeft": "6px"}), + ], style={"display": "inline-block", "marginRight": "24px"}), + + html.Div([ + html.Label("視窗:xmin, xmax, ymin, ymax"), + dcc.Input(id="xmin", type="number", value=-6, step=0.5, style={"width": "80px"}), + dcc.Input(id="xmax", type="number", value= 6, step=0.5, style={"width": "80px", "marginLeft": "6px"}), + dcc.Input(id="ymin", type="number", value=-6, step=0.5, style={"width": "80px", "marginLeft": "6px"}), + dcc.Input(id="ymax", type="number", value= 6, step=0.5, style={"width": "80px", "marginLeft": "6px"}), + ], style={"display": "inline-block"}), + ], style={"margin": "12px 0"}), + + html.Div(id="err", style={"color": "#c00", "marginBottom": "8px"}), + + # 畫布 + html.Div(id="jxg-wrap", children=[ + html.Div(id="jxg-contour", className="jxgbox", + style={"width": "100%", "height": "560px", "border": "1px solid #ddd"}) + ]), + + # 觸發器(不顯示) + dcc.Store(id="jxg-noop") +]) + +# ---------- 前端邏輯(clientside) ---------- +clientside_callback( + """ + function(expr, ls, le, step, xmin, xmax, ymin, ymax) { + // 基本檢查 + const errBox = document.getElementById('err'); + if (errBox) errBox.textContent = ''; + + const el = document.getElementById('jxg-contour'); + if (!el) return ""; + if (!window.JXG) { if (errBox) errBox.textContent = "未載入 JSXGraph。"; return ""; } + + // 初始化 board(只做一次) + let ctx = el.__ctx; + if (!ctx) { + // 預留高度(自適應) + const ratio = 1.0; + const w0 = Math.max(300, el.clientWidth || 600); + const h0 = Math.max(300, Math.floor(w0 / ratio)); + el.style.height = h0 + "px"; + + const board = JXG.JSXGraph.initBoard('jxg-contour', { + boundingbox: [xmin||-6, ymax||6, xmax||6, ymin||-6], + axis: true, + pan: { enabled: true }, + zoom: { enabled: true, wheel: true } + }); + + // ResizeObserver + if ("ResizeObserver" in window) { + let resizing = false, lastW = w0; + const ro = new ResizeObserver(function() { + const w = Math.floor(el.clientWidth); + if (!w || w === lastW || resizing) return; + const h = Math.max(300, Math.floor(w / ratio)); + resizing = true; + el.style.height = h + "px"; + board.resizeContainer(w, h); + board.update(); lastW = w; resizing = false; + }); + ro.observe(el); + } + + ctx = { board, curves: [], jc: board.jc }; + el.__ctx = ctx; + } + + // 解析使用者輸入的 f(x,y) + let F = null; + try { + // JessieCode:把 expr 變成函數 f(x,y) + // 例如 "cos(2*x)*cos(3*y)" + F = ctx.jc.snippet(expr || "0", true, 'x,y'); + } catch (e) { + if (errBox) errBox.textContent = "解析失敗: " + e; + return ""; + } + + // 數值合法性 & 等高線參數 + ls = (ls===null || ls===undefined) ? -2 : ls; + le = (le===null || le===undefined) ? 2 : le; + step = (step===null || step===undefined) ? 0.5 : step; + if (step === 0) step = 0.5; + + xmin = (xmin===null||xmin===undefined) ? -6 : xmin; + xmax = (xmax===null||xmax===undefined) ? 6 : xmax; + ymin = (ymin===null||ymin===undefined) ? -6 : ymin; + ymax = (ymax===null||ymax===undefined) ? 6 : ymax; + + // 先清掉舊的曲線與標籤 + for (let c of ctx.curves) { try { ctx.board.removeObject(c); } catch(_){} } + ctx.curves = []; + for (let t of (ctx.labels || [])) { + try { ctx.board.removeObject(t.txt); ctx.board.removeObject(t.g); } catch(_){} + } + ctx.labels = []; + + // 畫多條等高線並加 k 標籤 + let idx = 0; + const eps = 1e-12; + if (ls > le) { const tmp = ls; ls = le; le = tmp; } + + // 配色 + const colors = ["#264653","#2a9d8f","#e9c46a","#f4a261","#e76f51", + "#8ab17d","#577590","#f94144","#f3722c","#f8961e"]; + + for (let level = ls; level <= le + eps; level += step) { + const G = function(x, y) { return F(x, y) - level; }; + + // ① 畫出 k 等高線 + const curve = ctx.board.create("implicitcurve", [G], { + strokeColor: colors[idx % colors.length], + strokeWidth: 2 + }); + ctx.curves.push(curve); + + // ② 在曲線上放一個 glider(用種子點吸附到最近的分支) + const seedx = xmin + (0.20 + 0.15*(idx % 4)) * (xmax - xmin); + const seedy = ymin + 0.50 * (ymax - ymin); + const g = ctx.board.create('glider', [seedx, seedy, curve], { + name: '', size: 1, color: 'rgba(0,0,0,0)', fixed: true, visible: false + }); + + // ③ 用 glider 的座標放文字,等於把標籤「貼在」曲線上 + const txt = ctx.board.create('text', [ + function(){ return g.X() + 0.02*(xmax - xmin); }, // 微偏移避免壓在線上 + function(){ return g.Y() + 0.02*(ymax - ymin); }, + function(){ return 'k = ' + (Math.round(level*1000)/1000); } + ], { + anchorX: 'left', anchorY: 'bottom', + fontSize: 12, + strokeColor: colors[idx % colors.length], + cssClass: 'jxg-contour-label' + }); + + ctx.labels.push({ g, txt }); + idx++; + if (idx > 200) break; // 安全上限 + } + + // 更新視窗 + try { ctx.board.setBoundingBox([xmin, ymax, xmax, ymin], false); } catch(_){} + ctx.board.update(); + + + return ""; + } + """, + Output("jxg-noop", "data"), + Input("expr", "value"), + Input("lv-start", "value"), + Input("lv-end", "value"), + Input("lv-step", "value"), + Input("xmin", "value"), + Input("xmax", "value"), + Input("ymin", "value"), + Input("ymax", "value"), +) diff --git a/pages/Ch14/C14_3/Dash_Ch14_3.py b/pages/Ch14/C14_3/Dash_Ch14_3.py new file mode 100644 index 0000000000000000000000000000000000000000..421f7588c4e95af92f468091795ba0633a2df5c7 --- /dev/null +++ b/pages/Ch14/C14_3/Dash_Ch14_3.py @@ -0,0 +1,11 @@ +import dash +from layout.page_builder import make_test_page +from pathlib import Path + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_3.json" + +dash.register_page(__name__, path="/Ch14_3", title="Ch14_3") + +def layout(): + return make_test_page(str(JSON_PATH), top_offset=90) diff --git a/pages/Ch14/C14_3/Md_14_3.md b/pages/Ch14/C14_3/Md_14_3.md new file mode 100644 index 0000000000000000000000000000000000000000..2f66ca1fa66014ab224b348808f9bb8d6393a3c9 --- /dev/null +++ b/pages/Ch14/C14_3/Md_14_3.md @@ -0,0 +1,1573 @@ +# 偏導數 +--- +## 1️⃣ 偏導數的定義 + +回顧單變數函數 $f(x)$,我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$,描述的是:函數在 $x=a$ 的 **「瞬間變化率」**。具體定義如下, +$$ + f'(a) = \lim_{\Delta x \to 0} \frac{f(a+\Delta x)-f(a)}{\Delta x}。 +$$ + +現在,我們想把這種「瞬間變化率」的概念推廣到雙變數函數 $f(x,y)$。直覺上,或許會想到: +$$ + f'(a,b) = \lim_{(\Delta x, \Delta y)\to (0,0)} \frac{f(a+\Delta x, b+\Delta y)-f(a,b)}{ (\Delta x,\Delta y) }? +$$ +⚠️但⋯⋯這裡馬上遇到一個大問題: + +a. 這樣定義完全沒問題,也是在計算在 $(a,b)$ 的瞬間變化率; +b. 有問題,因為分母是一個「向量」,不是數字,根本沒有辦法做除法。 + + +🤔 上面的問題來自於:我們**同時**在兩個變數 $x=a$ 與 $y=b$ 都(分別)添加上增量 $\Delta x$ 與 $\Delta y$,因此分母出現了**增量向量** $(\Delta x, \Delta y)$,無法直接進行「除法」。怎麼化解這個問題呢? + +💡 一個很直接的想法是:**一次只在一個變數上添加增量,另一個變數的值固定**,先了解單一個變數的變化,會為函數值帶來多大的變化。 + +🧪 這其實就像科學實驗中的「控制變因」──只改變一個因素,觀察這個因素對結果的影響。 + +👉 當然,或許你還是會想知道,**同時**改變兩個變數會怎樣(變化率、變化量等)——這個問題我們下一節再討論。 + +🔎 回到我們的剛才所提出的想法:**一次只在一個變數上添加增量,另一個變數的值固定**,並考慮在這種情況下的(瞬間)變化率。因此,我們將考慮到: +1. 只在 $x=a$ 做上增量 $\Delta x$(固定 $y=b$): + $$ + \hspace{60pt}\lim_{\Delta x\to 0} \frac{f(a+\Delta x, b)-f(a,b)}{ \Delta x }。 + $$ +2. 只在 $y=b$ 做上增量 $\Delta y$(固定 $x=a$): + $$ + \hspace{60pt}\lim_{\Delta y\to 0} \frac{f(a, b+ \Delta y)-f(a,b)}{ \Delta y }。 + $$ + +這兩個極限,就分別稱為函數 $f(x,y)$ 在 $(a,b)$ 對 $x$ 與對 $y$ 的**偏導數(partial derivatives)**。 +「偏」意味著我們「偏心」只關注其中一個變數,而忽略其他的變數的變化(固定其他變數的值)。 + + +定義 +雙變數函數在某點的偏導數 +給定雙變數函數 $f(x,y)$,我們定義 +1. 其在點 $(a,b)$ **對 $x$ 的偏導數(partial derivative with respect to $x$)**為 + $$ + f_x(a,b) := \lim_{\Delta x\to 0} \frac{f(a+\Delta x, b)-f(a,b)}{ \Delta x }。 + $$ +2. 其在點 $(a,b)$ **對 $y$ 的偏導數(partial derivative with respect to $y$)**為 + $$ + f_y(a,b) := \lim_{\Delta y\to 0} \frac{f(a, b+ \Delta y)-f(a,b)}{ \Delta y }。 + $$ +3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。 + + +⚠️ **注意 1.** 因為雙變數函數 $f(x,y)$ 具有兩個自變數,因此在計算偏導數時,一定要清楚標示是對哪一個變數取偏導。例如, +- 對 $x$ 取偏導記為 $f_x$ +- 對 $y$ 取偏導記為 $f_y$。 + +⚠️ **注意 2.** 觀察偏微分定義的極限,可以發現它是對**某一個增量** $\Delta x$ 或 $\Delta y$ 取極限。因此計算這樣的極限,我們先前學過的「單變數極限」計算方法與技巧,都可以直接拿來套用。 + +下面我們就先來練習一個計算偏微分的例子吧! + +--- +### Example 1 +請依據偏導數的定義,計算函數 +$$ + f(x,y) = x^2y - 3xy +$$ +在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。 + + +1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」: + $$ + f_x(1,4) = ? + $$ +$\lim\limits_{\Delta x\to 0} \dfrac{f(1+\Delta x, 4)-f(1,4)}{ \Delta x }$ + +2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中: + $$ + \begin{aligned} + \hspace{60pt}f_x(1,4) &= \lim_{\Delta x\to 0} \frac{f(1+\Delta x, 4)-f(1,4)}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left[ (1+\Delta x)^2 \cdot 4 - 3 (1+\Delta x)\cdot 4 \right] -\left[ 1^2 \cdot 4 -3 \cdot 1 \cdot 4 \right]}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left( 2\Delta x + (\Delta x)^2 \right) \cdot 4 - 3 \cdot (\Delta x)\cdot 4}{ \Delta x } + \end{aligned} + $$ +3. 請計算上面極限的結果: +$\boxed{-4}$ +--- +1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式: + $$ + f_y(1,4) = ? + $$ +$\lim\limits_{\Delta y\to 0} \dfrac{f(1, 4+\Delta y)-f(1,4)}{ \Delta y }$ + +2. 請計算上面極限的結果: +$\boxed{-2}$ + + + +1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」: + $$ + f_x(1,4) = ? + $$ + + a. $\lim\limits_{\Delta x\to 0} \dfrac{f(1+\Delta x, 4)-f(1,4)}{ \Delta x }$。 + b. $\lim\limits_{\Delta x\to 0} \dfrac{f(1+\Delta x, 4+\Delta x)-f(1,4)}{ \Delta x }$。 + c. $\lim\limits_{\Delta y\to 0} \dfrac{f(1, 4+\Delta y)-f(1,4)}{ \Delta y }$。 + d. $\lim\limits_{\Delta y\to 0} \dfrac{f(1+\Delta y, 4+\Delta y)-f(1,4)}{ \Delta y }$。 + +2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中: + $$ + \begin{aligned} + \hspace{60pt}f_x(1,4) &= \lim_{\Delta x\to 0} \frac{f(1+\Delta x, 4)-f(1,4)}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left[ (1+\Delta x)^2 \cdot 4 - 3 (1+\Delta x)\cdot 4 \right] -\left[ 1^2 \cdot 4 -3 \cdot 1 \cdot 4 \right]}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left( 2\Delta x + (\Delta x)^2 \right) \cdot 4 - 3 \cdot (\Delta x)\cdot 4}{ \Delta x } + \end{aligned} + $$ +3. 請計算上面極限的結果: + + +--- +1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式: + $$ + f_y(1,4) = ? + $$ + + a. $\lim\limits_{\Delta x\to 0} \dfrac{f(1+\Delta x, 4)-f(1,4)}{ \Delta x }$。 + b. $\lim\limits_{\Delta x\to 0} \dfrac{f(1+\Delta x, 4+\Delta x)-f(1,4)}{ \Delta x }$。 + c. $\lim\limits_{\Delta y\to 0} \dfrac{f(1, 4+\Delta y)-f(1,4)}{ \Delta y }$。 + d. $\lim\limits_{\Delta y\to 0} \dfrac{f(1+\Delta y, 4+\Delta y)-f(1,4)}{ \Delta y }$。 + +2. 請計算上面極限的結果: + + + + + +--- +💡 小知識:電腦怎麼算微分? + +電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 $\Delta x$(例如 $0.00001$)來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔! + + + +--- +## 2️⃣ 偏導數與切線斜率 + +回顧單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 恰為二維平面曲線 $y=f(x)$ 在點 $(a,f(a))$ 的**切線斜率(the slope of tangent)**。 + +🤔 那麼,對於雙變數函數 $f(x,y)$,其在點 $(a,b)$ 的偏導數 $f_x(a,b)$ 與 $f_y(a,b)$,在三維空間曲面 $z=f(x,y)$ 的點 $(a,b,f(a,b))$ 處,分別對應哪一條曲線的切線斜率呢? + +👀 接下來,我們將透過一個 **3D 互動圖形(Geogebra)**,實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。 + +--- +### Example 2(Geogebra) +考慮函數 +$$ + f(x,y)=4-x^2-2y^2。 +$$ +請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點 +$$ + P=(1,1,f(1,1)) +$$ +處,分別對應什麼曲線的切線斜率? + + +🧱 我們先在下圖(Geogebra)右側的 3D 圖中: +1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$; +2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$; +3. 再標出兩個「可以移動的點」 + $$ + \begin{aligned} + Q_{\Delta x} &= (1+\Delta x,1, f(1+\Delta x,1)),\\ + R_{\Delta y} &= (1,1+\Delta y, f(1,1+\Delta y)) + \end{aligned} + $$ + 其中 $\Delta x$ 與 $\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。 + + + +1. 請試著拖曳拉桿,改變 $\Delta x$ 的值,觀察點 + $$ + Q_{\Delta x}= (1+\Delta x,1, f(1+\Delta x,1)) + $$ + 的移動情形。 +2. 你會發現:點 $Q_{\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線? +與平面 $y=1$ 的截線 + +3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成: +$C_1:\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) + +4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為 + $$ + f_x(1,1) = \lim_{\Delta x \to 0} \frac{ f(1+\Delta x, 1) - f(1,1) }{\Delta x} + = \lim_{\Delta x \to 0} \frac{ z(Q_{\Delta x}) - z(P) }{ x(Q_{\Delta x}) - x(P) } + $$ + 其中 $z(\cdot)$ 與 $x(\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。 +5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」? +曲線 $C_1$ 在點 $P$ 的切線斜率 + +--- +1. 請試著拖曳拉桿,改變 $\Delta y$ 的值,觀察點 + $$ + R_{\Delta y}= (1,1+\Delta y, f(1,1+\Delta y)) + $$ + 的移動情形。 +2. 點 $R_{\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線? +與平面 $x=1$ 的截線 + +3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成: +$C_2:\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) + +4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為 + $$ + f_y(1,1) = \lim_{\Delta y \to 0} \frac{ f(1, 1+\Delta y) - f(1,1) }{\Delta y} + = \lim_{\Delta y \to 0} \frac{ z(R_{\Delta y}) - z(P) }{ y(R_{\Delta y}) - y(P) } + $$ + 其中 $z(\cdot)$ 與 $y(\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。 +5. 因此,$f_y(1,1)$ 對應的是? +曲線 $C_2$ 在點 $P$ 的切線斜率 + +5. 總結上述觀察,我們得到以下結論: + $$ + \begin{aligned} + &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\ + &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。 + \end{aligned} + $$ + + + +🧱 我們先在下圖(Geogebra)右側的 3D 圖中: +1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$; +2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$; +3. 再標出兩個「可以移動的點」 + $$ + \begin{aligned} + Q_{\Delta x} &= (1+\Delta x,1, f(1+\Delta x,1)),\\ + R_{\Delta y} &= (1,1+\Delta y, f(1,1+\Delta y)) + \end{aligned} + $$ + 其中 $\Delta x$ 與 $\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。 + + + +1. 請試著拖曳拉桿,改變 $\Delta x$ 的值,觀察點 + $$ + Q_{\Delta x}= (1+\Delta x,1, f(1+\Delta x,1)) + $$ + 的移動情形。 +2. 你會發現:點 $Q_{\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線? + + a. 與平面 $y=1$ 的截線 + b. 與平面 $x=1$ 的截線 + c. 與平面 $z=1$ 的截線 + d. 不對應任何固定平面 + +3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成: + + a. $C_1:\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑) + b. $C_1:\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) + c. $C_1:\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) + d. $C_1:\ (x,y,z)=(1,1,f(1,1))$(只有單一點) + +4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為 + $$ + f_x(1,1) = \lim_{\Delta x \to 0} \frac{ f(1+\Delta x, 1) - f(1,1) }{\Delta x} + = \lim_{\Delta x \to 0} \frac{ z(Q_{\Delta x}) - z(P) }{ x(Q_{\Delta x}) - x(P) } + $$ + 其中 $z(\cdot)$ 與 $x(\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。 +5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」? + + a. 曲線 $C_1$ 在點 $P$ 的切線斜率。 + b. 曲線 $C_1$ 在點 $Q_{\Delta x}$ 的切線斜率。 + c. 曲線 $C_2$ 在點 $P$ 的切線斜率。 + d. 曲線 $C_2$ 在點 $R_{\Delta y}$ 的切線斜率。 + +--- +1. 請試著拖曳拉桿,改變 $\Delta y$ 的值,觀察點 + $$ + R_{\Delta y}= (1,1+\Delta y, f(1,1+\Delta y)) + $$ + 的移動情形。 +2. 點 $R_{\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線? + + a. 與平面 $y=1$ 的截線 + b. 與平面 $x=1$ 的截線 + c. 與平面 $z=1$ 的截線 + d. 不對應任何固定平面 + +3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成: + + a. $C_2:\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。 + b. $C_2:\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。 + c. $C_2:\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。 + d. $C_2:\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。 + +4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為 + $$ + f_y(1,1) = \lim_{\Delta y \to 0} \frac{ f(1, 1+\Delta y) - f(1,1) }{\Delta y} + = \lim_{\Delta y \to 0} \frac{ z(R_{\Delta y}) - z(P) }{ y(R_{\Delta y}) - y(P) } + $$ + 其中 $z(\cdot)$ 與 $y(\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。 +5. 因此,$f_y(1,1)$ 對應的是? + + a. 曲線 $C_1$ 在點 $P$ 的切線斜率。 + b. 曲線 $C_1$ 在點 $Q_{\Delta x}$ 的切線斜率。 + c. 曲線 $C_2$ 在點 $P$ 的切線斜率。 + d. 曲線 $C_2$ 在點 $R_{\Delta y}$ 的切線斜率。 + +5. 總結上述觀察,我們得到以下結論: + $$ + \begin{aligned} + &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\ + &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。 + \end{aligned} + $$ + + + +--- +透過上面的範例觀察,我們得到以下結論。 + + +特性 +偏導數與切線斜率 +1. $f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。 +2. $f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。 + + +![](/assets/partial_derivative.svg) +--- +## 3️⃣ 偏導函數的定義 + +回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$ 後,我們隨之便定義了**導函數(derivative function)** $f'(x)$。 + +📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; + +📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。 + +也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義 +$$ + f'(x)=\lim_{\Delta x\to0}\frac{f(x+\Delta x)-f(x)}{\Delta x}. +$$ + +✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。 + +🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的**偏導函數(partial derivative functions)** $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理: + + +定義 +雙變數函數的偏導函數 +給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,時常簡稱**偏導、偏導數(partial derivative)**,定義如下: +1. 對 $x$ 的**偏導函數(partial derivative with respect to $x$)**為 + $$ + f_x(x,y) := \lim_{\Delta x\to 0} \frac{f(x+\Delta x, y)-f(x,y)}{ \Delta x }。 + $$ +2. 對 $y$ 的**偏導函數(partial derivative with respect to $y$)**為 + $$ + f_y(x,y) := \lim_{\Delta y\to 0} \frac{f(x, y+ \Delta y)-f(x,y)}{ \Delta y }。 + $$ +3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。 + + +⚠️ **注意 1.** 在計算偏導數時: +- 計算 $f_x(x,y)$ 時,請將 $y$ 視為常數; +- 計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。 + +⚠️ **注意 2.** 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。 +$$ + \begin{aligned} + f_x(a,b) &= f_x(x,y) \Big|_{(x,y)=(a,b)},\\ + f_y(a,b) &= f_y(x,y) \Big|_{(x,y)=(a,b)}, + \end{aligned} +$$ +其中 $\left. \cdot \right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\cdot$ 中。 + +--- +### Example 3 +請依據偏導函數的定義,計算函數 +$$ + f(x,y) = x^2y - 3xy +$$ +1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。 +2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。 + + +1. 先計算 $f_x(x,y)$: + $$ + \begin{aligned} + \hspace{60pt}f_x(x,y) &= \lim_{\Delta x\to 0} \frac{f(x+\Delta x, y)-f(x,y)}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left[ (x+\Delta x)^2 \cdot y - 3 \cdot (x+\Delta x)\cdot y \right] -\left[ x^2 \cdot y -3 \cdot x \cdot y \right]}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left( 2 x \Delta x + (\Delta x)^2 \right) \cdot y - 3 \cdot (\Delta x)\cdot y}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \left( 2 x + \Delta x \right) \cdot y - 3 \cdot y \\ + &= 2xy - 3 y。 + \end{aligned} + $$ + 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。 +2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$ +$\boxed{-4}$ +--- +1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式 + $$ + f_y(x,y) = ? + $$ +$\lim\limits_{\Delta y\to 0} \dfrac{f(x, y+\Delta y)-f(x,y)}{ \Delta y }$ + + 請再計算上面極限的結果: +$\boxed{x^2-3x}$ +2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$: +$\boxed{-2}$ + + + +1. 先計算 $f_x(x,y)$: + $$ + \begin{aligned} + \hspace{60pt}f_x(x,y) &= \lim_{\Delta x\to 0} \frac{f(x+\Delta x, y)-f(x,y)}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left[ (x+\Delta x)^2 \cdot y - 3 \cdot (x+\Delta x)\cdot y \right] -\left[ x^2 \cdot y -3 \cdot x \cdot y \right]}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \frac{ \left( 2 x \Delta x + (\Delta x)^2 \right) \cdot y - 3 \cdot (\Delta x)\cdot y}{ \Delta x } \\ + &= \lim_{\Delta x\to 0} \left( 2 x + \Delta x \right) \cdot y - 3 \cdot y \\ + &= 2xy - 3 y。 + \end{aligned} + $$ + 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。 +2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$ + + +--- +1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式 + $$ + f_y(x,y) = ? + $$ + + a. $\lim\limits_{\Delta x\to 0} \dfrac{f(x+\Delta x, y)-f(x,y)}{ \Delta x }$; + b. $\lim\limits_{\Delta x\to 0} \dfrac{f(x+\Delta x, y+\Delta x)-f(x,y)}{ \Delta x }$; + c. $\lim\limits_{\Delta y\to 0} \dfrac{f(x, y+\Delta y)-f(x,y)}{ \Delta y }$; + d. $\lim\limits_{\Delta y\to 0} \dfrac{f(x+\Delta y, y+\Delta y)-f(x,y)}{ \Delta y }$。 + + 請再計算上面極限的結果: + + +2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$: + + + + + +--- +## 4️⃣ 偏導函數的計算法則 + +在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 + +🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)? + +是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 + +📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。 +回想在單變數函數中,比如給定 +$$ + f(x) = x\cdot \sin(x), +$$ +現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎? +相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**, +例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法, +來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \sin(x) + x \cdot \cos(x)$。 + +🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢? + +💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。 + +👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。 + +例如,給定函數 +$$ + f(x,y) = x\cdot \sin(y), +$$ +在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時, +我們將變數 $y$ 的值固定為 $b$, +只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。 + +因此,計算 $f_x(a,b)$, +等同於計算單變數函數 +$$ + f(x,b) = x\cdot \sin(b) +$$ +在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而, +$$ + f_x(a,b) + = \frac{d}{dx} f(x,b) + = \frac{d}{dx}\bigl(x\cdot \sin(b)\bigr) + = \sin(b)。 +$$ +對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到 +$$ + f_x(x,y) = \sin(y)。 +$$ + +💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是: + +👉 固定其他變數 +👉 對單一變數做單變數微分 +因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。 + +我們將這個重要的結論整理如下。 + + +特性 +雙變數函數偏微分計算法則 +給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得: +$$ + \begin{aligned} + f_x(x,y) &= \boxed{\frac{d}{dx} f(x, y) \;\;(微分時,視\; y\; 為常數 )} =: \boxed{ \frac{\partial }{\partial x} f(x,y) }, \\[12pt] + f_y(x,y) &= \boxed{\frac{d}{dy} f(x, y) \;\;(微分時,視\; x\; 為常數 )} =: \boxed{ \frac{\partial }{\partial y} f(x,y) }。 + \end{aligned} +$$ + + + +1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數 + $$ + g(x) = f(x, b),\;\; (把\; y\; 固定成\; b) + $$ + 那麼由偏導數的定義,我們有 + $$ + \begin{aligned} + f_x(a,b) := \lim_{\Delta x\to 0} \frac{f(a+\Delta x, b)-f(a,b)}{ \Delta x } + = \lim_{\Delta x\to 0} \frac{g(a+\Delta x)-g(a)}{ \Delta x } + = g'(a)。 + \end{aligned} + $$ + 因此, + $$ + f_x(a,b) = g'(a) = \frac{d}{dx} f(x, b)\vert_{x=a}。 + $$ + 換成偏導數的寫法: + $$ + f_x(x,y) = g'(x) = \frac{d}{dx} f(x, y) \to \frac{\partial}{\partial x} f(x, y)。 + $$ + 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\partial$ 符號)。 +2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數 + $$ + h(y) = f(a, y),\;\; (把\; x\; 固定成\; a) + $$ + 那麼由偏導數的定義,我們有 + $$ + \begin{aligned} + f_y(a,b) := \lim_{\Delta y\to 0} \frac{f(a, b+\Delta y)-f(a,b)}{ \Delta y } + = \lim_{\Delta y\to 0} \frac{h(b+\Delta y)-h(b)}{ \Delta y } + = h'(b)。 + \end{aligned} + $$ + 因此, + $$ + f_y(a,b) = h'(b) = \frac{d}{dy} f(a, y)\vert_{y=b}。 + $$ + 換成偏導數的寫法: + $$ + f_y(x,y) = h'(y) = \frac{d}{dy} f(x, y) \to \frac{\partial}{\partial y} f(x, y)。 + $$ + + +⚠️ **注意 1.** 這裡我們引入新的符號: +1. **$\frac{\partial }{\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。 +2. **$\frac{\partial }{\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。 + +⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。 + +⚠️ **注意 3.** 在偏導中: +- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。 +- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 + +下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。 + +--- +### Example 4 +請計算下面單變數函數 +$$ + f(x) = x^2\cdot c - 3x \cdot c +$$ +的導函數 $f'(x)$,其中 $c$ 為一個常數。 + + +由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。 +因此,$f'(x)=?$: +$2xc-3c$ + + + + +由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。 +因此,$f'(x)=?$: + +a. $2x-3c$; +b. $2xc-3c$; +c. $x^2c-3$; +d. $2c-3x$。 + + + + +--- +### Example 5 +請計算下面雙變數函數 +$$ + f(x,y) = x^2y - 3xy +$$ +的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。 + + +1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_x(x,y) = \boxed{\frac{\partial}{\partial x} f(x, y)}。 + $$ + 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。 +2. 因此,$f_x(x,y)=?$ +$2xy-3y$ + +3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_y(x,y) = \boxed{\frac{\partial}{\partial y} f(x, y)} + $$ + 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。 +4. 因此,$f_y(x,y)=?$: +$x^2-3x$ + + + + +1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_x(x,y) = \boxed{\frac{\partial}{\partial x} f(x, y)}。 + $$ + 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。 +2. 因此,$f_x(x,y)=?$ + + a. $2x-3y$; + b. $2xy-3y$; + c. $x^2y-3$; + d. $2y-3x$。 + +3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_y(x,y) = \boxed{\frac{\partial}{\partial y} f(x, y)} + $$ + 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。 +4. 因此,$f_y(x,y)=?$: + + a. $2xy-3y$; + b. $x^2-3x$; + c. $2y-3x$; + d. $x^2y-3$。 + + + + +--- +### Example 6 +請計算下面單變數函數 +$$ + f(x) = \sin( x^2\cdot c - 3x \cdot c ) +$$ +的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。 + + +1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**: + $$ + \frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)。 + $$ +2. 函數 $f(x)$ 外層是 $\sin(\cdot)$, 內層是 $x^2\cdot c - 3x \cdot c$。因此,外層微分後變成 $\cos(\cdot)$,並乘上內層的導數: + $$ + f'(x) = ? + $$ +$\cos( x^2 c - 3xc )\,\cdot (2xc-3c)$ + + + + +1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**: + $$ + \frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)。 + $$ +2. 函數 $f(x)$ 外層是 $\sin(\cdot)$, 內層是 $x^2\cdot c - 3x \cdot c$。因此,外層微分後變成 $\cos(\cdot)$,並乘上內層的導數: + $$ + f'(x) = ? + $$ + + a. $\cos( x^2 c - 3xc )$; + b. $2xc-3c$; + c. $\sin( x^2 c - 3xc )\,\cdot (2xc-3c)$; + d. $\cos( x^2 c - 3xc )\,\cdot (2xc-3c)$。 + + + + +**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。 + +--- +### Example 7 +請計算下面雙變數函數 +$$ + f(x,y) = \sin( x^2y - 3xy ) +$$ +的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。 + + +1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_x(x,y) = \boxed{\frac{\partial}{\partial x} f(x, y)} + $$ + 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。 +2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。 +3. 因此,$f_x(x,y)=?$: +$\cos( x^2 y - 3xy )\,\cdot (2xy-3y)$ + +3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_y(x,y) = \boxed{\frac{\partial}{\partial y} f(x, y)} + $$ + 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。 +4. 因此,$f_y(x,y)=?$ +$x^2-3x$ + + + + +1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_x(x,y) = \boxed{\frac{\partial}{\partial x} f(x, y)} + $$ + 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。 +2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。 +3. 因此,$f_x(x,y)=?$: + + a. $\cos( x^2 y - 3xy )$; + b. $2xy-3y$; + c. $\sin( x^2 y - 3xy )\,\cdot (2xy-3y)$; + d. $\cos( x^2 y - 3xy )\,\cdot (2xy-3y)$。 + +3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果, + $$ + f_y(x,y) = \boxed{\frac{\partial}{\partial y} f(x, y)} + $$ + 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。 +4. 因此,$f_y(x,y)=?$ + + a. $\cos( x^2 y - 3xy )$; + b. $x^2-3x$; + c. $\sin( x^2 y - 3xy )\,\cdot (x^2-3x)$; + d. $\cos( x^2 y - 3xy )\,\cdot (x^2-3x)$。 + + + + +--- +## 5️⃣ 偏導數的不同標示 + +📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。 + + +定義 +偏導數的不同符號 +給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示: +$$ + \begin{aligned} + f_x(x,y) &= f_x + = \frac{\partial }{\partial x} f(x,y) + = \frac{\partial f}{\partial x} + = \frac{\partial z}{\partial x} + = D_x f; \\ + f_y(x,y) &= f_y + = \frac{\partial }{\partial y} f(x,y) + = \frac{\partial f}{\partial y} + = \frac{\partial z}{\partial y} + = D_y f。 + \end{aligned} +$$ + + +⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。 + +⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\frac{\partial f}{\partial x}$,之後再慢慢熟悉 $D_x f$。 + +--- +## 6️⃣ 偏導數與線性估計 + +💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。 +因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\Delta x$,則函數的**變化量**可估計為 +$$ + f(a+\Delta x)-f(a)\approx f'(a)\Delta x \quad (\Delta x \approx 0)。 +$$ + +📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。 + +對於雙變數函數 $f(x,y)$, +- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**; +- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**; + +因此,我們有以下函數的**變化量**估計: +$$ + \begin{aligned} + f(a+\Delta x,b)-f(a,b) &\approx f_x(a,b)\Delta x \quad (\Delta x\approx 0),\\ + f(a,b+\Delta y)-f(a,b) &\approx f_y(a,b)\Delta y \quad (\Delta y\approx 0)。 + \end{aligned} +$$ +📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。 + + +定理 +變化量的線性估計 +給定雙變數函數 $f(x,y)$。 +1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)** + $$ + f(a+\Delta x, b) - f(a,b) \approx f_x(a,b) \Delta x。 + $$ +2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)** + $$ + f(a, b+\Delta y) - f(a,b) \approx f_y(a,b) \Delta y。 + $$ + + +👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮 +$$ + f(a+\Delta x,b+\Delta y)-f(a,b), +$$ +也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧! + +⚠️ **注意.** 這個「近似 $\approx$」到底有多近呢? + +下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。 + + + + +定理 +變化量的線性估計(進階版) +給定雙變數函數 $f(x,y)$。 +1. 如果 $f_x(a,b)$ 存在,定義 + $$ + e_1(\Delta x) = f(a+\Delta x, b) - f(a,b) - f_x(a,b) \Delta x, + $$ + 則其滿足 + $$ + \lim\limits_{\Delta x \to 0} \frac{e_1(\Delta x)}{\Delta x} = 0。 + $$ + 因此,當 $\Delta x \approx 0$ 時,我們會有 $e_1(\Delta x) \approx 0$。等價的, + $$ + \boxed{f(a+\Delta x, b) - f(a,b) \approx f_x(a,b) \Delta x}。 + $$ +2. 如果 $f_y(a,b)$ 存在,定義 + $$ + e_2(\Delta y) = f(a, b+\Delta y) - f(a,b) - f_y(a,b) \Delta y, + $$ + 則其滿足 + $$ + \lim\limits_{\Delta y \to 0} \frac{e_2(\Delta y)}{\Delta y} = 0。 + $$ + 因此,當 $\Delta y \approx 0$ 時,我們會有 $e_2(\Delta y) \approx 0$。等價的, + $$ + \boxed{f(a, b+\Delta y) - f(a,b) \approx f_y(a,b) \Delta y}。 + $$ + + +**證明:** +1. 假設 $f_x(a,b)$ 存在。由於 + $$ + f_x(a,b) = \lim_{\Delta x\to 0} \frac{f(a+\Delta x, b)-f(a,b)}{ \Delta x } + $$ + 因此, + $$ + \lim_{\Delta x\to 0} \left[ \frac{f(a+\Delta x, b)-f(a,b)}{ \Delta x } - f_x(a,b) \right] = 0。 + $$ + 通分後, + $$ + \lim_{\Delta x\to 0} \left[ \frac{f(a+\Delta x, b)-f(a,b)- f_x(a,b)\Delta x}{ \Delta x } \right] = 0。 + $$ + 由 $e_1(\Delta x)$ 的定義,我們有 + $$ + \lim_{\Delta x\to 0} \frac{e_1(\Delta x)}{ \Delta x } = 0 + $$ + 是以,$\lim\limits_{\Delta x\to 0} e_1(\Delta x) = 0$。因而,當 $\Delta x \approx 0$,我們會有 + $$ + e_1(\Delta x) = f(a+\Delta x, b) - f(a,b) - f_x(a,b) \Delta x \approx 0。 + $$ +2. 對於定理另一個敘述,同理可證。 + +⚠️ **注意 1.** 由定義 +$$ + \begin{aligned} + e_1(\Delta x) &= \left[ f(a+\Delta x, b) - f(a,b) \right] - \left[ f_x(a,b) \Delta x \right] \\ + &= 實際變化量 - 線性估計變化量。 + \end{aligned} +$$ +因此,$e_1(\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\Delta y)$ 也是可以這般解釋。 + +⚠️ **注意 2.** 定理結果的 +$$ + \lim_{\Delta x\to0}\frac{e_1(\Delta x)}{\Delta x}=0 +$$ +不僅表示 $\lim_{\Delta x\to0}e_1(\Delta x)=0$,更代表當 $\Delta x\to0$ 時,誤差 $e_1(\Delta x)$ 相較於 $\Delta x$ 是可以忽略的。 + + +--- +### Example 8 +人體質量指數(Body Mass Index, BMI)的定義方式為 +$$ + B(h,w)=\frac{w}{h^2}, +$$ +其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。 +如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。 +1. 請問小明目前的 BMI 指數為? +2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。 +3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少? +4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少? + + +1. 小明目前的 BMI 為 + $$ + B(1.70,65) + =\frac{65}{(1.70)^2} + =\frac{65}{2.89} + \approx 22.491。 + $$ +2. 先求偏導函數: + $$ + B_w(h,w)=\frac{1}{h^2},\qquad + B_h(h,w)=-\frac{2w}{h^3}。 + $$ + 代入 $(h,w)=(1.70,65)$,得到偏導數 + $$ + \begin{aligned} + B_w(1.70,65) + &=\frac{1}{(1.70)^2} + \approx 0.346,\\ + B_h(1.70,65) + &=-\frac{2(65)}{(1.70)^3} + \approx -26.460。 + \end{aligned} + $$ +3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高) + - 身高增加 $1$ 公分(變成 $1.71$ 公尺): + $$ + B(1.71,65)-B(1.70,65) + =\frac{65}{(1.71)^2}-\frac{65}{(1.70)^2} + \approx -0.262。 + $$ + - 身高增加 $2$ 公分(變成 $1.72$ 公尺): + $$ + B(1.72,65)-B(1.70,65) + =\frac{65}{(1.72)^2}-\frac{65}{(1.70)^2} + \approx -0.520。 + $$ +4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是? +$B(1.70+\Delta h,65)-B(1.70,65)\approx B_h(1.70,65)\Delta h$ + + 因此, + - 當身高增加 $1$ 公分: + $$ + B(1.71,65)-B(1.70,65) + \approx (-26.460)(0.01) + =-0.2646。 + $$ + - 身高增加 $2$ 公分: + $$ + B(1.72,65)-B(1.70,65) + \approx (-26.460)(0.02) + =-0.5292。 + $$ +5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。 + + + +1. 小明目前的 BMI 為 + $$ + B(1.70,65) + =\frac{65}{(1.70)^2} + =\frac{65}{2.89} + \approx 22.491。 + $$ +2. 先求偏導函數: + $$ + B_w(h,w)=\frac{1}{h^2},\qquad + B_h(h,w)=-\frac{2w}{h^3}。 + $$ + 代入 $(h,w)=(1.70,65)$,得到偏導數 + $$ + \begin{aligned} + B_w(1.70,65) + &=\frac{1}{(1.70)^2} + \approx 0.346,\\ + B_h(1.70,65) + &=-\frac{2(65)}{(1.70)^3} + \approx -26.460。 + \end{aligned} + $$ +3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高) + - 身高增加 $1$ 公分(變成 $1.71$ 公尺): + $$ + B(1.71,65)-B(1.70,65) + =\frac{65}{(1.71)^2}-\frac{65}{(1.70)^2} + \approx -0.262。 + $$ + - 身高增加 $2$ 公分(變成 $1.72$ 公尺): + $$ + B(1.72,65)-B(1.70,65) + =\frac{65}{(1.72)^2}-\frac{65}{(1.70)^2} + \approx -0.520。 + $$ +4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是? + + a. $B(1.70+\Delta h,65)-B(1.70,65)\approx B_h(1.70,65)\Delta h$ + b. $B(1.70+\Delta h,65)-B(1.70,65)\approx B_w(1.70,65)\Delta h$ + c. $B(1.70,65+\Delta w)-B(1.70,65)\approx B_h(1.70,65)\Delta w$ + d. $B(1.70,65+\Delta w)-B(1.70,65)\approx B_w(1.70,65)\Delta w$ + + 因此, + - 當身高增加 $1$ 公分: + $$ + B(1.71,65)-B(1.70,65) + \approx (-26.460)(0.01) + =-0.2646。 + $$ + - 身高增加 $2$ 公分: + $$ + B(1.72,65)-B(1.70,65) + \approx (-26.460)(0.02) + =-0.5292。 + $$ +5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。 + + + +--- +## 7️⃣ 隱函數偏微分 + +🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎? + +💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。 + +讓我們透過下面的例子,來喚醒記憶。 + +--- +### Example 9 +考慮方程式 +$$ + x^2 + y^2 = 25。 +$$ +請計算導數 $\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。 + + +**第一個方法:暴力破解** +1. 先將 $y$ 解出: + $$ + \hspace{60pt}x^2 + y^2 = 25 \Longleftrightarrow y= \pm \sqrt{25-x^2}。 + $$ +2. 由於考慮的點 $(x,y)=(3,4)$ 滿足 + $$ + y= +\sqrt{25-x^2}。 + $$ + 因此,我們考慮函數 + $$ + y = f(x) = + \sqrt{25-x^2}。 + $$ + 因而, + $$ + \dfrac{dy}{dx} = \dfrac{d}{dx} f(x) = f'(x)。 + $$ +3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有 + $$ + \begin{aligned} + \hspace{60pt}\dfrac{dy}{dx} = f'(x) + &= \dfrac{d}{dx} \sqrt{25-x^2} + = \dfrac{d}{dx} (25-x^2)^{1/2} \\ + &= \frac{1}{2} (25-x^2)^{-1/2} \cdot (-2x) + = \frac{-x}{\sqrt{25-x^2}} = -\frac{x}{y}。 + \end{aligned} + $$ +3. 因此, 在點 $(x,y)=(3,4)$,導數 $\dfrac{dy}{dx}$ 的值為 $-\dfrac{3}{4}$。 +4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。 + +**第二個方法:隱函數微分** +1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \sqrt{25-x^2}$。) +2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到 + $$ + x^2 + (f(x))^2 = 25 + $$ +3. **直接對方程式兩邊對 $x$ 進行微分** + $$ + \begin{aligned} + &\frac{d}{dx} (x^2 + (f(x))^2) = \frac{d}{dx} (25) \\ + &\Longrightarrow 2x + 2 f(x) f'(x) = 0 \quad (這邊套用鏈鎖律\; Chain Rule!)\\ + &\Longrightarrow 2x + 2 y y' = 0 \\ + &\Longrightarrow y' = - \frac{x}{y}。 + \end{aligned} + $$ +4. 因此,在點 $(x,y)=(3,4)$,導數 $\dfrac{dy}{dx}$ 的值為 $-\dfrac{3}{4}$。 +4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)! + +**第二個方法(快速版):隱函數微分** +1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!) +1. **直接對方程式兩邊對 $x$ 進行微分**: + $$ + \begin{aligned} + &\frac{d}{dx} (x^2 + y^2) = \frac{d}{dx} (25) \\ + &\Longrightarrow 2x + 2 y \frac{dy}{dx} = 0 \quad ( y=f(x),因此要套用鏈鎖律\; Chain Rule ) )\\ + &\Longrightarrow y' = - \frac{x}{y}。 + \end{aligned} + $$ +2. 因此,在點 $(x,y)=(3,4)$,導數 $\dfrac{dy}{dx}$ 的值為 $-\dfrac{3}{4}$。 + + + +--- +👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\dfrac{\partial z}{\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\dfrac{\partial z}{\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。 + +💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的! + +我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的! + +--- +### Example 10 +考慮方程式 +$$ + x^2 + y^2 + z^2 + xyz = 4。 +$$ +請計算偏導數 $\dfrac{\partial z}{\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。 + + +**第一個方法:暴力破解** +1. 先將 $z$ 解出: + $$ + \begin{aligned} + \hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 + &\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\ + &\Longleftrightarrow + z = \frac{-(xy) \pm \sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。 + \end{aligned} + $$ +2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足 + $$ + z = \frac{-(xy) + \sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。 + $$ + 因此,我們考慮函數 + $$ + z= f(x,y) = \frac{-(xy) + \sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。 + $$ + 因而, + $$ + \frac{\partial z}{\partial x} = \frac{\partial}{\partial x} f(x,y) = f_x(x,y) + $$ +3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有 + $$ + \begin{aligned} + \frac{\partial z}{\partial x} &= \frac{\partial}{\partial x} \frac{-(xy) + \sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2} + &=\cdots + &=-\frac{y}{2} + \frac{2xy^2-8x}{4 \sqrt{(xy)^2 - 4 (x^2+y^2-4)}} + \end{aligned} + $$ +4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\dfrac{\partial z}{\partial x} = -1$。 +4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。 + +**第二個方法:隱函數微分** +1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。 +2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有 + $$ + \hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 + $$ +3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**) + $$ + \begin{aligned} + \hspace{60pt}&\frac{\partial }{\partial x} \left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \right) = \frac{\partial }{\partial x} (4) \\ + &\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \left[ f(x,y) + x f_x(x,y) \right] = 0 \; (視\; y \;為常數)\\ + &\Longrightarrow 2x + 2 z \frac{\partial z}{\partial x} + y \left[ z + x \frac{\partial z}{\partial x} \right] = 0\; (代回\; z=f(x,y))。 + \end{aligned} + $$ +4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到 + $$ + \hspace{60pt}2+ 2 \frac{\partial z}{\partial x} + \left( 1+ \frac{\partial z}{\partial x} \right) =0 + \Longrightarrow \frac{\partial z}{\partial x} = -1。 + $$ +5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)! + +**第二個方法(快速版):隱函數偏微分** +1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!) +2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**): + $$ + \begin{aligned} + \hspace{60pt}&\frac{\partial}{\partial x} (x^2 + y^2 + z^2 + xyz) = \frac{\partial}{\partial x} (4) \\ + &\Longrightarrow 2x + 0 + 2 z \frac{\partial z}{\partial x} + y \left[ z + x \frac{\partial z}{\partial x} \right] = 0 \;\; ( 視\; y \;為常數;而\; z= f(x,y) )。 + \end{aligned} + $$ +3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到 +$$ + \hspace{60pt}2+ 2 \frac{\partial z}{\partial x} + \left( 1+ \frac{\partial z}{\partial x} \right) =0 + \Longrightarrow \frac{\partial z}{\partial x} = -1。 +$$ +4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多! + + + +--- +### Example 11 +考慮方程式 +$$ + x^2 + y^2 + z^2 + xyz = 4。 +$$ +請計算偏導數 $\dfrac{\partial z}{\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。 + + +**第二個方法(快速版):隱函數偏微分** +1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!) +2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**): + $$ + \begin{aligned} + \frac{\partial}{\partial y}(x^2 + y^2 + z^2 + xyz) + = + \frac{\partial}{\partial y}(4) + \end{aligned} + $$ + 結果應該是? +$0 + 2y + 2z\dfrac{\partial z}{\partial y} + x\left( z + y\dfrac{\partial z}{\partial y}\right) = 0$ + + 繼續推導,上面答案中的方程式將變成? +$2y + xz + (2z + xy)\dfrac{\partial z}{\partial y} = 0$ + +2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\dfrac{\partial z}{\partial y}$: +$\boxed{-1}$ + + + +**第二個方法(快速版):隱函數偏微分** +1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!) +2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**): + $$ + \begin{aligned} + \frac{\partial}{\partial y}(x^2 + y^2 + z^2 + xyz) + = + \frac{\partial}{\partial y}(4) + \end{aligned} + $$ + 結果應該是? + + a. $0 + 2y + 2z + xy =0$; + b. $0 + 2y + 2z\frac{\partial z}{\partial y} + z = 0$; + c. $0 + 2y + 2z\dfrac{\partial z}{\partial y} + x\left( z + y\dfrac{\partial z}{\partial y}\right) = 0$; + d. $2x + 0 + 2z\dfrac{\partial z}{\partial x} + y\left( z + x\dfrac{\partial z}{\partial x}\right) = 0$。 + + 繼續推導,上面答案中的方程式將變成? + + a. $2y + z + xy = 0$; + b. $2y + xz + (2z + xy)\dfrac{\partial z}{\partial y} = 0$; + c. $2y + z + x\dfrac{\partial z}{\partial x} = 0$; + d. $2x + yz + (2z + yx)\dfrac{\partial z}{\partial x} = 0$。 + +2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\dfrac{\partial z}{\partial y}$: + + + + + +--- +我們將上面的作法,紀錄在下面的小技巧中: + + +小技巧 +隱函數偏微分的操作流程 +考慮一個**方程式**同時包含 $x,y,z$, +1. 要求 $\dfrac{\partial z}{\partial x}$ 時 + - 將 $z$ 想成 $z=f(x,y)$ + - 對整個方程式兩邊對 $x$ 做偏微分 + - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。 +2. 要求 $\dfrac{\partial z}{\partial y}$ 時 + - 將 $z$ 想成 $z=f(x,y)$ + - 對整個方程式兩邊對 $y$ 做偏微分 + - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。 + +⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」 + + +--- +## 8️⃣ 高階偏導數 + +給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。 + +💡 **直觀理解:** +- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 +- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。 + + +定義 +二階偏導數的不同符號 +給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示: +$$ + \begin{aligned} + (f_x)_x(x,y) &= f_{xx}(x,y) + = \frac{\partial }{\partial x} \left( \frac{\partial }{\partial x} f(x,y) \right) + = \frac{\partial^2 f}{\partial x^2} (x,y) + = \frac{\partial^2 }{\partial x^2} f(x,y) + = \frac{\partial^2 z}{\partial x^2}; \\ + (f_x)_y(x,y) &= f_{xy}(x,y) + = \frac{\partial }{\partial y} \left( \frac{\partial }{\partial x} f(x,y) \right) + = \frac{\partial^2 f}{\partial y \partial x} (x,y) + = \frac{\partial^2 }{\partial y \partial x} f(x,y) + = \frac{\partial^2 z}{\partial y \partial x};\\ + (f_y)_x(x,y) &= f_{yx}(x,y) + = \frac{\partial }{\partial x} \left( \frac{\partial }{\partial y} f(x,y) \right) + = \frac{\partial^2 f}{\partial x\partial y} (x,y) + = \frac{\partial^2 }{\partial x\partial y} f(x,y) + = \frac{\partial^2 z}{\partial x\partial y}; \\ + (f_y)_y(x,y) &= f_{yy}(x,y) + = \frac{\partial }{\partial y} \left( \frac{\partial }{\partial y} f(x,y) \right) + = \frac{\partial^2 f}{\partial y^2} (x,y) + = \frac{\partial^2 }{\partial y^2} f(x,y) + = \frac{\partial^2 z}{\partial y^2}; + \end{aligned} +$$ +有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\dfrac{\partial^2 f}{\partial x^2}(x,y)$ 簡寫成 $\dfrac{\partial^2 f}{\partial x^2}$ 等。 + + +⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作 +$$ +f_{xy}\quad 或 \quad \frac{\partial^2 f}{\partial y\,\partial x}。 +$$ +右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。 + +--- +### Example 12 +考慮雙變數函數 +$$ + f(x,y) = x^2 y -3 x y。 +$$ +請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。 + + +1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得 + $$ + \begin{aligned} + f_x(x,y) &= 2xy - 3y, \\ + f_y(x,y) &= x^2 - 3x。 + \end{aligned} + $$ +2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:** + $$ + \begin{aligned} + f_{xx} &= \frac{\partial}{\partial x} f_x(x,y), \; f_{xy} = \frac{\partial}{\partial y} f_x(x,y),\\ + f_{yx} &= \frac{\partial}{\partial x} f_y(x,y), \; f_{yy} = \frac{\partial}{\partial y} f_y(x,y)。 + \end{aligned} + $$ + 請上述計算後的結果: + - $f_{xx}(x,y) = ?$ +$\boxed{2y}$ + - $f_{xy}(x,y) = ?$ +$\boxed{2x-3}$ + - $f_{yx}(x,y) = ?$ +$\boxed{2x-3}$ + - $f_{yy}(x,y) = ?$ +$\boxed{0}$ + + + +1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得 + $$ + \begin{aligned} + f_x(x,y) &= 2xy - 3y, \\ + f_y(x,y) &= x^2 - 3x。 + \end{aligned} + $$ +2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:** + $$ + \begin{aligned} + f_{xx} &= \frac{\partial}{\partial x} f_x(x,y), \; f_{xy} = \frac{\partial}{\partial y} f_x(x,y),\\ + f_{yx} &= \frac{\partial}{\partial x} f_y(x,y), \; f_{yy} = \frac{\partial}{\partial y} f_y(x,y)。 + \end{aligned} + $$ + 請上述計算後的結果: + - $f_{xx}(x,y) = ?$ + + + - $f_{xy}(x,y) = ?$ + + + - $f_{yx}(x,y) = ?$ + + + - $f_{yy}(x,y) = ?$ + + + + +--- + +在上面的範例,我們可以觀察到 +$$ + f_{xy}(x,y)=f_{yx}(x,y)。 +$$ +也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。 + +這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。 + + +定理(Clairaut 定理) +偏微分的結果與偏微分的順序無關 +給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則 +$$ + f_{xy}(x,y)=f_{yx}(x,y),\qquad \forall (x,y)\in D。 +$$ + + +除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義 +$$ + f_{xyy}(x,y) = (f_{xy})_y(x,y) = \frac{\partial }{\partial y} \left( \frac{\partial^2 f}{\partial y \partial x} \right) (x,y) = \frac{\partial^3 f}{\partial y\partial y \partial x} (x,y)。 +$$ +**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \to y \to y$。而 $\frac{\partial^3}{\partial y\partial y \partial x}$ 偏微分順序是 $x\to y \to y$ 。 + +同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如, +$$ + f_{xyy} = f_{yxy} = f_{yyx}, +$$ +如果它們存在且連續。 + +⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\to y\to y$。 + +--- +### Example 13 +考慮雙變數函數 +$$ + f(x,y) = \sin (x^2 y -3 x y)。 +$$ +請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。 + + +1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分? +$x\to x \to y$ + +2. 我們先計算 $f_x$: +$f_x(x,y) = (2xy-3y)\cos(x^2y-3xy)$ + +3. 再來,我們計算 $f_{xx}= (f_x)_x$: +$f_{xx}(x,y) = 2y\cos(x^2y-3xy) - (2xy-3y)^2\sin(x^2y-3xy)$ + +4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$: +$f_{xxy}(x,y) = 2\cos(x^2y-3xy) - 2y(x^2-3x)\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\cos(x^2y-3xy)$ + +5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎? +不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的 + + ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。** + + + +1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分? + + a. $x\to x \to y$; + b. $y\to x \to x$。 + +2. 我們先計算 $f_x$: + + a. $f_x(x,y) = (2xy-3y)\cos(x^2y-3xy)$; + b. $f_x(x,y) = (2xy-3y)\sin(x^2y-3xy)$; + c. $f_x(x,y) = (x^2-3x)\cos(x^2y-3xy)$; + d. $f_x(x,y) = \cos(x^2y-3xy)$。 + +3. 再來,我們計算 $f_{xx}= (f_x)_x$: + + a. $f_{xx}(x,y) = 2y\cos(x^2y-3xy) - (2xy-3y)^2\sin(x^2y-3xy)$; + b. $f_{xx}(x,y) = 2y\cos(x^2y-3xy)$; + c. $f_{xx}(x,y) = -(2xy-3y)^2\sin(x^2y-3xy)$; + d. $f_{xx}(x,y) = (2xy-3y)\cos(x^2y-3xy)$。 + +4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$: + + a. $f_{xxy}(x,y) = 2\cos(x^2y-3xy) - 2y(x^2-3x)\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\cos(x^2y-3xy)$; + b. $f_{xxy}(x,y) = 2\cos(x^2y-3xy)$; + c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\cos(x^2y-3xy)$; + d. $f_{xxy}(x,y) = (x^2-3x)\sin(x^2y-3xy)$。 + +5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎? + + a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; + b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$; + c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$; + d. 不確定。 + + ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。** + + + + +--- +## 9️⃣ 三或更多變數函數的偏導數 + +上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如, + +📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為 +$$ + \begin{aligned} + f_x(a,b,c) &= \lim_{\Delta x \to 0} \frac{ f(a+\Delta x,b,c) - f(a,b,c) }{\Delta x}, \\ + f_y(a,b,c) &= \lim_{\Delta y \to 0} \frac{ f(a,b+\Delta y,c) - f(a,b,c) }{\Delta y}, \\ + f_z(a,b,c) &= \lim_{\Delta z \to 0} \frac{ f(a,b,c+\Delta z) - f(a,b,c) }{\Delta z}。 + \end{aligned} +$$ +它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。 + +📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。 + +📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作 +$$ + \begin{aligned} + f_x(x,y,z) &= \frac{\partial}{\partial x} f(x,y,z), \\ + f_y(x,y,z) &= \frac{\partial}{\partial y} f(x,y,z), \\ + f_z(x,y,z) &= \frac{\partial}{\partial z} f(x,y,z)。 + \end{aligned} +$$ + +📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。 + +📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。 + +--- +### Example 14 +考慮三變數函數 +$$ + f(x,y,z) = e^{xy}\ln(z)。 +$$ +請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。 + + +1. 偏導數 + $$ + f_{x}(x,y,z) = \frac{\partial}{\partial x} \big( e^{xy}\ln(z) \big)。 + $$ + 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為? +$\boxed{y e^{xy}\ln(z)}$ +2. 偏導數 + $$ + f_{y}(x,y,z) = \frac{\partial}{\partial y} \big( e^{xy}\ln(z) \big)。 + $$ + 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為? +$\boxed{x e^{xy}\ln(z)}$ +3. 偏導數 + $$ + f_{z}(x,y,z) = \frac{\partial}{\partial z} \big( e^{xy}\ln(z) \big)。 + $$ + 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為? +$\boxed{e^{xy}/z}$ + + + +1. 偏導數 + $$ + f_{x}(x,y,z) = \frac{\partial}{\partial x} \big( e^{xy}\ln(z) \big)。 + $$ + 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為? + + +2. 偏導數 + $$ + f_{y}(x,y,z) = \frac{\partial}{\partial y} \big( e^{xy}\ln(z) \big)。 + $$ + 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為? + + +3. 偏導數 + $$ + f_{z}(x,y,z) = \frac{\partial}{\partial z} \big( e^{xy}\ln(z) \big)。 + $$ + 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為? + + + + + diff --git a/pages/Ch14/C14_3/exported_result_14_3.json b/pages/Ch14/C14_3/exported_result_14_3.json new file mode 100644 index 0000000000000000000000000000000000000000..178e97b1165586dd08057f00c0f5ddd1a0b326ff --- /dev/null +++ b/pages/Ch14/C14_3/exported_result_14_3.json @@ -0,0 +1,38214 @@ +{ + "toc": [ + { + "label": "偏導數", + "id": "sec", + "level": 1 + }, + { + "label": "1️⃣ 偏導數的定義", + "id": "1", + "level": 2 + }, + { + "label": "Example 1", + "id": "Example-1", + "level": 3 + }, + { + "label": "2️⃣ 偏導數與切線斜率", + "id": "2", + "level": 2 + }, + { + "label": "Example 2(Geogebra)", + "id": "Example-2-Geogebra", + "level": 3 + }, + { + "label": "3️⃣ 偏導函數的定義", + "id": "3", + "level": 2 + }, + { + "label": "Example 3", + "id": "Example-3", + "level": 3 + }, + { + "label": "4️⃣ 偏導函數的計算法則", + "id": "4", + "level": 2 + }, + { + "label": "Example 4", + "id": "Example-4", + "level": 3 + }, + { + "label": "Example 5", + "id": "Example-5", + "level": 3 + }, + { + "label": "Example 6", + "id": "Example-6", + "level": 3 + }, + { + "label": "Example 7", + "id": "Example-7", + "level": 3 + }, + { + "label": "5️⃣ 偏導數的不同標示", + "id": "5", + "level": 2 + }, + { + "label": "6️⃣ 偏導數與線性估計", + "id": "6", + "level": 2 + }, + { + "label": "Example 8", + "id": "Example-8", + "level": 3 + }, + { + "label": "7️⃣ 隱函數偏微分", + "id": "7", + "level": 2 + }, + { + "label": "Example 9", + "id": "Example-9", + "level": 3 + }, + { + "label": "Example 10", + "id": "Example-10", + "level": 3 + }, + { + "label": "Example 11", + "id": "Example-11", + "level": 3 + }, + { + "label": "8️⃣ 高階偏導數", + "id": "8", + "level": 2 + }, + { + "label": "Example 12", + "id": "Example-12", + "level": 3 + }, + { + "label": "Example 13", + "id": "Example-13", + "level": 3 + }, + { + "label": "9️⃣ 三或更多變數函數的偏導數", + "id": "9", + "level": 2 + }, + { + "label": "Example 14", + "id": "Example-14", + "level": 3 + } + ], + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "偏導數", + "newline": "true", + "runs": [ + { + "text": "偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 偏導數的定義", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 偏導數的定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,我們談過其在點 $a$ 的導數(derivative) $f'(a)$,描述的是:函數在 $x=a$ 的 「瞬間變化率」。具體定義如下,$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x)-f(a)}{\\Delta x}。\n$$", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",我們談過其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "導數(derivative)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": ",描述的是:函數在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "text": "「瞬間變化率」", + "style": "bold" + }, + { + "text": "。具體定義如下," + }, + { + "latex": "$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x)-f(a)}{\\Delta x}。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "現在,我們想把這種「瞬間變化率」的概念推廣到雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。直覺上,或許會想到:" + }, + { + "latex": "$$\nf'(a,b) = \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} \\frac{f(a+\\Delta x, b+\\Delta y)-f(a,b)}{ (\\Delta x,\\Delta y) }?\n$$", + "kind": "math_block" + }, + { + "text": "⚠️但⋯⋯這裡馬上遇到一個大問題:" + } + ], + "options": [ + { + "key": "a", + "text": "這樣定義完全沒問題,也是在計算在 $(a,b)$ 的瞬間變化率;" + }, + { + "key": "b", + "text": "有問題,因為分母是一個「向量」,不是數字,根本沒有辦法做除法。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 上面的問題來自於:我們同時在兩個變數 $x=a$ 與 $y=b$ 都(分別)添加上增量 $\\Delta x$ 與 $\\Delta y$,因此分母出現了增量向量 $(\\Delta x, \\Delta y)$,無法直接進行「除法」。怎麼化解這個問題呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 上面的問題來自於:我們" + }, + { + "text": "同時", + "style": "bold" + }, + { + "text": "在兩個變數 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 都(分別)添加上增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": ",因此分母出現了" + }, + { + "text": "增量向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": ",無法直接進行「除法」。怎麼化解這個問題呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 一個很直接的想法是:一次只在一個變數上添加增量,另一個變數的值固定,先了解單一個變數的變化,會為函數值帶來多大的變化。", + "newline": "false", + "runs": [ + { + "text": "💡 一個很直接的想法是:" + }, + { + "text": "一次只在一個變數上添加增量,另一個變數的值固定", + "style": "bold" + }, + { + "text": ",先了解單一個變數的變化,會為函數值帶來多大的變化。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🧪 這其實就像科學實驗中的「控制變因」──只改變一個因素,觀察這個因素對結果的影響。", + "newline": "false", + "runs": [ + { + "text": "🧪 這其實就像科學實驗中的「控制變因」──只改變一個因素,觀察這個因素對結果的影響。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 當然,或許你還是會想知道,同時改變兩個變數會怎樣(變化率、變化量等)——這個問題我們下一節再討論。", + "newline": "false", + "runs": [ + { + "text": "👉 當然,或許你還是會想知道," + }, + { + "text": "同時", + "style": "bold" + }, + { + "text": "改變兩個變數會怎樣(變化率、變化量等)——這個問題我們下一節再討論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🔎 回到我們的剛才所提出的想法:一次只在一個變數上添加增量,另一個變數的值固定,並考慮在這種情況下的(瞬間)變化率。因此,我們將考慮到:", + "newline": "false", + "runs": [ + { + "text": "🔎 回到我們的剛才所提出的想法:" + }, + { + "text": "一次只在一個變數上添加增量,另一個變數的值固定", + "style": "bold" + }, + { + "text": ",並考慮在這種情況下的(瞬間)變化率。因此,我們將考慮到:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "只在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 做上增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\hspace{60pt}\\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "只在 $x=a$ 做上增量 $\\Delta x$(固定 $y=b$):$$\n\\hspace{60pt}\\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "只在 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 做上增量 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\hspace{60pt}\\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "只在 $y=b$ 做上增量 $\\Delta y$(固定 $x=a$):$$\n\\hspace{60pt}\\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這兩個極限,就分別稱為函數 $f(x,y)$ 在 $(a,b)$ 對 $x$ 與對 $y$ 的偏導數(partial derivatives)。 「偏」意味著我們「偏心」只關注其中一個變數,而忽略其他的變數的變化(固定其他變數的值)。", + "newline": "false", + "runs": [ + { + "text": "這兩個極限,就分別稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導數(partial derivatives)", + "style": "bold" + }, + { + "text": "。 「偏」意味著我們「偏心」只關注其中一個變數,而忽略其他的變數的變化(固定其他變數的值)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "雙變數函數在某點的偏導數", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,我們定義", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",我們定義" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "其在點 $(a,b)$ 對 $x$ 的偏導數(partial derivative with respect to $x$)為$$\nf_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "其在點 $(a,b)$ 對 $y$ 的偏導數(partial derivative with respect to $y$)為$$\nf_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數的過程,稱為" + }, + { + "text": "偏微分(partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "計算偏導數的過程,稱為偏微分(partial differentiation)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 因為雙變數函數 $f(x,y)$ 具有兩個自變數,因此在計算偏導數時,一定要清楚標示是對哪一個變數取偏導。例如,", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 因為雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 具有兩個自變數,因此在計算偏導數時,一定要清楚標示是對哪一個變數取偏導。例如," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 取偏導記為 " + }, + { + "latex": "$f_x$", + "kind": "math" + } + ], + "content": "對 $x$ 取偏導記為 $f_x$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 取偏導記為 " + }, + { + "latex": "$f_y$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $y$ 取偏導記為 $f_y$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 觀察偏微分定義的極限,可以發現它是對某一個增量 $\\Delta x$ 或 $\\Delta y$ 取極限。因此計算這樣的極限,我們先前學過的「單變數極限」計算方法與技巧,都可以直接拿來套用。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 觀察偏微分定義的極限,可以發現它是對" + }, + { + "text": "某一個增量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 取極限。因此計算這樣的極限,我們先前學過的「單變數極限」計算方法與技巧,都可以直接拿來套用。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面我們就先來練習一個計算偏微分的例子吧!", + "newline": "false", + "runs": [ + { + "text": "下面我們就先來練習一個計算偏微分的例子吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$\n\n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n $$\n3. 請計算上面極限的結果:\n$\\boxed{-4}$\n---\n1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式:\n $$\n f_y(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$\n\n2. 請計算上面極限的結果:\n$\\boxed{-2}$\n\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n \n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n $$\n3. 請計算上面極限的結果:\n \n \n---\n1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式:\n $$\n f_y(1,4) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n \n2. 請計算上面極限的結果:\n \n \n\n\n\n---\n💡 小知識:電腦怎麼算微分?\n\n電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 $\\Delta x$(例如 $0.00001$)來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!\n\n\n\n---\n## 2️⃣ 偏導數與切線斜率\n\n回顧單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 恰為二維平面曲線 $y=f(x)$ 在點 $(a,f(a))$ 的**切線斜率(the slope of tangent)**。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$,其在點 $(a,b)$ 的偏導數 $f_x(a,b)$ 與 $f_y(a,b)$,在三維空間曲面 $z=f(x,y)$ 的點 $(a,b,f(a,b))$ 處,分別對應哪一條曲線的切線斜率呢?\n\n👀 接下來,我們將透過一個 **3D 互動圖形(Geogebra)**,實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。\n\n---\n### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $y=1$ 的截線\n\n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n曲線 $C_1$ 在點 $P$ 的切線斜率\n\n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $x=1$ 的截線\n\n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n曲線 $C_2$ 在點 $P$ 的切線斜率\n\n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n \n a. $C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑) \n b. $C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) \n c. $C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) \n d. $C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點) \n \n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。 \n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n \n a. $C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。\n b. $C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。\n c. $C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。\n d. $C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。\n \n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。\n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n---\n透過上面的範例觀察,我們得到以下結論。\n\n\n特性\n偏導數與切線斜率\n1. $f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。\n2. $f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。\n\n\n![](/assets/partial_derivative.svg)\n---\n## 3️⃣ 偏導函數的定義\n\n回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$ 後,我們隨之便定義了**導函數(derivative function)** $f'(x)$。\n\n📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; \n\n📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。\n\n也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義\n$$\n f'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$\n\n✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。\n\n🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的**偏導函數(partial derivative functions)** $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:\n\n\n定義\n雙變數函數的偏導函數\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,時常簡稱**偏導、偏導數(partial derivative)**,定義如下:\n1. 對 $x$ 的**偏導函數(partial derivative with respect to $x$)**為\n $$\n f_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n $$\n2. 對 $y$ 的**偏導函數(partial derivative with respect to $y$)**為\n $$\n f_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n $$\n3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。\n\n\n⚠️ **注意 1.** 在計算偏導數時:\n- 計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;\n- 計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。\n\n⚠️ **注意 2.** 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。\n$$\n \\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$\n其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。\n\n---\n### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請依據偏導數的定義,計算函數 $$\nf(x,y) = x^2y - 3xy\n$$在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。", + "newline": "false", + "runs": [ + { + "text": "請依據偏導數的定義,計算函數 " + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + }, + { + "text": "在點 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 、對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_94d3624e49", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": ",代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",因此,我們先寫下 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 的「定義公式」:" + }, + { + "latex": "$$\nf_x(1,4) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$", + "kind": "math" + } + ], + "content": "要計算 $f_x(1,4)$,代表:只讓 $x$ 改變,將 $y$ 固定為 $4$,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:$$\nf_x(1,4) = ?\n$$$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,我們把這題的函數 " + }, + { + "latex": "$f(x,y) = x^2y - 3xy$", + "kind": "math" + }, + { + "text": " 代入上述正確的偏導數定義中:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請計算上面極限的結果:" + }, + { + "latex": "$\\boxed{-4}$", + "kind": "math" + } + ], + "content": "請計算上面極限的結果:$\\boxed{-4}$" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "現在改成計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。 這代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$1$", + "kind": "math", + "style": "bold" + }, + { + "text": "。請先寫下 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 的定義公式:" + }, + { + "latex": "$$\nf_y(1,4) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$", + "kind": "math" + } + ], + "content": "現在改成計算 $f_y(1,4)$。 這代表:只讓 $y$ 改變,將 $x$ 固定為 $1$。請先寫下 $f_y(1,4)$ 的定義公式:$$\nf_y(1,4) = ?\n$$$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算上面極限的結果:" + }, + { + "latex": "$\\boxed{-2}$", + "kind": "math" + } + ], + "content": "請計算上面極限的結果:$\\boxed{-2}$" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c1bbc90065", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": ",代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",因此,我們先寫下 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 的「定義公式」:" + }, + { + "latex": "$$\nf_x(1,4) = ?\n$$", + "kind": "math_block" + } + ], + "content": "要計算 $f_x(1,4)$,代表:只讓 $x$ 改變,將 $y$ 固定為 $4$,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:$$\nf_x(1,4) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,我們把這題的函數 " + }, + { + "latex": "$f(x,y) = x^2y - 3xy$", + "kind": "math" + }, + { + "text": " 代入上述正確的偏導數定義中:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請計算上面極限的結果:" + } + ], + "content": "請計算上面極限的結果:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "現在改成計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。 這代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$1$", + "kind": "math", + "style": "bold" + }, + { + "text": "。請先寫下 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 的定義公式:" + }, + { + "latex": "$$\nf_y(1,4) = ?\n$$", + "kind": "math_block" + } + ], + "content": "現在改成計算 $f_y(1,4)$。 這代表:只讓 $y$ 改變,將 $x$ 固定為 $1$。請先寫下 $f_y(1,4)$ 的定義公式:$$\nf_y(1,4) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算上面極限的結果:" + } + ], + "content": "請計算上面極限的結果:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "💡 小知識:電腦怎麼算微分?", + "newline": "false", + "runs": [ + { + "text": "💡 小知識:電腦怎麼算微分?" + } + ] + }, + { + "type": "solution", + "uid": "sol_cce5ca8ddf", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 $\\Delta x$(例如 $0.00001$)來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!", + "newline": "false", + "runs": [ + { + "text": "電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": "(例如 " + }, + { + "latex": "$0.00001$", + "kind": "math" + }, + { + "text": ")來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 偏導數與切線斜率", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 偏導數與切線斜率", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 恰為二維平面曲線 $y=f(x)$ 在點 $(a,f(a))$ 的切線斜率(the slope of tangent)。", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 恰為二維平面曲線 " + }, + { + "latex": "$y=f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,f(a))$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "切線斜率(the slope of tangent)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 那麼,對於雙變數函數 $f(x,y)$,其在點 $(a,b)$ 的偏導數 $f_x(a,b)$ 與 $f_y(a,b)$,在三維空間曲面 $z=f(x,y)$ 的點 $(a,b,f(a,b))$ 處,分別對應哪一條曲線的切線斜率呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 那麼,對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": ",在三維空間曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 的點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 處,分別對應哪一條曲線的切線斜率呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👀 接下來,我們將透過一個 3D 互動圖形(Geogebra),實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。", + "newline": "false", + "runs": [ + { + "text": "👀 接下來,我們將透過一個 " + }, + { + "text": "3D 互動圖形(Geogebra)", + "style": "bold" + }, + { + "text": ",實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2(Geogebra)", + "newline": "true", + "runs": [ + { + "text": "Example 2(Geogebra)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $y=1$ 的截線\n\n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n曲線 $C_1$ 在點 $P$ 的切線斜率\n\n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $x=1$ 的截線\n\n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n曲線 $C_2$ 在點 $P$ 的切線斜率\n\n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n \n a. $C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑) \n b. $C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) \n c. $C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) \n d. $C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點) \n \n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。 \n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n \n a. $C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。\n b. $C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。\n c. $C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。\n d. $C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。\n \n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。\n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n---\n透過上面的範例觀察,我們得到以下結論。\n\n\n特性\n偏導數與切線斜率\n1. $f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。\n2. $f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。\n\n\n![](/assets/partial_derivative.svg)\n---\n## 3️⃣ 偏導函數的定義\n\n回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$ 後,我們隨之便定義了**導函數(derivative function)** $f'(x)$。\n\n📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; \n\n📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。\n\n也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義\n$$\n f'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$\n\n✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。\n\n🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的**偏導函數(partial derivative functions)** $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:\n\n\n定義\n雙變數函數的偏導函數\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,時常簡稱**偏導、偏導數(partial derivative)**,定義如下:\n1. 對 $x$ 的**偏導函數(partial derivative with respect to $x$)**為\n $$\n f_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n $$\n2. 對 $y$ 的**偏導函數(partial derivative with respect to $y$)**為\n $$\n f_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n $$\n3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。\n\n\n⚠️ **注意 1.** 在計算偏導數時:\n- 計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;\n- 計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。\n\n⚠️ **注意 2.** 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。\n$$\n \\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$\n其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。\n\n---\n### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-2-Geogebra" + }, + { + "type": "paragraph", + "content": "考慮函數$$\nf(x,y)=4-x^2-2y^2。\n$$請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點$$\nP=(1,1,f(1,1))\n$$處,分別對應什麼曲線的切線斜率?", + "newline": "false", + "runs": [ + { + "text": "考慮函數" + }, + { + "latex": "$$\nf(x,y)=4-x^2-2y^2。\n$$", + "kind": "math_block" + }, + { + "text": "請解釋函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": ",在三維空間曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 的點" + }, + { + "latex": "$$\nP=(1,1,f(1,1))\n$$", + "kind": "math_block" + }, + { + "text": "處,分別對應什麼曲線的切線斜率?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9d7991d1a1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:", + "newline": "false", + "runs": [ + { + "text": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "繪製函數的圖形 " + }, + { + "latex": "$z= f(x,y)=4- x^2 -2 y^2$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "標出點 " + }, + { + "latex": "$P= (1,1,f(1,1))=(1,1,1)$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "標出點 $P= (1,1,f(1,1))=(1,1,1)$;" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再標出兩個「可以移動的點」" + }, + { + "latex": "$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,都可以透過左側面板中的" + }, + { + "text": "拉桿", + "style": "bold" + }, + { + "text": "來調整。" + } + ], + "content": "再標出兩個「可以移動的點」$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的拉桿來調整。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "ve6jegsw", + "width": "100%", + "height": "480", + "border": "0", + "caption": "偏導數", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "你會發現:點 " + }, + { + "latex": "$Q_{\\Delta x}$", + "kind": "math" + }, + { + "text": " 始終落在一條綠色曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + }, + { + "text": "與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線" + } + ], + "content": "你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?與平面 $y=1$ 的截線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 的參數方程可以寫成:" + }, + { + "latex": "$C_1:\\ (x,y,z)=(x,1,f(x,1))$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線)" + } + ], + "content": "既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數公式為" + }, + { + "latex": "$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是哪一個「切線斜率」?" + }, + { + "text": "曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的切線斜率" + } + ], + "content": "因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?曲線 $C_1$ 在點 $P$ 的切線斜率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "點 " + }, + { + "latex": "$R_{\\Delta y}$", + "kind": "math" + }, + { + "text": " 會落在另一條曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + }, + { + "text": "與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線" + } + ], + "content": "點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?與平面 $x=1$ 的截線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼它的參數方程可以寫成:" + }, + { + "latex": "$C_2:\\ (x,y,z)=(1,y,f(1,y))$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線)" + } + ], + "content": "既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數定義為" + }, + { + "latex": "$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是?" + }, + { + "text": "曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的切線斜率" + } + ], + "content": "因此,$f_y(1,1)$ 對應的是?曲線 $C_2$ 在點 $P$ 的切線斜率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "總結上述觀察,我們得到以下結論:" + }, + { + "latex": "$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "總結上述觀察,我們得到以下結論:$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$" + } + ] + } + ], + "ai_prompt_md": "### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cfc1b0969b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:", + "newline": "false", + "runs": [ + { + "text": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "繪製函數的圖形 " + }, + { + "latex": "$z= f(x,y)=4- x^2 -2 y^2$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "標出點 " + }, + { + "latex": "$P= (1,1,f(1,1))=(1,1,1)$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "標出點 $P= (1,1,f(1,1))=(1,1,1)$;" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再標出兩個「可以移動的點」" + }, + { + "latex": "$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,都可以透過左側面板中的" + }, + { + "text": "拉桿", + "style": "bold" + }, + { + "text": "來調整。" + } + ], + "content": "再標出兩個「可以移動的點」$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的拉桿來調整。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "ve6jegsw", + "width": "100%", + "height": "480", + "border": "0", + "caption": "偏導數", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "你會發現:點 " + }, + { + "latex": "$Q_{\\Delta x}$", + "kind": "math" + }, + { + "text": " 始終落在一條綠色曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + } + ], + "content": "你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "與平面 $y=1$ 的截線" + }, + { + "key": "b", + "text": "與平面 $x=1$ 的截線" + }, + { + "key": "c", + "text": "與平面 $z=1$ 的截線" + }, + { + "key": "d", + "text": "不對應任何固定平面" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 的參數方程可以寫成:" + } + ], + "content": "既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)" + }, + { + "key": "b", + "text": "$C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)" + }, + { + "key": "c", + "text": "$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)" + }, + { + "key": "d", + "text": "$C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數公式為" + }, + { + "latex": "$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是哪一個「切線斜率」?" + } + ], + "content": "因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "曲線 $C_1$ 在點 $P$ 的切線斜率。" + }, + { + "key": "b", + "text": "曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。" + }, + { + "key": "c", + "text": "曲線 $C_2$ 在點 $P$ 的切線斜率。" + }, + { + "key": "d", + "text": "曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "點 " + }, + { + "latex": "$R_{\\Delta y}$", + "kind": "math" + }, + { + "text": " 會落在另一條曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + } + ], + "content": "點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "與平面 $y=1$ 的截線" + }, + { + "key": "b", + "text": "與平面 $x=1$ 的截線" + }, + { + "key": "c", + "text": "與平面 $z=1$ 的截線" + }, + { + "key": "d", + "text": "不對應任何固定平面" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼它的參數方程可以寫成:" + } + ], + "content": "既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。" + }, + { + "key": "b", + "text": "$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。" + }, + { + "key": "c", + "text": "$C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。" + }, + { + "key": "d", + "text": "$C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數定義為" + }, + { + "latex": "$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是?" + } + ], + "content": "因此,$f_y(1,1)$ 對應的是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "曲線 $C_1$ 在點 $P$ 的切線斜率。" + }, + { + "key": "b", + "text": "曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。" + }, + { + "key": "c", + "text": "曲線 $C_2$ 在點 $P$ 的切線斜率。" + }, + { + "key": "d", + "text": "曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$\n\n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdo" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "總結上述觀察,我們得到以下結論:" + }, + { + "latex": "$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "總結上述觀察,我們得到以下結論:$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "透過上面的範例觀察,我們得到以下結論。", + "newline": "false", + "runs": [ + { + "text": "透過上面的範例觀察,我們得到以下結論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "偏導數與切線斜率", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 的截線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切線斜率。" + } + ], + "content": "$f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的截線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切線斜率。" + } + ], + "content": "$f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/partial_derivative.svg" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 偏導函數的定義", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 偏導函數的定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的導數(derivative) $f'(a)$ 後,我們隨之便定義了導函數(derivative function) $f'(x)$。", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",在我們談過其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "導數(derivative)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 後,我們隨之便定義了" + }, + { + "text": "導函數(derivative function)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; ", + "newline": "false", + "runs": [ + { + "text": "📌 導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 描述的是函數在「某一個點」的瞬間變化率; " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。", + "newline": "false", + "runs": [ + { + "text": "📌 而導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 則是把每一個點的導數值收集起來,形成一個新的函數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義$$\nf'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 定義域中的任意點 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 上給出導數值。是以,我們定義" + }, + { + "latex": "$$\nf'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。", + "newline": "false", + "runs": [ + { + "text": "✅ 一旦我們求得導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",將來要計算導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": ",只需將 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 即可。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的偏導函數(partial derivative functions) $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:", + "newline": "false", + "runs": [ + { + "text": "🧠 這樣的概念,推廣到雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,也是適用的。我們也能定義所謂的" + }, + { + "text": "偏導函數(partial derivative functions)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。請參見下面的定理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "雙變數函數的偏導函數", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,其偏導函數(partial derivative function),時常簡稱偏導、偏導數(partial derivative),定義如下:", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其" + }, + { + "text": "偏導函數(partial derivative function)", + "style": "bold" + }, + { + "text": ",時常簡稱" + }, + { + "text": "偏導、偏導數(partial derivative)", + "style": "bold" + }, + { + "text": ",定義如下:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導函數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "對 $x$ 的偏導函數(partial derivative with respect to $x$)為$$\nf_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導函數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "對 $y$ 的偏導函數(partial derivative with respect to $y$)為$$\nf_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數的過程,稱為" + }, + { + "text": "偏微分(partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "計算偏導數的過程,稱為偏微分(partial differentiation)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 在計算偏導數時:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 在計算偏導數時:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,請將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數;" + } + ], + "content": "計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,請將 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。$$\n\\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 一旦我們求得偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",要計算某一點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的偏導數值,只需將 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 代入即可。" + }, + { + "latex": "$$\n\\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\left. \\cdot \\right|_{(x,y)=(a,b)}$", + "kind": "math" + }, + { + "text": " 代表將 " + }, + { + "latex": "$(x,y)=(a,b)$", + "kind": "math" + }, + { + "text": " 代入到算式 " + }, + { + "latex": "$\\cdot$", + "kind": "math" + }, + { + "text": " 中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "請依據偏導函數的定義,計算函數 $$\nf(x,y) = x^2y - 3xy\n$$", + "newline": "false", + "runs": [ + { + "text": "請依據偏導函數的定義,計算函數 " + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",與偏導數 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",與偏導數 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6ac2c27af7", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "你可以發現,其實整個計算過程與第一題計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 完全一樣,只是將 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "先計算 $f_x(x,y)$:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_x(1,4)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{-4}$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$$\\boxed{-4}$" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "再來,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ":請先讓我們先寫下 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的公式" + }, + { + "latex": "$$\nf_y(x,y) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$", + "kind": "math" + }, + { + "text": "請再計算上面極限的結果:" + }, + { + "latex": "$\\boxed{x^2-3x}$", + "kind": "math" + } + ], + "content": "再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式$$\nf_y(x,y) = ?\n$$$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$請再計算上面極限的結果:$\\boxed{x^2-3x}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_y(1,4)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\boxed{-2}$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:$\\boxed{-2}$" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_00e2f8f9f7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "你可以發現,其實整個計算過程與第一題計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 完全一樣,只是將 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "先計算 $f_x(x,y)$:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_x(1,4)=?$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "再來,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ":請先讓我們先寫下 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的公式" + }, + { + "latex": "$$\nf_y(x,y) = ?\n$$", + "kind": "math_block" + } + ], + "content": "再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式$$\nf_y(x,y) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "newline": "true" + }, + { + "text": " 請再計算上面極限的結果: " + } + ], + "answers": [ + "x^2-3x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_y(1,4)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 偏導函數的計算法則", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 偏導函數的計算法則", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 ", + "newline": "false", + "runs": [ + { + "text": "在這一節中,我們要來談談偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的實際計算方法。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?", + "newline": "false", + "runs": [ + { + "text": "🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 ", + "newline": "false", + "runs": [ + { + "text": "是的!在前一節中,我們已經學會如何透過偏導數的定義來計算" + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。回想在單變數函數中,比如給定$$\nf(x) = x\\cdot \\sin(x),\n$$現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?相信不會的!我們會直接套用已知的微分運算法則(Differential Rules),例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。", + "newline": "false", + "runs": [ + { + "text": "📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。回想在單變數函數中,比如給定" + }, + { + "latex": "$$\nf(x) = x\\cdot \\sin(x),\n$$", + "kind": "math_block" + }, + { + "text": "現在的你,還會使用導數的定義來計算 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 嗎?相信不會的!我們會直接套用已知的" + }, + { + "text": "微分運算法則(Differential Rules)", + "style": "bold" + }, + { + "text": ",例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,來快速求得 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": "。 比如,這裡的 " + }, + { + "latex": "$f'(x)= \\sin(x) + x \\cdot \\cos(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 那麼,對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡答案是:可以的,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。", + "newline": "false", + "runs": [ + { + "text": "💡" + }, + { + "text": "答案是:可以的", + "style": "bold" + }, + { + "text": ",我們完全可以套用單變數微分技巧,來計算多變數函數的微分。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。", + "newline": "false", + "runs": [ + { + "text": "👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "例如,給定函數$$\nf(x,y) = x\\cdot \\sin(y),\n$$在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,我們將變數 $y$ 的值固定為 $b$,只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。", + "newline": "false", + "runs": [ + { + "text": "例如,給定函數" + }, + { + "latex": "$$\nf(x,y) = x\\cdot \\sin(y),\n$$", + "kind": "math_block" + }, + { + "text": "在計算函數對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 時,我們將變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的值固定為 " + }, + { + "latex": "$b$", + "kind": "math" + }, + { + "text": ",只對變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行變動(添加增量),去計算瞬間變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,計算 $f_x(a,b)$,等同於計算單變數函數$$\nf(x,b) = x\\cdot \\sin(b)\n$$在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,$$\nf_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到$$\nf_x(x,y) = \\sin(y)。\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,計算 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": ",等同於計算單變數函數" + }, + { + "latex": "$$\nf(x,b) = x\\cdot \\sin(b)\n$$", + "kind": "math_block" + }, + { + "text": "在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 處進行變動(添加增量),去計算瞬間變化率。因而," + }, + { + "latex": "$$\nf_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$", + "kind": "math_block" + }, + { + "text": "對於偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 也是一樣的道理,我們可以得到" + }, + { + "latex": "$$\nf_x(x,y) = \\sin(y)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:", + "newline": "false", + "runs": [ + { + "text": "💡 關鍵理解:雖然 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 是雙變數函數,但在計算偏導時,我們其實是:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 固定其他變數\n👉 對單一變數做單變數微分\n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。", + "newline": "true", + "runs": [ + { + "text": "👉 固定其他變數" + }, + { + "newline": "true" + }, + { + "text": "👉 對單一變數做單變數微分" + }, + { + "newline": "true" + }, + { + "text": "因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將這個重要的結論整理如下。", + "newline": "false", + "runs": [ + { + "text": "我們將這個重要的結論整理如下。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "雙變數函數偏微分計算法則", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,其偏導函數(partial derivative function),可依下列方式求得:$$\n\\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其" + }, + { + "text": "偏導函數(partial derivative function)", + "style": "bold" + }, + { + "text": ",可依下列方式求得:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_8b074752bb", + "label": "證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,考慮偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": "。我們定義單變數函數" + }, + { + "latex": "$$\ng(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n$$", + "kind": "math_block" + }, + { + "text": "那麼由偏導數的定義,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n$$", + "kind": "math_block" + }, + { + "text": "換成偏導數的寫法:" + }, + { + "latex": "$$\nf_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n$$", + "kind": "math_block" + }, + { + "text": "上述,最後一個只是換一個比較不會誤會的寫法(使用 " + }, + { + "latex": "$\\partial$", + "kind": "math" + }, + { + "text": " 符號)。" + } + ], + "content": "首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數$$\ng(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n$$那麼由偏導數的定義,我們有$$\n\\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n$$因此,$$\nf_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n$$換成偏導數的寫法:$$\nf_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n$$上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,考慮偏導數 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": "。我們定義單變數函數" + }, + { + "latex": "$$\nh(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n$$", + "kind": "math_block" + }, + { + "text": "那麼由偏導數的定義,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n$$", + "kind": "math_block" + }, + { + "text": "換成偏導數的寫法:" + }, + { + "latex": "$$\nf_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n$$", + "kind": "math_block" + } + ], + "content": "接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數$$\nh(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n$$那麼由偏導數的定義,我們有$$\n\\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n$$因此,$$\nf_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n$$換成偏導數的寫法:$$\nf_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 這裡我們引入新的符號:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 這裡我們引入新的符號:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\frac{\\partial }{\\partial x} f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " ", + "style": "bold" + }, + { + "text": ",唸作 「partial " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ", partial " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "」,代表只對變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "$\\frac{\\partial }{\\partial x} f(x,y)$ ,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\frac{\\partial }{\\partial y} f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " ", + "style": "bold" + }, + { + "text": ",唸作 「partial " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": ", partial " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "」,表示只對變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "$\\frac{\\partial }{\\partial y} f(x,y)$ ,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 常數(constant)是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " " + }, + { + "text": "常數(constant)", + "style": "bold" + }, + { + "text": "是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$-1$", + "kind": "math" + }, + { + "text": " 等。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 3. 在偏導中:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": " 在偏導中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": " 時,可把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 想成常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "計算 $f_x$ 時,可把 $y$ 想成常數 $c$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_y$", + "kind": "math" + }, + { + "text": " 時,可把 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 想成常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "計算 $f_y$ 時,可把 $x$ 想成常數 $c$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面我們先練習一個,單變數函數但帶有常數(constant)的微分。以更好的理解上述描述的「微分時,視 $y$ 為常數」或「微分時,視 $x$ 為常數」的意義。", + "newline": "false", + "runs": [ + { + "text": "下面我們先練習一個,單變數函數但帶有" + }, + { + "text": "常數(constant)", + "style": "bold" + }, + { + "text": "的微分。以更好的理解上述描述的「" + }, + { + "text": "微分時,視 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為常數", + "style": "bold" + }, + { + "text": "」或「" + }, + { + "text": "微分時,視 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為常數", + "style": "bold" + }, + { + "text": "」的意義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "請計算下面單變數函數 $$\nf(x) = x^2\\cdot c - 3x \\cdot c\n$$的導函數 $f'(x)$,其中 $c$ 為一個常數。", + "newline": "false", + "runs": [ + { + "text": "請計算下面單變數函數 " + }, + { + "latex": "$$\nf(x) = x^2\\cdot c - 3x \\cdot c\n$$", + "kind": "math_block" + }, + { + "text": "的導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為一個常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_aeb4e06437", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。因此,$f'(x)=?$:$2xc-3c$", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 是個常數(constant),你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 等。因此," + }, + { + "latex": "$f'(x)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$2xc-3c$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0a7a908e86", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "由於 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 是個常數(constant),你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 等。因此," + }, + { + "latex": "$f'(x)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$2x-3c$;" + }, + { + "key": "b", + "text": "$2xc-3c$;" + }, + { + "key": "c", + "text": "$x^2c-3$;" + }, + { + "key": "d", + "text": "$2c-3x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "請計算下面雙變數函數$$\nf(x,y) = x^2y - 3xy\n$$的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "請計算下面雙變數函數" + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + }, + { + "text": "的偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cc73c35092", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待(如同,上題的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 角色)。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant)看待(如同,上題的常數 $c$ 角色)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "latex": "$2xy-3y$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$$2xy-3y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant)看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$x^2-3x$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$:$x^2-3x$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7485aa792f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待(如同,上題的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 角色)。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant)看待(如同,上題的常數 $c$ 角色)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$2x-3y$;" + }, + { + "key": "b", + "text": "$2xy-3y$;" + }, + { + "key": "c", + "text": "$x^2y-3$;" + }, + { + "key": "d", + "text": "$2y-3x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant)看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "因此,$f_y(x,y)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$2xy-3y$;" + }, + { + "key": "b", + "text": "$x^2-3x$;" + }, + { + "key": "c", + "text": "$2y-3x$;" + }, + { + "key": "d", + "text": "$x^2y-3$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "請計算下面單變數函數 $$\nf(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。", + "newline": "false", + "runs": [ + { + "text": "請計算下面單變數函數 " + }, + { + "latex": "$$\nf(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$", + "kind": "math_block" + }, + { + "text": "的導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為一個常數(constant)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_024bb25dd8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用鏈鎖律(Chain Rule):$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 外層是 " + }, + { + "latex": "$\\sin(\\cdot)$", + "kind": "math" + }, + { + "text": ", 內層是 " + }, + { + "latex": "$x^2\\cdot c - 3x \\cdot c$", + "kind": "math" + }, + { + "text": "。因此,外層微分後變成 " + }, + { + "latex": "$\\cos(\\cdot)$", + "kind": "math" + }, + { + "text": ",並乘上內層的導數:" + }, + { + "latex": "$$\nf'(x) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$", + "kind": "math" + } + ], + "content": "函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:$$\nf'(x) = ?\n$$$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d07002c1b7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用鏈鎖律(Chain Rule):$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 外層是 " + }, + { + "latex": "$\\sin(\\cdot)$", + "kind": "math" + }, + { + "text": ", 內層是 " + }, + { + "latex": "$x^2\\cdot c - 3x \\cdot c$", + "kind": "math" + }, + { + "text": "。因此,外層微分後變成 " + }, + { + "latex": "$\\cos(\\cdot)$", + "kind": "math" + }, + { + "text": ",並乘上內層的導數:" + }, + { + "latex": "$$\nf'(x) = ?\n$$", + "kind": "math_block" + } + ], + "content": "函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:$$\nf'(x) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 c - 3xc )$;" + }, + { + "key": "b", + "text": "$2xc-3c$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意. 對於「合成函數」的微分,要養習慣:先找到內層(inner function)和外層(outer function),這樣微分時比較不容易混淆。", + "newline": "false", + "runs": [ + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 對於「合成函數」的微分,要養習慣:" + }, + { + "text": "先找到內層(inner function)和外層(outer function)", + "style": "bold" + }, + { + "text": ",這樣微分時比較不容易混淆。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "請計算下面雙變數函數$$\nf(x,y) = \\sin( x^2y - 3xy )\n$$的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "請計算下面雙變數函數" + }, + { + "latex": "$$\nf(x,y) = \\sin( x^2y - 3xy )\n$$", + "kind": "math_block" + }, + { + "text": "的偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_105053830e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "此外,這樣的「單變數函數(只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ")」是一個典型的合成函數,因此計算導函數時需要使用「" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": "」。" + } + ], + "content": "此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「鏈鎖律(Chain Rule)」。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$:$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "latex": "$x^2-3x$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$$x^2-3x$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c0bb924bac", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "此外,這樣的「單變數函數(只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ")」是一個典型的合成函數,因此計算導函數時需要使用「" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": "」。" + } + ], + "content": "此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「鏈鎖律(Chain Rule)」。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "因此,$f_x(x,y)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 y - 3xy )$;" + }, + { + "key": "b", + "text": "$2xy-3y$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 y - 3xy )$;" + }, + { + "key": "b", + "text": "$x^2-3x$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 偏導數的不同標示", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 偏導數的不同標示", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是同一個數學概念。", + "newline": "false", + "runs": [ + { + "text": "📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是" + }, + { + "text": "同一個數學概念", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "偏導數的不同符號", + "body": [ + { + "type": "paragraph", + "content": "給定 $z= f(x,y)$,則偏導數可用下面一些不同符號表示:$$\n\\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "給定 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": ",則偏導數可用下面一些不同" + }, + { + "text": "符號", + "style": "bold" + }, + { + "text": "表示:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 符號 $D$ 可以想成:Derivative 或 Differentiation。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 符號 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 可以想成:Derivative 或 Differentiation。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 建議初學者先習慣使用 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\frac{\\partial f}{\\partial x}$", + "kind": "math" + }, + { + "text": ",之後再慢慢熟悉 " + }, + { + "latex": "$D_x f$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣ 偏導數與線性估計", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 偏導數與線性估計", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的瞬間變化率。因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的變化量可估計為$$\nf(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$", + "newline": "false", + "runs": [ + { + "text": "💡 對於單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 描述的是函數在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": "。因此,如果 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 附近發生一個不大的增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ",則函數的" + }, + { + "text": "變化量", + "style": "bold" + }, + { + "text": "可估計為" + }, + { + "latex": "$$\nf(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 這稱為 線性估計(linear approximation),因為變化量與增量呈現 一階線性關係。", + "newline": "false", + "runs": [ + { + "text": "📌 這稱為 " + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "text": ",因為變化量與增量呈現 " + }, + { + "text": "一階線性關係", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對於雙變數函數 $f(x,y)$,", + "newline": "false", + "runs": [ + { + "text": "對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "由於偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": ",考慮的是,在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 變數變化下(固定 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": ")的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": ";" + } + ], + "content": "由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的瞬間變化率;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "由於偏導數 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": ",考慮的是,在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 變數變化下(固定 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": ")的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": ";" + } + ], + "content": "由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的瞬間變化率;" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,我們有以下函數的變化量估計:$$\n\\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$📌 這也是線性估計(linear approximation),只是限制在「單一變數變動下」的線性近似。", + "newline": "false", + "runs": [ + { + "text": "因此,我們有以下函數的" + }, + { + "text": "變化量", + "style": "bold" + }, + { + "text": "估計:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "📌 這也是" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "text": ",只是限制在「單一變數變動下」的線性近似。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "變化量的線性估計", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在,則我們有以下的變化量" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "latex": "$$\nf(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_x(a,b)$ 存在,則我們有以下的變化量線性估計(linear approximation)$$\nf(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,則我們有以下的變化量" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "latex": "$$\nf(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_y(a,b)$ 存在,則我們有以下的變化量線性估計(linear approximation)$$\nf(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮$$\nf(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!", + "newline": "false", + "runs": [ + { + "text": "👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮" + }, + { + "latex": "$$\nf(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$", + "kind": "math_block" + }, + { + "text": "也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 這個「近似 $\\approx$」到底有多近呢?", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 這個「近似 " + }, + { + "latex": "$\\approx$", + "kind": "math" + }, + { + "text": "」到底有多近呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的進階內容繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。", + "newline": "false", + "runs": [ + { + "text": "下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的" + }, + { + "text": "進階內容", + "style": "bold" + }, + { + "text": "繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_03701398c3", + "label": "進階內容", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "變化量的線性估計(進階版)", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在,定義" + }, + { + "latex": "$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n$$", + "kind": "math_block" + }, + { + "text": "則其滿足" + }, + { + "latex": "$$\n\\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n$$", + "kind": "math_block" + }, + { + "text": "因此,當 " + }, + { + "latex": "$\\Delta x \\approx 0$", + "kind": "math" + }, + { + "text": " 時,我們會有 " + }, + { + "latex": "$e_1(\\Delta x) \\approx 0$", + "kind": "math" + }, + { + "text": "。等價的," + }, + { + "latex": "$$\n\\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_x(a,b)$ 存在,定義$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n$$則其滿足$$\n\\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n$$因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,$$\n\\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,定義" + }, + { + "latex": "$$\ne_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n$$", + "kind": "math_block" + }, + { + "text": "則其滿足" + }, + { + "latex": "$$\n\\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n$$", + "kind": "math_block" + }, + { + "text": "因此,當 " + }, + { + "latex": "$\\Delta y \\approx 0$", + "kind": "math" + }, + { + "text": " 時,我們會有 " + }, + { + "latex": "$e_2(\\Delta y) \\approx 0$", + "kind": "math" + }, + { + "text": "。等價的," + }, + { + "latex": "$$\n\\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_y(a,b)$ 存在,定義$$\ne_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n$$則其滿足$$\n\\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n$$因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,$$\n\\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "證明:", + "newline": "false", + "runs": [ + { + "text": "證明:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在。由於" + }, + { + "latex": "$$\nf_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n$$", + "kind": "math_block" + }, + { + "text": "通分後," + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n$$", + "kind": "math_block" + }, + { + "text": "由 " + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 的定義,我們有" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n$$", + "kind": "math_block" + }, + { + "text": "是以," + }, + { + "latex": "$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$", + "kind": "math" + }, + { + "text": "。因而,當 " + }, + { + "latex": "$\\Delta x \\approx 0$", + "kind": "math" + }, + { + "text": ",我們會有" + }, + { + "latex": "$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n$$", + "kind": "math_block" + } + ], + "content": "假設 $f_x(a,b)$ 存在。由於$$\nf_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n$$因此,$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n$$通分後,$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n$$由 $e_1(\\Delta x)$ 的定義,我們有$$\n\\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n$$是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對於定理另一個敘述,同理可證。" + } + ], + "content": "對於定理另一個敘述,同理可證。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 由定義$$\n\\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 由定義" + }, + { + "latex": "$$\n\\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 是在衡量「線性估計變化量」與「實際變化量」的差異。因此," + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 越小表示「線性估計變化量」量與「實際變化量」越接近。同理," + }, + { + "latex": "$e_2(\\Delta y)$", + "kind": "math" + }, + { + "text": " 也是可以這般解釋。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 定理結果的$$\n\\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 定理結果的" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$", + "kind": "math_block" + }, + { + "text": "不僅表示 " + }, + { + "latex": "$\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$", + "kind": "math" + }, + { + "text": ",更代表當 " + }, + { + "latex": "$\\Delta x\\to0$", + "kind": "math" + }, + { + "text": " 時,誤差 " + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 相較於 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 是可以忽略的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "人體質量指數(Body Mass Index, BMI)的定義方式為$$\nB(h,w)=\\frac{w}{h^2},\n$$其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。", + "newline": "false", + "runs": [ + { + "text": "人體質量指數(Body Mass Index, BMI)的定義方式為" + }, + { + "latex": "$$\nB(h,w)=\\frac{w}{h^2},\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 代表體重(公斤)、" + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 代表身高(公尺)。如果小明同學的身高、體重分別是 " + }, + { + "latex": "$170$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$65$", + "kind": "math" + }, + { + "text": " 公斤(也就是 " + }, + { + "latex": "$h=1.70$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請問小明目前的 BMI 指數為?" + } + ], + "content": "請問小明目前的 BMI 指數為?" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算偏導數 " + }, + { + "latex": "$B_w(1.70,65)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$B_h(1.70,65)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "如果小明的身高分別增加了 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分,試問他 BMI " + }, + { + "text": "實際的", + "style": "bold" + }, + { + "text": "變化量分別會是多少?" + } + ], + "content": "如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI 實際的變化量分別會是多少?" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "如果小明的身高分別增加了 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分,試問利用" + }, + { + "text": "線性估計法", + "style": "bold" + }, + { + "text": ",他的 BMI 變化量分別會是多少?" + } + ], + "content": "如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用線性估計法,他的 BMI 變化量分別會是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_123583ed99", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "小明目前的 BMI 為" + }, + { + "latex": "$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$", + "kind": "math_block" + } + ], + "content": "小明目前的 BMI 為$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先求偏導函數:" + }, + { + "latex": "$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$", + "kind": "math_block" + }, + { + "text": "代入 " + }, + { + "latex": "$(h,w)=(1.70,65)$", + "kind": "math" + }, + { + "text": ",得到偏導數" + }, + { + "latex": "$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求偏導函數:$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$代入 $(h,w)=(1.70,65)$,得到偏導數$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "實際 BMI 變化量", + "style": "bold" + }, + { + "text": "(體重固定 " + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ",只改變身高)" + } + ], + "content": "實際 BMI 變化量(體重固定 $w=65$,只改變身高)" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.71$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $1$ 公分(變成 $1.71$ 公尺):$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.72$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分(變成 $1.72$ 公尺):$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "線性估計 BMI 變化量", + "style": "bold" + }, + { + "text": ":由於現在想了解" + }, + { + "text": "身高發生變化、體重固定", + "style": "bold" + }, + { + "text": "對 BMI " + }, + { + "latex": "$B(h,w)$", + "kind": "math" + }, + { + "text": " 造成的影響,因此應使用線性估計公式會是?" + }, + { + "latex": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$", + "kind": "math" + } + ], + "content": "線性估計 BMI 變化量:由於現在想了解身高發生變化、體重固定對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 因此,", + "newline": "false", + "runs": [ + { + "text": " 因此," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "當身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$", + "kind": "math_block" + } + ], + "content": "當身高增加 $1$ 公分:$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分:$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ], + "content": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ] + } + ], + "ai_prompt_md": "### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_06b45d0846", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "小明目前的 BMI 為" + }, + { + "latex": "$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$", + "kind": "math_block" + } + ], + "content": "小明目前的 BMI 為$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先求偏導函數:" + }, + { + "latex": "$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$", + "kind": "math_block" + }, + { + "text": "代入 " + }, + { + "latex": "$(h,w)=(1.70,65)$", + "kind": "math" + }, + { + "text": ",得到偏導數" + }, + { + "latex": "$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求偏導函數:$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$代入 $(h,w)=(1.70,65)$,得到偏導數$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "實際 BMI 變化量", + "style": "bold" + }, + { + "text": "(體重固定 " + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ",只改變身高)" + } + ], + "content": "實際 BMI 變化量(體重固定 $w=65$,只改變身高)" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.71$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $1$ 公分(變成 $1.71$ 公尺):$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.72$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分(變成 $1.72$ 公尺):$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "線性估計 BMI 變化量", + "style": "bold" + }, + { + "text": ":由於現在想了解" + }, + { + "text": "身高發生變化、體重固定", + "style": "bold" + }, + { + "text": "對 BMI " + }, + { + "latex": "$B(h,w)$", + "kind": "math" + }, + { + "text": " 造成的影響,因此應使用線性估計公式會是?" + } + ], + "content": "線性估計 BMI 變化量:由於現在想了解身高發生變化、體重固定對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$" + }, + { + "key": "b", + "text": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$" + }, + { + "key": "c", + "text": "$B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$" + }, + { + "key": "d", + "text": "$B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": " 因此,", + "newline": "false", + "runs": [ + { + "text": " 因此," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "當身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$", + "kind": "math_block" + } + ], + "content": "當身高增加 $1$ 公分:$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分:$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ], + "content": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "7️⃣ 隱函數偏微分", + "newline": "true", + "runs": [ + { + "text": "7️⃣ 隱函數偏微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "🤔 在單變數函數中,我們談過隱函數微分(implicit differentiation)。還記得這是什麼樣的問題嗎?", + "newline": "false", + "runs": [ + { + "text": "🤔 在單變數函數中,我們談過" + }, + { + "text": "隱函數微分(implicit differentiation)", + "style": "bold" + }, + { + "text": "。還記得這是什麼樣的問題嗎?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧便稱為隱函數微分(implicit differentiation)。", + "newline": "false", + "runs": [ + { + "text": "💡 在大多數的微分問題,考慮的是某個函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 的微分,也就是給定 " + }, + { + "latex": "$y= f(x)$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{d y}{d x}$", + "kind": "math" + }, + { + "text": "。在這種情況下," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 只是滿足某一條方程式,比如 " + }, + { + "latex": "$x^2+y^2 =25$", + "kind": "math" + }, + { + "text": ",那我們該如何求 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": "?像這樣," + }, + { + "text": "微分的對象 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 沒有明確的公式,而是隱藏在一條方程式中", + "style": "bold" + }, + { + "text": ",解決這類問題的微分技巧便稱為" + }, + { + "text": "隱函數微分(implicit differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "讓我們透過下面的例子,來喚醒記憶。", + "newline": "false", + "runs": [ + { + "text": "讓我們透過下面的例子,來喚醒記憶。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 = 25。\n$$請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 = 25。\n$$", + "kind": "math_block" + }, + { + "text": "請計算導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 與其在 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e3d5a3d6e8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第一個方法:暴力破解", + "newline": "false", + "runs": [ + { + "text": "第一個方法:暴力破解", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 解出:" + }, + { + "latex": "$$\n\\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n$$", + "kind": "math_block" + } + ], + "content": "先將 $y$ 解出:$$\n\\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於考慮的點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": " 滿足" + }, + { + "latex": "$$\ny= +\\sqrt{25-x^2}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們考慮函數" + }, + { + "latex": "$$\ny = f(x) = + \\sqrt{25-x^2}。\n$$", + "kind": "math_block" + }, + { + "text": "因而," + }, + { + "latex": "$$\n\\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "由於考慮的點 $(x,y)=(3,4)$ 滿足$$\ny= +\\sqrt{25-x^2}。\n$$因此,我們考慮函數$$\ny = f(x) = + \\sqrt{25-x^2}。\n$$因而,$$\n\\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "對上述函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": ",進行微分,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "對上述函數 $f(x)$,即 $y$,進行微分,我們有$$\n\\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此, 在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的缺點是,第一步要解出 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的公式,有時候未必是容易的。" + } + ], + "content": "備註:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法:隱函數微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法:隱函數微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們暫時把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 想成由 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 決定的函數 " + }, + { + "latex": "$y=f(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是某個函數。(當然,此處 " + }, + { + "latex": "$f(x) = + \\sqrt{25-x^2}$", + "kind": "math" + }, + { + "text": "。)" + } + ], + "content": "我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 代入題目方程式 " + }, + { + "latex": "$x^2 + y^2 = 25$", + "kind": "math" + }, + { + "text": " 中,我們會得到" + }, + { + "latex": "$$\nx^2 + (f(x))^2 = 25\n$$", + "kind": "math_block" + } + ], + "content": "將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到$$\nx^2 + (f(x))^2 = 25\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行微分", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行微分$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的優點是,不需要解出 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的公式(這通常是個大問題)!" + } + ], + "content": "備註:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數微分 ", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數微分", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 = 25$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行微分", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行微分:$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + } + ] + } + ], + "ai_prompt_md": "### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為隱函數偏微分(implicit partial differentiation)。", + "newline": "false", + "runs": [ + { + "text": "👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏微分,也就是給定 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": "。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 只是滿足某一條方程式,比如 " + }, + { + "latex": "$x^2+y^2+z^2 =25$", + "kind": "math" + }, + { + "text": ",那我們該如何求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": "?像這樣,微分的對象 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為" + }, + { + "text": "隱函數偏微分(implicit partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!", + "newline": "false", + "runs": [ + { + "text": "💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們就用下面例題,來說明多變數函數的隱函數偏微分是怎麼操作的!", + "newline": "false", + "runs": [ + { + "text": "我們就用下面例題,來說明" + }, + { + "text": "多變數函數的隱函數偏微分", + "style": "bold" + }, + { + "text": "是怎麼操作的!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-10" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$", + "kind": "math_block" + }, + { + "text": "請計算偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_985f464376", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第一個方法:暴力破解", + "newline": "false", + "runs": [ + { + "text": "第一個方法:暴力破解", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 解出:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先將 $z$ 解出:$$\n\\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於考慮的點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 滿足" + }, + { + "latex": "$$\nz = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們考慮函數" + }, + { + "latex": "$$\nz= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$", + "kind": "math_block" + }, + { + "text": "因而," + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n$$", + "kind": "math_block" + } + ], + "content": "由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足$$\nz = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$因此,我們考慮函數$$\nz= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$因而,$$\n\\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "對上述函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": ",進行微分,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "對上述函數 $f(x,y)$,即 $z$,進行微分,我們有$$\n\\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": ",偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = -1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的缺點是,第一步要解出 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式,有時候未必是容易的。此外,就算 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。" + } + ], + "content": "備註:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法:隱函數微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法:隱函數微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們暫時把 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成由 " + }, + { + "latex": "$x,y$", + "kind": "math" + }, + { + "text": " 決定的函數 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是某個函數。" + } + ], + "content": "我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 代入題目方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 中,會有" + }, + { + "latex": "$$\n\\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4\n$$", + "kind": "math_block" + } + ], + "content": "將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有$$\n\\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "直接對方程式的兩邊,對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": ")" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式的兩邊,對 $x$ 進行偏微分(記得,對 $x$ 偏微時,我們將 $y$ 視為常數)$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,將得到" + }, + { + "latex": "$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$", + "kind": "math_block" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的優點是,不需要解出 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式(這通常是個大問題)!" + } + ], + "content": "備註:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行偏微分(記得,對 $x$ 偏微時,我們將 $y$ 視為常數):$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,將得到" + }, + { + "latex": "$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$", + "kind": "math_block" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":習慣後,這樣的算法,遠比上面兩個方法快很多!" + } + ], + "content": "備註:習慣後,這樣的算法,遠比上面兩個方法快很多!" + } + ] + } + ], + "ai_prompt_md": "### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-11" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$", + "kind": "math_block" + }, + { + "text": "請計算偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_73fe61def9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "結果應該是?" + }, + { + "latex": "$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$", + "kind": "math" + } + ], + "content": "直接對方程式兩邊對 $y$ 進行偏微分(記得,對 $y$ 偏微時,我們將 $x$ 視為常數):$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$結果應該是?$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 繼續推導,上面答案中的方程式將變成?$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$", + "newline": "false", + "runs": [ + { + "text": " 繼續推導,上面答案中的方程式將變成?" + }, + { + "latex": "$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,請計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\boxed{-1}$", + "kind": "math" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:$\\boxed{-1}$" + } + ] + } + ], + "ai_prompt_md": "### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_fe8a3a7b42", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "結果應該是?" + } + ], + "content": "直接對方程式兩邊對 $y$ 進行偏微分(記得,對 $y$ 偏微時,我們將 $x$ 視為常數):$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$結果應該是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$0 + 2y + 2z + xy =0$;" + }, + { + "key": "b", + "text": "$0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;" + }, + { + "key": "c", + "text": "$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$;" + }, + { + "key": "d", + "text": "$2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 繼續推導,上面答案中的方程式將變成? " + } + ], + "options": [ + { + "key": "a", + "text": "$2y + z + xy = 0$;" + }, + { + "key": "b", + "text": "$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$;" + }, + { + "key": "c", + "text": "$2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$;" + }, + { + "key": "d", + "text": "$2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,請計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "我們將上面的作法,紀錄在下面的小技巧中:", + "newline": "false", + "runs": [ + { + "text": "我們將上面的作法,紀錄在下面的小技巧中:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "小技巧", + "headline": "隱函數偏微分的操作流程", + "body": [ + { + "type": "paragraph", + "content": "考慮一個方程式同時包含 $x,y,z$,", + "newline": "false", + "runs": [ + { + "text": "考慮一個" + }, + { + "text": "方程式", + "style": "bold" + }, + { + "text": "同時包含 " + }, + { + "latex": "$x,y,z$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 時" + } + ], + "content": "要求 $\\dfrac{\\partial z}{\\partial x}$ 時" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + } + ], + "content": "將 $z$ 想成 $z=f(x,y)$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "對整個方程式兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 做偏微分" + } + ], + "content": "對整個方程式兩邊對 $x$ 做偏微分" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "記得:(i) " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數; (ii) " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 要當作函數,必須使用鏈鎖律。" + } + ], + "content": "記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": " 時" + } + ], + "content": "要求 $\\dfrac{\\partial z}{\\partial y}$ 時" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + } + ], + "content": "將 $z$ 想成 $z=f(x,y)$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "對整個方程式兩邊對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 做偏微分" + } + ], + "content": "對整個方程式兩邊對 $y$ 做偏微分" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "記得:(i) " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數; (ii) " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 要當作函數,必須使用鏈鎖律。" + } + ], + "content": "記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」", + "newline": "false", + "runs": [ + { + "text": "⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 用鏈鎖律」" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "8️⃣ 高階偏導數", + "newline": "true", + "runs": [ + { + "text": "8️⃣ 高階偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的二階偏導函數(second partial derivatives)。", + "newline": "false", + "runs": [ + { + "text": "給定一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",我們可以計算它的一階偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 " + }, + { + "latex": "$(f_x)_x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_x)_y$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_y)_x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_y)_y$", + "kind": "math" + }, + { + "text": "。而這幾個函數,便稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "二階偏導函數(second partial derivatives)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 直觀理解:", + "newline": "false", + "runs": [ + { + "text": "💡 " + }, + { + "text": "直觀理解:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": ":沿著 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向的「斜率」,其變化率。" + } + ], + "content": "$f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}$", + "kind": "math" + }, + { + "text": ":沿著 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的「斜率」,其變化率。" + } + ], + "content": "$f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "二階偏導數的不同符號", + "body": [ + { + "type": "paragraph", + "content": "給定 $z=f(x,y)$,則二階偏導數(second partial derivative)可用下面一些不同符號表示:$$\n\\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。", + "newline": "false", + "runs": [ + { + "text": "給定 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": ",則" + }, + { + "text": "二階偏導數(second partial derivative)", + "style": "bold" + }, + { + "text": "可用下面一些不同" + }, + { + "text": "符號", + "style": "bold" + }, + { + "text": "表示:" + }, + { + "latex": "$$\n\\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "有時候,我們也會將上面等式中的 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 省略,以簡化表示,如 " + }, + { + "latex": "$f_{xx}(x,y)$", + "kind": "math" + }, + { + "text": " 簡寫成 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": "、如 " + }, + { + "latex": "$\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$", + "kind": "math" + }, + { + "text": " 簡寫成 " + }, + { + "latex": "$\\dfrac{\\partial^2 f}{\\partial x^2}$", + "kind": "math" + }, + { + "text": " 等。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數,記作" + }, + { + "latex": "$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$", + "kind": "math_block" + }, + { + "text": "右式分母最右邊的 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 代表「先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微分」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 12", + "newline": "true", + "runs": [ + { + "text": "Example 12", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 12, + "ai_prompt_md": "### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-12" + }, + { + "type": "paragraph", + "content": "考慮雙變數函數$$\nf(x,y) = x^2 y -3 x y。\n$$請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數" + }, + { + "latex": "$$\nf(x,y) = x^2 y -3 x y。\n$$", + "kind": "math_block" + }, + { + "text": "請計算函數所有的二階偏導數 " + }, + { + "latex": "$f_{xx}, f_{xy}, f_{yx}, f_{yy}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ec47ed314b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先求一階偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x, f_y$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 由上面範例,我們已經求得" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求一階偏導數 $f_x, f_y$: 由上面範例,我們已經求得$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由一階偏導數繼續對 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 偏微分,便能求所有二階偏導數:", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "請上述計算後的結果:" + } + ], + "content": "由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$請上述計算後的結果:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2y}$", + "kind": "math" + } + ], + "content": "$f_{xx}(x,y) = ?$$\\boxed{2y}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xy}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2x-3}$", + "kind": "math" + } + ], + "content": "$f_{xy}(x,y) = ?$$\\boxed{2x-3}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yx}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2x-3}$", + "kind": "math" + } + ], + "content": "$f_{yx}(x,y) = ?$$\\boxed{2x-3}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{0}$", + "kind": "math" + } + ], + "content": "$f_{yy}(x,y) = ?$$\\boxed{0}$" + } + ] + } + ], + "ai_prompt_md": "### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_68dd867971", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先求一階偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x, f_y$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 由上面範例,我們已經求得" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求一階偏導數 $f_x, f_y$: 由上面範例,我們已經求得$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由一階偏導數繼續對 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 偏微分,便能求所有二階偏導數:", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "請上述計算後的結果:" + } + ], + "content": "由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$請上述計算後的結果:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{xx}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xy}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{xy}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yx}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{yx}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{yy}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "在上面的範例,我們可以觀察到$$\nf_{xy}(x,y)=f_{yx}(x,y)。\n$$也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。", + "newline": "false", + "runs": [ + { + "text": "在上面的範例,我們可以觀察到" + }, + { + "latex": "$$\nf_{xy}(x,y)=f_{yx}(x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "也就是:函數先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微,與先對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微,結果是一樣的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這其實不是偶然的,對於大部分函數,都有這樣的性質:「二階偏微分的結果與偏微分的順序無關」。我們將這樣的結果紀錄在下面的定理中。", + "newline": "false", + "runs": [ + { + "text": "這其實不是偶然的,對於大部分函數,都有這樣的性質:「" + }, + { + "text": "二階偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。我們將這樣的結果紀錄在下面的定理中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理(Clairaut 定理)", + "headline": "偏微分的結果與偏微分的順序無關", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則$$\nf_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若在某個區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 內," + }, + { + "latex": "$f_{xy}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{yx}$", + "kind": "math" + }, + { + "text": " 都存在且連續,則" + }, + { + "latex": "$$\nf_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "除了二階偏導數,其實我們也可以定義更高階的偏導數,比如三階偏導數、四階偏導數,其定義方式也都如同二階偏導數一般。比方,我們定義$$\nf_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$注意. 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。", + "newline": "false", + "runs": [ + { + "text": "除了二階偏導數,其實我們也可以定義更高階的偏導數,比如" + }, + { + "text": "三階偏導數、四階偏導數", + "style": "bold" + }, + { + "text": ",其定義方式也都如同二階偏導數一般。比方,我們定義" + }, + { + "latex": "$$\nf_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 請注意偏微分在書寫上的順序。比如,上例 " + }, + { + "latex": "$f_{xyy}$", + "kind": "math" + }, + { + "text": " 偏微分順序是 " + }, + { + "latex": "$x \\to y \\to y$", + "kind": "math" + }, + { + "text": "。而 " + }, + { + "latex": "$\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$", + "kind": "math" + }, + { + "text": " 偏微分順序是 " + }, + { + "latex": "$x\\to y \\to y$", + "kind": "math" + }, + { + "text": " 。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「對於大部分函數,偏微分的結果與偏微分的順序無關」。比如,$$\nf_{xyy} = f_{yxy} = f_{yyx},\n$$如果它們存在且連續。", + "newline": "false", + "runs": [ + { + "text": "同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「" + }, + { + "text": "對於大部分函數,偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。比如," + }, + { + "latex": "$$\nf_{xyy} = f_{yxy} = f_{yyx},\n$$", + "kind": "math_block" + }, + { + "text": "如果它們存在且連續。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 請注意偏微分在書寫上的順序。例如 " + }, + { + "latex": "$f_{xyy}$", + "kind": "math" + }, + { + "text": " 的偏微分順序是 " + }, + { + "latex": "$x\\to y\\to y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 13", + "newline": "true", + "runs": [ + { + "text": "Example 13", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 13, + "ai_prompt_md": "### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-13" + }, + { + "type": "paragraph", + "content": "考慮雙變數函數$$\nf(x,y) = \\sin (x^2 y -3 x y)。\n$$請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數" + }, + { + "latex": "$$\nf(x,y) = \\sin (x^2 y -3 x y)。\n$$", + "kind": "math_block" + }, + { + "text": "請計算 " + }, + { + "latex": "$f_{xxy}(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_4cdf51175b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先確認微分順序:" + }, + { + "latex": "$f_{xxy}$", + "kind": "math" + }, + { + "text": " 表示先對哪個變數偏微分?" + }, + { + "latex": "$x\\to x \\to y$", + "kind": "math" + } + ], + "content": "先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?$x\\to x \\to y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們先計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "我們先計算 $f_x$:$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再來,我們計算 " + }, + { + "latex": "$f_{xx}= (f_x)_x$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "再來,我們計算 $f_{xx}= (f_x)_x$:$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "最後,我們計算 " + }, + { + "latex": "$f_{xxy}= (f_{xx})_y$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "最後,我們計算 $f_{xxy}= (f_{xx})_y$:$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "對於 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": ",我們還需要重新計算一次嗎?" + }, + { + "text": "不需要," + }, + { + "latex": "$f_{xxy}(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": " 微分順序是不一樣的" + } + ], + "content": "對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " ⭐ 提醒:由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "newline": "false", + "runs": [ + { + "text": " ⭐ " + }, + { + "text": "提醒", + "style": "bold" + }, + { + "text": ":" + }, + { + "text": "由於 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "style": "bold" + } + ] + } + ], + "ai_prompt_md": "### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dce8a972c0", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先確認微分順序:" + }, + { + "latex": "$f_{xxy}$", + "kind": "math" + }, + { + "text": " 表示先對哪個變數偏微分?" + } + ], + "content": "先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$x\\to x \\to y$;" + }, + { + "key": "b", + "text": "$y\\to x \\to x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們先計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "我們先計算 $f_x$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_x(x,y) = \\cos(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再來,我們計算 " + }, + { + "latex": "$f_{xx}= (f_x)_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "再來,我們計算 $f_{xx}= (f_x)_x$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "最後,我們計算 " + }, + { + "latex": "$f_{xxy}= (f_{xx})_y$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "最後,我們計算 $f_{xxy}= (f_{xx})_y$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "對於 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": ",我們還需要重新計算一次嗎?" + } + ], + "content": "對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的;" + }, + { + "key": "b", + "text": "需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;" + }, + { + "key": "c", + "text": "不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;" + }, + { + "key": "d", + "text": "不確定。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": " ⭐ 提醒:由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "newline": "false", + "runs": [ + { + "text": " ⭐ " + }, + { + "text": "提醒", + "style": "bold" + }, + { + "text": ":" + }, + { + "text": "由於 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "9️⃣ 三或更多變數函數的偏導數", + "newline": "true", + "runs": [ + { + "text": "9️⃣ 三或更多變數函數的偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "9" + }, + { + "type": "paragraph", + "content": "上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,", + "newline": "false", + "runs": [ + { + "text": "上面我們介紹了雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的偏導數為$$\n\\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。", + "newline": "false", + "runs": [ + { + "text": "📌 對三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們定義其在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導數", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 同樣的,我們也可以定義偏導函數 $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。", + "newline": "false", + "runs": [ + { + "text": "📌 同樣的,我們也可以定義" + }, + { + "text": "偏導函數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_x(x,y,z)$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_y(x,y,z)$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_z(x,y,z)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 而雙變數偏微分的計算法則,套用在多變數函數中也是成立的。即:執行偏微分時,對某一變數偏微分時,其餘變數皆視為常數。符號上,亦寫作$$\n\\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "📌 而雙變數" + }, + { + "text": "偏微分的計算法則", + "style": "bold" + }, + { + "text": ",套用在多變數函數中也是成立的。即:執行偏微分時," + }, + { + "text": "對某一變數偏微分時,其餘變數皆視為常數", + "style": "bold" + }, + { + "text": "。符號上,亦寫作" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 此外,「隱函數偏微分」、「高階偏導數」等主題,也都可以自然推廣到三變數與多變數函數中。", + "newline": "false", + "runs": [ + { + "text": "📌 此外,「" + }, + { + "text": "隱函數偏微分", + "style": "bold" + }, + { + "text": "」、「" + }, + { + "text": "高階偏導數", + "style": "bold" + }, + { + "text": "」等主題,也都可以自然推廣到三變數與多變數函數中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關」。", + "newline": "false", + "runs": [ + { + "text": "📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「" + }, + { + "text": "若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 14", + "newline": "true", + "runs": [ + { + "text": "Example 14", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 14, + "ai_prompt_md": "### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-14" + }, + { + "type": "paragraph", + "content": "考慮三變數函數 $$\nf(x,y,z) = e^{xy}\\ln(z)。\n$$請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。", + "newline": "false", + "runs": [ + { + "text": "考慮三變數函數 " + }, + { + "latex": "$$\nf(x,y,z) = e^{xy}\\ln(z)。\n$$", + "kind": "math_block" + }, + { + "text": "請計算 " + }, + { + "latex": "$f_{x}$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_{y}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{z}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dfafb51f45", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。因此,由鏈鎖律可得答案為?" + }, + { + "latex": "$\\boxed{y e^{xy}\\ln(z)}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?$\\boxed{y e^{xy}\\ln(z)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。同樣由鏈鎖律可得答案為?" + }, + { + "latex": "$\\boxed{x e^{xy}\\ln(z)}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?$\\boxed{x e^{xy}\\ln(z)}$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。此時 " + }, + { + "latex": "$e^{xy}$", + "kind": "math" + }, + { + "text": " 是常數因子,因此答案為?" + }, + { + "latex": "$\\boxed{e^{xy}/z}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?$\\boxed{e^{xy}/z}$" + } + ] + } + ], + "ai_prompt_md": "### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cd483b721a", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。因此,由鏈鎖律可得答案為?" + } + ], + "content": "偏導數$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "y e^{xy}\\ln(z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。同樣由鏈鎖律可得答案為?" + } + ], + "content": "偏導數$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "x e^{xy}\\ln(z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。此時 " + }, + { + "latex": "$e^{xy}$", + "kind": "math" + }, + { + "text": " 是常數因子,因此答案為?" + } + ], + "content": "偏導數$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "e^{xy}/z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "偏導數", + "newline": "true", + "runs": [ + { + "text": "偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 偏導數的定義", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 偏導數的定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,我們談過其在點 $a$ 的導數(derivative) $f'(a)$,描述的是:函數在 $x=a$ 的 「瞬間變化率」。具體定義如下,$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x)-f(a)}{\\Delta x}。\n$$", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",我們談過其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "導數(derivative)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": ",描述的是:函數在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "text": "「瞬間變化率」", + "style": "bold" + }, + { + "text": "。具體定義如下," + }, + { + "latex": "$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x)-f(a)}{\\Delta x}。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "現在,我們想把這種「瞬間變化率」的概念推廣到雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。直覺上,或許會想到:" + }, + { + "latex": "$$\nf'(a,b) = \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} \\frac{f(a+\\Delta x, b+\\Delta y)-f(a,b)}{ (\\Delta x,\\Delta y) }?\n$$", + "kind": "math_block" + }, + { + "text": "⚠️但⋯⋯這裡馬上遇到一個大問題:" + } + ], + "options": [ + { + "key": "a", + "text": "這樣定義完全沒問題,也是在計算在 $(a,b)$ 的瞬間變化率;" + }, + { + "key": "b", + "text": "有問題,因為分母是一個「向量」,不是數字,根本沒有辦法做除法。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 上面的問題來自於:我們同時在兩個變數 $x=a$ 與 $y=b$ 都(分別)添加上增量 $\\Delta x$ 與 $\\Delta y$,因此分母出現了增量向量 $(\\Delta x, \\Delta y)$,無法直接進行「除法」。怎麼化解這個問題呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 上面的問題來自於:我們" + }, + { + "text": "同時", + "style": "bold" + }, + { + "text": "在兩個變數 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 都(分別)添加上增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": ",因此分母出現了" + }, + { + "text": "增量向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": ",無法直接進行「除法」。怎麼化解這個問題呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 一個很直接的想法是:一次只在一個變數上添加增量,另一個變數的值固定,先了解單一個變數的變化,會為函數值帶來多大的變化。", + "newline": "false", + "runs": [ + { + "text": "💡 一個很直接的想法是:" + }, + { + "text": "一次只在一個變數上添加增量,另一個變數的值固定", + "style": "bold" + }, + { + "text": ",先了解單一個變數的變化,會為函數值帶來多大的變化。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🧪 這其實就像科學實驗中的「控制變因」──只改變一個因素,觀察這個因素對結果的影響。", + "newline": "false", + "runs": [ + { + "text": "🧪 這其實就像科學實驗中的「控制變因」──只改變一個因素,觀察這個因素對結果的影響。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 當然,或許你還是會想知道,同時改變兩個變數會怎樣(變化率、變化量等)——這個問題我們下一節再討論。", + "newline": "false", + "runs": [ + { + "text": "👉 當然,或許你還是會想知道," + }, + { + "text": "同時", + "style": "bold" + }, + { + "text": "改變兩個變數會怎樣(變化率、變化量等)——這個問題我們下一節再討論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🔎 回到我們的剛才所提出的想法:一次只在一個變數上添加增量,另一個變數的值固定,並考慮在這種情況下的(瞬間)變化率。因此,我們將考慮到:", + "newline": "false", + "runs": [ + { + "text": "🔎 回到我們的剛才所提出的想法:" + }, + { + "text": "一次只在一個變數上添加增量,另一個變數的值固定", + "style": "bold" + }, + { + "text": ",並考慮在這種情況下的(瞬間)變化率。因此,我們將考慮到:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "只在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 做上增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\hspace{60pt}\\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "只在 $x=a$ 做上增量 $\\Delta x$(固定 $y=b$):$$\n\\hspace{60pt}\\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "只在 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 做上增量 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\hspace{60pt}\\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "只在 $y=b$ 做上增量 $\\Delta y$(固定 $x=a$):$$\n\\hspace{60pt}\\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這兩個極限,就分別稱為函數 $f(x,y)$ 在 $(a,b)$ 對 $x$ 與對 $y$ 的偏導數(partial derivatives)。 「偏」意味著我們「偏心」只關注其中一個變數,而忽略其他的變數的變化(固定其他變數的值)。", + "newline": "false", + "runs": [ + { + "text": "這兩個極限,就分別稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導數(partial derivatives)", + "style": "bold" + }, + { + "text": "。 「偏」意味著我們「偏心」只關注其中一個變數,而忽略其他的變數的變化(固定其他變數的值)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "雙變數函數在某點的偏導數", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,我們定義", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",我們定義" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "其在點 $(a,b)$ 對 $x$ 的偏導數(partial derivative with respect to $x$)為$$\nf_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "其在點 $(a,b)$ 對 $y$ 的偏導數(partial derivative with respect to $y$)為$$\nf_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數的過程,稱為" + }, + { + "text": "偏微分(partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "計算偏導數的過程,稱為偏微分(partial differentiation)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 因為雙變數函數 $f(x,y)$ 具有兩個自變數,因此在計算偏導數時,一定要清楚標示是對哪一個變數取偏導。例如,", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 因為雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 具有兩個自變數,因此在計算偏導數時,一定要清楚標示是對哪一個變數取偏導。例如," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 取偏導記為 " + }, + { + "latex": "$f_x$", + "kind": "math" + } + ], + "content": "對 $x$ 取偏導記為 $f_x$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 取偏導記為 " + }, + { + "latex": "$f_y$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $y$ 取偏導記為 $f_y$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 觀察偏微分定義的極限,可以發現它是對某一個增量 $\\Delta x$ 或 $\\Delta y$ 取極限。因此計算這樣的極限,我們先前學過的「單變數極限」計算方法與技巧,都可以直接拿來套用。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 觀察偏微分定義的極限,可以發現它是對" + }, + { + "text": "某一個增量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 取極限。因此計算這樣的極限,我們先前學過的「單變數極限」計算方法與技巧,都可以直接拿來套用。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面我們就先來練習一個計算偏微分的例子吧!", + "newline": "false", + "runs": [ + { + "text": "下面我們就先來練習一個計算偏微分的例子吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$\n\n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n $$\n3. 請計算上面極限的結果:\n$\\boxed{-4}$\n---\n1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式:\n $$\n f_y(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$\n\n2. 請計算上面極限的結果:\n$\\boxed{-2}$\n\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n \n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n $$\n3. 請計算上面極限的結果:\n \n \n---\n1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式:\n $$\n f_y(1,4) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n \n2. 請計算上面極限的結果:\n \n \n\n\n\n---\n💡 小知識:電腦怎麼算微分?\n\n電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 $\\Delta x$(例如 $0.00001$)來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!\n\n\n\n---\n## 2️⃣ 偏導數與切線斜率\n\n回顧單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 恰為二維平面曲線 $y=f(x)$ 在點 $(a,f(a))$ 的**切線斜率(the slope of tangent)**。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$,其在點 $(a,b)$ 的偏導數 $f_x(a,b)$ 與 $f_y(a,b)$,在三維空間曲面 $z=f(x,y)$ 的點 $(a,b,f(a,b))$ 處,分別對應哪一條曲線的切線斜率呢?\n\n👀 接下來,我們將透過一個 **3D 互動圖形(Geogebra)**,實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。\n\n---\n### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $y=1$ 的截線\n\n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n曲線 $C_1$ 在點 $P$ 的切線斜率\n\n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $x=1$ 的截線\n\n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n曲線 $C_2$ 在點 $P$ 的切線斜率\n\n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n \n a. $C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑) \n b. $C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) \n c. $C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) \n d. $C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點) \n \n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。 \n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n \n a. $C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。\n b. $C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。\n c. $C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。\n d. $C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。\n \n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。\n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n---\n透過上面的範例觀察,我們得到以下結論。\n\n\n特性\n偏導數與切線斜率\n1. $f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。\n2. $f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。\n\n\n![](/assets/partial_derivative.svg)\n---\n## 3️⃣ 偏導函數的定義\n\n回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$ 後,我們隨之便定義了**導函數(derivative function)** $f'(x)$。\n\n📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; \n\n📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。\n\n也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義\n$$\n f'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$\n\n✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。\n\n🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的**偏導函數(partial derivative functions)** $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:\n\n\n定義\n雙變數函數的偏導函數\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,時常簡稱**偏導、偏導數(partial derivative)**,定義如下:\n1. 對 $x$ 的**偏導函數(partial derivative with respect to $x$)**為\n $$\n f_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n $$\n2. 對 $y$ 的**偏導函數(partial derivative with respect to $y$)**為\n $$\n f_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n $$\n3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。\n\n\n⚠️ **注意 1.** 在計算偏導數時:\n- 計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;\n- 計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。\n\n⚠️ **注意 2.** 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。\n$$\n \\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$\n其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。\n\n---\n### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請依據偏導數的定義,計算函數 $$\nf(x,y) = x^2y - 3xy\n$$在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。", + "newline": "false", + "runs": [ + { + "text": "請依據偏導數的定義,計算函數 " + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + }, + { + "text": "在點 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 、對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_94d3624e49", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": ",代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",因此,我們先寫下 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 的「定義公式」:" + }, + { + "latex": "$$\nf_x(1,4) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$", + "kind": "math" + } + ], + "content": "要計算 $f_x(1,4)$,代表:只讓 $x$ 改變,將 $y$ 固定為 $4$,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:$$\nf_x(1,4) = ?\n$$$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,我們把這題的函數 " + }, + { + "latex": "$f(x,y) = x^2y - 3xy$", + "kind": "math" + }, + { + "text": " 代入上述正確的偏導數定義中:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請計算上面極限的結果:" + }, + { + "latex": "$\\boxed{-4}$", + "kind": "math" + } + ], + "content": "請計算上面極限的結果:$\\boxed{-4}$" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "現在改成計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。 這代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$1$", + "kind": "math", + "style": "bold" + }, + { + "text": "。請先寫下 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 的定義公式:" + }, + { + "latex": "$$\nf_y(1,4) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$", + "kind": "math" + } + ], + "content": "現在改成計算 $f_y(1,4)$。 這代表:只讓 $y$ 改變,將 $x$ 固定為 $1$。請先寫下 $f_y(1,4)$ 的定義公式:$$\nf_y(1,4) = ?\n$$$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算上面極限的結果:" + }, + { + "latex": "$\\boxed{-2}$", + "kind": "math" + } + ], + "content": "請計算上面極限的結果:$\\boxed{-2}$" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c1bbc90065", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": ",代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",因此,我們先寫下 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 的「定義公式」:" + }, + { + "latex": "$$\nf_x(1,4) = ?\n$$", + "kind": "math_block" + } + ], + "content": "要計算 $f_x(1,4)$,代表:只讓 $x$ 改變,將 $y$ 固定為 $4$,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:$$\nf_x(1,4) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,我們把這題的函數 " + }, + { + "latex": "$f(x,y) = x^2y - 3xy$", + "kind": "math" + }, + { + "text": " 代入上述正確的偏導數定義中:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請計算上面極限的結果:" + } + ], + "content": "請計算上面極限的結果:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "現在改成計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。 這代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$1$", + "kind": "math", + "style": "bold" + }, + { + "text": "。請先寫下 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 的定義公式:" + }, + { + "latex": "$$\nf_y(1,4) = ?\n$$", + "kind": "math_block" + } + ], + "content": "現在改成計算 $f_y(1,4)$。 這代表:只讓 $y$ 改變,將 $x$ 固定為 $1$。請先寫下 $f_y(1,4)$ 的定義公式:$$\nf_y(1,4) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算上面極限的結果:" + } + ], + "content": "請計算上面極限的結果:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "💡 小知識:電腦怎麼算微分?", + "newline": "false", + "runs": [ + { + "text": "💡 小知識:電腦怎麼算微分?" + } + ] + }, + { + "type": "solution", + "uid": "sol_cce5ca8ddf", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 $\\Delta x$(例如 $0.00001$)來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!", + "newline": "false", + "runs": [ + { + "text": "電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": "(例如 " + }, + { + "latex": "$0.00001$", + "kind": "math" + }, + { + "text": ")來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 偏導數與切線斜率", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 偏導數與切線斜率", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 恰為二維平面曲線 $y=f(x)$ 在點 $(a,f(a))$ 的切線斜率(the slope of tangent)。", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 恰為二維平面曲線 " + }, + { + "latex": "$y=f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,f(a))$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "切線斜率(the slope of tangent)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 那麼,對於雙變數函數 $f(x,y)$,其在點 $(a,b)$ 的偏導數 $f_x(a,b)$ 與 $f_y(a,b)$,在三維空間曲面 $z=f(x,y)$ 的點 $(a,b,f(a,b))$ 處,分別對應哪一條曲線的切線斜率呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 那麼,對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": ",在三維空間曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 的點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 處,分別對應哪一條曲線的切線斜率呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👀 接下來,我們將透過一個 3D 互動圖形(Geogebra),實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。", + "newline": "false", + "runs": [ + { + "text": "👀 接下來,我們將透過一個 " + }, + { + "text": "3D 互動圖形(Geogebra)", + "style": "bold" + }, + { + "text": ",實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2(Geogebra)", + "newline": "true", + "runs": [ + { + "text": "Example 2(Geogebra)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $y=1$ 的截線\n\n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n曲線 $C_1$ 在點 $P$ 的切線斜率\n\n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $x=1$ 的截線\n\n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n曲線 $C_2$ 在點 $P$ 的切線斜率\n\n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n \n a. $C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑) \n b. $C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) \n c. $C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) \n d. $C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點) \n \n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。 \n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n \n a. $C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。\n b. $C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。\n c. $C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。\n d. $C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。\n \n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。\n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n---\n透過上面的範例觀察,我們得到以下結論。\n\n\n特性\n偏導數與切線斜率\n1. $f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。\n2. $f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。\n\n\n![](/assets/partial_derivative.svg)\n---\n## 3️⃣ 偏導函數的定義\n\n回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$ 後,我們隨之便定義了**導函數(derivative function)** $f'(x)$。\n\n📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; \n\n📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。\n\n也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義\n$$\n f'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$\n\n✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。\n\n🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的**偏導函數(partial derivative functions)** $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:\n\n\n定義\n雙變數函數的偏導函數\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,時常簡稱**偏導、偏導數(partial derivative)**,定義如下:\n1. 對 $x$ 的**偏導函數(partial derivative with respect to $x$)**為\n $$\n f_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n $$\n2. 對 $y$ 的**偏導函數(partial derivative with respect to $y$)**為\n $$\n f_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n $$\n3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。\n\n\n⚠️ **注意 1.** 在計算偏導數時:\n- 計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;\n- 計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。\n\n⚠️ **注意 2.** 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。\n$$\n \\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$\n其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。\n\n---\n### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-2-Geogebra" + }, + { + "type": "paragraph", + "content": "考慮函數$$\nf(x,y)=4-x^2-2y^2。\n$$請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點$$\nP=(1,1,f(1,1))\n$$處,分別對應什麼曲線的切線斜率?", + "newline": "false", + "runs": [ + { + "text": "考慮函數" + }, + { + "latex": "$$\nf(x,y)=4-x^2-2y^2。\n$$", + "kind": "math_block" + }, + { + "text": "請解釋函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": ",在三維空間曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 的點" + }, + { + "latex": "$$\nP=(1,1,f(1,1))\n$$", + "kind": "math_block" + }, + { + "text": "處,分別對應什麼曲線的切線斜率?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9d7991d1a1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:", + "newline": "false", + "runs": [ + { + "text": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "繪製函數的圖形 " + }, + { + "latex": "$z= f(x,y)=4- x^2 -2 y^2$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "標出點 " + }, + { + "latex": "$P= (1,1,f(1,1))=(1,1,1)$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "標出點 $P= (1,1,f(1,1))=(1,1,1)$;" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再標出兩個「可以移動的點」" + }, + { + "latex": "$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,都可以透過左側面板中的" + }, + { + "text": "拉桿", + "style": "bold" + }, + { + "text": "來調整。" + } + ], + "content": "再標出兩個「可以移動的點」$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的拉桿來調整。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "ve6jegsw", + "width": "100%", + "height": "480", + "border": "0", + "caption": "偏導數", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "你會發現:點 " + }, + { + "latex": "$Q_{\\Delta x}$", + "kind": "math" + }, + { + "text": " 始終落在一條綠色曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + }, + { + "text": "與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線" + } + ], + "content": "你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?與平面 $y=1$ 的截線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 的參數方程可以寫成:" + }, + { + "latex": "$C_1:\\ (x,y,z)=(x,1,f(x,1))$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線)" + } + ], + "content": "既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數公式為" + }, + { + "latex": "$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是哪一個「切線斜率」?" + }, + { + "text": "曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的切線斜率" + } + ], + "content": "因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?曲線 $C_1$ 在點 $P$ 的切線斜率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "點 " + }, + { + "latex": "$R_{\\Delta y}$", + "kind": "math" + }, + { + "text": " 會落在另一條曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + }, + { + "text": "與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線" + } + ], + "content": "點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?與平面 $x=1$ 的截線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼它的參數方程可以寫成:" + }, + { + "latex": "$C_2:\\ (x,y,z)=(1,y,f(1,y))$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線)" + } + ], + "content": "既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數定義為" + }, + { + "latex": "$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是?" + }, + { + "text": "曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的切線斜率" + } + ], + "content": "因此,$f_y(1,1)$ 對應的是?曲線 $C_2$ 在點 $P$ 的切線斜率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "總結上述觀察,我們得到以下結論:" + }, + { + "latex": "$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "總結上述觀察,我們得到以下結論:$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$" + } + ] + } + ], + "ai_prompt_md": "### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cfc1b0969b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:", + "newline": "false", + "runs": [ + { + "text": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "繪製函數的圖形 " + }, + { + "latex": "$z= f(x,y)=4- x^2 -2 y^2$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "標出點 " + }, + { + "latex": "$P= (1,1,f(1,1))=(1,1,1)$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "標出點 $P= (1,1,f(1,1))=(1,1,1)$;" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再標出兩個「可以移動的點」" + }, + { + "latex": "$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,都可以透過左側面板中的" + }, + { + "text": "拉桿", + "style": "bold" + }, + { + "text": "來調整。" + } + ], + "content": "再標出兩個「可以移動的點」$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的拉桿來調整。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "ve6jegsw", + "width": "100%", + "height": "480", + "border": "0", + "caption": "偏導數", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "你會發現:點 " + }, + { + "latex": "$Q_{\\Delta x}$", + "kind": "math" + }, + { + "text": " 始終落在一條綠色曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + } + ], + "content": "你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "與平面 $y=1$ 的截線" + }, + { + "key": "b", + "text": "與平面 $x=1$ 的截線" + }, + { + "key": "c", + "text": "與平面 $z=1$ 的截線" + }, + { + "key": "d", + "text": "不對應任何固定平面" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 的參數方程可以寫成:" + } + ], + "content": "既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)" + }, + { + "key": "b", + "text": "$C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)" + }, + { + "key": "c", + "text": "$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)" + }, + { + "key": "d", + "text": "$C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數公式為" + }, + { + "latex": "$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是哪一個「切線斜率」?" + } + ], + "content": "因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "曲線 $C_1$ 在點 $P$ 的切線斜率。" + }, + { + "key": "b", + "text": "曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。" + }, + { + "key": "c", + "text": "曲線 $C_2$ 在點 $P$ 的切線斜率。" + }, + { + "key": "d", + "text": "曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "點 " + }, + { + "latex": "$R_{\\Delta y}$", + "kind": "math" + }, + { + "text": " 會落在另一條曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + } + ], + "content": "點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "與平面 $y=1$ 的截線" + }, + { + "key": "b", + "text": "與平面 $x=1$ 的截線" + }, + { + "key": "c", + "text": "與平面 $z=1$ 的截線" + }, + { + "key": "d", + "text": "不對應任何固定平面" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼它的參數方程可以寫成:" + } + ], + "content": "既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。" + }, + { + "key": "b", + "text": "$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。" + }, + { + "key": "c", + "text": "$C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。" + }, + { + "key": "d", + "text": "$C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數定義為" + }, + { + "latex": "$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是?" + } + ], + "content": "因此,$f_y(1,1)$ 對應的是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "曲線 $C_1$ 在點 $P$ 的切線斜率。" + }, + { + "key": "b", + "text": "曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。" + }, + { + "key": "c", + "text": "曲線 $C_2$ 在點 $P$ 的切線斜率。" + }, + { + "key": "d", + "text": "曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$\n\n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdo" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "總結上述觀察,我們得到以下結論:" + }, + { + "latex": "$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "總結上述觀察,我們得到以下結論:$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "透過上面的範例觀察,我們得到以下結論。", + "newline": "false", + "runs": [ + { + "text": "透過上面的範例觀察,我們得到以下結論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "偏導數與切線斜率", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 的截線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切線斜率。" + } + ], + "content": "$f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的截線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切線斜率。" + } + ], + "content": "$f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/partial_derivative.svg" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 偏導函數的定義", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 偏導函數的定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的導數(derivative) $f'(a)$ 後,我們隨之便定義了導函數(derivative function) $f'(x)$。", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",在我們談過其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "導數(derivative)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 後,我們隨之便定義了" + }, + { + "text": "導函數(derivative function)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; ", + "newline": "false", + "runs": [ + { + "text": "📌 導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 描述的是函數在「某一個點」的瞬間變化率; " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。", + "newline": "false", + "runs": [ + { + "text": "📌 而導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 則是把每一個點的導數值收集起來,形成一個新的函數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義$$\nf'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 定義域中的任意點 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 上給出導數值。是以,我們定義" + }, + { + "latex": "$$\nf'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。", + "newline": "false", + "runs": [ + { + "text": "✅ 一旦我們求得導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",將來要計算導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": ",只需將 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 即可。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的偏導函數(partial derivative functions) $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:", + "newline": "false", + "runs": [ + { + "text": "🧠 這樣的概念,推廣到雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,也是適用的。我們也能定義所謂的" + }, + { + "text": "偏導函數(partial derivative functions)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。請參見下面的定理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "雙變數函數的偏導函數", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,其偏導函數(partial derivative function),時常簡稱偏導、偏導數(partial derivative),定義如下:", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其" + }, + { + "text": "偏導函數(partial derivative function)", + "style": "bold" + }, + { + "text": ",時常簡稱" + }, + { + "text": "偏導、偏導數(partial derivative)", + "style": "bold" + }, + { + "text": ",定義如下:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導函數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "對 $x$ 的偏導函數(partial derivative with respect to $x$)為$$\nf_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導函數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "對 $y$ 的偏導函數(partial derivative with respect to $y$)為$$\nf_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數的過程,稱為" + }, + { + "text": "偏微分(partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "計算偏導數的過程,稱為偏微分(partial differentiation)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 在計算偏導數時:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 在計算偏導數時:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,請將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數;" + } + ], + "content": "計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,請將 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。$$\n\\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 一旦我們求得偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",要計算某一點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的偏導數值,只需將 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 代入即可。" + }, + { + "latex": "$$\n\\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\left. \\cdot \\right|_{(x,y)=(a,b)}$", + "kind": "math" + }, + { + "text": " 代表將 " + }, + { + "latex": "$(x,y)=(a,b)$", + "kind": "math" + }, + { + "text": " 代入到算式 " + }, + { + "latex": "$\\cdot$", + "kind": "math" + }, + { + "text": " 中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "請依據偏導函數的定義,計算函數 $$\nf(x,y) = x^2y - 3xy\n$$", + "newline": "false", + "runs": [ + { + "text": "請依據偏導函數的定義,計算函數 " + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",與偏導數 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",與偏導數 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6ac2c27af7", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "你可以發現,其實整個計算過程與第一題計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 完全一樣,只是將 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "先計算 $f_x(x,y)$:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_x(1,4)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{-4}$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$$\\boxed{-4}$" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "再來,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ":請先讓我們先寫下 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的公式" + }, + { + "latex": "$$\nf_y(x,y) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$", + "kind": "math" + }, + { + "text": "請再計算上面極限的結果:" + }, + { + "latex": "$\\boxed{x^2-3x}$", + "kind": "math" + } + ], + "content": "再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式$$\nf_y(x,y) = ?\n$$$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$請再計算上面極限的結果:$\\boxed{x^2-3x}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_y(1,4)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\boxed{-2}$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:$\\boxed{-2}$" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_00e2f8f9f7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "你可以發現,其實整個計算過程與第一題計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 完全一樣,只是將 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "先計算 $f_x(x,y)$:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_x(1,4)=?$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "再來,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ":請先讓我們先寫下 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的公式" + }, + { + "latex": "$$\nf_y(x,y) = ?\n$$", + "kind": "math_block" + } + ], + "content": "再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式$$\nf_y(x,y) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "newline": "true" + }, + { + "text": " 請再計算上面極限的結果: " + } + ], + "answers": [ + "x^2-3x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_y(1,4)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 偏導函數的計算法則", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 偏導函數的計算法則", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 ", + "newline": "false", + "runs": [ + { + "text": "在這一節中,我們要來談談偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的實際計算方法。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?", + "newline": "false", + "runs": [ + { + "text": "🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 ", + "newline": "false", + "runs": [ + { + "text": "是的!在前一節中,我們已經學會如何透過偏導數的定義來計算" + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。回想在單變數函數中,比如給定$$\nf(x) = x\\cdot \\sin(x),\n$$現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?相信不會的!我們會直接套用已知的微分運算法則(Differential Rules),例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。", + "newline": "false", + "runs": [ + { + "text": "📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。回想在單變數函數中,比如給定" + }, + { + "latex": "$$\nf(x) = x\\cdot \\sin(x),\n$$", + "kind": "math_block" + }, + { + "text": "現在的你,還會使用導數的定義來計算 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 嗎?相信不會的!我們會直接套用已知的" + }, + { + "text": "微分運算法則(Differential Rules)", + "style": "bold" + }, + { + "text": ",例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,來快速求得 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": "。 比如,這裡的 " + }, + { + "latex": "$f'(x)= \\sin(x) + x \\cdot \\cos(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 那麼,對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡答案是:可以的,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。", + "newline": "false", + "runs": [ + { + "text": "💡" + }, + { + "text": "答案是:可以的", + "style": "bold" + }, + { + "text": ",我們完全可以套用單變數微分技巧,來計算多變數函數的微分。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。", + "newline": "false", + "runs": [ + { + "text": "👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "例如,給定函數$$\nf(x,y) = x\\cdot \\sin(y),\n$$在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,我們將變數 $y$ 的值固定為 $b$,只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。", + "newline": "false", + "runs": [ + { + "text": "例如,給定函數" + }, + { + "latex": "$$\nf(x,y) = x\\cdot \\sin(y),\n$$", + "kind": "math_block" + }, + { + "text": "在計算函數對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 時,我們將變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的值固定為 " + }, + { + "latex": "$b$", + "kind": "math" + }, + { + "text": ",只對變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行變動(添加增量),去計算瞬間變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,計算 $f_x(a,b)$,等同於計算單變數函數$$\nf(x,b) = x\\cdot \\sin(b)\n$$在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,$$\nf_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到$$\nf_x(x,y) = \\sin(y)。\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,計算 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": ",等同於計算單變數函數" + }, + { + "latex": "$$\nf(x,b) = x\\cdot \\sin(b)\n$$", + "kind": "math_block" + }, + { + "text": "在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 處進行變動(添加增量),去計算瞬間變化率。因而," + }, + { + "latex": "$$\nf_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$", + "kind": "math_block" + }, + { + "text": "對於偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 也是一樣的道理,我們可以得到" + }, + { + "latex": "$$\nf_x(x,y) = \\sin(y)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:", + "newline": "false", + "runs": [ + { + "text": "💡 關鍵理解:雖然 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 是雙變數函數,但在計算偏導時,我們其實是:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 固定其他變數\n👉 對單一變數做單變數微分\n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。", + "newline": "true", + "runs": [ + { + "text": "👉 固定其他變數" + }, + { + "newline": "true" + }, + { + "text": "👉 對單一變數做單變數微分" + }, + { + "newline": "true" + }, + { + "text": "因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將這個重要的結論整理如下。", + "newline": "false", + "runs": [ + { + "text": "我們將這個重要的結論整理如下。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "雙變數函數偏微分計算法則", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,其偏導函數(partial derivative function),可依下列方式求得:$$\n\\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其" + }, + { + "text": "偏導函數(partial derivative function)", + "style": "bold" + }, + { + "text": ",可依下列方式求得:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_8b074752bb", + "label": "證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,考慮偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": "。我們定義單變數函數" + }, + { + "latex": "$$\ng(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n$$", + "kind": "math_block" + }, + { + "text": "那麼由偏導數的定義,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n$$", + "kind": "math_block" + }, + { + "text": "換成偏導數的寫法:" + }, + { + "latex": "$$\nf_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n$$", + "kind": "math_block" + }, + { + "text": "上述,最後一個只是換一個比較不會誤會的寫法(使用 " + }, + { + "latex": "$\\partial$", + "kind": "math" + }, + { + "text": " 符號)。" + } + ], + "content": "首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數$$\ng(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n$$那麼由偏導數的定義,我們有$$\n\\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n$$因此,$$\nf_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n$$換成偏導數的寫法:$$\nf_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n$$上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,考慮偏導數 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": "。我們定義單變數函數" + }, + { + "latex": "$$\nh(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n$$", + "kind": "math_block" + }, + { + "text": "那麼由偏導數的定義,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n$$", + "kind": "math_block" + }, + { + "text": "換成偏導數的寫法:" + }, + { + "latex": "$$\nf_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n$$", + "kind": "math_block" + } + ], + "content": "接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數$$\nh(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n$$那麼由偏導數的定義,我們有$$\n\\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n$$因此,$$\nf_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n$$換成偏導數的寫法:$$\nf_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 這裡我們引入新的符號:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 這裡我們引入新的符號:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\frac{\\partial }{\\partial x} f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " ", + "style": "bold" + }, + { + "text": ",唸作 「partial " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ", partial " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "」,代表只對變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "$\\frac{\\partial }{\\partial x} f(x,y)$ ,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\frac{\\partial }{\\partial y} f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " ", + "style": "bold" + }, + { + "text": ",唸作 「partial " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": ", partial " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "」,表示只對變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "$\\frac{\\partial }{\\partial y} f(x,y)$ ,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 常數(constant)是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " " + }, + { + "text": "常數(constant)", + "style": "bold" + }, + { + "text": "是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$-1$", + "kind": "math" + }, + { + "text": " 等。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 3. 在偏導中:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": " 在偏導中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": " 時,可把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 想成常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "計算 $f_x$ 時,可把 $y$ 想成常數 $c$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_y$", + "kind": "math" + }, + { + "text": " 時,可把 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 想成常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "計算 $f_y$ 時,可把 $x$ 想成常數 $c$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面我們先練習一個,單變數函數但帶有常數(constant)的微分。以更好的理解上述描述的「微分時,視 $y$ 為常數」或「微分時,視 $x$ 為常數」的意義。", + "newline": "false", + "runs": [ + { + "text": "下面我們先練習一個,單變數函數但帶有" + }, + { + "text": "常數(constant)", + "style": "bold" + }, + { + "text": "的微分。以更好的理解上述描述的「" + }, + { + "text": "微分時,視 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為常數", + "style": "bold" + }, + { + "text": "」或「" + }, + { + "text": "微分時,視 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為常數", + "style": "bold" + }, + { + "text": "」的意義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "請計算下面單變數函數 $$\nf(x) = x^2\\cdot c - 3x \\cdot c\n$$的導函數 $f'(x)$,其中 $c$ 為一個常數。", + "newline": "false", + "runs": [ + { + "text": "請計算下面單變數函數 " + }, + { + "latex": "$$\nf(x) = x^2\\cdot c - 3x \\cdot c\n$$", + "kind": "math_block" + }, + { + "text": "的導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為一個常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_aeb4e06437", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。因此,$f'(x)=?$:$2xc-3c$", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 是個常數(constant),你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 等。因此," + }, + { + "latex": "$f'(x)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$2xc-3c$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0a7a908e86", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "由於 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 是個常數(constant),你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 等。因此," + }, + { + "latex": "$f'(x)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$2x-3c$;" + }, + { + "key": "b", + "text": "$2xc-3c$;" + }, + { + "key": "c", + "text": "$x^2c-3$;" + }, + { + "key": "d", + "text": "$2c-3x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "請計算下面雙變數函數$$\nf(x,y) = x^2y - 3xy\n$$的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "請計算下面雙變數函數" + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + }, + { + "text": "的偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cc73c35092", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待(如同,上題的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 角色)。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant)看待(如同,上題的常數 $c$ 角色)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "latex": "$2xy-3y$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$$2xy-3y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant)看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$x^2-3x$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$:$x^2-3x$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7485aa792f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待(如同,上題的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 角色)。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant)看待(如同,上題的常數 $c$ 角色)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$2x-3y$;" + }, + { + "key": "b", + "text": "$2xy-3y$;" + }, + { + "key": "c", + "text": "$x^2y-3$;" + }, + { + "key": "d", + "text": "$2y-3x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant)看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "因此,$f_y(x,y)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$2xy-3y$;" + }, + { + "key": "b", + "text": "$x^2-3x$;" + }, + { + "key": "c", + "text": "$2y-3x$;" + }, + { + "key": "d", + "text": "$x^2y-3$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "請計算下面單變數函數 $$\nf(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。", + "newline": "false", + "runs": [ + { + "text": "請計算下面單變數函數 " + }, + { + "latex": "$$\nf(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$", + "kind": "math_block" + }, + { + "text": "的導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為一個常數(constant)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_024bb25dd8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用鏈鎖律(Chain Rule):$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 外層是 " + }, + { + "latex": "$\\sin(\\cdot)$", + "kind": "math" + }, + { + "text": ", 內層是 " + }, + { + "latex": "$x^2\\cdot c - 3x \\cdot c$", + "kind": "math" + }, + { + "text": "。因此,外層微分後變成 " + }, + { + "latex": "$\\cos(\\cdot)$", + "kind": "math" + }, + { + "text": ",並乘上內層的導數:" + }, + { + "latex": "$$\nf'(x) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$", + "kind": "math" + } + ], + "content": "函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:$$\nf'(x) = ?\n$$$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d07002c1b7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用鏈鎖律(Chain Rule):$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 外層是 " + }, + { + "latex": "$\\sin(\\cdot)$", + "kind": "math" + }, + { + "text": ", 內層是 " + }, + { + "latex": "$x^2\\cdot c - 3x \\cdot c$", + "kind": "math" + }, + { + "text": "。因此,外層微分後變成 " + }, + { + "latex": "$\\cos(\\cdot)$", + "kind": "math" + }, + { + "text": ",並乘上內層的導數:" + }, + { + "latex": "$$\nf'(x) = ?\n$$", + "kind": "math_block" + } + ], + "content": "函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:$$\nf'(x) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 c - 3xc )$;" + }, + { + "key": "b", + "text": "$2xc-3c$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意. 對於「合成函數」的微分,要養習慣:先找到內層(inner function)和外層(outer function),這樣微分時比較不容易混淆。", + "newline": "false", + "runs": [ + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 對於「合成函數」的微分,要養習慣:" + }, + { + "text": "先找到內層(inner function)和外層(outer function)", + "style": "bold" + }, + { + "text": ",這樣微分時比較不容易混淆。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "請計算下面雙變數函數$$\nf(x,y) = \\sin( x^2y - 3xy )\n$$的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "請計算下面雙變數函數" + }, + { + "latex": "$$\nf(x,y) = \\sin( x^2y - 3xy )\n$$", + "kind": "math_block" + }, + { + "text": "的偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_105053830e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "此外,這樣的「單變數函數(只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ")」是一個典型的合成函數,因此計算導函數時需要使用「" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": "」。" + } + ], + "content": "此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「鏈鎖律(Chain Rule)」。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$:$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "latex": "$x^2-3x$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$$x^2-3x$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c0bb924bac", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "此外,這樣的「單變數函數(只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ")」是一個典型的合成函數,因此計算導函數時需要使用「" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": "」。" + } + ], + "content": "此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「鏈鎖律(Chain Rule)」。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "因此,$f_x(x,y)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 y - 3xy )$;" + }, + { + "key": "b", + "text": "$2xy-3y$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 y - 3xy )$;" + }, + { + "key": "b", + "text": "$x^2-3x$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 偏導數的不同標示", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 偏導數的不同標示", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是同一個數學概念。", + "newline": "false", + "runs": [ + { + "text": "📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是" + }, + { + "text": "同一個數學概念", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "偏導數的不同符號", + "body": [ + { + "type": "paragraph", + "content": "給定 $z= f(x,y)$,則偏導數可用下面一些不同符號表示:$$\n\\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "給定 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": ",則偏導數可用下面一些不同" + }, + { + "text": "符號", + "style": "bold" + }, + { + "text": "表示:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 符號 $D$ 可以想成:Derivative 或 Differentiation。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 符號 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 可以想成:Derivative 或 Differentiation。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 建議初學者先習慣使用 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\frac{\\partial f}{\\partial x}$", + "kind": "math" + }, + { + "text": ",之後再慢慢熟悉 " + }, + { + "latex": "$D_x f$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣ 偏導數與線性估計", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 偏導數與線性估計", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的瞬間變化率。因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的變化量可估計為$$\nf(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$", + "newline": "false", + "runs": [ + { + "text": "💡 對於單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 描述的是函數在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": "。因此,如果 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 附近發生一個不大的增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ",則函數的" + }, + { + "text": "變化量", + "style": "bold" + }, + { + "text": "可估計為" + }, + { + "latex": "$$\nf(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 這稱為 線性估計(linear approximation),因為變化量與增量呈現 一階線性關係。", + "newline": "false", + "runs": [ + { + "text": "📌 這稱為 " + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "text": ",因為變化量與增量呈現 " + }, + { + "text": "一階線性關係", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對於雙變數函數 $f(x,y)$,", + "newline": "false", + "runs": [ + { + "text": "對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "由於偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": ",考慮的是,在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 變數變化下(固定 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": ")的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": ";" + } + ], + "content": "由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的瞬間變化率;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "由於偏導數 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": ",考慮的是,在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 變數變化下(固定 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": ")的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": ";" + } + ], + "content": "由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的瞬間變化率;" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,我們有以下函數的變化量估計:$$\n\\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$📌 這也是線性估計(linear approximation),只是限制在「單一變數變動下」的線性近似。", + "newline": "false", + "runs": [ + { + "text": "因此,我們有以下函數的" + }, + { + "text": "變化量", + "style": "bold" + }, + { + "text": "估計:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "📌 這也是" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "text": ",只是限制在「單一變數變動下」的線性近似。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "變化量的線性估計", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在,則我們有以下的變化量" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "latex": "$$\nf(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_x(a,b)$ 存在,則我們有以下的變化量線性估計(linear approximation)$$\nf(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,則我們有以下的變化量" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "latex": "$$\nf(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_y(a,b)$ 存在,則我們有以下的變化量線性估計(linear approximation)$$\nf(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮$$\nf(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!", + "newline": "false", + "runs": [ + { + "text": "👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮" + }, + { + "latex": "$$\nf(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$", + "kind": "math_block" + }, + { + "text": "也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 這個「近似 $\\approx$」到底有多近呢?", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 這個「近似 " + }, + { + "latex": "$\\approx$", + "kind": "math" + }, + { + "text": "」到底有多近呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的進階內容繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。", + "newline": "false", + "runs": [ + { + "text": "下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的" + }, + { + "text": "進階內容", + "style": "bold" + }, + { + "text": "繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_03701398c3", + "label": "進階內容", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "變化量的線性估計(進階版)", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在,定義" + }, + { + "latex": "$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n$$", + "kind": "math_block" + }, + { + "text": "則其滿足" + }, + { + "latex": "$$\n\\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n$$", + "kind": "math_block" + }, + { + "text": "因此,當 " + }, + { + "latex": "$\\Delta x \\approx 0$", + "kind": "math" + }, + { + "text": " 時,我們會有 " + }, + { + "latex": "$e_1(\\Delta x) \\approx 0$", + "kind": "math" + }, + { + "text": "。等價的," + }, + { + "latex": "$$\n\\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_x(a,b)$ 存在,定義$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n$$則其滿足$$\n\\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n$$因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,$$\n\\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,定義" + }, + { + "latex": "$$\ne_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n$$", + "kind": "math_block" + }, + { + "text": "則其滿足" + }, + { + "latex": "$$\n\\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n$$", + "kind": "math_block" + }, + { + "text": "因此,當 " + }, + { + "latex": "$\\Delta y \\approx 0$", + "kind": "math" + }, + { + "text": " 時,我們會有 " + }, + { + "latex": "$e_2(\\Delta y) \\approx 0$", + "kind": "math" + }, + { + "text": "。等價的," + }, + { + "latex": "$$\n\\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_y(a,b)$ 存在,定義$$\ne_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n$$則其滿足$$\n\\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n$$因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,$$\n\\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "證明:", + "newline": "false", + "runs": [ + { + "text": "證明:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在。由於" + }, + { + "latex": "$$\nf_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n$$", + "kind": "math_block" + }, + { + "text": "通分後," + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n$$", + "kind": "math_block" + }, + { + "text": "由 " + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 的定義,我們有" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n$$", + "kind": "math_block" + }, + { + "text": "是以," + }, + { + "latex": "$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$", + "kind": "math" + }, + { + "text": "。因而,當 " + }, + { + "latex": "$\\Delta x \\approx 0$", + "kind": "math" + }, + { + "text": ",我們會有" + }, + { + "latex": "$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n$$", + "kind": "math_block" + } + ], + "content": "假設 $f_x(a,b)$ 存在。由於$$\nf_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n$$因此,$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n$$通分後,$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n$$由 $e_1(\\Delta x)$ 的定義,我們有$$\n\\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n$$是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對於定理另一個敘述,同理可證。" + } + ], + "content": "對於定理另一個敘述,同理可證。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 由定義$$\n\\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 由定義" + }, + { + "latex": "$$\n\\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 是在衡量「線性估計變化量」與「實際變化量」的差異。因此," + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 越小表示「線性估計變化量」量與「實際變化量」越接近。同理," + }, + { + "latex": "$e_2(\\Delta y)$", + "kind": "math" + }, + { + "text": " 也是可以這般解釋。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 定理結果的$$\n\\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 定理結果的" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$", + "kind": "math_block" + }, + { + "text": "不僅表示 " + }, + { + "latex": "$\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$", + "kind": "math" + }, + { + "text": ",更代表當 " + }, + { + "latex": "$\\Delta x\\to0$", + "kind": "math" + }, + { + "text": " 時,誤差 " + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 相較於 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 是可以忽略的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "人體質量指數(Body Mass Index, BMI)的定義方式為$$\nB(h,w)=\\frac{w}{h^2},\n$$其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。", + "newline": "false", + "runs": [ + { + "text": "人體質量指數(Body Mass Index, BMI)的定義方式為" + }, + { + "latex": "$$\nB(h,w)=\\frac{w}{h^2},\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 代表體重(公斤)、" + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 代表身高(公尺)。如果小明同學的身高、體重分別是 " + }, + { + "latex": "$170$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$65$", + "kind": "math" + }, + { + "text": " 公斤(也就是 " + }, + { + "latex": "$h=1.70$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請問小明目前的 BMI 指數為?" + } + ], + "content": "請問小明目前的 BMI 指數為?" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算偏導數 " + }, + { + "latex": "$B_w(1.70,65)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$B_h(1.70,65)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "如果小明的身高分別增加了 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分,試問他 BMI " + }, + { + "text": "實際的", + "style": "bold" + }, + { + "text": "變化量分別會是多少?" + } + ], + "content": "如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI 實際的變化量分別會是多少?" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "如果小明的身高分別增加了 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分,試問利用" + }, + { + "text": "線性估計法", + "style": "bold" + }, + { + "text": ",他的 BMI 變化量分別會是多少?" + } + ], + "content": "如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用線性估計法,他的 BMI 變化量分別會是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_123583ed99", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "小明目前的 BMI 為" + }, + { + "latex": "$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$", + "kind": "math_block" + } + ], + "content": "小明目前的 BMI 為$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先求偏導函數:" + }, + { + "latex": "$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$", + "kind": "math_block" + }, + { + "text": "代入 " + }, + { + "latex": "$(h,w)=(1.70,65)$", + "kind": "math" + }, + { + "text": ",得到偏導數" + }, + { + "latex": "$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求偏導函數:$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$代入 $(h,w)=(1.70,65)$,得到偏導數$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "實際 BMI 變化量", + "style": "bold" + }, + { + "text": "(體重固定 " + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ",只改變身高)" + } + ], + "content": "實際 BMI 變化量(體重固定 $w=65$,只改變身高)" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.71$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $1$ 公分(變成 $1.71$ 公尺):$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.72$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分(變成 $1.72$ 公尺):$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "線性估計 BMI 變化量", + "style": "bold" + }, + { + "text": ":由於現在想了解" + }, + { + "text": "身高發生變化、體重固定", + "style": "bold" + }, + { + "text": "對 BMI " + }, + { + "latex": "$B(h,w)$", + "kind": "math" + }, + { + "text": " 造成的影響,因此應使用線性估計公式會是?" + }, + { + "latex": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$", + "kind": "math" + } + ], + "content": "線性估計 BMI 變化量:由於現在想了解身高發生變化、體重固定對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 因此,", + "newline": "false", + "runs": [ + { + "text": " 因此," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "當身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$", + "kind": "math_block" + } + ], + "content": "當身高增加 $1$ 公分:$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分:$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ], + "content": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ] + } + ], + "ai_prompt_md": "### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_06b45d0846", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "小明目前的 BMI 為" + }, + { + "latex": "$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$", + "kind": "math_block" + } + ], + "content": "小明目前的 BMI 為$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先求偏導函數:" + }, + { + "latex": "$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$", + "kind": "math_block" + }, + { + "text": "代入 " + }, + { + "latex": "$(h,w)=(1.70,65)$", + "kind": "math" + }, + { + "text": ",得到偏導數" + }, + { + "latex": "$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求偏導函數:$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$代入 $(h,w)=(1.70,65)$,得到偏導數$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "實際 BMI 變化量", + "style": "bold" + }, + { + "text": "(體重固定 " + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ",只改變身高)" + } + ], + "content": "實際 BMI 變化量(體重固定 $w=65$,只改變身高)" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.71$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $1$ 公分(變成 $1.71$ 公尺):$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.72$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分(變成 $1.72$ 公尺):$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "線性估計 BMI 變化量", + "style": "bold" + }, + { + "text": ":由於現在想了解" + }, + { + "text": "身高發生變化、體重固定", + "style": "bold" + }, + { + "text": "對 BMI " + }, + { + "latex": "$B(h,w)$", + "kind": "math" + }, + { + "text": " 造成的影響,因此應使用線性估計公式會是?" + } + ], + "content": "線性估計 BMI 變化量:由於現在想了解身高發生變化、體重固定對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$" + }, + { + "key": "b", + "text": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$" + }, + { + "key": "c", + "text": "$B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$" + }, + { + "key": "d", + "text": "$B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": " 因此,", + "newline": "false", + "runs": [ + { + "text": " 因此," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "當身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$", + "kind": "math_block" + } + ], + "content": "當身高增加 $1$ 公分:$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分:$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ], + "content": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "7️⃣ 隱函數偏微分", + "newline": "true", + "runs": [ + { + "text": "7️⃣ 隱函數偏微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "🤔 在單變數函數中,我們談過隱函數微分(implicit differentiation)。還記得這是什麼樣的問題嗎?", + "newline": "false", + "runs": [ + { + "text": "🤔 在單變數函數中,我們談過" + }, + { + "text": "隱函數微分(implicit differentiation)", + "style": "bold" + }, + { + "text": "。還記得這是什麼樣的問題嗎?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧便稱為隱函數微分(implicit differentiation)。", + "newline": "false", + "runs": [ + { + "text": "💡 在大多數的微分問題,考慮的是某個函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 的微分,也就是給定 " + }, + { + "latex": "$y= f(x)$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{d y}{d x}$", + "kind": "math" + }, + { + "text": "。在這種情況下," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 只是滿足某一條方程式,比如 " + }, + { + "latex": "$x^2+y^2 =25$", + "kind": "math" + }, + { + "text": ",那我們該如何求 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": "?像這樣," + }, + { + "text": "微分的對象 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 沒有明確的公式,而是隱藏在一條方程式中", + "style": "bold" + }, + { + "text": ",解決這類問題的微分技巧便稱為" + }, + { + "text": "隱函數微分(implicit differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "讓我們透過下面的例子,來喚醒記憶。", + "newline": "false", + "runs": [ + { + "text": "讓我們透過下面的例子,來喚醒記憶。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 = 25。\n$$請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 = 25。\n$$", + "kind": "math_block" + }, + { + "text": "請計算導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 與其在 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e3d5a3d6e8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第一個方法:暴力破解", + "newline": "false", + "runs": [ + { + "text": "第一個方法:暴力破解", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 解出:" + }, + { + "latex": "$$\n\\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n$$", + "kind": "math_block" + } + ], + "content": "先將 $y$ 解出:$$\n\\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於考慮的點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": " 滿足" + }, + { + "latex": "$$\ny= +\\sqrt{25-x^2}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們考慮函數" + }, + { + "latex": "$$\ny = f(x) = + \\sqrt{25-x^2}。\n$$", + "kind": "math_block" + }, + { + "text": "因而," + }, + { + "latex": "$$\n\\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "由於考慮的點 $(x,y)=(3,4)$ 滿足$$\ny= +\\sqrt{25-x^2}。\n$$因此,我們考慮函數$$\ny = f(x) = + \\sqrt{25-x^2}。\n$$因而,$$\n\\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "對上述函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": ",進行微分,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "對上述函數 $f(x)$,即 $y$,進行微分,我們有$$\n\\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此, 在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的缺點是,第一步要解出 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的公式,有時候未必是容易的。" + } + ], + "content": "備註:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法:隱函數微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法:隱函數微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們暫時把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 想成由 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 決定的函數 " + }, + { + "latex": "$y=f(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是某個函數。(當然,此處 " + }, + { + "latex": "$f(x) = + \\sqrt{25-x^2}$", + "kind": "math" + }, + { + "text": "。)" + } + ], + "content": "我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 代入題目方程式 " + }, + { + "latex": "$x^2 + y^2 = 25$", + "kind": "math" + }, + { + "text": " 中,我們會得到" + }, + { + "latex": "$$\nx^2 + (f(x))^2 = 25\n$$", + "kind": "math_block" + } + ], + "content": "將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到$$\nx^2 + (f(x))^2 = 25\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行微分", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行微分$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的優點是,不需要解出 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的公式(這通常是個大問題)!" + } + ], + "content": "備註:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數微分 ", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數微分", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 = 25$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行微分", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行微分:$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + } + ] + } + ], + "ai_prompt_md": "### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為隱函數偏微分(implicit partial differentiation)。", + "newline": "false", + "runs": [ + { + "text": "👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏微分,也就是給定 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": "。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 只是滿足某一條方程式,比如 " + }, + { + "latex": "$x^2+y^2+z^2 =25$", + "kind": "math" + }, + { + "text": ",那我們該如何求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": "?像這樣,微分的對象 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為" + }, + { + "text": "隱函數偏微分(implicit partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!", + "newline": "false", + "runs": [ + { + "text": "💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們就用下面例題,來說明多變數函數的隱函數偏微分是怎麼操作的!", + "newline": "false", + "runs": [ + { + "text": "我們就用下面例題,來說明" + }, + { + "text": "多變數函數的隱函數偏微分", + "style": "bold" + }, + { + "text": "是怎麼操作的!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-10" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$", + "kind": "math_block" + }, + { + "text": "請計算偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_985f464376", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第一個方法:暴力破解", + "newline": "false", + "runs": [ + { + "text": "第一個方法:暴力破解", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 解出:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先將 $z$ 解出:$$\n\\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於考慮的點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 滿足" + }, + { + "latex": "$$\nz = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們考慮函數" + }, + { + "latex": "$$\nz= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$", + "kind": "math_block" + }, + { + "text": "因而," + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n$$", + "kind": "math_block" + } + ], + "content": "由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足$$\nz = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$因此,我們考慮函數$$\nz= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$因而,$$\n\\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "對上述函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": ",進行微分,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "對上述函數 $f(x,y)$,即 $z$,進行微分,我們有$$\n\\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": ",偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = -1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的缺點是,第一步要解出 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式,有時候未必是容易的。此外,就算 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。" + } + ], + "content": "備註:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法:隱函數微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法:隱函數微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們暫時把 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成由 " + }, + { + "latex": "$x,y$", + "kind": "math" + }, + { + "text": " 決定的函數 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是某個函數。" + } + ], + "content": "我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 代入題目方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 中,會有" + }, + { + "latex": "$$\n\\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4\n$$", + "kind": "math_block" + } + ], + "content": "將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有$$\n\\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "直接對方程式的兩邊,對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": ")" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式的兩邊,對 $x$ 進行偏微分(記得,對 $x$ 偏微時,我們將 $y$ 視為常數)$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,將得到" + }, + { + "latex": "$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$", + "kind": "math_block" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的優點是,不需要解出 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式(這通常是個大問題)!" + } + ], + "content": "備註:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行偏微分(記得,對 $x$ 偏微時,我們將 $y$ 視為常數):$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,將得到" + }, + { + "latex": "$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$", + "kind": "math_block" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":習慣後,這樣的算法,遠比上面兩個方法快很多!" + } + ], + "content": "備註:習慣後,這樣的算法,遠比上面兩個方法快很多!" + } + ] + } + ], + "ai_prompt_md": "### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-11" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$", + "kind": "math_block" + }, + { + "text": "請計算偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_73fe61def9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "結果應該是?" + }, + { + "latex": "$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$", + "kind": "math" + } + ], + "content": "直接對方程式兩邊對 $y$ 進行偏微分(記得,對 $y$ 偏微時,我們將 $x$ 視為常數):$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$結果應該是?$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 繼續推導,上面答案中的方程式將變成?$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$", + "newline": "false", + "runs": [ + { + "text": " 繼續推導,上面答案中的方程式將變成?" + }, + { + "latex": "$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,請計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\boxed{-1}$", + "kind": "math" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:$\\boxed{-1}$" + } + ] + } + ], + "ai_prompt_md": "### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_fe8a3a7b42", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "結果應該是?" + } + ], + "content": "直接對方程式兩邊對 $y$ 進行偏微分(記得,對 $y$ 偏微時,我們將 $x$ 視為常數):$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$結果應該是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$0 + 2y + 2z + xy =0$;" + }, + { + "key": "b", + "text": "$0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;" + }, + { + "key": "c", + "text": "$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$;" + }, + { + "key": "d", + "text": "$2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 繼續推導,上面答案中的方程式將變成? " + } + ], + "options": [ + { + "key": "a", + "text": "$2y + z + xy = 0$;" + }, + { + "key": "b", + "text": "$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$;" + }, + { + "key": "c", + "text": "$2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$;" + }, + { + "key": "d", + "text": "$2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,請計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "我們將上面的作法,紀錄在下面的小技巧中:", + "newline": "false", + "runs": [ + { + "text": "我們將上面的作法,紀錄在下面的小技巧中:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "小技巧", + "headline": "隱函數偏微分的操作流程", + "body": [ + { + "type": "paragraph", + "content": "考慮一個方程式同時包含 $x,y,z$,", + "newline": "false", + "runs": [ + { + "text": "考慮一個" + }, + { + "text": "方程式", + "style": "bold" + }, + { + "text": "同時包含 " + }, + { + "latex": "$x,y,z$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 時" + } + ], + "content": "要求 $\\dfrac{\\partial z}{\\partial x}$ 時" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + } + ], + "content": "將 $z$ 想成 $z=f(x,y)$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "對整個方程式兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 做偏微分" + } + ], + "content": "對整個方程式兩邊對 $x$ 做偏微分" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "記得:(i) " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數; (ii) " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 要當作函數,必須使用鏈鎖律。" + } + ], + "content": "記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": " 時" + } + ], + "content": "要求 $\\dfrac{\\partial z}{\\partial y}$ 時" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + } + ], + "content": "將 $z$ 想成 $z=f(x,y)$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "對整個方程式兩邊對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 做偏微分" + } + ], + "content": "對整個方程式兩邊對 $y$ 做偏微分" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "記得:(i) " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數; (ii) " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 要當作函數,必須使用鏈鎖律。" + } + ], + "content": "記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」", + "newline": "false", + "runs": [ + { + "text": "⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 用鏈鎖律」" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "8️⃣ 高階偏導數", + "newline": "true", + "runs": [ + { + "text": "8️⃣ 高階偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的二階偏導函數(second partial derivatives)。", + "newline": "false", + "runs": [ + { + "text": "給定一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",我們可以計算它的一階偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 " + }, + { + "latex": "$(f_x)_x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_x)_y$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_y)_x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_y)_y$", + "kind": "math" + }, + { + "text": "。而這幾個函數,便稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "二階偏導函數(second partial derivatives)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 直觀理解:", + "newline": "false", + "runs": [ + { + "text": "💡 " + }, + { + "text": "直觀理解:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": ":沿著 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向的「斜率」,其變化率。" + } + ], + "content": "$f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}$", + "kind": "math" + }, + { + "text": ":沿著 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的「斜率」,其變化率。" + } + ], + "content": "$f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "二階偏導數的不同符號", + "body": [ + { + "type": "paragraph", + "content": "給定 $z=f(x,y)$,則二階偏導數(second partial derivative)可用下面一些不同符號表示:$$\n\\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。", + "newline": "false", + "runs": [ + { + "text": "給定 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": ",則" + }, + { + "text": "二階偏導數(second partial derivative)", + "style": "bold" + }, + { + "text": "可用下面一些不同" + }, + { + "text": "符號", + "style": "bold" + }, + { + "text": "表示:" + }, + { + "latex": "$$\n\\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "有時候,我們也會將上面等式中的 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 省略,以簡化表示,如 " + }, + { + "latex": "$f_{xx}(x,y)$", + "kind": "math" + }, + { + "text": " 簡寫成 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": "、如 " + }, + { + "latex": "$\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$", + "kind": "math" + }, + { + "text": " 簡寫成 " + }, + { + "latex": "$\\dfrac{\\partial^2 f}{\\partial x^2}$", + "kind": "math" + }, + { + "text": " 等。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數,記作" + }, + { + "latex": "$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$", + "kind": "math_block" + }, + { + "text": "右式分母最右邊的 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 代表「先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微分」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 12", + "newline": "true", + "runs": [ + { + "text": "Example 12", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 12, + "ai_prompt_md": "### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-12" + }, + { + "type": "paragraph", + "content": "考慮雙變數函數$$\nf(x,y) = x^2 y -3 x y。\n$$請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數" + }, + { + "latex": "$$\nf(x,y) = x^2 y -3 x y。\n$$", + "kind": "math_block" + }, + { + "text": "請計算函數所有的二階偏導數 " + }, + { + "latex": "$f_{xx}, f_{xy}, f_{yx}, f_{yy}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ec47ed314b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先求一階偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x, f_y$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 由上面範例,我們已經求得" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求一階偏導數 $f_x, f_y$: 由上面範例,我們已經求得$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由一階偏導數繼續對 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 偏微分,便能求所有二階偏導數:", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "請上述計算後的結果:" + } + ], + "content": "由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$請上述計算後的結果:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2y}$", + "kind": "math" + } + ], + "content": "$f_{xx}(x,y) = ?$$\\boxed{2y}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xy}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2x-3}$", + "kind": "math" + } + ], + "content": "$f_{xy}(x,y) = ?$$\\boxed{2x-3}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yx}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2x-3}$", + "kind": "math" + } + ], + "content": "$f_{yx}(x,y) = ?$$\\boxed{2x-3}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{0}$", + "kind": "math" + } + ], + "content": "$f_{yy}(x,y) = ?$$\\boxed{0}$" + } + ] + } + ], + "ai_prompt_md": "### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_68dd867971", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先求一階偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x, f_y$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 由上面範例,我們已經求得" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求一階偏導數 $f_x, f_y$: 由上面範例,我們已經求得$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由一階偏導數繼續對 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 偏微分,便能求所有二階偏導數:", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "請上述計算後的結果:" + } + ], + "content": "由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$請上述計算後的結果:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{xx}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xy}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{xy}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yx}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{yx}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{yy}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "在上面的範例,我們可以觀察到$$\nf_{xy}(x,y)=f_{yx}(x,y)。\n$$也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。", + "newline": "false", + "runs": [ + { + "text": "在上面的範例,我們可以觀察到" + }, + { + "latex": "$$\nf_{xy}(x,y)=f_{yx}(x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "也就是:函數先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微,與先對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微,結果是一樣的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這其實不是偶然的,對於大部分函數,都有這樣的性質:「二階偏微分的結果與偏微分的順序無關」。我們將這樣的結果紀錄在下面的定理中。", + "newline": "false", + "runs": [ + { + "text": "這其實不是偶然的,對於大部分函數,都有這樣的性質:「" + }, + { + "text": "二階偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。我們將這樣的結果紀錄在下面的定理中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理(Clairaut 定理)", + "headline": "偏微分的結果與偏微分的順序無關", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則$$\nf_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若在某個區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 內," + }, + { + "latex": "$f_{xy}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{yx}$", + "kind": "math" + }, + { + "text": " 都存在且連續,則" + }, + { + "latex": "$$\nf_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "除了二階偏導數,其實我們也可以定義更高階的偏導數,比如三階偏導數、四階偏導數,其定義方式也都如同二階偏導數一般。比方,我們定義$$\nf_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$注意. 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。", + "newline": "false", + "runs": [ + { + "text": "除了二階偏導數,其實我們也可以定義更高階的偏導數,比如" + }, + { + "text": "三階偏導數、四階偏導數", + "style": "bold" + }, + { + "text": ",其定義方式也都如同二階偏導數一般。比方,我們定義" + }, + { + "latex": "$$\nf_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 請注意偏微分在書寫上的順序。比如,上例 " + }, + { + "latex": "$f_{xyy}$", + "kind": "math" + }, + { + "text": " 偏微分順序是 " + }, + { + "latex": "$x \\to y \\to y$", + "kind": "math" + }, + { + "text": "。而 " + }, + { + "latex": "$\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$", + "kind": "math" + }, + { + "text": " 偏微分順序是 " + }, + { + "latex": "$x\\to y \\to y$", + "kind": "math" + }, + { + "text": " 。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「對於大部分函數,偏微分的結果與偏微分的順序無關」。比如,$$\nf_{xyy} = f_{yxy} = f_{yyx},\n$$如果它們存在且連續。", + "newline": "false", + "runs": [ + { + "text": "同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「" + }, + { + "text": "對於大部分函數,偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。比如," + }, + { + "latex": "$$\nf_{xyy} = f_{yxy} = f_{yyx},\n$$", + "kind": "math_block" + }, + { + "text": "如果它們存在且連續。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 請注意偏微分在書寫上的順序。例如 " + }, + { + "latex": "$f_{xyy}$", + "kind": "math" + }, + { + "text": " 的偏微分順序是 " + }, + { + "latex": "$x\\to y\\to y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 13", + "newline": "true", + "runs": [ + { + "text": "Example 13", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 13, + "ai_prompt_md": "### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-13" + }, + { + "type": "paragraph", + "content": "考慮雙變數函數$$\nf(x,y) = \\sin (x^2 y -3 x y)。\n$$請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數" + }, + { + "latex": "$$\nf(x,y) = \\sin (x^2 y -3 x y)。\n$$", + "kind": "math_block" + }, + { + "text": "請計算 " + }, + { + "latex": "$f_{xxy}(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_4cdf51175b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先確認微分順序:" + }, + { + "latex": "$f_{xxy}$", + "kind": "math" + }, + { + "text": " 表示先對哪個變數偏微分?" + }, + { + "latex": "$x\\to x \\to y$", + "kind": "math" + } + ], + "content": "先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?$x\\to x \\to y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們先計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "我們先計算 $f_x$:$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再來,我們計算 " + }, + { + "latex": "$f_{xx}= (f_x)_x$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "再來,我們計算 $f_{xx}= (f_x)_x$:$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "最後,我們計算 " + }, + { + "latex": "$f_{xxy}= (f_{xx})_y$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "最後,我們計算 $f_{xxy}= (f_{xx})_y$:$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "對於 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": ",我們還需要重新計算一次嗎?" + }, + { + "text": "不需要," + }, + { + "latex": "$f_{xxy}(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": " 微分順序是不一樣的" + } + ], + "content": "對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " ⭐ 提醒:由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "newline": "false", + "runs": [ + { + "text": " ⭐ " + }, + { + "text": "提醒", + "style": "bold" + }, + { + "text": ":" + }, + { + "text": "由於 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "style": "bold" + } + ] + } + ], + "ai_prompt_md": "### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dce8a972c0", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先確認微分順序:" + }, + { + "latex": "$f_{xxy}$", + "kind": "math" + }, + { + "text": " 表示先對哪個變數偏微分?" + } + ], + "content": "先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$x\\to x \\to y$;" + }, + { + "key": "b", + "text": "$y\\to x \\to x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們先計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "我們先計算 $f_x$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_x(x,y) = \\cos(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再來,我們計算 " + }, + { + "latex": "$f_{xx}= (f_x)_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "再來,我們計算 $f_{xx}= (f_x)_x$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "最後,我們計算 " + }, + { + "latex": "$f_{xxy}= (f_{xx})_y$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "最後,我們計算 $f_{xxy}= (f_{xx})_y$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "對於 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": ",我們還需要重新計算一次嗎?" + } + ], + "content": "對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的;" + }, + { + "key": "b", + "text": "需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;" + }, + { + "key": "c", + "text": "不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;" + }, + { + "key": "d", + "text": "不確定。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": " ⭐ 提醒:由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "newline": "false", + "runs": [ + { + "text": " ⭐ " + }, + { + "text": "提醒", + "style": "bold" + }, + { + "text": ":" + }, + { + "text": "由於 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "9️⃣ 三或更多變數函數的偏導數", + "newline": "true", + "runs": [ + { + "text": "9️⃣ 三或更多變數函數的偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "9" + }, + { + "type": "paragraph", + "content": "上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,", + "newline": "false", + "runs": [ + { + "text": "上面我們介紹了雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的偏導數為$$\n\\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。", + "newline": "false", + "runs": [ + { + "text": "📌 對三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們定義其在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導數", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 同樣的,我們也可以定義偏導函數 $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。", + "newline": "false", + "runs": [ + { + "text": "📌 同樣的,我們也可以定義" + }, + { + "text": "偏導函數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_x(x,y,z)$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_y(x,y,z)$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_z(x,y,z)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 而雙變數偏微分的計算法則,套用在多變數函數中也是成立的。即:執行偏微分時,對某一變數偏微分時,其餘變數皆視為常數。符號上,亦寫作$$\n\\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "📌 而雙變數" + }, + { + "text": "偏微分的計算法則", + "style": "bold" + }, + { + "text": ",套用在多變數函數中也是成立的。即:執行偏微分時," + }, + { + "text": "對某一變數偏微分時,其餘變數皆視為常數", + "style": "bold" + }, + { + "text": "。符號上,亦寫作" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 此外,「隱函數偏微分」、「高階偏導數」等主題,也都可以自然推廣到三變數與多變數函數中。", + "newline": "false", + "runs": [ + { + "text": "📌 此外,「" + }, + { + "text": "隱函數偏微分", + "style": "bold" + }, + { + "text": "」、「" + }, + { + "text": "高階偏導數", + "style": "bold" + }, + { + "text": "」等主題,也都可以自然推廣到三變數與多變數函數中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關」。", + "newline": "false", + "runs": [ + { + "text": "📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「" + }, + { + "text": "若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 14", + "newline": "true", + "runs": [ + { + "text": "Example 14", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 14, + "ai_prompt_md": "### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-14" + }, + { + "type": "paragraph", + "content": "考慮三變數函數 $$\nf(x,y,z) = e^{xy}\\ln(z)。\n$$請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。", + "newline": "false", + "runs": [ + { + "text": "考慮三變數函數 " + }, + { + "latex": "$$\nf(x,y,z) = e^{xy}\\ln(z)。\n$$", + "kind": "math_block" + }, + { + "text": "請計算 " + }, + { + "latex": "$f_{x}$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_{y}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{z}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dfafb51f45", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。因此,由鏈鎖律可得答案為?" + }, + { + "latex": "$\\boxed{y e^{xy}\\ln(z)}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?$\\boxed{y e^{xy}\\ln(z)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。同樣由鏈鎖律可得答案為?" + }, + { + "latex": "$\\boxed{x e^{xy}\\ln(z)}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?$\\boxed{x e^{xy}\\ln(z)}$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。此時 " + }, + { + "latex": "$e^{xy}$", + "kind": "math" + }, + { + "text": " 是常數因子,因此答案為?" + }, + { + "latex": "$\\boxed{e^{xy}/z}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?$\\boxed{e^{xy}/z}$" + } + ] + } + ], + "ai_prompt_md": "### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cd483b721a", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。因此,由鏈鎖律可得答案為?" + } + ], + "content": "偏導數$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "y e^{xy}\\ln(z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。同樣由鏈鎖律可得答案為?" + } + ], + "content": "偏導數$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "x e^{xy}\\ln(z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。此時 " + }, + { + "latex": "$e^{xy}$", + "kind": "math" + }, + { + "text": " 是常數因子,因此答案為?" + } + ], + "content": "偏導數$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "e^{xy}/z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣ 偏導數的定義", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣ 偏導數的定義", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 偏導數的定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,我們談過其在點 $a$ 的導數(derivative) $f'(a)$,描述的是:函數在 $x=a$ 的 「瞬間變化率」。具體定義如下,$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x)-f(a)}{\\Delta x}。\n$$", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",我們談過其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "導數(derivative)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": ",描述的是:函數在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "text": "「瞬間變化率」", + "style": "bold" + }, + { + "text": "。具體定義如下," + }, + { + "latex": "$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x)-f(a)}{\\Delta x}。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "現在,我們想把這種「瞬間變化率」的概念推廣到雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。直覺上,或許會想到:" + }, + { + "latex": "$$\nf'(a,b) = \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} \\frac{f(a+\\Delta x, b+\\Delta y)-f(a,b)}{ (\\Delta x,\\Delta y) }?\n$$", + "kind": "math_block" + }, + { + "text": "⚠️但⋯⋯這裡馬上遇到一個大問題:" + } + ], + "options": [ + { + "key": "a", + "text": "這樣定義完全沒問題,也是在計算在 $(a,b)$ 的瞬間變化率;" + }, + { + "key": "b", + "text": "有問題,因為分母是一個「向量」,不是數字,根本沒有辦法做除法。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 上面的問題來自於:我們同時在兩個變數 $x=a$ 與 $y=b$ 都(分別)添加上增量 $\\Delta x$ 與 $\\Delta y$,因此分母出現了增量向量 $(\\Delta x, \\Delta y)$,無法直接進行「除法」。怎麼化解這個問題呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 上面的問題來自於:我們" + }, + { + "text": "同時", + "style": "bold" + }, + { + "text": "在兩個變數 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 都(分別)添加上增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": ",因此分母出現了" + }, + { + "text": "增量向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": ",無法直接進行「除法」。怎麼化解這個問題呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 一個很直接的想法是:一次只在一個變數上添加增量,另一個變數的值固定,先了解單一個變數的變化,會為函數值帶來多大的變化。", + "newline": "false", + "runs": [ + { + "text": "💡 一個很直接的想法是:" + }, + { + "text": "一次只在一個變數上添加增量,另一個變數的值固定", + "style": "bold" + }, + { + "text": ",先了解單一個變數的變化,會為函數值帶來多大的變化。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🧪 這其實就像科學實驗中的「控制變因」──只改變一個因素,觀察這個因素對結果的影響。", + "newline": "false", + "runs": [ + { + "text": "🧪 這其實就像科學實驗中的「控制變因」──只改變一個因素,觀察這個因素對結果的影響。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 當然,或許你還是會想知道,同時改變兩個變數會怎樣(變化率、變化量等)——這個問題我們下一節再討論。", + "newline": "false", + "runs": [ + { + "text": "👉 當然,或許你還是會想知道," + }, + { + "text": "同時", + "style": "bold" + }, + { + "text": "改變兩個變數會怎樣(變化率、變化量等)——這個問題我們下一節再討論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🔎 回到我們的剛才所提出的想法:一次只在一個變數上添加增量,另一個變數的值固定,並考慮在這種情況下的(瞬間)變化率。因此,我們將考慮到:", + "newline": "false", + "runs": [ + { + "text": "🔎 回到我們的剛才所提出的想法:" + }, + { + "text": "一次只在一個變數上添加增量,另一個變數的值固定", + "style": "bold" + }, + { + "text": ",並考慮在這種情況下的(瞬間)變化率。因此,我們將考慮到:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "只在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 做上增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\hspace{60pt}\\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "只在 $x=a$ 做上增量 $\\Delta x$(固定 $y=b$):$$\n\\hspace{60pt}\\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "只在 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 做上增量 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\hspace{60pt}\\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "只在 $y=b$ 做上增量 $\\Delta y$(固定 $x=a$):$$\n\\hspace{60pt}\\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這兩個極限,就分別稱為函數 $f(x,y)$ 在 $(a,b)$ 對 $x$ 與對 $y$ 的偏導數(partial derivatives)。 「偏」意味著我們「偏心」只關注其中一個變數,而忽略其他的變數的變化(固定其他變數的值)。", + "newline": "false", + "runs": [ + { + "text": "這兩個極限,就分別稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導數(partial derivatives)", + "style": "bold" + }, + { + "text": "。 「偏」意味著我們「偏心」只關注其中一個變數,而忽略其他的變數的變化(固定其他變數的值)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "雙變數函數在某點的偏導數", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,我們定義", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",我們定義" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "其在點 $(a,b)$ 對 $x$ 的偏導數(partial derivative with respect to $x$)為$$\nf_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "其在點 $(a,b)$ 對 $y$ 的偏導數(partial derivative with respect to $y$)為$$\nf_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+ \\Delta y)-f(a,b)}{ \\Delta y }。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數的過程,稱為" + }, + { + "text": "偏微分(partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "計算偏導數的過程,稱為偏微分(partial differentiation)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 因為雙變數函數 $f(x,y)$ 具有兩個自變數,因此在計算偏導數時,一定要清楚標示是對哪一個變數取偏導。例如,", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 因為雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 具有兩個自變數,因此在計算偏導數時,一定要清楚標示是對哪一個變數取偏導。例如," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 取偏導記為 " + }, + { + "latex": "$f_x$", + "kind": "math" + } + ], + "content": "對 $x$ 取偏導記為 $f_x$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 取偏導記為 " + }, + { + "latex": "$f_y$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $y$ 取偏導記為 $f_y$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 觀察偏微分定義的極限,可以發現它是對某一個增量 $\\Delta x$ 或 $\\Delta y$ 取極限。因此計算這樣的極限,我們先前學過的「單變數極限」計算方法與技巧,都可以直接拿來套用。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 觀察偏微分定義的極限,可以發現它是對" + }, + { + "text": "某一個增量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 取極限。因此計算這樣的極限,我們先前學過的「單變數極限」計算方法與技巧,都可以直接拿來套用。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面我們就先來練習一個計算偏微分的例子吧!", + "newline": "false", + "runs": [ + { + "text": "下面我們就先來練習一個計算偏微分的例子吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$\n\n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n $$\n3. 請計算上面極限的結果:\n$\\boxed{-4}$\n---\n1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式:\n $$\n f_y(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$\n\n2. 請計算上面極限的結果:\n$\\boxed{-2}$\n\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n \n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n $$\n3. 請計算上面極限的結果:\n \n \n---\n1. 現在改成計算 $f_y(1,4)$。 這代表:**只讓 $y$ 改變,將 $x$ 固定為 $1$**。請先寫下 $f_y(1,4)$ 的定義公式:\n $$\n f_y(1,4) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。\n \n2. 請計算上面極限的結果:\n \n \n\n\n\n---\n💡 小知識:電腦怎麼算微分?\n\n電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 $\\Delta x$(例如 $0.00001$)來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!\n\n\n\n---\n## 2️⃣ 偏導數與切線斜率\n\n回顧單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 恰為二維平面曲線 $y=f(x)$ 在點 $(a,f(a))$ 的**切線斜率(the slope of tangent)**。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$,其在點 $(a,b)$ 的偏導數 $f_x(a,b)$ 與 $f_y(a,b)$,在三維空間曲面 $z=f(x,y)$ 的點 $(a,b,f(a,b))$ 處,分別對應哪一條曲線的切線斜率呢?\n\n👀 接下來,我們將透過一個 **3D 互動圖形(Geogebra)**,實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。\n\n---\n### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $y=1$ 的截線\n\n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n曲線 $C_1$ 在點 $P$ 的切線斜率\n\n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $x=1$ 的截線\n\n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n曲線 $C_2$ 在點 $P$ 的切線斜率\n\n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n \n a. $C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑) \n b. $C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) \n c. $C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) \n d. $C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點) \n \n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。 \n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n \n a. $C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。\n b. $C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。\n c. $C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。\n d. $C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。\n \n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。\n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n---\n透過上面的範例觀察,我們得到以下結論。\n\n\n特性\n偏導數與切線斜率\n1. $f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。\n2. $f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。\n\n\n![](/assets/partial_derivative.svg)\n---\n## 3️⃣ 偏導函數的定義\n\n回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$ 後,我們隨之便定義了**導函數(derivative function)** $f'(x)$。\n\n📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; \n\n📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。\n\n也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義\n$$\n f'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$\n\n✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。\n\n🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的**偏導函數(partial derivative functions)** $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:\n\n\n定義\n雙變數函數的偏導函數\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,時常簡稱**偏導、偏導數(partial derivative)**,定義如下:\n1. 對 $x$ 的**偏導函數(partial derivative with respect to $x$)**為\n $$\n f_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n $$\n2. 對 $y$ 的**偏導函數(partial derivative with respect to $y$)**為\n $$\n f_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n $$\n3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。\n\n\n⚠️ **注意 1.** 在計算偏導數時:\n- 計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;\n- 計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。\n\n⚠️ **注意 2.** 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。\n$$\n \\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$\n其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。\n\n---\n### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請依據偏導數的定義,計算函數 $$\nf(x,y) = x^2y - 3xy\n$$在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。", + "newline": "false", + "runs": [ + { + "text": "請依據偏導數的定義,計算函數 " + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + }, + { + "text": "在點 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 、對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_94d3624e49", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": ",代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",因此,我們先寫下 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 的「定義公式」:" + }, + { + "latex": "$$\nf_x(1,4) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$", + "kind": "math" + } + ], + "content": "要計算 $f_x(1,4)$,代表:只讓 $x$ 改變,將 $y$ 固定為 $4$,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:$$\nf_x(1,4) = ?\n$$$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,我們把這題的函數 " + }, + { + "latex": "$f(x,y) = x^2y - 3xy$", + "kind": "math" + }, + { + "text": " 代入上述正確的偏導數定義中:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請計算上面極限的結果:" + }, + { + "latex": "$\\boxed{-4}$", + "kind": "math" + } + ], + "content": "請計算上面極限的結果:$\\boxed{-4}$" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "現在改成計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。 這代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$1$", + "kind": "math", + "style": "bold" + }, + { + "text": "。請先寫下 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 的定義公式:" + }, + { + "latex": "$$\nf_y(1,4) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$", + "kind": "math" + } + ], + "content": "現在改成計算 $f_y(1,4)$。 這代表:只讓 $y$ 改變,將 $x$ 固定為 $1$。請先寫下 $f_y(1,4)$ 的定義公式:$$\nf_y(1,4) = ?\n$$$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算上面極限的結果:" + }, + { + "latex": "$\\boxed{-2}$", + "kind": "math" + } + ], + "content": "請計算上面極限的結果:$\\boxed{-2}$" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c1bbc90065", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": ",代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",因此,我們先寫下 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 的「定義公式」:" + }, + { + "latex": "$$\nf_x(1,4) = ?\n$$", + "kind": "math_block" + } + ], + "content": "要計算 $f_x(1,4)$,代表:只讓 $x$ 改變,將 $y$ 固定為 $4$,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:$$\nf_x(1,4) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,我們把這題的函數 " + }, + { + "latex": "$f(x,y) = x^2y - 3xy$", + "kind": "math" + }, + { + "text": " 代入上述正確的偏導數定義中:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdot 4 -3 \\cdot 1 \\cdot 4 \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2\\Delta x + (\\Delta x)^2 \\right) \\cdot 4 - 3 \\cdot (\\Delta x)\\cdot 4}{ \\Delta x }\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請計算上面極限的結果:" + } + ], + "content": "請計算上面極限的結果:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "現在改成計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。 這代表:" + }, + { + "text": "只讓 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 改變,將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 固定為 ", + "style": "bold" + }, + { + "latex": "$1$", + "kind": "math", + "style": "bold" + }, + { + "text": "。請先寫下 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 的定義公式:" + }, + { + "latex": "$$\nf_y(1,4) = ?\n$$", + "kind": "math_block" + } + ], + "content": "現在改成計算 $f_y(1,4)$。 這代表:只讓 $y$ 改變,將 $x$ 固定為 $1$。請先寫下 $f_y(1,4)$ 的定義公式:$$\nf_y(1,4) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4+\\Delta x)-f(1,4)}{ \\Delta x }$。" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(1+\\Delta y, 4+\\Delta y)-f(1,4)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算上面極限的結果:" + } + ], + "content": "請計算上面極限的結果:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "💡 小知識:電腦怎麼算微分?", + "newline": "false", + "runs": [ + { + "text": "💡 小知識:電腦怎麼算微分?" + } + ] + }, + { + "type": "solution", + "uid": "sol_cce5ca8ddf", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 $\\Delta x$(例如 $0.00001$)來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!", + "newline": "false", + "runs": [ + { + "text": "電腦在進行機器學習(如訓練 AI 模型)時,其實就是利用類似定義中的概念,取一個極小的 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": "(例如 " + }, + { + "latex": "$0.00001$", + "kind": "math" + }, + { + "text": ")來計算差商,藉此「數值模擬」出瞬間變化率。這就是我們定義中極限操作的實際應用喔!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣ 偏導數與切線斜率", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣ 偏導數與切線斜率", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 偏導數與切線斜率", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 恰為二維平面曲線 $y=f(x)$ 在點 $(a,f(a))$ 的切線斜率(the slope of tangent)。", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 恰為二維平面曲線 " + }, + { + "latex": "$y=f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,f(a))$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "切線斜率(the slope of tangent)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 那麼,對於雙變數函數 $f(x,y)$,其在點 $(a,b)$ 的偏導數 $f_x(a,b)$ 與 $f_y(a,b)$,在三維空間曲面 $z=f(x,y)$ 的點 $(a,b,f(a,b))$ 處,分別對應哪一條曲線的切線斜率呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 那麼,對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": ",在三維空間曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 的點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 處,分別對應哪一條曲線的切線斜率呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👀 接下來,我們將透過一個 3D 互動圖形(Geogebra),實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。", + "newline": "false", + "runs": [ + { + "text": "👀 接下來,我們將透過一個 " + }, + { + "text": "3D 互動圖形(Geogebra)", + "style": "bold" + }, + { + "text": ",實際「看到」偏導數所對應的切線斜率,並將觀察結果整理成明確的結論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2(Geogebra)", + "newline": "true", + "runs": [ + { + "text": "Example 2(Geogebra)", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $y=1$ 的截線\n\n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n曲線 $C_1$ 在點 $P$ 的切線斜率\n\n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n與平面 $x=1$ 的截線\n\n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)\n\n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n曲線 $C_2$ 在點 $P$ 的切線斜率\n\n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n🧱 我們先在下圖(Geogebra)右側的 3D 圖中:\n1. 繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;\n2. 標出點 $P= (1,1,f(1,1))=(1,1,1)$;\n3. 再標出兩個「可以移動的點」 \n $$\n \\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n $$\n 其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的**拉桿**來調整。\n\n\n\n1. 請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點 \n $$\n Q_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n $$ \n 的移動情形。\n2. 你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:\n \n a. $C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑) \n b. $C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線) \n c. $C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線) \n d. $C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點) \n \n4. 由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為\n $$\n f_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n $$\n 其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。\n5. 因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。 \n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n---\n1. 請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點 \n $$\n R_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n $$ \n 的移動情形。\n2. 點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?\n \n a. 與平面 $y=1$ 的截線 \n b. 與平面 $x=1$ 的截線 \n c. 與平面 $z=1$ 的截線 \n d. 不對應任何固定平面 \n \n3. 既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:\n \n a. $C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。\n b. $C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。\n c. $C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。\n d. $C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。\n \n4. 由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為\n $$\n f_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n $$\n 其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。\n5. 因此,$f_y(1,1)$ 對應的是?\n \n a. 曲線 $C_1$ 在點 $P$ 的切線斜率。\n b. 曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。\n c. 曲線 $C_2$ 在點 $P$ 的切線斜率。\n d. 曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。\n \n5. 總結上述觀察,我們得到以下結論:\n $$\n \\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n $$\n\n\n\n---\n透過上面的範例觀察,我們得到以下結論。\n\n\n特性\n偏導數與切線斜率\n1. $f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。\n2. $f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。\n\n\n![](/assets/partial_derivative.svg)\n---\n## 3️⃣ 偏導函數的定義\n\n回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的**導數(derivative)** $f'(a)$ 後,我們隨之便定義了**導函數(derivative function)** $f'(x)$。\n\n📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; \n\n📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。\n\n也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義\n$$\n f'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$\n\n✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。\n\n🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的**偏導函數(partial derivative functions)** $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:\n\n\n定義\n雙變數函數的偏導函數\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,時常簡稱**偏導、偏導數(partial derivative)**,定義如下:\n1. 對 $x$ 的**偏導函數(partial derivative with respect to $x$)**為\n $$\n f_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n $$\n2. 對 $y$ 的**偏導函數(partial derivative with respect to $y$)**為\n $$\n f_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n $$\n3. 計算偏導數的過程,稱為**偏微分(partial differentiation)**。\n\n\n⚠️ **注意 1.** 在計算偏導數時:\n- 計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;\n- 計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。\n\n⚠️ **注意 2.** 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。\n$$\n \\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$\n其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。\n\n---\n### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-2-Geogebra" + }, + { + "type": "paragraph", + "content": "考慮函數$$\nf(x,y)=4-x^2-2y^2。\n$$請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點$$\nP=(1,1,f(1,1))\n$$處,分別對應什麼曲線的切線斜率?", + "newline": "false", + "runs": [ + { + "text": "考慮函數" + }, + { + "latex": "$$\nf(x,y)=4-x^2-2y^2。\n$$", + "kind": "math_block" + }, + { + "text": "請解釋函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": ",在三維空間曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 的點" + }, + { + "latex": "$$\nP=(1,1,f(1,1))\n$$", + "kind": "math_block" + }, + { + "text": "處,分別對應什麼曲線的切線斜率?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9d7991d1a1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:", + "newline": "false", + "runs": [ + { + "text": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "繪製函數的圖形 " + }, + { + "latex": "$z= f(x,y)=4- x^2 -2 y^2$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "標出點 " + }, + { + "latex": "$P= (1,1,f(1,1))=(1,1,1)$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "標出點 $P= (1,1,f(1,1))=(1,1,1)$;" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再標出兩個「可以移動的點」" + }, + { + "latex": "$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,都可以透過左側面板中的" + }, + { + "text": "拉桿", + "style": "bold" + }, + { + "text": "來調整。" + } + ], + "content": "再標出兩個「可以移動的點」$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的拉桿來調整。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "ve6jegsw", + "width": "100%", + "height": "480", + "border": "0", + "caption": "偏導數", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "你會發現:點 " + }, + { + "latex": "$Q_{\\Delta x}$", + "kind": "math" + }, + { + "text": " 始終落在一條綠色曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + }, + { + "text": "與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線" + } + ], + "content": "你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?與平面 $y=1$ 的截線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 的參數方程可以寫成:" + }, + { + "latex": "$C_1:\\ (x,y,z)=(x,1,f(x,1))$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線)" + } + ], + "content": "既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數公式為" + }, + { + "latex": "$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是哪一個「切線斜率」?" + }, + { + "text": "曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的切線斜率" + } + ], + "content": "因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?曲線 $C_1$ 在點 $P$ 的切線斜率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "點 " + }, + { + "latex": "$R_{\\Delta y}$", + "kind": "math" + }, + { + "text": " 會落在另一條曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + }, + { + "text": "與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線" + } + ], + "content": "點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?與平面 $x=1$ 的截線" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼它的參數方程可以寫成:" + }, + { + "latex": "$C_2:\\ (x,y,z)=(1,y,f(1,y))$", + "kind": "math" + }, + { + "text": "(固定 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線)" + } + ], + "content": "既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數定義為" + }, + { + "latex": "$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是?" + }, + { + "text": "曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的切線斜率" + } + ], + "content": "因此,$f_y(1,1)$ 對應的是?曲線 $C_2$ 在點 $P$ 的切線斜率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "總結上述觀察,我們得到以下結論:" + }, + { + "latex": "$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "總結上述觀察,我們得到以下結論:$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$" + } + ] + } + ], + "ai_prompt_md": "### Example 2(Geogebra)\n考慮函數\n$$\n f(x,y)=4-x^2-2y^2。\n$$\n請解釋函數在點 $(1,1)$ 的偏導數 $f_x(1,1)$ 與 $f_y(1,1)$,在三維空間曲面 $z=f(x,y)$ 的點\n$$\n P=(1,1,f(1,1))\n$$\n處,分別對應什麼曲線的切線斜率?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cfc1b0969b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:", + "newline": "false", + "runs": [ + { + "text": "🧱 我們先在下圖(Geogebra)右側的 3D 圖中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "繪製函數的圖形 " + }, + { + "latex": "$z= f(x,y)=4- x^2 -2 y^2$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "繪製函數的圖形 $z= f(x,y)=4- x^2 -2 y^2$;" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "標出點 " + }, + { + "latex": "$P= (1,1,f(1,1))=(1,1,1)$", + "kind": "math" + }, + { + "text": ";" + } + ], + "content": "標出點 $P= (1,1,f(1,1))=(1,1,1)$;" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再標出兩個「可以移動的點」" + }, + { + "latex": "$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,都可以透過左側面板中的" + }, + { + "text": "拉桿", + "style": "bold" + }, + { + "text": "來調整。" + } + ], + "content": "再標出兩個「可以移動的點」$$\n\\begin{aligned}\n Q_{\\Delta x} &= (1+\\Delta x,1, f(1+\\Delta x,1)),\\\\\n R_{\\Delta y} &= (1,1+\\Delta y, f(1,1+\\Delta y))\n \\end{aligned}\n$$其中 $\\Delta x$ 與 $\\Delta y$ 的值,都可以透過左側面板中的拉桿來調整。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "ve6jegsw", + "width": "100%", + "height": "480", + "border": "0", + "caption": "偏導數", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta x$ 的值,觀察點$$\nQ_{\\Delta x}= (1+\\Delta x,1, f(1+\\Delta x,1))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "你會發現:點 " + }, + { + "latex": "$Q_{\\Delta x}$", + "kind": "math" + }, + { + "text": " 始終落在一條綠色曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + } + ], + "content": "你會發現:點 $Q_{\\Delta x}$ 始終落在一條綠色曲線 $C_1$ 上。請問曲線 $C_1$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "與平面 $y=1$ 的截線" + }, + { + "key": "b", + "text": "與平面 $x=1$ 的截線" + }, + { + "key": "c", + "text": "與平面 $z=1$ 的截線" + }, + { + "key": "d", + "text": "不對應任何固定平面" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼曲線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": " 的參數方程可以寫成:" + } + ], + "content": "既然 $C_1$ 是曲面 $z=f(x,y)$ 與平面 $y=1$ 的截線,那麼曲線 $C_1$ 的參數方程可以寫成:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$C_1:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)" + }, + { + "key": "b", + "text": "$C_1:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)" + }, + { + "key": "c", + "text": "$C_1:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)" + }, + { + "key": "d", + "text": "$C_1:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數公式為" + }, + { + "latex": "$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $x$ 的偏導數公式為$$\nf_x(1,1) = \\lim_{\\Delta x \\to 0} \\frac{ f(1+\\Delta x, 1) - f(1,1) }{\\Delta x}\n = \\lim_{\\Delta x \\to 0} \\frac{ z(Q_{\\Delta x}) - z(P) }{ x(Q_{\\Delta x}) - x(P) }\n$$其中 $z(\\cdot)$ 與 $x(\\cdot)$ 代表點的 $z$ 座標與 $x$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是哪一個「切線斜率」?" + } + ], + "content": "因此,$f_x(1,1)$ 對應的是哪一個「切線斜率」?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "曲線 $C_1$ 在點 $P$ 的切線斜率。" + }, + { + "key": "b", + "text": "曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。" + }, + { + "key": "c", + "text": "曲線 $C_2$ 在點 $P$ 的切線斜率。" + }, + { + "key": "d", + "text": "曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請試著拖曳拉桿,改變 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的值,觀察點" + }, + { + "latex": "$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$", + "kind": "math_block" + }, + { + "text": "的移動情形。" + } + ], + "content": "請試著拖曳拉桿,改變 $\\Delta y$ 的值,觀察點$$\nR_{\\Delta y}= (1,1+\\Delta y, f(1,1+\\Delta y))\n$$的移動情形。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "點 " + }, + { + "latex": "$R_{\\Delta y}$", + "kind": "math" + }, + { + "text": " 會落在另一條曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 上。請問曲線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與哪一個平面的截線?" + } + ], + "content": "點 $R_{\\Delta y}$ 會落在另一條曲線 $C_2$ 上。請問曲線 $C_2$ 是曲面 $z=f(x,y)$ 與哪一個平面的截線?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "與平面 $y=1$ 的截線" + }, + { + "key": "b", + "text": "與平面 $x=1$ 的截線" + }, + { + "key": "c", + "text": "與平面 $z=1$ 的截線" + }, + { + "key": "d", + "text": "不對應任何固定平面" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "既然 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=1$", + "kind": "math" + }, + { + "text": " 的截線,那麼它的參數方程可以寫成:" + } + ], + "content": "既然 $C_2$ 是曲面 $z=f(x,y)$ 與平面 $x=1$ 的截線,那麼它的參數方程可以寫成:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$C_2:\\ (x,y,z)=(x,1,f(x,1))$(固定 $y=1$ 的截線)。" + }, + { + "key": "b", + "text": "$C_2:\\ (x,y,z)=(1,y,f(1,y))$(固定 $x=1$ 的截線)。" + }, + { + "key": "c", + "text": "$C_2:\\ (x,y,z)=(x,y,f(x,y))$(整個曲面上的任意路徑)。" + }, + { + "key": "d", + "text": "$C_2:\\ (x,y,z)=(1,1,f(1,1))$(只有單一點)。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "由於函數在點 " + }, + { + "latex": "$(1,1)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數定義為" + }, + { + "latex": "$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$z(\\cdot)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y(\\cdot)$", + "kind": "math" + }, + { + "text": " 代表點的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 座標與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 座標。" + } + ], + "content": "由於函數在點 $(1,1)$ 對 $y$ 的偏導數定義為$$\nf_y(1,1) = \\lim_{\\Delta y \\to 0} \\frac{ f(1, 1+\\Delta y) - f(1,1) }{\\Delta y}\n = \\lim_{\\Delta y \\to 0} \\frac{ z(R_{\\Delta y}) - z(P) }{ y(R_{\\Delta y}) - y(P) }\n$$其中 $z(\\cdot)$ 與 $y(\\cdot)$ 代表點的 $z$ 座標與 $y$ 座標。" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(1,1)$", + "kind": "math" + }, + { + "text": " 對應的是?" + } + ], + "content": "因此,$f_y(1,1)$ 對應的是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "曲線 $C_1$ 在點 $P$ 的切線斜率。" + }, + { + "key": "b", + "text": "曲線 $C_1$ 在點 $Q_{\\Delta x}$ 的切線斜率。" + }, + { + "key": "c", + "text": "曲線 $C_2$ 在點 $P$ 的切線斜率。" + }, + { + "key": "d", + "text": "曲線 $C_2$ 在點 $R_{\\Delta y}$ 的切線斜率。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n請依據偏導數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n在點 $(1,4)$ 對 $x$ 的偏導數 $f_x(1,4)$ 、對 $y$ 的偏導數 $f_y(1,4)$。\n\n\n1. 要計算 $f_x(1,4)$,代表:**只讓 $x$ 改變,將 $y$ 固定為 $4$**,因此,我們先寫下 $f_x(1,4)$ 的「定義公式」:\n $$\n f_x(1,4) = ?\n $$\n$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x }$\n\n2. 接著,我們把這題的函數 $f(x,y) = x^2y - 3xy$ 代入上述正確的偏導數定義中:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(1,4) &= \\lim_{\\Delta x\\to 0} \\frac{f(1+\\Delta x, 4)-f(1,4)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (1+\\Delta x)^2 \\cdot 4 - 3 (1+\\Delta x)\\cdot 4 \\right] -\\left[ 1^2 \\cdo" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "總結上述觀察,我們得到以下結論:" + }, + { + "latex": "$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "總結上述觀察,我們得到以下結論:$$\n\\begin{aligned}\n &f_x(1,1) 是曲面 z = f(x,y) 與平面 y=1 的截線 C_1,在點 P=(1,1,f(1,1)) 的切線斜率;\\\\\n &f_y(1,1) 是曲面 z = f(x,y) 與平面 x=1 的截線 C_2,在點 P=(1,1,f(1,1)) 的切線斜率。\n \\end{aligned}\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "透過上面的範例觀察,我們得到以下結論。", + "newline": "false", + "runs": [ + { + "text": "透過上面的範例觀察,我們得到以下結論。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "偏導數與切線斜率", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": " 的截線 " + }, + { + "latex": "$C_1$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切線斜率。" + } + ], + "content": "$f_x(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $y=b$ 的截線 $C_1$,在點 $(a,b,f(a,b))$ 的切線斜率。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 是曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 與平面 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的截線 " + }, + { + "latex": "$C_2$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切線斜率。" + } + ], + "content": "$f_y(a,b)$ 是曲面 $z = f(x,y)$ 與平面 $x=a$ 的截線 $C_2$,在點 $(a,b,f(a,b))$ 的切線斜率。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/partial_derivative.svg" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣ 偏導函數的定義", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣ 偏導函數的定義", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 偏導函數的定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "回顧單變數函數 $f(x)$,在我們談過其在點 $a$ 的導數(derivative) $f'(a)$ 後,我們隨之便定義了導函數(derivative function) $f'(x)$。", + "newline": "false", + "runs": [ + { + "text": "回顧單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",在我們談過其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "導數(derivative)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 後,我們隨之便定義了" + }, + { + "text": "導函數(derivative function)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 導數 $f'(a)$ 描述的是函數在「某一個點」的瞬間變化率; ", + "newline": "false", + "runs": [ + { + "text": "📌 導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 描述的是函數在「某一個點」的瞬間變化率; " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 而導函數 $f'(x)$ 則是把每一個點的導數值收集起來,形成一個新的函數。", + "newline": "false", + "runs": [ + { + "text": "📌 而導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 則是把每一個點的導數值收集起來,形成一個新的函數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 $f$ 定義域中的任意點 $x$ 上給出導數值。是以,我們定義$$\nf'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是說,導函數是將導數的定義推廣為一個函數,使其能在函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 定義域中的任意點 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 上給出導數值。是以,我們定義" + }, + { + "latex": "$$\nf'(x)=\\lim_{\\Delta x\\to0}\\frac{f(x+\\Delta x)-f(x)}{\\Delta x}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "✅ 一旦我們求得導函數 $f'(x)$,將來要計算導數 $f'(a)$,只需將 $a$ 代入 $f'(x)$ 即可。", + "newline": "false", + "runs": [ + { + "text": "✅ 一旦我們求得導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",將來要計算導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": ",只需將 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 即可。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🧠 這樣的概念,推廣到雙變數函數 $f(x,y)$ 中,也是適用的。我們也能定義所謂的偏導函數(partial derivative functions) $f_x(x,y)$ 與 $f_y(x,y)$。請參見下面的定理:", + "newline": "false", + "runs": [ + { + "text": "🧠 這樣的概念,推廣到雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,也是適用的。我們也能定義所謂的" + }, + { + "text": "偏導函數(partial derivative functions)", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。請參見下面的定理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "雙變數函數的偏導函數", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,其偏導函數(partial derivative function),時常簡稱偏導、偏導數(partial derivative),定義如下:", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其" + }, + { + "text": "偏導函數(partial derivative function)", + "style": "bold" + }, + { + "text": ",時常簡稱" + }, + { + "text": "偏導、偏導數(partial derivative)", + "style": "bold" + }, + { + "text": ",定義如下:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導函數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n$$", + "kind": "math_block" + } + ], + "content": "對 $x$ 的偏導函數(partial derivative with respect to $x$)為$$\nf_x(x,y) := \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導函數(partial derivative with respect to ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\nf_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n$$", + "kind": "math_block" + } + ], + "content": "對 $y$ 的偏導函數(partial derivative with respect to $y$)為$$\nf_y(x,y) := \\lim_{\\Delta y\\to 0} \\frac{f(x, y+ \\Delta y)-f(x,y)}{ \\Delta y }。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數的過程,稱為" + }, + { + "text": "偏微分(partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ], + "content": "計算偏導數的過程,稱為偏微分(partial differentiation)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 在計算偏導數時:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 在計算偏導數時:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,請將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數;" + } + ], + "content": "計算 $f_x(x,y)$ 時,請將 $y$ 視為常數;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,請將 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "計算 $f_y(x,y)$ 時,請將 $x$ 視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 一旦我們求得偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$,要計算某一點 $(a,b)$ 的偏導數值,只需將 $(a,b)$ 代入即可。$$\n\\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$其中 $\\left. \\cdot \\right|_{(x,y)=(a,b)}$ 代表將 $(x,y)=(a,b)$ 代入到算式 $\\cdot$ 中。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 一旦我們求得偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",要計算某一點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的偏導數值,只需將 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 代入即可。" + }, + { + "latex": "$$\n\\begin{aligned} \n f_x(a,b) &= f_x(x,y) \\Big|_{(x,y)=(a,b)},\\\\\n f_y(a,b) &= f_y(x,y) \\Big|_{(x,y)=(a,b)},\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\left. \\cdot \\right|_{(x,y)=(a,b)}$", + "kind": "math" + }, + { + "text": " 代表將 " + }, + { + "latex": "$(x,y)=(a,b)$", + "kind": "math" + }, + { + "text": " 代入到算式 " + }, + { + "latex": "$\\cdot$", + "kind": "math" + }, + { + "text": " 中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n$\\boxed{-4}$\n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$\n \n 請再計算上面極限的結果:\n$\\boxed{x^2-3x}$\n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n$\\boxed{-2}$\n\n\n\n1. 先計算 $f_x(x,y)$:\n $$\n \\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n $$\n 你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。\n2. 由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$\n \n \n---\n1. 再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式\n $$\n f_y(x,y) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;\n c. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;\n d. $\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。\n \n 請再計算上面極限的結果:\n \n \n2. 由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:\n \n \n\n\n\n---\n## 4️⃣ 偏導函數的計算法則\n\n在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 \n\n🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?\n\n是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 \n\n📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。\n回想在單變數函數中,比如給定\n$$\n f(x) = x\\cdot \\sin(x),\n$$\n現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?\n相信不會的!我們會直接套用已知的**微分運算法則(Differential Rules)**,\n例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,\n來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。\n\n🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?\n\n💡**答案是:可以的**,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。\n\n👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。\n\n例如,給定函數\n$$\n f(x,y) = x\\cdot \\sin(y),\n$$\n在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,\n我們將變數 $y$ 的值固定為 $b$,\n只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。\n\n因此,計算 $f_x(a,b)$,\n等同於計算單變數函數\n$$\n f(x,b) = x\\cdot \\sin(b)\n$$\n在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,\n$$\n f_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$\n對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到\n$$\n f_x(x,y) = \\sin(y)。\n$$\n\n💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:\n\n👉 固定其他變數 \n👉 對單一變數做單變數微分 \n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。\n\n我們將這個重要的結論整理如下。\n\n\n特性\n雙變數函數偏微分計算法則\n給定雙變數函數 $f(x,y)$,其**偏導函數(partial derivative function)**,可依下列方式求得:\n$$\n \\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$\n\n\n\n1. 首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數\n $$\n g(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n $$\n 換成偏導數的寫法:\n $$\n f_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n $$\n 上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。\n2. 接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數\n $$\n h(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n $$\n 那麼由偏導數的定義,我們有\n $$\n \\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n $$\n 因此,\n $$\n f_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n $$\n 換成偏導數的寫法:\n $$\n f_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n $$\n\n\n⚠️ **注意 1.** 這裡我們引入新的符號:\n1. **$\\frac{\\partial }{\\partial x} f(x,y)$ **,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。\n2. **$\\frac{\\partial }{\\partial y} f(x,y)$ **,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。\n\n⚠️ **注意 2.** **常數(constant)**是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。\n\n⚠️ **注意 3.** 在偏導中:\n- 計算 $f_x$ 時,可把 $y$ 想成常數 $c$。\n- 計算 $f_y$ 時,可把 $x$ 想成常數 $c$。 \n\n下面我們先練習一個,單變數函數但帶有**常數(constant)**的微分。以更好的理解上述描述的「**微分時,視 $y$ 為常數**」或「**微分時,視 $x$ 為常數**」的意義。\n\n---\n### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "請依據偏導函數的定義,計算函數 $$\nf(x,y) = x^2y - 3xy\n$$", + "newline": "false", + "runs": [ + { + "text": "請依據偏導函數的定義,計算函數 " + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",與偏導數 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",與偏導數 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6ac2c27af7", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "你可以發現,其實整個計算過程與第一題計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 完全一樣,只是將 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "先計算 $f_x(x,y)$:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_x(1,4)=?$", + "kind": "math" + }, + { + "latex": "$\\boxed{-4}$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$$\\boxed{-4}$" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "再來,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ":請先讓我們先寫下 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的公式" + }, + { + "latex": "$$\nf_y(x,y) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$", + "kind": "math" + }, + { + "text": "請再計算上面極限的結果:" + }, + { + "latex": "$\\boxed{x^2-3x}$", + "kind": "math" + } + ], + "content": "再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式$$\nf_y(x,y) = ?\n$$$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$請再計算上面極限的結果:$\\boxed{x^2-3x}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_y(1,4)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\boxed{-2}$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:$\\boxed{-2}$" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n請依據偏導函數的定義,計算函數 \n$$\n f(x,y) = x^2y - 3xy\n$$ \n1. 對 $x$ 的偏導函數 $f_x(x,y)$,與偏導數 $f_x(1,4)$。\n2. 對 $y$ 的偏導函數 $f_y(x,y)$,與偏導數 $f_y(1,4)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_00e2f8f9f7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "你可以發現,其實整個計算過程與第一題計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 完全一樣,只是將 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "先計算 $f_x(x,y)$:$$\n\\begin{aligned}\n \\hspace{60pt}f_x(x,y) &= \\lim_{\\Delta x\\to 0} \\frac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left[ (x+\\Delta x)^2 \\cdot y - 3 \\cdot (x+\\Delta x)\\cdot y \\right] -\\left[ x^2 \\cdot y -3 \\cdot x \\cdot y \\right]}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\frac{ \\left( 2 x \\Delta x + (\\Delta x)^2 \\right) \\cdot y - 3 \\cdot (\\Delta x)\\cdot y}{ \\Delta x } \\\\\n &= \\lim_{\\Delta x\\to 0} \\left( 2 x + \\Delta x \\right) \\cdot y - 3 \\cdot y \\\\\n &= 2xy - 3 y。\n \\end{aligned}\n$$你可以發現,其實整個計算過程與第一題計算 $f_x(1,4)$ 完全一樣,只是將 $(1,4)$ 寫成 $(x,y)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_x(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_x(1,4)=?$", + "kind": "math" + } + ], + "content": "由於已經計算好偏導函數 $f_x(x,y)$,因此計算 $f_x(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_x(1,4)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "再來,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ":請先讓我們先寫下 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的公式" + }, + { + "latex": "$$\nf_y(x,y) = ?\n$$", + "kind": "math_block" + } + ], + "content": "再來,計算 $f_y(x,y)$:請先讓我們先寫下 $f_y(x,y)$ 的公式$$\nf_y(x,y) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y)-f(x,y)}{ \\Delta x }$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(x+\\Delta x, y+\\Delta x)-f(x,y)}{ \\Delta x }$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x, y+\\Delta y)-f(x,y)}{ \\Delta y }$;" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta y\\to 0} \\dfrac{f(x+\\Delta y, y+\\Delta y)-f(x,y)}{ \\Delta y }$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "newline": "true" + }, + { + "text": " 請再計算上面極限的結果: " + } + ], + "answers": [ + "x^2-3x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於已經計算好偏導函數 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": ",因此計算 " + }, + { + "latex": "$f_y(1,4)$", + "kind": "math" + }, + { + "text": " 只要將 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 代入 " + }, + { + "latex": "$(1,4)$", + "kind": "math" + }, + { + "text": " 就好。因此," + }, + { + "latex": "$f_y(1,4)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "由於已經計算好偏導函數 $f_y(x,y)$,因此計算 $f_y(1,4)$ 只要將 $(x,y)$ 代入 $(1,4)$ 就好。因此,$f_y(1,4)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-4", + "title": "4️⃣ 偏導函數的計算法則", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "4️⃣ 偏導函數的計算法則", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 偏導函數的計算法則", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "在這一節中,我們要來談談偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$ 的實際計算方法。 ", + "newline": "false", + "runs": [ + { + "text": "在這一節中,我們要來談談偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 的實際計算方法。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?", + "newline": "false", + "runs": [ + { + "text": "🤔 不過,先等等——這些我們不是已經會了嗎(例如前面的例題)?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "是的!在前一節中,我們已經學會如何透過偏導數的定義來計算$f_x(x,y)$ 與 $f_y(x,y)$。 ", + "newline": "false", + "runs": [ + { + "text": "是的!在前一節中,我們已經學會如何透過偏導數的定義來計算" + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。回想在單變數函數中,比如給定$$\nf(x) = x\\cdot \\sin(x),\n$$現在的你,還會使用導數的定義來計算 $f'(x)$ 嗎?相信不會的!我們會直接套用已知的微分運算法則(Differential Rules),例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,來快速求得 $f'(x)$。 比如,這裡的 $f'(x)= \\sin(x) + x \\cdot \\cos(x)$。", + "newline": "false", + "runs": [ + { + "text": "📌 然而,和單變數函數的情況一樣,在實際計算導數時,我們並不會每次都回到極限定義。回想在單變數函數中,比如給定" + }, + { + "latex": "$$\nf(x) = x\\cdot \\sin(x),\n$$", + "kind": "math_block" + }, + { + "text": "現在的你,還會使用導數的定義來計算 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": " 嗎?相信不會的!我們會直接套用已知的" + }, + { + "text": "微分運算法則(Differential Rules)", + "style": "bold" + }, + { + "text": ",例如加法、減法、乘法、係數乘法、除法、合成函數(鏈鎖律)等微分運算法,來快速求得 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": "。 比如,這裡的 " + }, + { + "latex": "$f'(x)= \\sin(x) + x \\cdot \\cos(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "🤔 那麼,對於雙變數函數 $f(x,y)$ 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?", + "newline": "false", + "runs": [ + { + "text": "🤔 那麼,對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 而言,我們在單變數函數中所學到的這些微分技巧,是否仍然適用呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡答案是:可以的,我們完全可以套用單變數微分技巧,來計算多變數函數的微分。", + "newline": "false", + "runs": [ + { + "text": "💡" + }, + { + "text": "答案是:可以的", + "style": "bold" + }, + { + "text": ",我們完全可以套用單變數微分技巧,來計算多變數函數的微分。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。", + "newline": "false", + "runs": [ + { + "text": "👉 關鍵原因於,算偏導數時,我們只讓一個變數變動,並把其他變數視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "例如,給定函數$$\nf(x,y) = x\\cdot \\sin(y),\n$$在計算函數對 $x$ 的偏導數 $f_x(a,b)$ 時,我們將變數 $y$ 的值固定為 $b$,只對變數 $x$ 進行變動(添加增量),去計算瞬間變化率。", + "newline": "false", + "runs": [ + { + "text": "例如,給定函數" + }, + { + "latex": "$$\nf(x,y) = x\\cdot \\sin(y),\n$$", + "kind": "math_block" + }, + { + "text": "在計算函數對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 時,我們將變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的值固定為 " + }, + { + "latex": "$b$", + "kind": "math" + }, + { + "text": ",只對變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行變動(添加增量),去計算瞬間變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,計算 $f_x(a,b)$,等同於計算單變數函數$$\nf(x,b) = x\\cdot \\sin(b)\n$$在 $x=a$ 處進行變動(添加增量),去計算瞬間變化率。因而,$$\nf_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$對於偏導函數 $f_x(x,y)$ 也是一樣的道理,我們可以得到$$\nf_x(x,y) = \\sin(y)。\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,計算 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": ",等同於計算單變數函數" + }, + { + "latex": "$$\nf(x,b) = x\\cdot \\sin(b)\n$$", + "kind": "math_block" + }, + { + "text": "在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 處進行變動(添加增量),去計算瞬間變化率。因而," + }, + { + "latex": "$$\nf_x(a,b)\n = \\frac{d}{dx} f(x,b)\n = \\frac{d}{dx}\\bigl(x\\cdot \\sin(b)\\bigr)\n = \\sin(b)。\n$$", + "kind": "math_block" + }, + { + "text": "對於偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 也是一樣的道理,我們可以得到" + }, + { + "latex": "$$\nf_x(x,y) = \\sin(y)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 關鍵理解:雖然 $f(x,y)$ 是雙變數函數,但在計算偏導時,我們其實是:", + "newline": "false", + "runs": [ + { + "text": "💡 關鍵理解:雖然 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 是雙變數函數,但在計算偏導時,我們其實是:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 固定其他變數\n👉 對單一變數做單變數微分\n因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。", + "newline": "true", + "runs": [ + { + "text": "👉 固定其他變數" + }, + { + "newline": "true" + }, + { + "text": "👉 對單一變數做單變數微分" + }, + { + "newline": "true" + }, + { + "text": "因此,所有單變數微積分的微分技巧,都可以直接套用到偏導數計算。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將這個重要的結論整理如下。", + "newline": "false", + "runs": [ + { + "text": "我們將這個重要的結論整理如下。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "特性", + "headline": "雙變數函數偏微分計算法則", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$,其偏導函數(partial derivative function),可依下列方式求得:$$\n\\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",其" + }, + { + "text": "偏導函數(partial derivative function)", + "style": "bold" + }, + { + "text": ",可依下列方式求得:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= \\boxed{\\frac{d}{dx} f(x, y) \\;\\;(微分時,視\\; y\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial x} f(x,y) }, \\\\[12pt]\n f_y(x,y) &= \\boxed{\\frac{d}{dy} f(x, y) \\;\\;(微分時,視\\; x\\; 為常數 )} =: \\boxed{ \\frac{\\partial }{\\partial y} f(x,y) }。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_8b074752bb", + "label": "證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "首先,考慮偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": "。我們定義單變數函數" + }, + { + "latex": "$$\ng(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n$$", + "kind": "math_block" + }, + { + "text": "那麼由偏導數的定義,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n$$", + "kind": "math_block" + }, + { + "text": "換成偏導數的寫法:" + }, + { + "latex": "$$\nf_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n$$", + "kind": "math_block" + }, + { + "text": "上述,最後一個只是換一個比較不會誤會的寫法(使用 " + }, + { + "latex": "$\\partial$", + "kind": "math" + }, + { + "text": " 符號)。" + } + ], + "content": "首先,考慮偏導數 $f_x(a,b)$。我們定義單變數函數$$\ng(x) = f(x, b),\\;\\; (把\\; y\\; 固定成\\; b)\n$$那麼由偏導數的定義,我們有$$\n\\begin{aligned}\n f_x(a,b) := \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n = \\lim_{\\Delta x\\to 0} \\frac{g(a+\\Delta x)-g(a)}{ \\Delta x }\n = g'(a)。\n \\end{aligned}\n$$因此,$$\nf_x(a,b) = g'(a) = \\frac{d}{dx} f(x, b)\\vert_{x=a}。\n$$換成偏導數的寫法:$$\nf_x(x,y) = g'(x) = \\frac{d}{dx} f(x, y) \\to \\frac{\\partial}{\\partial x} f(x, y)。\n$$上述,最後一個只是換一個比較不會誤會的寫法(使用 $\\partial$ 符號)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "接著,考慮偏導數 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": "。我們定義單變數函數" + }, + { + "latex": "$$\nh(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n$$", + "kind": "math_block" + }, + { + "text": "那麼由偏導數的定義,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n$$", + "kind": "math_block" + }, + { + "text": "換成偏導數的寫法:" + }, + { + "latex": "$$\nf_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n$$", + "kind": "math_block" + } + ], + "content": "接著,考慮偏導數 $f_y(a,b)$。我們定義單變數函數$$\nh(y) = f(a, y),\\;\\; (把\\; x\\; 固定成\\; a)\n$$那麼由偏導數的定義,我們有$$\n\\begin{aligned}\n f_y(a,b) := \\lim_{\\Delta y\\to 0} \\frac{f(a, b+\\Delta y)-f(a,b)}{ \\Delta y }\n = \\lim_{\\Delta y\\to 0} \\frac{h(b+\\Delta y)-h(b)}{ \\Delta y }\n = h'(b)。\n \\end{aligned}\n$$因此,$$\nf_y(a,b) = h'(b) = \\frac{d}{dy} f(a, y)\\vert_{y=b}。\n$$換成偏導數的寫法:$$\nf_y(x,y) = h'(y) = \\frac{d}{dy} f(x, y) \\to \\frac{\\partial}{\\partial y} f(x, y)。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 這裡我們引入新的符號:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 這裡我們引入新的符號:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\frac{\\partial }{\\partial x} f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " ", + "style": "bold" + }, + { + "text": ",唸作 「partial " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ", partial " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "」,代表只對變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "$\\frac{\\partial }{\\partial x} f(x,y)$ ,唸作 「partial $x$, partial $f(x,y)$」,代表只對變數 $x$ 進行微分,而將其他變數 $y$ 視為常數。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\frac{\\partial }{\\partial y} f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " ", + "style": "bold" + }, + { + "text": ",唸作 「partial " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": ", partial " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "」,表示只對變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數。" + } + ], + "content": "$\\frac{\\partial }{\\partial y} f(x,y)$ ,唸作 「partial $y$, partial $f(x,y)$」,表示只對變數 $y$ 進行微分,而將其他變數 $x$ 視為常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 常數(constant)是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 $1$, $2$, $-1$ 等。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " " + }, + { + "text": "常數(constant)", + "style": "bold" + }, + { + "text": "是指「固定不變的數值」。你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$-1$", + "kind": "math" + }, + { + "text": " 等。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 3. 在偏導中:", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": " 在偏導中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": " 時,可把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 想成常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "計算 $f_x$ 時,可把 $y$ 想成常數 $c$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_y$", + "kind": "math" + }, + { + "text": " 時,可把 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 想成常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "計算 $f_y$ 時,可把 $x$ 想成常數 $c$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面我們先練習一個,單變數函數但帶有常數(constant)的微分。以更好的理解上述描述的「微分時,視 $y$ 為常數」或「微分時,視 $x$ 為常數」的意義。", + "newline": "false", + "runs": [ + { + "text": "下面我們先練習一個,單變數函數但帶有" + }, + { + "text": "常數(constant)", + "style": "bold" + }, + { + "text": "的微分。以更好的理解上述描述的「" + }, + { + "text": "微分時,視 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為常數", + "style": "bold" + }, + { + "text": "」或「" + }, + { + "text": "微分時,視 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 為常數", + "style": "bold" + }, + { + "text": "」的意義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n$2xc-3c$\n\n\n\n\n由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。\n因此,$f'(x)=?$:\n\na. $2x-3c$;\nb. $2xc-3c$;\nc. $x^2c-3$;\nd. $2c-3x$。\n\n\n\n\n---\n### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "請計算下面單變數函數 $$\nf(x) = x^2\\cdot c - 3x \\cdot c\n$$的導函數 $f'(x)$,其中 $c$ 為一個常數。", + "newline": "false", + "runs": [ + { + "text": "請計算下面單變數函數 " + }, + { + "latex": "$$\nf(x) = x^2\\cdot c - 3x \\cdot c\n$$", + "kind": "math_block" + }, + { + "text": "的導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為一個常數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_aeb4e06437", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由於 $c$ 是個常數(constant),你可以把他想像成某個固定的數字,例如 $2$ 等。因此,$f'(x)=?$:$2xc-3c$", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 是個常數(constant),你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 等。因此," + }, + { + "latex": "$f'(x)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$2xc-3c$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 4\n請計算下面單變數函數 \n$$\n f(x) = x^2\\cdot c - 3x \\cdot c\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0a7a908e86", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "由於 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 是個常數(constant),你可以把他想像成某個固定的數字,例如 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 等。因此," + }, + { + "latex": "$f'(x)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$2x-3c$;" + }, + { + "key": "b", + "text": "$2xc-3c$;" + }, + { + "key": "c", + "text": "$x^2c-3$;" + }, + { + "key": "d", + "text": "$2c-3x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n$2xy-3y$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)**看待(如同,上題的常數 $c$ 角色)。\n2. 因此,$f_x(x,y)=?$\n \n a. $2x-3y$;\n b. $2xy-3y$;\n c. $x^2y-3$;\n d. $2y-3x$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)**看待。\n4. 因此,$f_y(x,y)=?$:\n \n a. $2xy-3y$;\n b. $x^2-3x$;\n c. $2y-3x$;\n d. $x^2y-3$。\n \n\n\n\n---\n### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "請計算下面雙變數函數$$\nf(x,y) = x^2y - 3xy\n$$的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "請計算下面雙變數函數" + }, + { + "latex": "$$\nf(x,y) = x^2y - 3xy\n$$", + "kind": "math_block" + }, + { + "text": "的偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cc73c35092", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待(如同,上題的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 角色)。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant)看待(如同,上題的常數 $c$ 角色)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "latex": "$2xy-3y$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$$2xy-3y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant)看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$x^2-3x$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$:$x^2-3x$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 5\n請計算下面雙變數函數\n$$\n f(x,y) = x^2y - 3xy\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7485aa792f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待(如同,上題的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 角色)。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}。\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant)看待(如同,上題的常數 $c$ 角色)。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$2x-3y$;" + }, + { + "key": "b", + "text": "$2xy-3y$;" + }, + { + "key": "c", + "text": "$x^2y-3$;" + }, + { + "key": "d", + "text": "$2y-3x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": "看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant)看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "因此,$f_y(x,y)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$2xy-3y$;" + }, + { + "key": "b", + "text": "$x^2-3x$;" + }, + { + "key": "c", + "text": "$2y-3x$;" + }, + { + "key": "d", + "text": "$x^2y-3$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$\n\n\n\n\n1. 本題的函數是一個典型的合成函數,因此計算導函數時需要使用**鏈鎖律(Chain Rule)**:\n $$\n \\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n $$\n2. 函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:\n $$\n f'(x) = ?\n $$\n \n a. $\\cos( x^2 c - 3xc )$;\n b. $2xc-3c$;\n c. $\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;\n d. $\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。\n \n\n\n\n**注意.** 對於「合成函數」的微分,要養習慣:**先找到內層(inner function)和外層(outer function)**,這樣微分時比較不容易混淆。\n\n---\n### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "請計算下面單變數函數 $$\nf(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。", + "newline": "false", + "runs": [ + { + "text": "請計算下面單變數函數 " + }, + { + "latex": "$$\nf(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$", + "kind": "math_block" + }, + { + "text": "的導函數 " + }, + { + "latex": "$f'(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 為一個常數(constant)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_024bb25dd8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用鏈鎖律(Chain Rule):$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 外層是 " + }, + { + "latex": "$\\sin(\\cdot)$", + "kind": "math" + }, + { + "text": ", 內層是 " + }, + { + "latex": "$x^2\\cdot c - 3x \\cdot c$", + "kind": "math" + }, + { + "text": "。因此,外層微分後變成 " + }, + { + "latex": "$\\cos(\\cdot)$", + "kind": "math" + }, + { + "text": ",並乘上內層的導數:" + }, + { + "latex": "$$\nf'(x) = ?\n$$", + "kind": "math_block" + }, + { + "latex": "$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$", + "kind": "math" + } + ], + "content": "函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:$$\nf'(x) = ?\n$$$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 6\n請計算下面單變數函數 \n$$\n f(x) = \\sin( x^2\\cdot c - 3x \\cdot c )\n$$ \n的導函數 $f'(x)$,其中 $c$ 為一個常數(constant)。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d07002c1b7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "本題的函數是一個典型的合成函數,因此計算導函數時需要使用鏈鎖律(Chain Rule):$$\n\\frac{d}{dx} f(g(x)) = f'(g(x)) \\cdot g'(x)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 外層是 " + }, + { + "latex": "$\\sin(\\cdot)$", + "kind": "math" + }, + { + "text": ", 內層是 " + }, + { + "latex": "$x^2\\cdot c - 3x \\cdot c$", + "kind": "math" + }, + { + "text": "。因此,外層微分後變成 " + }, + { + "latex": "$\\cos(\\cdot)$", + "kind": "math" + }, + { + "text": ",並乘上內層的導數:" + }, + { + "latex": "$$\nf'(x) = ?\n$$", + "kind": "math_block" + } + ], + "content": "函數 $f(x)$ 外層是 $\\sin(\\cdot)$, 內層是 $x^2\\cdot c - 3x \\cdot c$。因此,外層微分後變成 $\\cos(\\cdot)$,並乘上內層的導數:$$\nf'(x) = ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 c - 3xc )$;" + }, + { + "key": "b", + "text": "$2xc-3c$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 c - 3xc )\\,\\cdot (2xc-3c)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 c - 3xc )\\,\\cdot (2xc-3c)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意. 對於「合成函數」的微分,要養習慣:先找到內層(inner function)和外層(outer function),這樣微分時比較不容易混淆。", + "newline": "false", + "runs": [ + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 對於「合成函數」的微分,要養習慣:" + }, + { + "text": "先找到內層(inner function)和外層(outer function)", + "style": "bold" + }, + { + "text": ",這樣微分時比較不容易混淆。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$\n\n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n$x^2-3x$\n\n\n\n\n1. 計算 $f_x(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n $$\n 因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 **$y$ 當作常數(constant)** 看待。\n2. 此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「**鏈鎖律(Chain Rule)**」。\n3. 因此,$f_x(x,y)=?$:\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $2xy-3y$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。\n \n3. 同理,計算 $f_y(x,y)$ 時,依據上面**特性**中所得到的結果,\n $$\n f_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n $$\n 因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 **$x$ 當作常數(constant)** 看待。\n4. 因此,$f_y(x,y)=?$\n \n a. $\\cos( x^2 y - 3xy )$;\n b. $x^2-3x$;\n c. $\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;\n d. $\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。\n \n\n\n\n---\n## 5️⃣ 偏導數的不同標示\n\n📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是**同一個數學概念**。\n\n\n定義\n偏導數的不同符號\n給定 $z= f(x,y)$,則偏導數可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$\n\n\n⚠️ **注意 1.** 符號 $D$ 可以想成:Derivative 或 Differentiation。\n\n⚠️ **注意 2.** 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。\n\n---\n## 6️⃣ 偏導數與線性估計\n\n💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的**瞬間變化率**。\n因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的**變化量**可估計為\n$$\n f(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$\n\n📌 這稱為 **線性估計(linear approximation)**,因為變化量與增量呈現 **一階線性關係**。\n\n對於雙變數函數 $f(x,y)$,\n- 由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的**瞬間變化率**;\n- 由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的**瞬間變化率**;\n\n因此,我們有以下函數的**變化量**估計:\n$$\n \\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$\n📌 這也是**線性估計(linear approximation)**,只是限制在「單一變數變動下」的線性近似。\n\n\n定理\n變化量的線性估計\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n $$\n2. 如果 $f_y(a,b)$ 存在,則我們有以下的變化量**線性估計(linear approximation)**\n $$\n f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n $$\n\n\n👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮\n$$\n f(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$\n也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!\n\n⚠️ **注意.** 這個「近似 $\\approx$」到底有多近呢?\n\n下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的**進階內容**繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。\n\n\n\n\n定理\n變化量的線性估計(進階版)\n給定雙變數函數 $f(x,y)$。\n1. 如果 $f_x(a,b)$ 存在,定義\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n $$\n 因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,\n $$\n \\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n $$\n2. 如果 $f_y(a,b)$ 存在,定義\n $$\n e_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n $$\n 則其滿足 \n $$\n \\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n $$\n 因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,\n $$\n \\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n $$\n\n\n**證明:**\n1. 假設 $f_x(a,b)$ 存在。由於\n $$\n f_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n $$\n 因此,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n $$\n 通分後,\n $$\n \\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n $$\n 由 $e_1(\\Delta x)$ 的定義,我們有\n $$\n \\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n $$\n 是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有\n $$\n e_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n $$\n2. 對於定理另一個敘述,同理可證。\n\n⚠️ **注意 1.** 由定義\n$$\n \\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$\n因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。\n\n⚠️ **注意 2.** 定理結果的\n$$\n \\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$\n不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。\n\n\n---\n### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "請計算下面雙變數函數$$\nf(x,y) = \\sin( x^2y - 3xy )\n$$的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "請計算下面雙變數函數" + }, + { + "latex": "$$\nf(x,y) = \\sin( x^2y - 3xy )\n$$", + "kind": "math_block" + }, + { + "text": "的偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_105053830e", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "此外,這樣的「單變數函數(只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ")」是一個典型的合成函數,因此計算導函數時需要使用「" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": "」。" + } + ], + "content": "此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「鏈鎖律(Chain Rule)」。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$", + "kind": "math" + } + ], + "content": "因此,$f_x(x,y)=?$:$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + }, + { + "latex": "$x^2-3x$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$$x^2-3x$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 7\n請計算下面雙變數函數\n$$\n f(x,y) = \\sin( x^2y - 3xy )\n$$ \n的偏導數 $f_x(x,y)$ 與 $f_y(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c0bb924bac", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "計算 $f_x(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_x(x,y) = \\boxed{\\frac{\\partial}{\\partial x} f(x, y)}\n$$因此,想像 $f_x(x,y)$ 是只有變數 $x$ 的「單變數函數」,對 $x$ 進行微分,而將 $y$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "此外,這樣的「單變數函數(只有變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": ")」是一個典型的合成函數,因此計算導函數時需要使用「" + }, + { + "text": "鏈鎖律(Chain Rule)", + "style": "bold" + }, + { + "text": "」。" + } + ], + "content": "此外,這樣的「單變數函數(只有變數 $x$)」是一個典型的合成函數,因此計算導函數時需要使用「鏈鎖律(Chain Rule)」。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_x(x,y)=?$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "因此,$f_x(x,y)=?$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 y - 3xy )$;" + }, + { + "key": "b", + "text": "$2xy-3y$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 y - 3xy )\\,\\cdot (2xy-3y)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 y - 3xy )\\,\\cdot (2xy-3y)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "同理,計算 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 時,依據上面" + }, + { + "text": "特性", + "style": "bold" + }, + { + "text": "中所得到的結果," + }, + { + "latex": "$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$", + "kind": "math_block" + }, + { + "text": "因此,想像 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 是只有變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的「單變數函數」,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 進行微分,而將 " + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 當作常數(constant)", + "style": "bold" + }, + { + "text": " 看待。" + } + ], + "content": "同理,計算 $f_y(x,y)$ 時,依據上面特性中所得到的結果,$$\nf_y(x,y) = \\boxed{\\frac{\\partial}{\\partial y} f(x, y)}\n$$因此,想像 $f_y(x,y)$ 是只有變數 $y$ 的「單變數函數」,對 $y$ 進行微分,而將 $x$ 當作常數(constant) 看待。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$f_y(x,y)=?$", + "kind": "math" + } + ], + "content": "因此,$f_y(x,y)=?$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\cos( x^2 y - 3xy )$;" + }, + { + "key": "b", + "text": "$x^2-3x$;" + }, + { + "key": "c", + "text": "$\\sin( x^2 y - 3xy )\\,\\cdot (x^2-3x)$;" + }, + { + "key": "d", + "text": "$\\cos( x^2 y - 3xy )\\,\\cdot (x^2-3x)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-5", + "title": "5️⃣ 偏導數的不同標示", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "5️⃣ 偏導數的不同標示", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 偏導數的不同標示", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是同一個數學概念。", + "newline": "false", + "runs": [ + { + "text": "📌 在不同學科、書籍或應用情境中,偏導數常會用不同符號表示,但它們描述的是" + }, + { + "text": "同一個數學概念", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "偏導數的不同符號", + "body": [ + { + "type": "paragraph", + "content": "給定 $z= f(x,y)$,則偏導數可用下面一些不同符號表示:$$\n\\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "給定 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": ",則偏導數可用下面一些不同" + }, + { + "text": "符號", + "style": "bold" + }, + { + "text": "表示:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= f_x \n = \\frac{\\partial }{\\partial x} f(x,y) \n = \\frac{\\partial f}{\\partial x} \n = \\frac{\\partial z}{\\partial x}\n = D_x f; \\\\\n f_y(x,y) &= f_y \n = \\frac{\\partial }{\\partial y} f(x,y) \n = \\frac{\\partial f}{\\partial y} \n = \\frac{\\partial z}{\\partial y}\n = D_y f。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 符號 $D$ 可以想成:Derivative 或 Differentiation。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 符號 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 可以想成:Derivative 或 Differentiation。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 建議初學者先習慣使用 $f_x$ 與 $\\frac{\\partial f}{\\partial x}$,之後再慢慢熟悉 $D_x f$。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 建議初學者先習慣使用 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\frac{\\partial f}{\\partial x}$", + "kind": "math" + }, + { + "text": ",之後再慢慢熟悉 " + }, + { + "latex": "$D_x f$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-6", + "title": "6️⃣ 偏導數與線性估計", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "6️⃣ 偏導數與線性估計", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 偏導數與線性估計", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "💡 對於單變數函數 $f(x)$,其在點 $a$ 的導數 $f'(a)$ 描述的是函數在 $x=a$ 的瞬間變化率。因此,如果 $x$ 在點 $a$ 附近發生一個不大的增量 $\\Delta x$,則函數的變化量可估計為$$\nf(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$", + "newline": "false", + "runs": [ + { + "text": "💡 對於單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",其在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的導數 " + }, + { + "latex": "$f'(a)$", + "kind": "math" + }, + { + "text": " 描述的是函數在 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": "。因此,如果 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 附近發生一個不大的增量 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ",則函數的" + }, + { + "text": "變化量", + "style": "bold" + }, + { + "text": "可估計為" + }, + { + "latex": "$$\nf(a+\\Delta x)-f(a)\\approx f'(a)\\Delta x \\quad (\\Delta x \\approx 0)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 這稱為 線性估計(linear approximation),因為變化量與增量呈現 一階線性關係。", + "newline": "false", + "runs": [ + { + "text": "📌 這稱為 " + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "text": ",因為變化量與增量呈現 " + }, + { + "text": "一階線性關係", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對於雙變數函數 $f(x,y)$,", + "newline": "false", + "runs": [ + { + "text": "對於雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "由於偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": ",考慮的是,在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 變數變化下(固定 " + }, + { + "latex": "$y=b$", + "kind": "math" + }, + { + "text": ")的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": ";" + } + ], + "content": "由於偏導數 $f_x(a,b)$,考慮的是,在 $x$ 變數變化下(固定 $y=b$)的瞬間變化率;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "由於偏導數 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": ",考慮的是,在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 變數變化下(固定 " + }, + { + "latex": "$x=a$", + "kind": "math" + }, + { + "text": ")的" + }, + { + "text": "瞬間變化率", + "style": "bold" + }, + { + "text": ";" + } + ], + "content": "由於偏導數 $f_y(a,b)$,考慮的是,在 $y$ 變數變化下(固定 $x=a$)的瞬間變化率;" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,我們有以下函數的變化量估計:$$\n\\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$📌 這也是線性估計(linear approximation),只是限制在「單一變數變動下」的線性近似。", + "newline": "false", + "runs": [ + { + "text": "因此,我們有以下函數的" + }, + { + "text": "變化量", + "style": "bold" + }, + { + "text": "估計:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x,b)-f(a,b) &\\approx f_x(a,b)\\Delta x \\quad (\\Delta x\\approx 0),\\\\\n f(a,b+\\Delta y)-f(a,b) &\\approx f_y(a,b)\\Delta y \\quad (\\Delta y\\approx 0)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "📌 這也是" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "text": ",只是限制在「單一變數變動下」的線性近似。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "變化量的線性估計", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在,則我們有以下的變化量" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "latex": "$$\nf(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_x(a,b)$ 存在,則我們有以下的變化量線性估計(linear approximation)$$\nf(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,則我們有以下的變化量" + }, + { + "text": "線性估計(linear approximation)", + "style": "bold" + }, + { + "latex": "$$\nf(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_y(a,b)$ 存在,則我們有以下的變化量線性估計(linear approximation)$$\nf(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮$$\nf(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!", + "newline": "false", + "runs": [ + { + "text": "👉 上面定理得到的是「單一變數變化下」的線性估計(固定另一個變數)。如果我們同時考慮" + }, + { + "latex": "$$\nf(a+\\Delta x,b+\\Delta y)-f(a,b),\n$$", + "kind": "math_block" + }, + { + "text": "也就是讓兩個變數同時改變,那該如何估計呢?這個問題,我們在下一節繼續討論吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 這個「近似 $\\approx$」到底有多近呢?", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 這個「近似 " + }, + { + "latex": "$\\approx$", + "kind": "math" + }, + { + "text": "」到底有多近呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的進階內容繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。", + "newline": "false", + "runs": [ + { + "text": "下面的定理給出了嚴格的數學保證,但有一點挑戰喔!我們就讓有興趣的同學,再展開下面的" + }, + { + "text": "進階內容", + "style": "bold" + }, + { + "text": "繼續閱讀吧!如果你初次學習微積分,可以先跳過這個部份。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_03701398c3", + "label": "進階內容", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "變化量的線性估計(進階版)", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在,定義" + }, + { + "latex": "$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n$$", + "kind": "math_block" + }, + { + "text": "則其滿足" + }, + { + "latex": "$$\n\\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n$$", + "kind": "math_block" + }, + { + "text": "因此,當 " + }, + { + "latex": "$\\Delta x \\approx 0$", + "kind": "math" + }, + { + "text": " 時,我們會有 " + }, + { + "latex": "$e_1(\\Delta x) \\approx 0$", + "kind": "math" + }, + { + "text": "。等價的," + }, + { + "latex": "$$\n\\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_x(a,b)$ 存在,定義$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x,\n$$則其滿足$$\n\\lim\\limits_{\\Delta x \\to 0} \\frac{e_1(\\Delta x)}{\\Delta x} = 0。\n$$因此,當 $\\Delta x \\approx 0$ 時,我們會有 $e_1(\\Delta x) \\approx 0$。等價的,$$\n\\boxed{f(a+\\Delta x, b) - f(a,b) \\approx f_x(a,b) \\Delta x}。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,定義" + }, + { + "latex": "$$\ne_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n$$", + "kind": "math_block" + }, + { + "text": "則其滿足" + }, + { + "latex": "$$\n\\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n$$", + "kind": "math_block" + }, + { + "text": "因此,當 " + }, + { + "latex": "$\\Delta y \\approx 0$", + "kind": "math" + }, + { + "text": " 時,我們會有 " + }, + { + "latex": "$e_2(\\Delta y) \\approx 0$", + "kind": "math" + }, + { + "text": "。等價的," + }, + { + "latex": "$$\n\\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n$$", + "kind": "math_block" + } + ], + "content": "如果 $f_y(a,b)$ 存在,定義$$\ne_2(\\Delta y) = f(a, b+\\Delta y) - f(a,b) - f_y(a,b) \\Delta y,\n$$則其滿足$$\n\\lim\\limits_{\\Delta y \\to 0} \\frac{e_2(\\Delta y)}{\\Delta y} = 0。\n$$因此,當 $\\Delta y \\approx 0$ 時,我們會有 $e_2(\\Delta y) \\approx 0$。等價的,$$\n\\boxed{f(a, b+\\Delta y) - f(a,b) \\approx f_y(a,b) \\Delta y}。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "證明:", + "newline": "false", + "runs": [ + { + "text": "證明:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 存在。由於" + }, + { + "latex": "$$\nf_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n$$", + "kind": "math_block" + }, + { + "text": "通分後," + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n$$", + "kind": "math_block" + }, + { + "text": "由 " + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 的定義,我們有" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n$$", + "kind": "math_block" + }, + { + "text": "是以," + }, + { + "latex": "$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$", + "kind": "math" + }, + { + "text": "。因而,當 " + }, + { + "latex": "$\\Delta x \\approx 0$", + "kind": "math" + }, + { + "text": ",我們會有" + }, + { + "latex": "$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n$$", + "kind": "math_block" + } + ], + "content": "假設 $f_x(a,b)$ 存在。由於$$\nf_x(a,b) = \\lim_{\\Delta x\\to 0} \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x }\n$$因此,$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)}{ \\Delta x } - f_x(a,b) \\right] = 0。\n$$通分後,$$\n\\lim_{\\Delta x\\to 0} \\left[ \\frac{f(a+\\Delta x, b)-f(a,b)- f_x(a,b)\\Delta x}{ \\Delta x } \\right] = 0。\n$$由 $e_1(\\Delta x)$ 的定義,我們有$$\n\\lim_{\\Delta x\\to 0} \\frac{e_1(\\Delta x)}{ \\Delta x } = 0\n$$是以,$\\lim\\limits_{\\Delta x\\to 0} e_1(\\Delta x) = 0$。因而,當 $\\Delta x \\approx 0$,我們會有$$\ne_1(\\Delta x) = f(a+\\Delta x, b) - f(a,b) - f_x(a,b) \\Delta x \\approx 0。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對於定理另一個敘述,同理可證。" + } + ], + "content": "對於定理另一個敘述,同理可證。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 1. 由定義$$\n\\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$因此,$e_1(\\Delta x)$ 是在衡量「線性估計變化量」與「實際變化量」的差異。因此,$e_1(\\Delta x)$ 越小表示「線性估計變化量」量與「實際變化量」越接近。同理,$e_2(\\Delta y)$ 也是可以這般解釋。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 由定義" + }, + { + "latex": "$$\n\\begin{aligned}\n e_1(\\Delta x) &= \\left[ f(a+\\Delta x, b) - f(a,b) \\right] - \\left[ f_x(a,b) \\Delta x \\right] \\\\\n &= 實際變化量 - 線性估計變化量。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 是在衡量「線性估計變化量」與「實際變化量」的差異。因此," + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 越小表示「線性估計變化量」量與「實際變化量」越接近。同理," + }, + { + "latex": "$e_2(\\Delta y)$", + "kind": "math" + }, + { + "text": " 也是可以這般解釋。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意 2. 定理結果的$$\n\\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$不僅表示 $\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$,更代表當 $\\Delta x\\to0$ 時,誤差 $e_1(\\Delta x)$ 相較於 $\\Delta x$ 是可以忽略的。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 定理結果的" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to0}\\frac{e_1(\\Delta x)}{\\Delta x}=0\n$$", + "kind": "math_block" + }, + { + "text": "不僅表示 " + }, + { + "latex": "$\\lim_{\\Delta x\\to0}e_1(\\Delta x)=0$", + "kind": "math" + }, + { + "text": ",更代表當 " + }, + { + "latex": "$\\Delta x\\to0$", + "kind": "math" + }, + { + "text": " 時,誤差 " + }, + { + "latex": "$e_1(\\Delta x)$", + "kind": "math" + }, + { + "text": " 相較於 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 是可以忽略的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$\n\n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n1. 小明目前的 BMI 為\n $$\n B(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n $$\n2. 先求偏導函數:\n $$\n B_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n $$\n 代入 $(h,w)=(1.70,65)$,得到偏導數\n $$\n \\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n $$\n3. **實際 BMI 變化量**(體重固定 $w=65$,只改變身高)\n - 身高增加 $1$ 公分(變成 $1.71$ 公尺):\n $$\n B(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n $$\n - 身高增加 $2$ 公分(變成 $1.72$ 公尺):\n $$\n B(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n $$\n4. **線性估計 BMI 變化量**:由於現在想了解**身高發生變化、體重固定**對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?\n \n a. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$ \n b. $B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$ \n c. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$ \n d. $B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$ \n \n 因此,\n - 當身高增加 $1$ 公分:\n $$\n B(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n $$\n - 身高增加 $2$ 公分:\n $$\n B(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n $$\n5. 可以看出線性估計的優點:好算、與實際變化量也相當接近。\n\n\n\n---\n## 7️⃣ 隱函數偏微分\n\n🤔 在單變數函數中,我們談過**隱函數微分(implicit differentiation)**。還記得這是什麼樣的問題嗎?\n\n💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,**微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中**,解決這類問題的微分技巧便稱為**隱函數微分(implicit differentiation)**。\n\n讓我們透過下面的例子,來喚醒記憶。\n\n---\n### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "人體質量指數(Body Mass Index, BMI)的定義方式為$$\nB(h,w)=\\frac{w}{h^2},\n$$其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。", + "newline": "false", + "runs": [ + { + "text": "人體質量指數(Body Mass Index, BMI)的定義方式為" + }, + { + "latex": "$$\nB(h,w)=\\frac{w}{h^2},\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 代表體重(公斤)、" + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 代表身高(公尺)。如果小明同學的身高、體重分別是 " + }, + { + "latex": "$170$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$65$", + "kind": "math" + }, + { + "text": " 公斤(也就是 " + }, + { + "latex": "$h=1.70$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請問小明目前的 BMI 指數為?" + } + ], + "content": "請問小明目前的 BMI 指數為?" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算偏導數 " + }, + { + "latex": "$B_w(1.70,65)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$B_h(1.70,65)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "如果小明的身高分別增加了 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分,試問他 BMI " + }, + { + "text": "實際的", + "style": "bold" + }, + { + "text": "變化量分別會是多少?" + } + ], + "content": "如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI 實際的變化量分別會是多少?" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "如果小明的身高分別增加了 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分、" + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分,試問利用" + }, + { + "text": "線性估計法", + "style": "bold" + }, + { + "text": ",他的 BMI 變化量分別會是多少?" + } + ], + "content": "如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用線性估計法,他的 BMI 變化量分別會是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_123583ed99", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "小明目前的 BMI 為" + }, + { + "latex": "$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$", + "kind": "math_block" + } + ], + "content": "小明目前的 BMI 為$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先求偏導函數:" + }, + { + "latex": "$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$", + "kind": "math_block" + }, + { + "text": "代入 " + }, + { + "latex": "$(h,w)=(1.70,65)$", + "kind": "math" + }, + { + "text": ",得到偏導數" + }, + { + "latex": "$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求偏導函數:$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$代入 $(h,w)=(1.70,65)$,得到偏導數$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "實際 BMI 變化量", + "style": "bold" + }, + { + "text": "(體重固定 " + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ",只改變身高)" + } + ], + "content": "實際 BMI 變化量(體重固定 $w=65$,只改變身高)" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.71$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $1$ 公分(變成 $1.71$ 公尺):$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.72$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分(變成 $1.72$ 公尺):$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "線性估計 BMI 變化量", + "style": "bold" + }, + { + "text": ":由於現在想了解" + }, + { + "text": "身高發生變化、體重固定", + "style": "bold" + }, + { + "text": "對 BMI " + }, + { + "latex": "$B(h,w)$", + "kind": "math" + }, + { + "text": " 造成的影響,因此應使用線性估計公式會是?" + }, + { + "latex": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$", + "kind": "math" + } + ], + "content": "線性估計 BMI 變化量:由於現在想了解身高發生變化、體重固定對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 因此,", + "newline": "false", + "runs": [ + { + "text": " 因此," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "當身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$", + "kind": "math_block" + } + ], + "content": "當身高增加 $1$ 公分:$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分:$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ], + "content": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ] + } + ], + "ai_prompt_md": "### Example 8\n人體質量指數(Body Mass Index, BMI)的定義方式為\n$$\n B(h,w)=\\frac{w}{h^2},\n$$\n其中 $w$ 代表體重(公斤)、$h$ 代表身高(公尺)。\n如果小明同學的身高、體重分別是 $170$ 公分、$65$ 公斤(也就是 $h=1.70$、$w=65$)。\n1. 請問小明目前的 BMI 指數為?\n2. 請計算偏導數 $B_w(1.70,65)$ 與 $B_h(1.70,65)$。\n3. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問他 BMI **實際的**變化量分別會是多少?\n4. 如果小明的身高分別增加了 $1$ 公分、$2$ 公分,試問利用**線性估計法**,他的 BMI 變化量分別會是多少?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_06b45d0846", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "小明目前的 BMI 為" + }, + { + "latex": "$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$", + "kind": "math_block" + } + ], + "content": "小明目前的 BMI 為$$\nB(1.70,65)\n =\\frac{65}{(1.70)^2}\n =\\frac{65}{2.89}\n \\approx 22.491。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先求偏導函數:" + }, + { + "latex": "$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$", + "kind": "math_block" + }, + { + "text": "代入 " + }, + { + "latex": "$(h,w)=(1.70,65)$", + "kind": "math" + }, + { + "text": ",得到偏導數" + }, + { + "latex": "$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求偏導函數:$$\nB_w(h,w)=\\frac{1}{h^2},\\qquad\n B_h(h,w)=-\\frac{2w}{h^3}。\n$$代入 $(h,w)=(1.70,65)$,得到偏導數$$\n\\begin{aligned}\n B_w(1.70,65)\n &=\\frac{1}{(1.70)^2}\n \\approx 0.346,\\\\\n B_h(1.70,65)\n &=-\\frac{2(65)}{(1.70)^3}\n \\approx -26.460。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "實際 BMI 變化量", + "style": "bold" + }, + { + "text": "(體重固定 " + }, + { + "latex": "$w=65$", + "kind": "math" + }, + { + "text": ",只改變身高)" + } + ], + "content": "實際 BMI 變化量(體重固定 $w=65$,只改變身高)" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.71$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $1$ 公分(變成 $1.71$ 公尺):$$\nB(1.71,65)-B(1.70,65)\n =\\frac{65}{(1.71)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.262。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分(變成 " + }, + { + "latex": "$1.72$", + "kind": "math" + }, + { + "text": " 公尺):" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分(變成 $1.72$ 公尺):$$\nB(1.72,65)-B(1.70,65)\n =\\frac{65}{(1.72)^2}-\\frac{65}{(1.70)^2}\n \\approx -0.520。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "線性估計 BMI 變化量", + "style": "bold" + }, + { + "text": ":由於現在想了解" + }, + { + "text": "身高發生變化、體重固定", + "style": "bold" + }, + { + "text": "對 BMI " + }, + { + "latex": "$B(h,w)$", + "kind": "math" + }, + { + "text": " 造成的影響,因此應使用線性估計公式會是?" + } + ], + "content": "線性估計 BMI 變化量:由於現在想了解身高發生變化、體重固定對 BMI $B(h,w)$ 造成的影響,因此應使用線性估計公式會是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_h(1.70,65)\\Delta h$" + }, + { + "key": "b", + "text": "$B(1.70+\\Delta h,65)-B(1.70,65)\\approx B_w(1.70,65)\\Delta h$" + }, + { + "key": "c", + "text": "$B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_h(1.70,65)\\Delta w$" + }, + { + "key": "d", + "text": "$B(1.70,65+\\Delta w)-B(1.70,65)\\approx B_w(1.70,65)\\Delta w$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": " 因此,", + "newline": "false", + "runs": [ + { + "text": " 因此," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "當身高增加 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$", + "kind": "math_block" + } + ], + "content": "當身高增加 $1$ 公分:$$\nB(1.71,65)-B(1.70,65)\n \\approx (-26.460)(0.01)\n =-0.2646。\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "身高增加 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 公分:" + }, + { + "latex": "$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$", + "kind": "math_block" + } + ], + "content": "身高增加 $2$ 公分:$$\nB(1.72,65)-B(1.70,65)\n \\approx (-26.460)(0.02)\n =-0.5292。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ], + "content": "可以看出線性估計的優點:好算、與實際變化量也相當接近。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-7", + "title": "7️⃣ 隱函數偏微分", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "7️⃣ 隱函數偏微分", + "newline": "true", + "runs": [ + { + "text": "7️⃣ 隱函數偏微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "🤔 在單變數函數中,我們談過隱函數微分(implicit differentiation)。還記得這是什麼樣的問題嗎?", + "newline": "false", + "runs": [ + { + "text": "🤔 在單變數函數中,我們談過" + }, + { + "text": "隱函數微分(implicit differentiation)", + "style": "bold" + }, + { + "text": "。還記得這是什麼樣的問題嗎?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 在大多數的微分問題,考慮的是某個函數 $f(x)$ 的微分,也就是給定 $y= f(x)$,求 $\\dfrac{d y}{d x}$。在這種情況下,$y$ 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 $y$ 只是滿足某一條方程式,比如 $x^2+y^2 =25$,那我們該如何求 $\\dfrac{dy}{dx}$?像這樣,微分的對象 $y$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧便稱為隱函數微分(implicit differentiation)。", + "newline": "false", + "runs": [ + { + "text": "💡 在大多數的微分問題,考慮的是某個函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 的微分,也就是給定 " + }, + { + "latex": "$y= f(x)$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{d y}{d x}$", + "kind": "math" + }, + { + "text": "。在這種情況下," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 有一個明確的公式。計算其微分,我們可以套用一些已知的微分法則,比如微分的運演算法則(加減乘除)、鏈鎖律。但是,如果現在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 只是滿足某一條方程式,比如 " + }, + { + "latex": "$x^2+y^2 =25$", + "kind": "math" + }, + { + "text": ",那我們該如何求 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": "?像這樣," + }, + { + "text": "微分的對象 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 沒有明確的公式,而是隱藏在一條方程式中", + "style": "bold" + }, + { + "text": ",解決這類問題的微分技巧便稱為" + }, + { + "text": "隱函數微分(implicit differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "讓我們透過下面的例子,來喚醒記憶。", + "newline": "false", + "runs": [ + { + "text": "讓我們透過下面的例子,來喚醒記憶。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 9, + "ai_prompt_md": "### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $y$ 解出:\n $$\n \\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n $$\n2. 由於考慮的點 $(x,y)=(3,4)$ 滿足\n $$\n y= +\\sqrt{25-x^2}。\n $$\n 因此,我們考慮函數 \n $$\n y = f(x) = + \\sqrt{25-x^2}。\n $$\n 因而,\n $$\n \\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n $$\n3. 對上述函數 $f(x)$,即 $y$,進行微分,我們有\n $$\n \\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n $$\n3. 因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)\n2. 將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到\n $$\n x^2 + (f(x))^2 = 25\n $$\n3. **直接對方程式兩邊對 $x$ 進行微分**\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n4. **備註**:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數微分** \n1. 看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)\n1. **直接對方程式兩邊對 $x$ 進行微分**:\n $$\n \\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n $$\n2. 因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。\n\n\n\n---\n👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為**隱函數偏微分(implicit partial differentiation)**。\n\n💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!\n\n我們就用下面例題,來說明**多變數函數的隱函數偏微分**是怎麼操作的!\n\n---\n### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 = 25。\n$$請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 = 25。\n$$", + "kind": "math_block" + }, + { + "text": "請計算導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 與其在 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e3d5a3d6e8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第一個方法:暴力破解", + "newline": "false", + "runs": [ + { + "text": "第一個方法:暴力破解", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 解出:" + }, + { + "latex": "$$\n\\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n$$", + "kind": "math_block" + } + ], + "content": "先將 $y$ 解出:$$\n\\hspace{60pt}x^2 + y^2 = 25 \\Longleftrightarrow y= \\pm \\sqrt{25-x^2}。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於考慮的點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": " 滿足" + }, + { + "latex": "$$\ny= +\\sqrt{25-x^2}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們考慮函數" + }, + { + "latex": "$$\ny = f(x) = + \\sqrt{25-x^2}。\n$$", + "kind": "math_block" + }, + { + "text": "因而," + }, + { + "latex": "$$\n\\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n$$", + "kind": "math_block" + } + ], + "content": "由於考慮的點 $(x,y)=(3,4)$ 滿足$$\ny= +\\sqrt{25-x^2}。\n$$因此,我們考慮函數$$\ny = f(x) = + \\sqrt{25-x^2}。\n$$因而,$$\n\\dfrac{dy}{dx} = \\dfrac{d}{dx} f(x) = f'(x)。\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "對上述函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": ",進行微分,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "對上述函數 $f(x)$,即 $y$,進行微分,我們有$$\n\\begin{aligned}\n \\hspace{60pt}\\dfrac{dy}{dx} = f'(x)\n &= \\dfrac{d}{dx} \\sqrt{25-x^2} \n = \\dfrac{d}{dx} (25-x^2)^{1/2} \\\\\n &= \\frac{1}{2} (25-x^2)^{-1/2} \\cdot (-2x)\n = \\frac{-x}{\\sqrt{25-x^2}} = -\\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "因此, 在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此, 在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的缺點是,第一步要解出 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的公式,有時候未必是容易的。" + } + ], + "content": "備註:這個方法最大的缺點是,第一步要解出 $y$ 的公式,有時候未必是容易的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法:隱函數微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法:隱函數微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們暫時把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 想成由 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 決定的函數 " + }, + { + "latex": "$y=f(x)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是某個函數。(當然,此處 " + }, + { + "latex": "$f(x) = + \\sqrt{25-x^2}$", + "kind": "math" + }, + { + "text": "。)" + } + ], + "content": "我們暫時把 $y$ 想成由 $x$ 決定的函數 $y=f(x)$,其中 $f$ 是某個函數。(當然,此處 $f(x) = + \\sqrt{25-x^2}$。)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 代入題目方程式 " + }, + { + "latex": "$x^2 + y^2 = 25$", + "kind": "math" + }, + { + "text": " 中,我們會得到" + }, + { + "latex": "$$\nx^2 + (f(x))^2 = 25\n$$", + "kind": "math_block" + } + ], + "content": "將 $y = f(x)$ 代入題目方程式 $x^2 + y^2 = 25$ 中,我們會得到$$\nx^2 + (f(x))^2 = 25\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行微分", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行微分$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + (f(x))^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 f(x) f'(x) = 0 \\quad (這邊套用鏈鎖律\\; Chain Rule!)\\\\\n &\\Longrightarrow 2x + 2 y y' = 0 \\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的優點是,不需要解出 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的公式(這通常是個大問題)!" + } + ], + "content": "備註:這個方法最大的優點是,不需要解出 $y$ 的公式(這通常是個大問題)!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數微分 ", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數微分", + "style": "bold" + }, + { + "text": " " + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 = 25$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 = 25$ 時,假想 $y = f(x)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行微分", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行微分:$$\n\\begin{aligned}\n &\\frac{d}{dx} (x^2 + y^2) = \\frac{d}{dx} (25) \\\\\n &\\Longrightarrow 2x + 2 y \\frac{dy}{dx} = 0 \\quad ( y=f(x),因此要套用鏈鎖律\\; Chain Rule ) )\\\\\n &\\Longrightarrow y' = - \\frac{x}{y}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y)=(3,4)$", + "kind": "math" + }, + { + "text": ",導數 " + }, + { + "latex": "$\\dfrac{dy}{dx}$", + "kind": "math" + }, + { + "text": " 的值為 " + }, + { + "latex": "$-\\dfrac{3}{4}$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y)=(3,4)$,導數 $\\dfrac{dy}{dx}$ 的值為 $-\\dfrac{3}{4}$。" + } + ] + } + ], + "ai_prompt_md": "### Example 9\n考慮方程式\n$$\n x^2 + y^2 = 25。\n$$\n請計算導數 $\\dfrac{dy}{dx}$ 與其在 $(x,y)=(3,4)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 $f(x,y)$ 的偏微分,也就是給定 $z= f(x,y)$,求 $\\dfrac{\\partial z}{\\partial x}$。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 $z$ 只是滿足某一條方程式,比如 $x^2+y^2+z^2 =25$,那我們該如何求 $\\dfrac{\\partial z}{\\partial x}$?像這樣,微分的對象 $z$ 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為隱函數偏微分(implicit partial differentiation)。", + "newline": "false", + "runs": [ + { + "text": "👉 多變數函數也面臨類似的問題。在大多數的偏微分問題,考慮的是某個函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏微分,也就是給定 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": "。在這種情況下,我們可以直接套用已知的偏微分法則。但是,如果 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 只是滿足某一條方程式,比如 " + }, + { + "latex": "$x^2+y^2+z^2 =25$", + "kind": "math" + }, + { + "text": ",那我們該如何求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": "?像這樣,微分的對象 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 沒有明確的公式,而是隱藏在一條方程式中,解決這類問題的微分技巧同樣稱為" + }, + { + "text": "隱函數偏微分(implicit partial differentiation)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!", + "newline": "false", + "runs": [ + { + "text": "💡 事實上,如果你已經理解上面單變數函數的隱函數微分法,應該可以察覺到:同樣的邏輯手法,套用在多變數函數也是完全沒問題的!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們就用下面例題,來說明多變數函數的隱函數偏微分是怎麼操作的!", + "newline": "false", + "runs": [ + { + "text": "我們就用下面例題,來說明" + }, + { + "text": "多變數函數的隱函數偏微分", + "style": "bold" + }, + { + "text": "是怎麼操作的!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 10", + "newline": "true", + "runs": [ + { + "text": "Example 10", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 10, + "ai_prompt_md": "### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第一個方法:暴力破解**\n1. 先將 $z$ 解出:\n $$\n \\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n $$\n2. 由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足\n $$\n z = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因此,我們考慮函數\n $$\n z= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n $$\n 因而, \n $$\n \\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n $$\n3. 對上述函數 $f(x,y)$,即 $z$,進行微分,我們有\n $$\n \\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n $$\n4. 因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。 \n4. **備註**:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。\n\n**第二個方法:隱函數微分**\n1. 我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。\n2. 將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有\n $$\n \\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4 \n $$\n3. **直接對方程式的兩邊,對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**)\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n $$\n4. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n $$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n $$\n5. **備註**:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $x$ 進行偏微分**(記得,對 $x$ 偏微時,我們**將 $y$ 視為常數**):\n $$\n \\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n $$\n3. 將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到\n$$\n \\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$\n4. **備註**:習慣後,這樣的算法,遠比上面兩個方法快很多!\n\n\n\n---\n### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-10" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$", + "kind": "math_block" + }, + { + "text": "請計算偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_985f464376", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第一個方法:暴力破解", + "newline": "false", + "runs": [ + { + "text": "第一個方法:暴力破解", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 解出:" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先將 $z$ 解出:$$\n\\begin{aligned}\n \\hspace{60pt}x^2 + y^2 + z^2 + xyz = 4 \n &\\Longleftrightarrow z^2 + (xy)z +(x^2+y^2-4) = 0\\\\\n &\\Longleftrightarrow \n z = \\frac{-(xy) \\pm \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由於考慮的點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 滿足" + }, + { + "latex": "$$\nz = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$", + "kind": "math_block" + }, + { + "text": "因此,我們考慮函數" + }, + { + "latex": "$$\nz= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$", + "kind": "math_block" + }, + { + "text": "因而," + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n$$", + "kind": "math_block" + } + ], + "content": "由於考慮的點 $(x,y,z)=(1,1,1)$ 滿足$$\nz = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$因此,我們考慮函數$$\nz= f(x,y) = \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}。\n$$因而,$$\n\\frac{\\partial z}{\\partial x} = \\frac{\\partial}{\\partial x} f(x,y) = f_x(x,y)\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "對上述函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",即 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": ",進行微分,我們有" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "對上述函數 $f(x,y)$,即 $z$,進行微分,我們有$$\n\\begin{aligned}\n \\frac{\\partial z}{\\partial x} &= \\frac{\\partial}{\\partial x} \\frac{-(xy) + \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}{2}\n &=\\cdots\n &=-\\frac{y}{2} + \\frac{2xy^2-8x}{4 \\sqrt{(xy)^2 - 4 (x^2+y^2-4)}}\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,在點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": ",偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = -1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "因此,在點 $(x,y,z)=(1,1,1)$,偏導數 $\\dfrac{\\partial z}{\\partial x} = -1$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的缺點是,第一步要解出 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式,有時候未必是容易的。此外,就算 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。" + } + ], + "content": "備註:這個方法最大的缺點是,第一步要解出 $z$ 的公式,有時候未必是容易的。此外,就算 $z$ 的公式算出了,你有發現直接微分有多痛苦嗎?這就是為什麼我們需要隱函數微分!。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法:隱函數微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法:隱函數微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "我們暫時把 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成由 " + }, + { + "latex": "$x,y$", + "kind": "math" + }, + { + "text": " 決定的函數 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是某個函數。" + } + ], + "content": "我們暫時把 $z$ 想成由 $x,y$ 決定的函數 $z=f(x,y)$,其中 $f$ 是某個函數。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 代入題目方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 中,會有" + }, + { + "latex": "$$\n\\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4\n$$", + "kind": "math_block" + } + ], + "content": "將 $z = f(x,y)$ 代入題目方程式 $x^2 + y^2 + z^2 + xyz = 4$ 中,會有$$\n\\hspace{60pt}x^2 + y^2 + (f(x,y))^2 + xy f(x,y) = 4\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "直接對方程式的兩邊,對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": ")" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式的兩邊,對 $x$ 進行偏微分(記得,對 $x$ 偏微時,我們將 $y$ 視為常數)$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial }{\\partial x} \\left(x^2 + y^2 + (f(x,y))^2 + xy f(x,y) \\right) = \\frac{\\partial }{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 f(x,y) f_x(x,y) + y \\left[ f(x,y) + x f_x(x,y) \\right] = 0 \\; (視\\; y \\;為常數)\\\\\n &\\Longrightarrow 2x + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0\\; (代回\\; z=f(x,y))。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,將得到" + }, + { + "latex": "$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$", + "kind": "math_block" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$" + }, + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":這個方法最大的優點是,不需要解出 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的公式(這通常是個大問題)!" + } + ], + "content": "備註:這個方法最大的優點是,不需要解出 $z$ 的公式(這通常是個大問題)!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "直接對方程式兩邊對 $x$ 進行偏微分(記得,對 $x$ 偏微時,我們將 $y$ 視為常數):$$\n\\begin{aligned}\n \\hspace{60pt}&\\frac{\\partial}{\\partial x} (x^2 + y^2 + z^2 + xyz) = \\frac{\\partial}{\\partial x} (4) \\\\\n &\\Longrightarrow 2x + 0 + 2 z \\frac{\\partial z}{\\partial x} + y \\left[ z + x \\frac{\\partial z}{\\partial x} \\right] = 0 \\;\\; ( 視\\; y \\;為常數;而\\; z= f(x,y) )。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,將得到" + }, + { + "latex": "$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$", + "kind": "math_block" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,將得到$$\n\\hspace{60pt}2+ 2 \\frac{\\partial z}{\\partial x} + \\left( 1+ \\frac{\\partial z}{\\partial x} \\right) =0\n \\Longrightarrow \\frac{\\partial z}{\\partial x} = -1。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "備註", + "style": "bold" + }, + { + "text": ":習慣後,這樣的算法,遠比上面兩個方法快很多!" + } + ], + "content": "備註:習慣後,這樣的算法,遠比上面兩個方法快很多!" + } + ] + } + ], + "ai_prompt_md": "### Example 10\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial x}$ 在 $(x,y,z)=(1,1,1)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 11", + "newline": "true", + "runs": [ + { + "text": "Example 11", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 11, + "ai_prompt_md": "### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$\n\n 繼續推導,上面答案中的方程式將變成?\n$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$\n\n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n$\\boxed{-1}$\n\n\n\n**第二個方法(快速版):隱函數偏微分**\n1. 看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)\n2. **直接對方程式兩邊對 $y$ 進行偏微分**(記得,對 $y$ 偏微時,我們**將 $x$ 視為常數**):\n $$\n \\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n $$\n 結果應該是?\n \n a. $0 + 2y + 2z + xy =0$;\n b. $0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;\n c. $0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$; \n d. $2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。\n \n 繼續推導,上面答案中的方程式將變成?\n \n a. $2y + z + xy = 0$; \n b. $2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$; \n c. $2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$; \n d. $2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。\n \n2. 將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:\n \n \n\n\n\n---\n我們將上面的作法,紀錄在下面的小技巧中:\n\n\n小技巧\n隱函數偏微分的操作流程\n考慮一個**方程式**同時包含 $x,y,z$,\n1. 要求 $\\dfrac{\\partial z}{\\partial x}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $x$ 做偏微分\n - 記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n2. 要求 $\\dfrac{\\partial z}{\\partial y}$ 時\n - 將 $z$ 想成 $z=f(x,y)$ \n - 對整個方程式兩邊對 $y$ 做偏微分\n - 記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。\n\n⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」\n\n\n---\n## 8️⃣ 高階偏導數\n\n給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的**二階偏導函數(second partial derivatives)**。\n\n💡 **直觀理解:**\n- $f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。 \n- $f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。\n\n\n定義\n二階偏導數的不同符號\n給定 $z=f(x,y)$,則**二階偏導數(second partial derivative)**可用下面一些不同**符號**表示:\n$$\n \\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$\n有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。\n\n\n⚠️ **注意.** 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作\n$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$\n右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。\n\n---\n### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-11" + }, + { + "type": "paragraph", + "content": "考慮方程式$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "考慮方程式" + }, + { + "latex": "$$\nx^2 + y^2 + z^2 + xyz = 4。\n$$", + "kind": "math_block" + }, + { + "text": "請計算偏導數 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_73fe61def9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "結果應該是?" + }, + { + "latex": "$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$", + "kind": "math" + } + ], + "content": "直接對方程式兩邊對 $y$ 進行偏微分(記得,對 $y$ 偏微時,我們將 $x$ 視為常數):$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$結果應該是?$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 繼續推導,上面答案中的方程式將變成?$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$", + "newline": "false", + "runs": [ + { + "text": " 繼續推導,上面答案中的方程式將變成?" + }, + { + "latex": "$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,請計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\boxed{-1}$", + "kind": "math" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:$\\boxed{-1}$" + } + ] + } + ], + "ai_prompt_md": "### Example 11\n考慮方程式\n$$\n x^2 + y^2 + z^2 + xyz = 4。\n$$\n請計算偏導數 $\\dfrac{\\partial z}{\\partial y}$ 在 $(x,y,z)=(1,1,1)$ 的值。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_fe8a3a7b42", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "第二個方法(快速版):隱函數偏微分", + "newline": "false", + "runs": [ + { + "text": "第二個方法(快速版):隱函數偏微分", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "看著方程式 " + }, + { + "latex": "$x^2 + y^2 + z^2 + xyz = 4$", + "kind": "math" + }, + { + "text": " 時,假想 " + }, + { + "latex": "$z =f(x,y)$", + "kind": "math" + }, + { + "text": "。(我知道這有點困難,但~熟能生巧!)" + } + ], + "content": "看著方程式 $x^2 + y^2 + z^2 + xyz = 4$ 時,假想 $z =f(x,y)$。(我知道這有點困難,但~熟能生巧!)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "直接對方程式兩邊對 ", + "style": "bold" + }, + { + "latex": "$y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 進行偏微分", + "style": "bold" + }, + { + "text": "(記得,對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微時,我們" + }, + { + "text": "將 ", + "style": "bold" + }, + { + "latex": "$x$", + "kind": "math", + "style": "bold" + }, + { + "text": " 視為常數", + "style": "bold" + }, + { + "text": "):" + }, + { + "latex": "$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "結果應該是?" + } + ], + "content": "直接對方程式兩邊對 $y$ 進行偏微分(記得,對 $y$ 偏微時,我們將 $x$ 視為常數):$$\n\\begin{aligned}\n \\frac{\\partial}{\\partial y}(x^2 + y^2 + z^2 + xyz)\n = \n \\frac{\\partial}{\\partial y}(4)\n \\end{aligned}\n$$結果應該是?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$0 + 2y + 2z + xy =0$;" + }, + { + "key": "b", + "text": "$0 + 2y + 2z\\frac{\\partial z}{\\partial y} + z = 0$;" + }, + { + "key": "c", + "text": "$0 + 2y + 2z\\dfrac{\\partial z}{\\partial y} + x\\left( z + y\\dfrac{\\partial z}{\\partial y}\\right) = 0$;" + }, + { + "key": "d", + "text": "$2x + 0 + 2z\\dfrac{\\partial z}{\\partial x} + y\\left( z + x\\dfrac{\\partial z}{\\partial x}\\right) = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 繼續推導,上面答案中的方程式將變成? " + } + ], + "options": [ + { + "key": "a", + "text": "$2y + z + xy = 0$;" + }, + { + "key": "b", + "text": "$2y + xz + (2z + xy)\\dfrac{\\partial z}{\\partial y} = 0$;" + }, + { + "key": "c", + "text": "$2y + z + x\\dfrac{\\partial z}{\\partial x} = 0$;" + }, + { + "key": "d", + "text": "$2x + yz + (2z + yx)\\dfrac{\\partial z}{\\partial x} = 0$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "將點 " + }, + { + "latex": "$(x,y,z)=(1,1,1)$", + "kind": "math" + }, + { + "text": " 代入上式,請計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "將點 $(x,y,z)=(1,1,1)$ 代入上式,請計算 $\\dfrac{\\partial z}{\\partial y}$:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "-1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "我們將上面的作法,紀錄在下面的小技巧中:", + "newline": "false", + "runs": [ + { + "text": "我們將上面的作法,紀錄在下面的小技巧中:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "小技巧", + "headline": "隱函數偏微分的操作流程", + "body": [ + { + "type": "paragraph", + "content": "考慮一個方程式同時包含 $x,y,z$,", + "newline": "false", + "runs": [ + { + "text": "考慮一個" + }, + { + "text": "方程式", + "style": "bold" + }, + { + "text": "同時包含 " + }, + { + "latex": "$x,y,z$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 時" + } + ], + "content": "要求 $\\dfrac{\\partial z}{\\partial x}$ 時" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + } + ], + "content": "將 $z$ 想成 $z=f(x,y)$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "對整個方程式兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 做偏微分" + } + ], + "content": "對整個方程式兩邊對 $x$ 做偏微分" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "記得:(i) " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數; (ii) " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 要當作函數,必須使用鏈鎖律。" + } + ], + "content": "記得:(i) $y$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": " 時" + } + ], + "content": "要求 $\\dfrac{\\partial z}{\\partial y}$ 時" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 想成 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + } + ], + "content": "將 $z$ 想成 $z=f(x,y)$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "對整個方程式兩邊對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 做偏微分" + } + ], + "content": "對整個方程式兩邊對 $y$ 做偏微分" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "記得:(i) " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 視為常數; (ii) " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 要當作函數,必須使用鏈鎖律。" + } + ], + "content": "記得:(i) $x$ 視為常數; (ii) $z$ 要當作函數,必須使用鏈鎖律。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 $z$ 用鏈鎖律」", + "newline": "false", + "runs": [ + { + "text": "⭐ 核心關鍵只有一句話:「隱函數偏微分 = 整式偏微分 + 對 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 用鏈鎖律」" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-8", + "title": "8️⃣ 高階偏導數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "8️⃣ 高階偏導數", + "newline": "true", + "runs": [ + { + "text": "8️⃣ 高階偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "給定一個雙變數函數 $f(x,y)$,我們可以計算它的一階偏導函數 $f_x(x,y)$ 與 $f_y(x,y)$。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 $(f_x)_x$, $(f_x)_y$, $(f_y)_x$, $(f_y)_y$。而這幾個函數,便稱為函數 $f(x,y)$ 的二階偏導函數(second partial derivatives)。", + "newline": "false", + "runs": [ + { + "text": "給定一個雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",我們可以計算它的一階偏導函數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": "。進一步地,我們也可以再對這些偏導函數進行偏微分,例如 " + }, + { + "latex": "$(f_x)_x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_x)_y$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_y)_x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$(f_y)_y$", + "kind": "math" + }, + { + "text": "。而這幾個函數,便稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "二階偏導函數(second partial derivatives)", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "💡 直觀理解:", + "newline": "false", + "runs": [ + { + "text": "💡 " + }, + { + "text": "直觀理解:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": ":沿著 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向的「斜率」,其變化率。" + } + ], + "content": "$f_{xx}$:沿著 $x$ 方向的「斜率」,其變化率。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}$", + "kind": "math" + }, + { + "text": ":沿著 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的「斜率」,其變化率。" + } + ], + "content": "$f_{yy}$:沿著 $y$ 方向的「斜率」,其變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "二階偏導數的不同符號", + "body": [ + { + "type": "paragraph", + "content": "給定 $z=f(x,y)$,則二階偏導數(second partial derivative)可用下面一些不同符號表示:$$\n\\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$有時候,我們也會將上面等式中的 $(x,y)$ 省略,以簡化表示,如 $f_{xx}(x,y)$ 簡寫成 $f_{xx}$、如 $\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$ 簡寫成 $\\dfrac{\\partial^2 f}{\\partial x^2}$ 等。", + "newline": "false", + "runs": [ + { + "text": "給定 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": ",則" + }, + { + "text": "二階偏導數(second partial derivative)", + "style": "bold" + }, + { + "text": "可用下面一些不同" + }, + { + "text": "符號", + "style": "bold" + }, + { + "text": "表示:" + }, + { + "latex": "$$\n\\begin{aligned}\n (f_x)_x(x,y) &= f_{xx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x^2} (x,y)\n = \\frac{\\partial^2 }{\\partial x^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x^2}; \\\\\n (f_x)_y(x,y) &= f_{xy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial x} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y \\partial x} (x,y)\n = \\frac{\\partial^2 }{\\partial y \\partial x} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y \\partial x};\\\\\n (f_y)_x(x,y) &= f_{yx}(x,y) \n = \\frac{\\partial }{\\partial x} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial x\\partial y} (x,y)\n = \\frac{\\partial^2 }{\\partial x\\partial y} f(x,y)\n = \\frac{\\partial^2 z}{\\partial x\\partial y}; \\\\\n (f_y)_y(x,y) &= f_{yy}(x,y) \n = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial }{\\partial y} f(x,y) \\right)\n = \\frac{\\partial^2 f}{\\partial y^2} (x,y)\n = \\frac{\\partial^2 }{\\partial y^2} f(x,y)\n = \\frac{\\partial^2 z}{\\partial y^2};\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "有時候,我們也會將上面等式中的 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 省略,以簡化表示,如 " + }, + { + "latex": "$f_{xx}(x,y)$", + "kind": "math" + }, + { + "text": " 簡寫成 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": "、如 " + }, + { + "latex": "$\\dfrac{\\partial^2 f}{\\partial x^2}(x,y)$", + "kind": "math" + }, + { + "text": " 簡寫成 " + }, + { + "latex": "$\\dfrac{\\partial^2 f}{\\partial x^2}$", + "kind": "math" + }, + { + "text": " 等。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 $x$ 再對 $y$ 的偏導數,記作$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$右式分母最右邊的 $x$ 代表「先對 $x$ 偏微分」。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 書寫二階偏導數時,請小心下標順序。下標順序代表偏微分順序。例如,先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數,記作" + }, + { + "latex": "$$\nf_{xy}\\quad 或 \\quad \\frac{\\partial^2 f}{\\partial y\\,\\partial x}。\n$$", + "kind": "math_block" + }, + { + "text": "右式分母最右邊的 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 代表「先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微分」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 12", + "newline": "true", + "runs": [ + { + "text": "Example 12", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 12, + "ai_prompt_md": "### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n$\\boxed{2y}$\n - $f_{xy}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yx}(x,y) = ?$\n$\\boxed{2x-3}$\n - $f_{yy}(x,y) = ?$\n$\\boxed{0}$\n\n\n\n1. **先求一階偏導數 $f_x, f_y$:** 由上面範例,我們已經求得\n $$\n \\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n $$\n2. **由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:**\n $$\n \\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n $$\n 請上述計算後的結果:\n - $f_{xx}(x,y) = ?$\n \n \n - $f_{xy}(x,y) = ?$\n \n \n - $f_{yx}(x,y) = ?$\n \n \n - $f_{yy}(x,y) = ?$\n \n \n\n\n---\n\n在上面的範例,我們可以觀察到\n$$\n f_{xy}(x,y)=f_{yx}(x,y)。\n$$\n也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。\n\n這其實不是偶然的,對於大部分函數,都有這樣的性質:「**二階偏微分的結果與偏微分的順序無關**」。我們將這樣的結果紀錄在下面的定理中。\n\n\n定理(Clairaut 定理)\n偏微分的結果與偏微分的順序無關 \n給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則\n$$\n f_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$\n\n\n除了二階偏導數,其實我們也可以定義更高階的偏導數,比如**三階偏導數、四階偏導數**,其定義方式也都如同二階偏導數一般。比方,我們定義\n$$\n f_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$\n**注意.** 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。\n\n同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「**對於大部分函數,偏微分的結果與偏微分的順序無關**」。比如,\n$$\n f_{xyy} = f_{yxy} = f_{yyx},\n$$\n如果它們存在且連續。\n\n⚠️ **注意.** 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。\n\n---\n### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-12" + }, + { + "type": "paragraph", + "content": "考慮雙變數函數$$\nf(x,y) = x^2 y -3 x y。\n$$請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數" + }, + { + "latex": "$$\nf(x,y) = x^2 y -3 x y。\n$$", + "kind": "math_block" + }, + { + "text": "請計算函數所有的二階偏導數 " + }, + { + "latex": "$f_{xx}, f_{xy}, f_{yx}, f_{yy}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ec47ed314b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先求一階偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x, f_y$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 由上面範例,我們已經求得" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求一階偏導數 $f_x, f_y$: 由上面範例,我們已經求得$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由一階偏導數繼續對 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 偏微分,便能求所有二階偏導數:", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "請上述計算後的結果:" + } + ], + "content": "由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$請上述計算後的結果:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2y}$", + "kind": "math" + } + ], + "content": "$f_{xx}(x,y) = ?$$\\boxed{2y}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xy}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2x-3}$", + "kind": "math" + } + ], + "content": "$f_{xy}(x,y) = ?$$\\boxed{2x-3}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yx}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{2x-3}$", + "kind": "math" + } + ], + "content": "$f_{yx}(x,y) = ?$$\\boxed{2x-3}$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}(x,y) = ?$", + "kind": "math" + }, + { + "latex": "$\\boxed{0}$", + "kind": "math" + } + ], + "content": "$f_{yy}(x,y) = ?$$\\boxed{0}$" + } + ] + } + ], + "ai_prompt_md": "### Example 12\n考慮雙變數函數\n$$\n f(x,y) = x^2 y -3 x y。\n$$\n請計算函數所有的二階偏導數 $f_{xx}, f_{xy}, f_{yx}, f_{yy}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_68dd867971", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先求一階偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x, f_y$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 由上面範例,我們已經求得" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "先求一階偏導數 $f_x, f_y$: 由上面範例,我們已經求得$$\n\\begin{aligned}\n f_x(x,y) &= 2xy - 3y, \\\\\n f_y(x,y) &= x^2 - 3x。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "由一階偏導數繼續對 ", + "style": "bold" + }, + { + "latex": "$x,y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 偏微分,便能求所有二階偏導數:", + "style": "bold" + }, + { + "latex": "$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "請上述計算後的結果:" + } + ], + "content": "由一階偏導數繼續對 $x,y$ 偏微分,便能求所有二階偏導數:$$\n\\begin{aligned}\n f_{xx} &= \\frac{\\partial}{\\partial x} f_x(x,y), \\; f_{xy} = \\frac{\\partial}{\\partial y} f_x(x,y),\\\\\n f_{yx} &= \\frac{\\partial}{\\partial x} f_y(x,y), \\; f_{yy} = \\frac{\\partial}{\\partial y} f_y(x,y)。\n \\end{aligned}\n$$請上述計算後的結果:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xx}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{xx}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{xy}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{xy}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yx}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{yx}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_{yy}(x,y) = ?$", + "kind": "math" + } + ], + "content": "$f_{yy}(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "在上面的範例,我們可以觀察到$$\nf_{xy}(x,y)=f_{yx}(x,y)。\n$$也就是:函數先對 $x$ 再對 $y$ 偏微,與先對 $y$ 再對 $x$ 偏微,結果是一樣的。", + "newline": "false", + "runs": [ + { + "text": "在上面的範例,我們可以觀察到" + }, + { + "latex": "$$\nf_{xy}(x,y)=f_{yx}(x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "也就是:函數先對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 偏微,與先對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 再對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微,結果是一樣的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這其實不是偶然的,對於大部分函數,都有這樣的性質:「二階偏微分的結果與偏微分的順序無關」。我們將這樣的結果紀錄在下面的定理中。", + "newline": "false", + "runs": [ + { + "text": "這其實不是偶然的,對於大部分函數,都有這樣的性質:「" + }, + { + "text": "二階偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。我們將這樣的結果紀錄在下面的定理中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理(Clairaut 定理)", + "headline": "偏微分的結果與偏微分的順序無關", + "body": [ + { + "type": "paragraph", + "content": "給定雙變數函數 $f(x,y)$。若在某個區域 $D$ 內,$f_{xy}$ 與 $f_{yx}$ 都存在且連續,則$$\nf_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$", + "newline": "false", + "runs": [ + { + "text": "給定雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若在某個區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 內," + }, + { + "latex": "$f_{xy}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{yx}$", + "kind": "math" + }, + { + "text": " 都存在且連續,則" + }, + { + "latex": "$$\nf_{xy}(x,y)=f_{yx}(x,y),\\qquad \\forall (x,y)\\in D。\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "除了二階偏導數,其實我們也可以定義更高階的偏導數,比如三階偏導數、四階偏導數,其定義方式也都如同二階偏導數一般。比方,我們定義$$\nf_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$注意. 請注意偏微分在書寫上的順序。比如,上例 $f_{xyy}$ 偏微分順序是 $x \\to y \\to y$。而 $\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$ 偏微分順序是 $x\\to y \\to y$ 。", + "newline": "false", + "runs": [ + { + "text": "除了二階偏導數,其實我們也可以定義更高階的偏導數,比如" + }, + { + "text": "三階偏導數、四階偏導數", + "style": "bold" + }, + { + "text": ",其定義方式也都如同二階偏導數一般。比方,我們定義" + }, + { + "latex": "$$\nf_{xyy}(x,y) = (f_{xy})_y(x,y) = \\frac{\\partial }{\\partial y} \\left( \\frac{\\partial^2 f}{\\partial y \\partial x} \\right) (x,y) = \\frac{\\partial^3 f}{\\partial y\\partial y \\partial x} (x,y)。\n$$", + "kind": "math_block" + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 請注意偏微分在書寫上的順序。比如,上例 " + }, + { + "latex": "$f_{xyy}$", + "kind": "math" + }, + { + "text": " 偏微分順序是 " + }, + { + "latex": "$x \\to y \\to y$", + "kind": "math" + }, + { + "text": "。而 " + }, + { + "latex": "$\\frac{\\partial^3}{\\partial y\\partial y \\partial x}$", + "kind": "math" + }, + { + "text": " 偏微分順序是 " + }, + { + "latex": "$x\\to y \\to y$", + "kind": "math" + }, + { + "text": " 。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「對於大部分函數,偏微分的結果與偏微分的順序無關」。比如,$$\nf_{xyy} = f_{yxy} = f_{yyx},\n$$如果它們存在且連續。", + "newline": "false", + "runs": [ + { + "text": "同樣的,對於三階導數或更高階的導數,我們會有類似上面定理的結果:「" + }, + { + "text": "對於大部分函數,偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。比如," + }, + { + "latex": "$$\nf_{xyy} = f_{yxy} = f_{yyx},\n$$", + "kind": "math_block" + }, + { + "text": "如果它們存在且連續。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "⚠️ 注意. 請注意偏微分在書寫上的順序。例如 $f_{xyy}$ 的偏微分順序是 $x\\to y\\to y$。", + "newline": "false", + "runs": [ + { + "text": "⚠️ " + }, + { + "text": "注意.", + "style": "bold" + }, + { + "text": " 請注意偏微分在書寫上的順序。例如 " + }, + { + "latex": "$f_{xyy}$", + "kind": "math" + }, + { + "text": " 的偏微分順序是 " + }, + { + "latex": "$x\\to y\\to y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 13", + "newline": "true", + "runs": [ + { + "text": "Example 13", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 13, + "ai_prompt_md": "### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n$x\\to x \\to y$\n\n2. 我們先計算 $f_x$:\n$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$\n\n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$\n\n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$\n\n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的\n\n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n1. 先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?\n \n a. $x\\to x \\to y$; \n b. $y\\to x \\to x$。\n \n2. 我們先計算 $f_x$:\n \n a. $f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$; \n b. $f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;\n c. $f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_x(x,y) = \\cos(x^2y-3xy)$。\n \n3. 再來,我們計算 $f_{xx}= (f_x)_x$:\n \n a. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$; \n b. $f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;\n c. $f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;\n d. $f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。\n \n4. 最後,我們計算 $f_{xxy}= (f_{xx})_y$:\n \n a. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$; \n b. $f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;\n c. $f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;\n d. $f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。\n \n5. 對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?\n \n a. 不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的; \n b. 需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n c. 不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;\n d. 不確定。\n \n ⭐ **提醒**:**由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。**\n\n\n\n\n---\n## 9️⃣ 三或更多變數函數的偏導數\n\n上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,\n\n📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的**偏導數**為\n$$\n \\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$\n它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。\n\n📌 同樣的,我們也可以定義**偏導函數** $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。\n\n📌 而雙變數**偏微分的計算法則**,套用在多變數函數中也是成立的。即:執行偏微分時,**對某一變數偏微分時,其餘變數皆視為常數**。符號上,亦寫作\n$$\n \\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$\n\n📌 此外,「**隱函數偏微分**」、「**高階偏導數**」等主題,也都可以自然推廣到三變數與多變數函數中。\n\n📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「**若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關**」。\n\n---\n### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-13" + }, + { + "type": "paragraph", + "content": "考慮雙變數函數$$\nf(x,y) = \\sin (x^2 y -3 x y)。\n$$請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數" + }, + { + "latex": "$$\nf(x,y) = \\sin (x^2 y -3 x y)。\n$$", + "kind": "math_block" + }, + { + "text": "請計算 " + }, + { + "latex": "$f_{xxy}(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_4cdf51175b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先確認微分順序:" + }, + { + "latex": "$f_{xxy}$", + "kind": "math" + }, + { + "text": " 表示先對哪個變數偏微分?" + }, + { + "latex": "$x\\to x \\to y$", + "kind": "math" + } + ], + "content": "先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?$x\\to x \\to y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們先計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "我們先計算 $f_x$:$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再來,我們計算 " + }, + { + "latex": "$f_{xx}= (f_x)_x$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "再來,我們計算 $f_{xx}= (f_x)_x$:$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "最後,我們計算 " + }, + { + "latex": "$f_{xxy}= (f_{xx})_y$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$", + "kind": "math" + } + ], + "content": "最後,我們計算 $f_{xxy}= (f_{xx})_y$:$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "對於 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": ",我們還需要重新計算一次嗎?" + }, + { + "text": "不需要," + }, + { + "latex": "$f_{xxy}(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": " 微分順序是不一樣的" + } + ], + "content": "對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " ⭐ 提醒:由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "newline": "false", + "runs": [ + { + "text": " ⭐ " + }, + { + "text": "提醒", + "style": "bold" + }, + { + "text": ":" + }, + { + "text": "由於 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "style": "bold" + } + ] + } + ], + "ai_prompt_md": "### Example 13\n考慮雙變數函數\n$$\n f(x,y) = \\sin (x^2 y -3 x y)。\n$$\n請計算 $f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dce8a972c0", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先確認微分順序:" + }, + { + "latex": "$f_{xxy}$", + "kind": "math" + }, + { + "text": " 表示先對哪個變數偏微分?" + } + ], + "content": "先確認微分順序:$f_{xxy}$ 表示先對哪個變數偏微分?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$x\\to x \\to y$;" + }, + { + "key": "b", + "text": "$y\\to x \\to x$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "我們先計算 " + }, + { + "latex": "$f_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "我們先計算 $f_x$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(x,y) = (2xy-3y)\\cos(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_x(x,y) = (2xy-3y)\\sin(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_x(x,y) = (x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_x(x,y) = \\cos(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "再來,我們計算 " + }, + { + "latex": "$f_{xx}= (f_x)_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "再來,我們計算 $f_{xx}= (f_x)_x$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy) - (2xy-3y)^2\\sin(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_{xx}(x,y) = 2y\\cos(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_{xx}(x,y) = -(2xy-3y)^2\\sin(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_{xx}(x,y) = (2xy-3y)\\cos(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "最後,我們計算 " + }, + { + "latex": "$f_{xxy}= (f_{xx})_y$", + "kind": "math" + }, + { + "text": ":" + } + ], + "content": "最後,我們計算 $f_{xxy}= (f_{xx})_y$:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy) - 2y(x^2-3x)\\sin(x^2y-3xy) - 2(2xy-3y)(2x-3)\\sin(x^2y-3xy) - (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "b", + "text": "$f_{xxy}(x,y) = 2\\cos(x^2y-3xy)$;" + }, + { + "key": "c", + "text": "$f_{xxy}(x,y) = (2xy-3y)^2(x^2-3x)\\cos(x^2y-3xy)$;" + }, + { + "key": "d", + "text": "$f_{xxy}(x,y) = (x^2-3x)\\sin(x^2y-3xy)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "對於 " + }, + { + "latex": "$f_{xyx}(x,y)$", + "kind": "math" + }, + { + "text": ",我們還需要重新計算一次嗎?" + } + ], + "content": "對於 $f_{xyx}(x,y)$,我們還需要重新計算一次嗎?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "不需要,$f_{xxy}(x,y)$ 與 $f_{xyx}(x,y)$ 微分順序是不一樣的;" + }, + { + "key": "b", + "text": "需要,因為任何函數都會有 $f_{xxy}(x,y) = f_{xyx}(x,y)$;" + }, + { + "key": "c", + "text": "不需要,因為本題的函數,其所有偏導數皆連續,因此 $f_{xxy}(x,y) = f_{xyx}(x,y)$;" + }, + { + "key": "d", + "text": "不確定。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": " ⭐ 提醒:由於 $f(x,y)$ 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "newline": "false", + "runs": [ + { + "text": " ⭐ " + }, + { + "text": "提醒", + "style": "bold" + }, + { + "text": ":" + }, + { + "text": "由於 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 是由多項式、三角函數等基本函數所組成(經四則或合成運算),因此即使多次微分,所得函數仍為基本函數所組成,其相關高階偏導數在其定義域內皆存在且連續。", + "style": "bold" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-9", + "title": "9️⃣ 三或更多變數函數的偏導數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "9️⃣ 三或更多變數函數的偏導數", + "newline": "true", + "runs": [ + { + "text": "9️⃣ 三或更多變數函數的偏導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "9" + }, + { + "type": "paragraph", + "content": "上面我們介紹了雙變數函數 $f(x,y)$ 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如,", + "newline": "false", + "runs": [ + { + "text": "上面我們介紹了雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏微分與相關概念。這些想法可以很自然地推廣到三變數或多變數的情形。例如," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 對三變數函數 $f(x,y,z)$,我們定義其在點 $(a,b,c)$ 的偏導數為$$\n\\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。", + "newline": "false", + "runs": [ + { + "text": "📌 對三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們定義其在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "偏導數", + "style": "bold" + }, + { + "text": "為" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b,c) &= \\lim_{\\Delta x \\to 0} \\frac{ f(a+\\Delta x,b,c) - f(a,b,c) }{\\Delta x}, \\\\\n f_y(a,b,c) &= \\lim_{\\Delta y \\to 0} \\frac{ f(a,b+\\Delta y,c) - f(a,b,c) }{\\Delta y}, \\\\\n f_z(a,b,c) &= \\lim_{\\Delta z \\to 0} \\frac{ f(a,b,c+\\Delta z) - f(a,b,c) }{\\Delta z}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "它們同樣描述函數在各變數變化下,對函數造成的「瞬間變化率」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 同樣的,我們也可以定義偏導函數 $f_x(x,y,z)$, $f_y(x,y,z)$, $f_z(x,y,z)$。", + "newline": "false", + "runs": [ + { + "text": "📌 同樣的,我們也可以定義" + }, + { + "text": "偏導函數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_x(x,y,z)$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_y(x,y,z)$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_z(x,y,z)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 而雙變數偏微分的計算法則,套用在多變數函數中也是成立的。即:執行偏微分時,對某一變數偏微分時,其餘變數皆視為常數。符號上,亦寫作$$\n\\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "📌 而雙變數" + }, + { + "text": "偏微分的計算法則", + "style": "bold" + }, + { + "text": ",套用在多變數函數中也是成立的。即:執行偏微分時," + }, + { + "text": "對某一變數偏微分時,其餘變數皆視為常數", + "style": "bold" + }, + { + "text": "。符號上,亦寫作" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(x,y,z) &= \\frac{\\partial}{\\partial x} f(x,y,z), \\\\\n f_y(x,y,z) &= \\frac{\\partial}{\\partial y} f(x,y,z), \\\\\n f_z(x,y,z) &= \\frac{\\partial}{\\partial z} f(x,y,z)。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 此外,「隱函數偏微分」、「高階偏導數」等主題,也都可以自然推廣到三變數與多變數函數中。", + "newline": "false", + "runs": [ + { + "text": "📌 此外,「" + }, + { + "text": "隱函數偏微分", + "style": "bold" + }, + { + "text": "」、「" + }, + { + "text": "高階偏導數", + "style": "bold" + }, + { + "text": "」等主題,也都可以自然推廣到三變數與多變數函數中。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關」。", + "newline": "false", + "runs": [ + { + "text": "📌 最後,我們也強調 Clairaut 定理對於多變數函數也是成立的,也就是「" + }, + { + "text": "若函數的高階偏導數存在且連續,偏微分的結果與偏微分的順序無關", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 14", + "newline": "true", + "runs": [ + { + "text": "Example 14", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 14, + "ai_prompt_md": "### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n$\\boxed{y e^{xy}\\ln(z)}$\n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n$\\boxed{x e^{xy}\\ln(z)}$\n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n$\\boxed{e^{xy}/z}$\n\n\n\n1. 偏導數 \n $$\n f_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?\n \n \n2. 偏導數 \n $$\n f_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?\n \n \n3. 偏導數 \n $$\n f_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n $$\n 偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?\n \n \n", + "id": "Example-14" + }, + { + "type": "paragraph", + "content": "考慮三變數函數 $$\nf(x,y,z) = e^{xy}\\ln(z)。\n$$請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。", + "newline": "false", + "runs": [ + { + "text": "考慮三變數函數 " + }, + { + "latex": "$$\nf(x,y,z) = e^{xy}\\ln(z)。\n$$", + "kind": "math_block" + }, + { + "text": "請計算 " + }, + { + "latex": "$f_{x}$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$f_{y}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{z}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dfafb51f45", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。因此,由鏈鎖律可得答案為?" + }, + { + "latex": "$\\boxed{y e^{xy}\\ln(z)}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?$\\boxed{y e^{xy}\\ln(z)}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。同樣由鏈鎖律可得答案為?" + }, + { + "latex": "$\\boxed{x e^{xy}\\ln(z)}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?$\\boxed{x e^{xy}\\ln(z)}$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。此時 " + }, + { + "latex": "$e^{xy}$", + "kind": "math" + }, + { + "text": " 是常數因子,因此答案為?" + }, + { + "latex": "$\\boxed{e^{xy}/z}$", + "kind": "math" + } + ], + "content": "偏導數$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?$\\boxed{e^{xy}/z}$" + } + ] + } + ], + "ai_prompt_md": "### Example 14\n考慮三變數函數 \n$$\n f(x,y,z) = e^{xy}\\ln(z)。\n$$\n請計算 $f_{x}$, $f_{y}$ 與 $f_{z}$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_cd483b721a", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。因此,由鏈鎖律可得答案為?" + } + ], + "content": "偏導數$$\nf_{x}(x,y,z) = \\frac{\\partial}{\\partial x} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $x$ 為變數,其他變數 $y$ 與 $z$ 視為常數。因此,由鏈鎖律可得答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "y e^{xy}\\ln(z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 視為常數。同樣由鏈鎖律可得答案為?" + } + ], + "content": "偏導數$$\nf_{y}(x,y,z) = \\frac{\\partial}{\\partial y} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $y$ 為變數,其他變數 $x$ 與 $z$ 視為常數。同樣由鏈鎖律可得答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "x e^{xy}\\ln(z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "偏導數" + }, + { + "latex": "$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$", + "kind": "math_block" + }, + { + "text": "偏微分時,僅視 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 為變數,其他變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 視為常數。此時 " + }, + { + "latex": "$e^{xy}$", + "kind": "math" + }, + { + "text": " 是常數因子,因此答案為?" + } + ], + "content": "偏導數$$\nf_{z}(x,y,z) = \\frac{\\partial}{\\partial z} \\big( e^{xy}\\ln(z) \\big)。\n$$偏微分時,僅視 $z$ 為變數,其他變數 $x$ 與 $y$ 視為常數。此時 $e^{xy}$ 是常數因子,因此答案為?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "e^{xy}/z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/C14_3/partial_derivative.png b/pages/Ch14/C14_3/partial_derivative.png new file mode 100644 index 0000000000000000000000000000000000000000..4bff3313174813afab65b07f2db39c8ba6ddc62b --- /dev/null +++ b/pages/Ch14/C14_3/partial_derivative.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a15f7e3b475f9bb4c6b4269177b68a97c8f0e1d0f894690c1b4873d4da910055 +size 370316 diff --git a/pages/Ch14/C14_4/Dash_Ch14_4.py b/pages/Ch14/C14_4/Dash_Ch14_4.py new file mode 100644 index 0000000000000000000000000000000000000000..b267852933a20e250c48d0941c10ac2bf4b1575e --- /dev/null +++ b/pages/Ch14/C14_4/Dash_Ch14_4.py @@ -0,0 +1,11 @@ +import dash +from layout.page_builder import make_test_page +from pathlib import Path + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_4.json" + +dash.register_page(__name__, path="/Ch14_4", title="Ch14_4") + +def layout(): + return make_test_page(str(JSON_PATH), top_offset=90) diff --git a/pages/Ch14/C14_4/Md_14_4.md b/pages/Ch14/C14_4/Md_14_4.md new file mode 100644 index 0000000000000000000000000000000000000000..d053bdf49c04662cf35d8b94a0b6f420706df81a --- /dev/null +++ b/pages/Ch14/C14_4/Md_14_4.md @@ -0,0 +1,807 @@ +# 線性估計與切平面 + +--- +## 1️⃣線性估計 + +上一節中,我們介紹了雙變數函數 $f(x,y)$ 的偏導數。以點 $(a,b)$ 為例,定義如下: +$$ + \begin{aligned} + f_x(a,b) &= \lim_{\Delta x \to 0} \frac{f(a+\Delta x , b)-f(a,b)}{\Delta x},\\ + f_y(a,b) &= \lim_{\Delta y \to 0} \frac{f(a , b+\Delta y)-f(a,b)}{\Delta y}。 + \end{aligned} +$$ +這兩個量分別代表 $f$ 在 $x$ 方向與 $y$ 方向的瞬間變化率。因此,在偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下,當 $\Delta x$ 與 $\Delta y$ 都非常小時,可以將偏導數視為「變化率」,得到近似關係: +$$ + \begin{aligned} + f_x(a,b) &\approx \frac{f(a+\Delta x , b)-f(a,b)}{\Delta x},\\ + f_y(a,b) &\approx \frac{f(a , b+\Delta y)-f(a,b)}{\Delta y}。 + \end{aligned} +$$ +且,當 $\Delta x$, $\Delta y$ 越小時,誤差越小(估計更精準)。 + +由上述兩個近似式,我們可以得到 $f$ 的變化量在各方向的估計。當 $\Delta x$ 與 $\Delta y$ 都很小時: +$$ + \begin{aligned} + f(a+\Delta x , b) - f(a,b) &\approx f_x(a,b) \Delta x,\\ + f(a , b+\Delta y) - f(a,b) &\approx f_y(a,b) \Delta y。 + \end{aligned} +$$ +且,當 $\Delta x$, $\Delta y$ 越小時,誤差越小(估計更精準)。這兩條式子表達了一個非常直覺的觀念:**應變數的變化量 = 變化率 × 自變數的變化**。 + +進一步將上式移項,可得:當偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下, +$$ + \begin{aligned} + f(a+\Delta x , b) &\approx f(a,b) + f_x(a,b) \Delta x,\\ + f(a , b+\Delta y) &\approx f(a,b) + f_y(a,b) \Delta y。 + \end{aligned} +$$ +且,當 $\Delta x$, $\Delta y$ 越小時,誤差越小(估計更精準)。這表示:**在做小幅度的變動時,$f$ 的值可以由「原本的函數值」加上「變化率 × 變動量」來估計**。 + +前面我們分別討論了只變動 $x$ 或只變動 $y$ 時,$f$ 的變化可以用偏導數來估計。 +那麼,如果現在我們 同時 對 $x$ 與 $y$ 做微小的變動,也就是 $\Delta x$ 和 $\Delta y$ 都接近 $0$ 時, +$$ + f(a+\Delta x , b+\Delta y) +$$ +**又該如何近似呢?** + + +1. 直覺上,$f$ 的變化會同時受到 $x$ 與 $y$ 這兩個方向變動的影響,因此其總變化量理應由兩項貢獻加總而成。為了正式推導線性估計,我們先觀察:$f(a+\Delta x , b+\Delta y) - f(a,b)$。 + +2. 利用「加減同一項」的方式,我們把變化量拆成先變 $y$、再變 $x$ 兩段。 + $$ + \begin{aligned} + &f(a+\Delta x , b+\Delta y) - f(a,b) \\ + &= \left[ f(a+\Delta x , b+\Delta y) - f(a,b+\Delta y) \right] + + \left[ f(a,b+\Delta y) - f(a,b) \right] + \end{aligned} + $$ + - 這是多變數函數線性化中最核心的一步,常見教材直接跳過,但實際上這是『線性估計為何成立』的根本原因。 +3. 上述第一項可以看成是「在點 $(a,b+\Delta y)$ 上,函數 $f$ 在 $x$ 方向有一個 $\Delta x$ 的變化量」,因此: + $$ + f(a+\Delta x , b+\Delta y) - f(a,b+\Delta y) \approx ? + $$ + + a. $f_x(a,b) \Delta x$; + b. $f_x(a,b+\Delta y) \Delta x$; + c. $f_y(a,b) \Delta y$; + d. $f_x(a,b+\Delta x) \Delta y$。 + +4. 上述第二項可以看成是「在點 $(a,b)$ 上,函數 $f$ 在 $y$ 方向有一個 $\Delta y$ 的變化量」,因此: + $$ + f(a,b+\Delta y) - f(a,b) \approx ? + $$ + + a. $f_x(a,b) \Delta x$; + b. $f_x(a,b+\Delta y) \Delta x$; + c. $f_y(a,b) \Delta y$; + d. $f_x(a,b+\Delta x) \Delta y$。 + +5. 由上面兩個推導,我們得到: + $$ + \begin{aligned} + f(a+\Delta x , b+\Delta y) - f(a,b) \approx f_x(a,b+\Delta y) \Delta x + f_y(a,b) \Delta y + \end{aligned} + $$ + + 記得: + 1. 第一項使用的是點 $(a,b+\Delta y)$ 對 $x$ 的偏導數(此外,需要 $f_x(a,b+\Delta y)$ 是存在的); + 2. 第二項使用的是點 $(a,b)$ 對 $y$ 的偏導數(此外,需要 $f_y(a,b)$ 是存在的)。 +6. 是不是很想將上式 $f_x(a,b+\Delta y)$ 寫成 $f_x(a,b)$ 呢?也就是希望: + $$ + f_x(a,b+\Delta y) \approx f_x(a,b) ? + $$ + 等價地,希望: + $$ + \lim_{\Delta y \to 0} f_x(a,b+\Delta y) = f_x(a,b) ? + $$ + + 試想:什麼條件可以保證上式一定成立? + + a. 任意的函數 $f_x(x,y)$ 皆會成立; + b. 函數 $f_x(x,y)$ 在 $(a,b)$ 的極限存在; + c. 函數 $f_x(x,y)$ 在 $(a,b)$ 是連續的。 + d. 函數 $f_y(x,y)$ 在 $(a,b)$ 是連續的。 + +7. 因此,在偏導數連續的條件成立時: + $$ + f(a+\Delta x , b+\Delta y) - f(a,b) \approx f_x(a,b) \Delta x + f_y(a,b) \Delta y。 + $$ + 等價的, + $$ + f(a+\Delta x , b+\Delta y) \approx f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y。 + $$ + + +我們將結果得到 $f(a+\Delta x , b+\Delta y)$ 近似的結果,紀錄如下: + + +定理 +線性估計(Linear Approximation) +考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的, +則當 $\Delta x$ 與 $\Delta y$ 都非常小時,我們會有: +$$ + \boxed{f(a+\Delta x , b+\Delta y) \approx f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y}。 +$$ +等價的,令 $x = a+\Delta x$ 與 $y = b+\Delta y$,則在 $x\approx a$ 與 $y\approx b$ 時, +$$ + \boxed{f(x , y) \approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)}。 +$$ +以上兩式皆稱為函數 $f(x,y)$ 在點 $(a,b)$ 的 **線性估計(Linear Approximation)**。這兩個公式只是表達方式略有不同。此外,當 $\Delta x$, $\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。 + + +**注意 1.** 條件的要求是偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 「**附近**」皆是連續的,不是只有點 $(a,b)$ 而已。因為,在上面推導第 4 點中有一項要求:$f_x(a,b+\Delta y)$ 是存在的,不是只有要求 $f_x(a,b+\Delta y)$ 是存在的。 + +**注意 2.** 上面定理,要求「偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的」,其實有一點多!只是這樣條件比較清晰簡潔。 + +**注意 3.** 上面定理,框起來的兩個公式,非常重要,我們將在後面反覆利用它們。一個公式,多個解釋! + +--- +### Example 1 +考慮函數 +$$ + f(x,y) = \ln ( x^2y - 3xy + 3y ) +$$ +請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。 +$$ + f(2.01, 0.99) \approx ? \text{(輸入近似值(四捨五入到小數第2位))} +$$ + + + +設函數 $f(x,y)$ 在點 $(2,1)$ 附近可用線性估計來近似。 + +在線性估計中,我們使用的公式是 +$$ +L(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1). +$$ + +接著計算在點 $(2,1)$ 的函數值與偏導數值: +$$ +f(2,1)=0,\qquad f_x(2,1)=1,\qquad f_y(2,1)=1. +$$ + +因此,函數在點 $(2,1)$ 的線性估計公式為 +$$ +L(x,y)=0+1(x-2)+1(y-1). +$$ + +也就是 +$$ +L(x,y)=x+y-3. +$$ + +現在利用這個線性估計公式來估計 +$$ +f(2.01,0.99). +$$ + +代入可得 +$$ +L(2.01,0.99)=0+(2.01-2)+(0.99-1). +$$ + +因此 +$$ +L(2.01,0.99)=0.01-0.01=0. +$$ + +所以 +$$ +f(2.01,0.99)\approx 0. +$$ + + + + +1. 寫出函數 $f(x,y)$ 在點 $(2,1)$ 的線性估計公式 + + a. $f(x,y) = f(2,1) + f_x(x,y) (x-2) + f_y(x,y) (y-1)$; + b. $f(x,y) = f(2,1) + f_x(x,y) (x-2.01) + f_y(x,y) (y-0.99)$; + c. $f(x,y) = f(2,1) + f_x(2,1) (x-2) + f_y(2,1) (y-1)$; + d. $f(x,y) = f(2,1) + f_x(2,1) (x-2.01) + f_y(2,1) (y-0.99)$。 + + + +2. 先計算 $f(2,1)$,$f_x(2,1)$ 與 $f_y(2,1)$,再選出正確的線性估計公式: + + a. $f(x,y) \approx -1 + 2(x-2) + (y-1)$; + b. $f(x,y) \approx 0 + 2(x-2) + (y-1)$; + c. $f(x,y) \approx 0 + 1(x-2) + 1(y-1)$; + d. $f(x,y) \approx 0 + (x-2) + 2(y-1)$。 + + + +3. 利用上題選出的線性估計公式,將 $(2.01, 0.99)$ 代入,估計 + $$ + f(2.01, 0.99) \approx ? \text{(輸入近似值(四捨五入到小數第2位))} + $$ + + + +答案:$f(2.01,0.99)\approx 0.$ + + + + +--- +## 2️⃣多變數函數的可微性 + +在前面的「**線性估計(Linear Approximation)**」定理中,我們提到:如果偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則當 $\Delta x$ 與 $\Delta y$ 都非常小時, +$$ + f(a+\Delta x , b+\Delta y) \approx f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y +$$ +且,當 $\Delta x$, $\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。 +事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「**可微的(Differentiable)**」來描述 真正意義上 的線性近似成立。 + + +定義 +可微的(Differentiable) +考慮雙變數函數 $f(x,y)$。如果在點 $(a,b)$ 附近,函數的改變量可以寫成 +$$ + f(a+\Delta x , b+\Delta y) = f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y。 +$$ +或更精確的, +$$ + f(a+\Delta x , b+\Delta y) = + f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y + \varepsilon_1 \Delta x + \varepsilon_2 \Delta y。 +$$ +其中 $\varepsilon_1$ 與 $\varepsilon_2$ 皆會在 $(\Delta x, \Delta y)$ 趨近於 $(0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y)$ 在點 $(a,b)$ 是「**可微的(Differentiable)**」。 + + +**注意 1.** +上述形式比使用近似符號 $\approx$ 的寫法更加簡潔與嚴謹,因為它直接反映出,當 $(\Delta x, \Delta y)$ 趨近於 $(0,0)$ 時, +$$ + f(a+\Delta x , b+\Delta y) \approx f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y +$$ +上面兩式等號左右兩項誤差越小(估計更精準)。 + +**注意 2.** 可微性意味著,此函數在點 $(a,b)$ 附近可以被一個線性函數很好地逼近。 + +**注意 3.** +上述對於多變數函數 $f(x,y)$ 在點 $(a,b)$ 的可微性,這與單變數函數 $f(x)$ 在點 $a$ 的可微性定義是一致的。我們定義單變數函數 $f(x)$ 在點 $a$ 是可微的,如果 +$$ + f'(a) = \lim_{\Delta x \to 0} \frac{f(a+\Delta x) -f(a)}{\Delta x} +$$ +存在。這等價於以下線性估計成立: +$$ + f'(a) \approx \frac{f(a+\Delta x) - f(a)}{\Delta x} + \Longleftrightarrow + f(a+\Delta x) \approx f(a) + f'(a) \Delta x +$$ +且,當 $\Delta x$ 趨近於 $0$ 時,左右兩邊的差值(誤差)會越來越小。 + +透過上面「**線性估計(Linear Approximation)**」定理與「**可微的(Differentiable)**」定義,我們會有以下結論: + + +推論 +檢驗可微分的方法 +考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則函數 $f(x,y)$ 在點 $(a,b)$ 是可微的。 + + +**注意 1.** 請注意,如果只有 $f_x(a,b)$ 與 $f_y(a,b)$ 存在,未函數 $f(x,y)$ 在點 $(a,b)$ 是可微的!請參見下面例題。 + + +定理 +可微分 必定 連續 +考慮雙變數函數 $f(x,y)$。若 $f(x,y)$ 在點 $(a,b)$ 是可微的,則其在點 $(a,b)$ 是連續的。 + + + +1. 由雙變數函數 $f(x,y)$ 在點 $(a,b)$ 是可微的定義: + $$ + f(a+\Delta x , b+\Delta y) = + f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y + \varepsilon_1 \Delta x + \varepsilon_2 \Delta y。 + $$ + 其中 $\varepsilon_1$ 與 $\varepsilon_2$ 會在 $(\Delta x, \Delta y)$ 趨近於 $(0,0)$ 時,皆趨近於 $0$。 +2. 因此, + $$ + \begin{aligned} + \lim_{(\Delta x, \Delta y)\to (0,0)} f(a+\Delta x , b+\Delta y) &= + &= f(a,b)。 + \end{aligned} + $$ +3. 令 $x= a+ \Delta x$ 與 $y= b+\Delta y$。則,當 $(\Delta x, \Delta y)\to (0,0)$,我們會有 $(x,y)\to (a,b)$。此外,由上式,我們會有 + $$ + \lim_{(x,y)\to (a,b)} f(x , y) = f(a,b)。 + $$ +4. 因此,函數 $f(x,y)$ 在點 $(a,b)$ 是連續的。 + + + +$$ + \boxed{f_x(x,y), f_y(x,y) \;在\; (a,b) \;附近連續} + \Longrightarrow \boxed{f(x,y) \;在\; (a,b) \;可微} \Longrightarrow \boxed{f(x,y) \;在\; (a,b) \;連續} +$$ + +--- +### Example 2 +考慮函數 +$$f(x,y) = \begin{cases} \dfrac{xy}{x^2+y^2} &\text{if } (x,y)\neq (0,0),\\ 0 &\text{if } (x,y)= (0,0)。 \end{cases}$$ +1. 請計算 $\lim\limits_{(x,y)\to (0,0)} f(x,y)$ 的極限。 +2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。 +3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。 +4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。 + +這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。 + +請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為? + + + + +1. **說明極限不存在:** +由於此題在 $(x,y)\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。 + +這裡用**路徑比較法**來看。 +若沿著直線 +$$ +y=mx +$$ +趨近 $(0,0)$,代入函數後可得 +$$ +\lim_{(x,y)\to(0,0)\text{ 沿 }y=mx} f(x,y) +=\frac{m}{1+m^2}. +$$ + +這個結果會隨著 $m$ 的不同而改變。 +例如: +- 若 $m=0$,極限為 $0$ +- 若 $m=1$,極限為 $\frac12$ + +因為沿不同路徑得到的極限值不同,所以 +$$ +\lim_{(x,y)\to(0,0)} f(x,y) +$$ +**不存在**。 + +--- + +2. **說明在 $(0,0)$ 不連續:** +函數在點 $(0,0)$ 連續,必須滿足 +$$ +\lim_{(x,y)\to(0,0)} f(x,y)=f(0,0). +$$ + +但由第 1 小題可知, +$$ +\lim_{(x,y)\to(0,0)} f(x,y) +$$ +不存在,所以函數在 $(0,0)$ **不連續**。 + +--- + +3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** +根據偏導數定義, +$$ +f_x(0,0)=\lim_{\Delta x\to 0}\frac{f(\Delta x,0)-f(0,0)}{\Delta x}. +$$ + +代入此題函數後,可以算得上式為 +$$ +\lim_{\Delta x\to 0} 0=0, +$$ +因此 +$$ +f_x(0,0)=0. +$$ + +同理, +$$ +f_y(0,0)=\lim_{\Delta y\to 0}\frac{f(0,\Delta y)-f(0,0)}{\Delta y}=0. +$$ + +所以 +$$ +f_x(0,0)=0,\qquad f_y(0,0)=0. +$$ + +--- + +4. **說明在 $(0,0)$ 不可微:** +若函數在某點可微,則一定在該點連續。 +也就是說: +$$ +\text{可微} \Longrightarrow \text{連續}. +$$ + +但前面已經證明 $f(x,y)$ 在 $(0,0)$ **不連續**, +因此它在 $(0,0)$ **不可能可微**。 + +--- + +**結論:** +- $\lim\limits_{(x,y)\to(0,0)} f(x,y)$ 不存在 +- $f(x,y)$ 在 $(0,0)$ 不連續 +- $f_x(0,0)=0,\;f_y(0,0)=0$ +- $f(x,y)$ 在 $(0,0)$ 不可微 + + +1. **說明極限不存在:** 由於此題分母在 $(x,y)\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。 + + 下面,我們來試試使用「路徑比較法」計算極限:考慮點 $(x,y)$ 沿著路徑 + $$ + C: y= m(x-0)+0 + $$ + 趨近 $(0,0)$,則 + $$ + \lim\limits_{(x,y)\to (0,0) \;沿著\; C} f(x,y) = \lim\limits_{x\to 0} ? + $$ + + a. $0$; + b. $m$; + c. $\dfrac{m}{1+m^2}$; + d. $\dfrac{1}{1+m^2}$。 + + 所以 $\lim\limits_{(x,y)\to (0,0)} f(x,y)=?$ + + a. $0$; + b. $m$; + c. $\dfrac{m}{1+m^2}$; + d. 不存在。 + +2. **說明在 $(0,0)$ 不連續:** 連續的定義:函數在點 $(0,0)$ 連續,必須滿足? + + a. $\lim\limits_{(x,y)\to (0,0)} f(x,y)$ 存在即可; + b. $f(0,0)$ 有定義即可; + c. $\lim\limits_{(x,y)\to (0,0)} f(x,y) = f(0,0)$; + d. 偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。 + + 因此,由第 1 小題,$f(x,y)$ 在點 $(0,0)$ 不連續。 +3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** 根據定義, + $$ + f_x(0,0) = ? + $$ + + a. $\lim\limits_{\Delta x\to 0} \dfrac{f(\Delta x,\Delta x)-f(0,0)}{\Delta x}$; + b. $\lim\limits_{\Delta x\to 0} \dfrac{f(\Delta x,0)-f(0,0)}{\Delta x}$; + c. $\lim\limits_{\Delta x\to 0} \dfrac{f(0,\Delta x)-f(0,0)}{\Delta x}$; + d. $\lim\limits_{\Delta x\to 0} f(\Delta x,0)$。 + + 代入此題函數的定義,上述極限變成? + + a. $\lim\limits_{\Delta x\to 0} 0= 0$; + b. $\lim\limits_{\Delta x\to 0} \dfrac{1}{\Delta x}$; + c. $\lim\limits_{\Delta x\to 0} \Delta x= 0= 0$; + d. 無法由此計算出來。 + + 同理,可以計算出 $f_y(0,0)=0$。 +4. **說明在 $(0,0)$ 不可微:** 什麼條件?$\Longrightarrow$ 不可微: + + a. 因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微; + b. 因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微; + c. 因為 $\lim\limits_{(x,y)\to (0,0)} f(x,y)=0$,所以不可微; + d. 因為 $f(0,0)$ 沒有定義,所以不可微。 + + + +--- +## 3️⃣切平面 + +在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時, +$$ + f(a+\Delta x , b+\Delta y) \approx f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y, +$$ +當 $(\Delta x, \Delta y) \to (0,0)$,或等價地寫成 +$$ + f(x , y) \approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。 +$$ +當 $(x,y) \to (a,b)$。 + +上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮 +$$ + \begin{cases} + z &= f(x,y)\\ + z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b) + \end{cases} +$$ +那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。 + +注意到: +- 圖形上,$S:\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面; +- 圖形上, + $$ + T:\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b) + $$ + 是一個通過點 $\left( a,b,f(a,b) \right)$ 的平面。 + +因此,上面近似的結果告訴我們的是: +1. 兩個圖形 $S,T$ 都通過同一個點 $P: \left( a,b,f(a,b) \right)$。 +2. 在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。 +3. 越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。 + +因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「**切平面(tangent plane)**」。 + +我們將這樣的定義紀錄如下: + + +定義 +切平面 +考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面 +$$ + T:\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b) +$$ +為函數曲面 $S: z = f(x,y)$ 在點 $P: \left( a,b,f(a,b) \right)$ 的「**切平面(tangent plane)**」。 + + +--- +### Example 3 +考慮函數 +$$ + f(x,y) = x^2 + 2y^2 +$$ +請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。 +切平面方程式為? + + + +先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式: +$$ +z=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b). +$$ + +接著計算偏導數: +$$ +f_x(x,y)=2x,\qquad f_y(x,y)=4y. +$$ + +因為切點是 $(1,1,3)$,所以要把偏導數代入 +$$ +(a,b)=(1,1). +$$ + +可得 +$$ +f_x(1,1)=2,\qquad f_y(1,1)=4. +$$ + +又因為 +$$ +f(1,1)=3, +$$ +所以切平面方程式為 +$$ +z=3+2(x-1)+4(y-1). +$$ + +如果再整理一下,也可以寫成 +$$ +z=2x+4y-3. +$$ + + +1. 先寫下切平面方程式的一般公式: + + a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; + b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; + c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; + d. $dz = f_x(a,b)\,dx + f_y(a,b)\,dy$。 + +2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )): + $$ + f_x(x,y)=? + $$ + + + $$ + f_y(x,y)=? + $$ + + +3. 計算偏微分在哪個點的值? + + a. $(a,b) = (1,3)$; + b. $(a,b) = (1,1)$; + c. $(a,b) = (3,1)$; + d. $(a,b) = (0,0)$。 + +4. 因此,切平面方程式為: + + + + +--- +## 4️⃣全微分 + +考慮變數 +$$ + z= f(x,y)。 +$$ + +在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時, +$$ + f(a+\Delta x , b+\Delta y) \approx + f(a,b) + f_x(a,b) \Delta x + f_y(a,b) \Delta y。 +$$ +因此, +$$ + f(a+\Delta x , b+\Delta y) - f(a,b)= + f_x(a,b) \Delta x + f_y(a,b) \Delta y。 +$$ + +也就是說,當變數 $x$ 與 $y$ 分別改變 $\Delta x$ 與 $\Delta y$ 時,對應的 $z$ 值會產生的增量為 +$$ + \begin{aligned} + \Delta z + &:= f(a+\Delta x,b+\Delta y)-f(a,b) \\ + &\approx f_x(a,b) \Delta x + f_y(a,b) \Delta y。 + \end{aligned} +$$ + +如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼 +$$ + dz := f_x(a,b) dx + f_y(a,b) dy \approx \Delta z。 +$$ + +**重點**:真實變化 $\Delta z$ vs 線性估計 $dz$: +1. $\Delta z = f(a+\Delta x,b+\Delta y) − f(a,b)$:真實的變化。 +2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。 +3. 若可微 $\Rightarrow \Delta z − dz \to 0$。 + + +定義 +全微分 +令 $z = f(x,y)$。其 **全微分(total differential)** 定義為 +$$ + \begin{aligned} + dz &= f_x(x,y) dx + f_y(x,y) dy \\ + &= \frac{\partial z}{\partial x} dx + \frac{\partial z}{\partial y} dy。 + \end{aligned} +$$ + + +--- +### Example 4 +假設 +$$ + z = f(x,y) = \ln ( x^2y - 3xy + 3y ) +$$ +1. 請計算全微分 $dz$。 +2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\Delta z$ 的值。 + + +先寫出函數的全微分公式: +$$ +dz=f_x(x,y)\,dx+f_y(x,y)\,dy. +$$ + +接著計算偏導數: +$$ +\frac{\partial z}{\partial x}=\frac{2x-3}{x^2-3x+3}, +\qquad +\frac{\partial z}{\partial y}=x^2-3x+3. +$$ + +題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, +所以 +$$ +x=2,\qquad y=1,\qquad dx=0.01,\qquad dy=-0.01. +$$ + +先把偏導數代入 $(2,1)$: +$$ +f_x(2,1)=\frac{2(2)-3}{2^2-3(2)+3}=\frac{1}{1}=1, +$$ +$$ +f_y(2,1)=2^2-3(2)+3=1. +$$ + +因此,全微分為 +$$ +dz=f_x(2,1)\,dx+f_y(2,1)\,dy +=1(0.01)+1(-0.01)=0. +$$ + +所以利用全微分估計,可得 +$$ +dz=0. +$$ + +此外,實際增量為 +$$ +\Delta z=f(2.01,0.99)-f(2,1)\approx -0.000001. +$$ + + + +1. 寫出函數 全微分 $dz$ 的一般公式: + + a. $dz = f_x(x,y)\,dx + f_y(x,y)\,dy$; + b. $dz = f(x,y)\,dx + f(x,y)\,dy$; + c. $dz = dx + dy$; + d. $dz = f_x(a,b)\,x + f_y(a,b)\,y$。 + +2. 計算偏微分函數: + $$ + \frac{\partial z}{\partial x}=? + $$ + + a. $y(2x-3)$; + b. $2x-3$; + c. $\dfrac{2x-3}{x^2 - 3x + 3}$; + d. $\dfrac{1}{y}$。 + + $$ + \frac{\partial z}{\partial y}=? + $$ + + a. $y$; + b. $\dfrac{1}{y}$; + c. $x^2 - 3x + 3$; + d. $\dfrac{x}{y}$。 + +3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為? + + a. $(2,1,0.01,0.01)$; + b. $(2,1,0.1,-0.1)$; + c. $(2,1,0.01,-0.01)$; + d. $(2.01,0.99,0.01,-0.01)$。 + + +4. 將 $(x,y)=(2,1)$ 代入偏導數,可得 + $$ + f_x(2,1)=\frac{2(2)-3}{2^2-3(2)+3}=\frac{1}{1}=1 + $$ + $$ + f_y(2,1)=2^2-3(2)+3=1 + $$ + 又因為 + $$ + dx=2.01-2=0.01,\qquad dy=0.99-1=-0.01 + $$ + 所以 + $$ + dz=f_x(2,1)\,dx+f_y(2,1)\,dy + $$ + $$ + dz=1(0.01)+1(-0.01)=0.01-0.01=0 + $$ + 因此,全微分給出的變化量近似為 + $$ + dz=0. + $$ + +5. 再來比較實際的變化量: + $$ + \Delta z=f(2.01,0.99)-f(2,1) + $$ + 經過計算可得 + $$ + \Delta z\approx -0.000001 + $$ + 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的 + $$ + dz=0 + $$ + 也確實是一個很好的近似值。 + + 也就是說,當 $(x,y)$ 的改變很小時, + $$ + \Delta z \approx dz + $$ + 這就是全微分可以用來近似函數變化量的原因。 + + +--- +## 5️⃣三或更多變數函數 + +上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$, + +1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式 +$$ + f(x,y,z) \approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。 +$$ +2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成 +$$ +\begin{aligned} + f(a+\Delta x , b+\Delta y, c+& \Delta z) =\\ + f(a,b,c) + & f_x(a,b,c) \Delta x + f_y(a,b,c) \Delta y + f_z(a,b,c) \Delta z + + \varepsilon_1 \Delta x + \varepsilon_2 \Delta y + \varepsilon_3 \Delta z。 +\end{aligned} +$$ + +其中 $\varepsilon_1$, $\varepsilon_2$ 與 $\varepsilon_3$ 皆會在 $(\Delta x, \Delta y, \Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。 +3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。 +4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為 +$$ + dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。 +$$ diff --git a/pages/Ch14/C14_4/exported_result_14_4.json b/pages/Ch14/C14_4/exported_result_14_4.json new file mode 100644 index 0000000000000000000000000000000000000000..284d4bdd49b9232c6b38e787529d92bb1544c283 --- /dev/null +++ b/pages/Ch14/C14_4/exported_result_14_4.json @@ -0,0 +1,17534 @@ +{ + "toc": [ + { + "label": "線性估計與切平面", + "id": "sec", + "level": 1 + }, + { + "label": "1️⃣線性估計", + "id": "1", + "level": 2 + }, + { + "label": "Example 1", + "id": "Example-1", + "level": 3 + }, + { + "label": "2️⃣多變數函數的可微性", + "id": "2", + "level": 2 + }, + { + "label": "Example 2", + "id": "Example-2", + "level": 3 + }, + { + "label": "3️⃣切平面", + "id": "3", + "level": 2 + }, + { + "label": "Example 3", + "id": "Example-3", + "level": 3 + }, + { + "label": "4️⃣全微分", + "id": "4", + "level": 2 + }, + { + "label": "Example 4", + "id": "Example-4", + "level": 3 + }, + { + "label": "5️⃣三或更多變數函數", + "id": "5", + "level": 2 + } + ], + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "線性估計與切平面", + "newline": "true", + "runs": [ + { + "text": "線性估計與切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣線性估計", + "newline": "true", + "runs": [ + { + "text": "1️⃣線性估計", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "上一節中,我們介紹了雙變數函數 $f(x,y)$ 的偏導數。以點 $(a,b)$ 為例,定義如下:$$\n\\begin{aligned}\n f_x(a,b) &= \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &= \\lim_{\\Delta y \\to 0} \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。 \n \\end{aligned}\n$$這兩個量分別代表 $f$ 在 $x$ 方向與 $y$ 方向的瞬間變化率。因此,在偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下,當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,可以將偏導數視為「變化率」,得到近似關係:$$\n\\begin{aligned}\n f_x(a,b) &\\approx \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &\\approx \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。", + "newline": "false", + "runs": [ + { + "text": "上一節中,我們介紹了雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏導數。以點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 為例,定義如下:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) &= \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &= \\lim_{\\Delta y \\to 0} \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。 \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "這兩個量分別代表 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的瞬間變化率。因此,在偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在的情況下,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時,可以將偏導數視為「變化率」,得到近似關係:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) &\\approx \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &\\approx \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由上述兩個近似式,我們可以得到 $f$ 的變化量在各方向的估計。當 $\\Delta x$ 與 $\\Delta y$ 都很小時:$$\n\\begin{aligned}\n f(a+\\Delta x , b) - f(a,b) &\\approx f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) - f(a,b) &\\approx f_y(a,b) \\Delta y。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。這兩條式子表達了一個非常直覺的觀念:應變數的變化量 = 變化率 × 自變數的變化。", + "newline": "false", + "runs": [ + { + "text": "由上述兩個近似式,我們可以得到 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化量在各方向的估計。當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都很小時:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b) - f(a,b) &\\approx f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) - f(a,b) &\\approx f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。這兩條式子表達了一個非常直覺的觀念:" + }, + { + "text": "應變數的變化量 = 變化率 × 自變數的變化", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "進一步將上式移項,可得:當偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下,$$\n\\begin{aligned}\n f(a+\\Delta x , b) &\\approx f(a,b) + f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) &\\approx f(a,b) + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。這表示:在做小幅度的變動時,$f$ 的值可以由「原本的函數值」加上「變化率 × 變動量」來估計。", + "newline": "false", + "runs": [ + { + "text": "進一步將上式移項,可得:當偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在的情況下," + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b) &\\approx f(a,b) + f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) &\\approx f(a,b) + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。這表示:" + }, + { + "text": "在做小幅度的變動時,", + "style": "bold" + }, + { + "latex": "$f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的值可以由「原本的函數值」加上「變化率 × 變動量」來估計", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "前面我們分別討論了只變動 $x$ 或只變動 $y$ 時,$f$ 的變化可以用偏導數來估計。那麼,如果現在我們 同時 對 $x$ 與 $y$ 做微小的變動,也就是 $\\Delta x$ 和 $\\Delta y$ 都接近 $0$ 時,$$\nf(a+\\Delta x , b+\\Delta y)\n$$又該如何近似呢?", + "newline": "false", + "runs": [ + { + "text": "前面我們分別討論了只變動 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 或只變動 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化可以用偏導數來估計。那麼,如果現在我們 同時 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 做微小的變動,也就是 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都接近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y)\n$$", + "kind": "math_block" + }, + { + "text": "又該如何近似呢?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_688869c490", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "直覺上," + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化會同時受到 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 這兩個方向變動的影響,因此其總變化量理應由兩項貢獻加總而成。為了正式推導線性估計,我們先觀察:" + }, + { + "latex": "$f(a+\\Delta x , b+\\Delta y) - f(a,b)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "直覺上,$f$ 的變化會同時受到 $x$ 與 $y$ 這兩個方向變動的影響,因此其總變化量理應由兩項貢獻加總而成。為了正式推導線性估計,我們先觀察:$f(a+\\Delta x , b+\\Delta y) - f(a,b)$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "利用「加減同一項」的方式,我們把變化量拆成先變 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "、再變 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 兩段。" + }, + { + "latex": "$$\n\\begin{aligned}\n &f(a+\\Delta x , b+\\Delta y) - f(a,b) \\\\\n &= \\left[ f(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\right]\n + \\left[ f(a,b+\\Delta y) - f(a,b) \\right]\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "利用「加減同一項」的方式,我們把變化量拆成先變 $y$、再變 $x$ 兩段。$$\n\\begin{aligned}\n &f(a+\\Delta x , b+\\Delta y) - f(a,b) \\\\\n &= \\left[ f(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\right]\n + \\left[ f(a,b+\\Delta y) - f(a,b) \\right]\n \\end{aligned}\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "這是多變數函數線性化中最核心的一步,常見教材直接跳過,但實際上這是『線性估計為何成立』的根本原因。" + } + ], + "content": "這是多變數函數線性化中最核心的一步,常見教材直接跳過,但實際上這是『線性估計為何成立』的根本原因。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "上述第一項可以看成是「在點 " + }, + { + "latex": "$(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 上,函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向有一個 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的變化量」,因此:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\approx ?\n$$", + "kind": "math_block" + } + ], + "content": "上述第一項可以看成是「在點 $(a,b+\\Delta y)$ 上,函數 $f$ 在 $x$ 方向有一個 $\\Delta x$ 的變化量」,因此:$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\approx ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(a,b) \\Delta x$;" + }, + { + "key": "b", + "text": "$f_x(a,b+\\Delta y) \\Delta x$;" + }, + { + "key": "c", + "text": "$f_y(a,b) \\Delta y$;" + }, + { + "key": "d", + "text": "$f_x(a,b+\\Delta x) \\Delta y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "上述第二項可以看成是「在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上,函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向有一個 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的變化量」,因此:" + }, + { + "latex": "$$\nf(a,b+\\Delta y) - f(a,b) \\approx ?\n$$", + "kind": "math_block" + } + ], + "content": "上述第二項可以看成是「在點 $(a,b)$ 上,函數 $f$ 在 $y$ 方向有一個 $\\Delta y$ 的變化量」,因此:$$\nf(a,b+\\Delta y) - f(a,b) \\approx ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(a,b) \\Delta x$;" + }, + { + "key": "b", + "text": "$f_x(a,b+\\Delta y) \\Delta x$;" + }, + { + "key": "c", + "text": "$f_y(a,b) \\Delta y$;" + }, + { + "key": "d", + "text": "$f_x(a,b+\\Delta x) \\Delta y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上面兩個推導,我們得到:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b+\\Delta y) \\Delta x + f_y(a,b) \\Delta y\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "由上面兩個推導,我們得到:$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b+\\Delta y) \\Delta x + f_y(a,b) \\Delta y\n \\end{aligned}\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 記得:", + "newline": "false", + "runs": [ + { + "text": " 記得:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "1.", + "runs": [ + { + "text": "第一項使用的是點 " + }, + { + "latex": "$(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數(此外,需要 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的);" + } + ], + "content": "第一項使用的是點 $(a,b+\\Delta y)$ 對 $x$ 的偏導數(此外,需要 $f_x(a,b+\\Delta y)$ 是存在的);" + }, + { + "indent": 2, + "marker": "2.", + "runs": [ + { + "text": "第二項使用的是點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數(此外,需要 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 是存在的)。" + } + ], + "content": "第二項使用的是點 $(a,b)$ 對 $y$ 的偏導數(此外,需要 $f_y(a,b)$ 是存在的)。" + }, + { + "indent": 0, + "marker": "6.", + "runs": [ + { + "text": "是不是很想將上式 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 呢?也就是希望:" + }, + { + "latex": "$$\nf_x(a,b+\\Delta y) \\approx f_x(a,b) ?\n$$", + "kind": "math_block" + }, + { + "text": "等價地,希望:" + }, + { + "latex": "$$\n\\lim_{\\Delta y \\to 0} f_x(a,b+\\Delta y) = f_x(a,b) ?\n$$", + "kind": "math_block" + } + ], + "content": "是不是很想將上式 $f_x(a,b+\\Delta y)$ 寫成 $f_x(a,b)$ 呢?也就是希望:$$\nf_x(a,b+\\Delta y) \\approx f_x(a,b) ?\n$$等價地,希望:$$\n\\lim_{\\Delta y \\to 0} f_x(a,b+\\Delta y) = f_x(a,b) ?\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 試想:什麼條件可以保證上式一定成立? " + } + ], + "options": [ + { + "key": "a", + "text": "任意的函數 $f_x(x,y)$ 皆會成立;" + }, + { + "key": "b", + "text": "函數 $f_x(x,y)$ 在 $(a,b)$ 的極限存在;" + }, + { + "key": "c", + "text": "函數 $f_x(x,y)$ 在 $(a,b)$ 是連續的。" + }, + { + "key": "d", + "text": "函數 $f_y(x,y)$ 在 $(a,b)$ 是連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "7.", + "runs": [ + { + "text": "因此,在偏導數連續的條件成立時:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "等價的," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ], + "content": "因此,在偏導數連續的條件成立時:$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$等價的,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將結果得到 $f(a+\\Delta x , b+\\Delta y)$ 近似的結果,紀錄如下:", + "newline": "false", + "runs": [ + { + "text": "我們將結果得到 " + }, + { + "latex": "$f(a+\\Delta x , b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 近似的結果,紀錄如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "線性估計(Linear Approximation)", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,\n則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,我們會有:$$\n\\boxed{f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y}。\n$$等價的,令 $x = a+\\Delta x$ 與 $y = b+\\Delta y$,則在 $x\\approx a$ 與 $y\\approx b$ 時,$$\n\\boxed{f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)}。\n$$以上兩式皆稱為函數 $f(x,y)$ 在點 $(a,b)$ 的 線性估計(Linear Approximation)。這兩個公式只是表達方式略有不同。此外,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。", + "newline": "true", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若其偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的," + }, + { + "newline": "true" + }, + { + "text": "則當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時,我們會有:" + }, + { + "latex": "$$\n\\boxed{f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y}。\n$$", + "kind": "math_block" + }, + { + "text": "等價的,令 " + }, + { + "latex": "$x = a+\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y = b+\\Delta y$", + "kind": "math" + }, + { + "text": ",則在 " + }, + { + "latex": "$x\\approx a$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y\\approx b$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\n\\boxed{f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)}。\n$$", + "kind": "math_block" + }, + { + "text": "以上兩式皆稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "。這兩個公式只是表達方式略有不同。此外,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 條件的要求是偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 「附近」皆是連續的,不是只有點 $(a,b)$ 而已。因為,在上面推導第 4 點中有一項要求:$f_x(a,b+\\Delta y)$ 是存在的,不是只有要求 $f_x(a,b+\\Delta y)$ 是存在的。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 條件的要求是偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 「" + }, + { + "text": "附近", + "style": "bold" + }, + { + "text": "」皆是連續的,不是只有點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 而已。因為,在上面推導第 4 點中有一項要求:" + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的,不是只有要求 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2. 上面定理,要求「偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的」,其實有一點多!只是這樣條件比較清晰簡潔。", + "newline": "false", + "runs": [ + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 上面定理,要求「偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的」,其實有一點多!只是這樣條件比較清晰簡潔。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 3. 上面定理,框起來的兩個公式,非常重要,我們將在後面反覆利用它們。一個公式,多個解釋!", + "newline": "false", + "runs": [ + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": " 上面定理,框起來的兩個公式,非常重要,我們將在後面反覆利用它們。一個公式,多個解釋!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$\n \n\n\n設函數 $f(x,y)$ 在點 $(2,1)$ 附近可用線性估計來近似。\n\n在線性估計中,我們使用的公式是\n$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$\n\n接著計算在點 $(2,1)$ 的函數值與偏導數值:\n$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$\n\n因此,函數在點 $(2,1)$ 的線性估計公式為\n$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$\n\n也就是\n$$\nL(x,y)=x+y-3.\n$$\n\n現在利用這個線性估計公式來估計\n$$\nf(2.01,0.99).\n$$\n\n代入可得\n$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$\n\n因此\n$$\nL(2.01,0.99)=0.01-0.01=0.\n$$\n\n所以\n$$\nf(2.01,0.99)\\approx 0.\n$$\n\n \n\n\n1. 寫出函數 $f(x,y)$ 在點 $(2,1)$ 的線性估計公式\n \n a. $f(x,y) = f(2,1) + f_x(x,y) (x-2) + f_y(x,y) (y-1)$;\n b. $f(x,y) = f(2,1) + f_x(x,y) (x-2.01) + f_y(x,y) (y-0.99)$;\n c. $f(x,y) = f(2,1) + f_x(2,1) (x-2) + f_y(2,1) (y-1)$;\n d. $f(x,y) = f(2,1) + f_x(2,1) (x-2.01) + f_y(2,1) (y-0.99)$。\n \n\n\n2. 先計算 $f(2,1)$,$f_x(2,1)$ 與 $f_y(2,1)$,再選出正確的線性估計公式:\n \n a. $f(x,y) \\approx -1 + 2(x-2) + (y-1)$;\n b. $f(x,y) \\approx 0 + 2(x-2) + (y-1)$;\n c. $f(x,y) \\approx 0 + 1(x-2) + 1(y-1)$;\n d. $f(x,y) \\approx 0 + (x-2) + 2(y-1)$。\n \n\n\n3. 利用上題選出的線性估計公式,將 $(2.01, 0.99)$ 代入,估計\n $$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n $$\n \n\n\n答案:$f(2.01,0.99)\\approx 0.$\n\n \n\n\n---\n## 2️⃣多變數函數的可微性\n\n在前面的「**線性估計(Linear Approximation)**」定理中,我們提到:如果偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$\n且,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。\n事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「**可微的(Differentiable)**」來描述 真正意義上 的線性近似成立。\n\n\n定義\n可微的(Differentiable)\n考慮雙變數函數 $f(x,y)$。如果在點 $(a,b)$ 附近,函數的改變量可以寫成\n$$\n f(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n或更精確的,\n$$\n f(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$\n其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 皆會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y)$ 在點 $(a,b)$ 是「**可微的(Differentiable)**」。\n\n\n**注意 1.** \n上述形式比使用近似符號 $\\approx$ 的寫法更加簡潔與嚴謹,因為它直接反映出,當 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$\n上面兩式等號左右兩項誤差越小(估計更精準)。\n\n**注意 2.** 可微性意味著,此函數在點 $(a,b)$ 附近可以被一個線性函數很好地逼近。\n\n**注意 3.**\n上述對於多變數函數 $f(x,y)$ 在點 $(a,b)$ 的可微性,這與單變數函數 $f(x)$ 在點 $a$ 的可微性定義是一致的。我們定義單變數函數 $f(x)$ 在點 $a$ 是可微的,如果 \n$$\n f'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$ \n存在。這等價於以下線性估計成立:\n$$\n f'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$\n且,當 $\\Delta x$ 趨近於 $0$ 時,左右兩邊的差值(誤差)會越來越小。\n\n透過上面「**線性估計(Linear Approximation)**」定理與「**可微的(Differentiable)**」定義,我們會有以下結論:\n\n\n推論\n檢驗可微分的方法\n考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則函數 $f(x,y)$ 在點 $(a,b)$ 是可微的。\n\n\n**注意 1.** 請注意,如果只有 $f_x(a,b)$ 與 $f_y(a,b)$ 存在,未函數 $f(x,y)$ 在點 $(a,b)$ 是可微的!請參見下面例題。\n\n\n定理\n可微分 必定 連續\n考慮雙變數函數 $f(x,y)$。若 $f(x,y)$ 在點 $(a,b)$ 是可微的,則其在點 $(a,b)$ 是連續的。\n\n\n \n1. 由雙變數函數 $f(x,y)$ 在點 $(a,b)$ 是可微的定義:\n $$\n f(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n $$\n 其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,皆趨近於 $0$。\n2. 因此,\n $$\n \\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n $$\n3. 令 $x= a+ \\Delta x$ 與 $y= b+\\Delta y$。則,當 $(\\Delta x, \\Delta y)\\to (0,0)$,我們會有 $(x,y)\\to (a,b)$。此外,由上式,我們會有\n $$\n \\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n $$\n4. 因此,函數 $f(x,y)$ 在點 $(a,b)$ 是連續的。\n\n\n\n$$\n \\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$\n\n---\n### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n\n\n\n1. **說明極限不存在:** \n由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。\n\n這裡用**路徑比較法**來看。 \n若沿著直線\n$$\ny=mx\n$$\n趨近 $(0,0)$,代入函數後可得\n$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$\n\n這個結果會隨著 $m$ 的不同而改變。 \n例如:\n- 若 $m=0$,極限為 $0$\n- 若 $m=1$,極限為 $\\frac12$\n\n因為沿不同路徑得到的極限值不同,所以\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n**不存在**。\n\n---\n\n2. **說明在 $(0,0)$ 不連續:** \n函數在點 $(0,0)$ 連續,必須滿足\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$\n\n但由第 1 小題可知,\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n不存在,所以函數在 $(0,0)$ **不連續**。\n\n---\n\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** \n根據偏導數定義,\n$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$\n\n代入此題函數後,可以算得上式為\n$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$\n因此\n$$\nf_x(0,0)=0.\n$$\n\n同理,\n$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$\n\n所以\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n---\n\n4. **說明在 $(0,0)$ 不可微:** \n若函數在某點可微,則一定在該點連續。 \n也就是說:\n$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$\n\n但前面已經證明 $f(x,y)$ 在 $(0,0)$ **不連續**, \n因此它在 $(0,0)$ **不可能可微**。\n\n---\n\n**結論:**\n- $\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在\n- $f(x,y)$ 在 $(0,0)$ 不連續\n- $f_x(0,0)=0,\\;f_y(0,0)=0$\n- $f(x,y)$ 在 $(0,0)$ 不可微\n\n \n1. **說明極限不存在:** 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。\n\n 下面,我們來試試使用「路徑比較法」計算極限:考慮點 $(x,y)$ 沿著路徑 \n $$\n C: y= m(x-0)+0\n $$ \n 趨近 $(0,0)$,則\n $$\n \\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n $$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. $\\dfrac{1}{1+m^2}$。\n \n 所以 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. 不存在。\n \n2. **說明在 $(0,0)$ 不連續:** 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?\n \n a. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;\n b. $f(0,0)$ 有定義即可;\n c. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;\n d. 偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。\n \n 因此,由第 1 小題,$f(x,y)$ 在點 $(0,0)$ 不連續。\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** 根據定義,\n $$\n f_x(0,0) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;\n d. $\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。\n \n 代入此題函數的定義,上述極限變成?\n \n a. $\\lim\\limits_{\\Delta x\\to 0} 0= 0$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;\n d. 無法由此計算出來。\n \n 同理,可以計算出 $f_y(0,0)=0$。\n4. **說明在 $(0,0)$ 不可微:** 什麼條件?$\\Longrightarrow$ 不可微:\n \n a. 因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微; \n b. 因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;\n c. 因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微; \n d. 因為 $f(0,0)$ 沒有定義,所以不可微。\n \n\n\n---\n## 3️⃣切平面\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$\n當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成\n$$\n f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$\n當 $(x,y) \\to (a,b)$。\n\n上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮\n$$\n \\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$\n那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。\n\n注意到:\n- 圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;\n- 圖形上,\n $$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n $$ \n 是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。\n\n因此,上面近似的結果告訴我們的是:\n1. 兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。\n2. 在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。\n3. 越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。\n\n因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「**切平面(tangent plane)**」。\n\n我們將這樣的定義紀錄如下:\n\n\n定義\n切平面\n考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面\n$$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$ \n為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「**切平面(tangent plane)**」。\n\n\n---\n### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-1" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "kind": "math_block" + }, + { + "text": "請利用函數在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式,估計 " + }, + { + "latex": "$f(2.01, 0.99)$", + "kind": "math" + }, + { + "text": " 的值。" + }, + { + "latex": "$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$", + "kind": "math_block" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入近似值", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$" + }, + { + "type": "solution", + "uid": "sol_20d1453615", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "設函數 $f(x,y)$ 在點 $(2,1)$ 附近可用線性估計來近似。", + "newline": "false", + "runs": [ + { + "text": "設函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 附近可用線性估計來近似。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在線性估計中,我們使用的公式是$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "在線性估計中,我們使用的公式是" + }, + { + "latex": "$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算在點 $(2,1)$ 的函數值與偏導數值:$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的函數值與偏導數值:" + }, + { + "latex": "$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,函數在點 $(2,1)$ 的線性估計公式為$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,函數在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式為" + }, + { + "latex": "$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是$$\nL(x,y)=x+y-3.\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是" + }, + { + "latex": "$$\nL(x,y)=x+y-3.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "現在利用這個線性估計公式來估計$$\nf(2.01,0.99).\n$$", + "newline": "false", + "runs": [ + { + "text": "現在利用這個線性估計公式來估計" + }, + { + "latex": "$$\nf(2.01,0.99).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入可得$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "代入可得" + }, + { + "latex": "$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此$$\nL(2.01,0.99)=0.01-0.01=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此" + }, + { + "latex": "$$\nL(2.01,0.99)=0.01-0.01=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\nf(2.01,0.99)\\approx 0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\nf(2.01,0.99)\\approx 0.\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$\n \n" + }, + { + "type": "solution", + "uid": "sol_6aafcf81a4", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": " ", + "newline": "false", + "runs": [ + { + "text": " " + } + ] + }, + { + "type": "flow", + "id": "flow-5", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "寫出函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式" + } + ], + "content": "寫出函數 $f(x,y)$ 在點 $(2,1)$ 的線性估計公式" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-5::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f(x,y) = f(2,1) + f_x(x,y) (x-2) + f_y(x,y) (y-1)$;" + }, + { + "key": "b", + "text": "$f(x,y) = f(2,1) + f_x(x,y) (x-2.01) + f_y(x,y) (y-0.99)$;" + }, + { + "key": "c", + "text": "$f(x,y) = f(2,1) + f_x(2,1) (x-2) + f_y(2,1) (y-1)$;" + }, + { + "key": "d", + "text": "$f(x,y) = f(2,1) + f_x(2,1) (x-2.01) + f_y(2,1) (y-0.99)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-5", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f(2,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_x(2,1)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(2,1)$", + "kind": "math" + }, + { + "text": ",再選出正確的線性估計公式:" + } + ], + "content": "先計算 $f(2,1)$,$f_x(2,1)$ 與 $f_y(2,1)$,再選出正確的線性估計公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-5::step-2::q2", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f(x,y) \\approx -1 + 2(x-2) + (y-1)$;" + }, + { + "key": "b", + "text": "$f(x,y) \\approx 0 + 2(x-2) + (y-1)$;" + }, + { + "key": "c", + "text": "$f(x,y) \\approx 0 + 1(x-2) + 1(y-1)$;" + }, + { + "key": "d", + "text": "$f(x,y) \\approx 0 + (x-2) + 2(y-1)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-5", + "step": "step-2" + } + ], + "gate_from": "flow-5::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "利用上題選出的線性估計公式,將 " + }, + { + "latex": "$(2.01, 0.99)$", + "kind": "math" + }, + { + "text": " 代入,估計" + }, + { + "latex": "$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$", + "kind": "math_block" + } + ], + "content": "利用上題選出的線性估計公式,將 $(2.01, 0.99)$ 代入,估計$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-5::step-3::q3", + "prompt_runs": [], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入近似值(四捨五入到小數第 2 位)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-5", + "step": "step-3" + } + ], + "gate_from": "flow-5::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$f(2.01,0.99)\\approx 0.$", + "newline": "false", + "runs": [ + { + "text": "答案:" + }, + { + "latex": "$f(2.01,0.99)\\approx 0.$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-5::step-3::q3" + } + ] + }, + { + "type": "paragraph", + "content": "\n", + "newline": "true", + "runs": [ + { + "newline": "true" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣多變數函數的可微性", + "newline": "true", + "runs": [ + { + "text": "2️⃣多變數函數的可微性", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "在前面的「線性估計(Linear Approximation)」定理中,我們提到:如果偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「可微的(Differentiable)」來描述 真正意義上 的線性近似成立。", + "newline": "false", + "runs": [ + { + "text": "在前面的「" + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "」定理中,我們提到:如果偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的,則當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」來描述 真正意義上 的線性近似成立。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "可微的(Differentiable)", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。如果在點 $(a,b)$ 附近,函數的改變量可以寫成$$\nf(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$或更精確的,$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 皆會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y)$ 在點 $(a,b)$ 是「可微的(Differentiable)」。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。如果在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近,函數的改變量可以寫成" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "或更精確的," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 皆會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們稱函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 上述形式比使用近似符號 $\\approx$ 的寫法更加簡潔與嚴謹,因為它直接反映出,當 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$上面兩式等號左右兩項誤差越小(估計更精準)。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 上述形式比使用近似符號 " + }, + { + "latex": "$\\approx$", + "kind": "math" + }, + { + "text": " 的寫法更加簡潔與嚴謹,因為它直接反映出,當 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$", + "kind": "math_block" + }, + { + "text": "上面兩式等號左右兩項誤差越小(估計更精準)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2. 可微性意味著,此函數在點 $(a,b)$ 附近可以被一個線性函數很好地逼近。", + "newline": "false", + "runs": [ + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 可微性意味著,此函數在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近可以被一個線性函數很好地逼近。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 3.上述對於多變數函數 $f(x,y)$ 在點 $(a,b)$ 的可微性,這與單變數函數 $f(x)$ 在點 $a$ 的可微性定義是一致的。我們定義單變數函數 $f(x)$ 在點 $a$ 是可微的,如果 $$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$存在。這等價於以下線性估計成立:$$\nf'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$且,當 $\\Delta x$ 趨近於 $0$ 時,左右兩邊的差值(誤差)會越來越小。", + "newline": "false", + "runs": [ + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": "上述對於多變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的可微性,這與單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的可微性定義是一致的。我們定義單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 是可微的,如果 " + }, + { + "latex": "$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$", + "kind": "math_block" + }, + { + "text": "存在。這等價於以下線性估計成立:" + }, + { + "latex": "$$\nf'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,左右兩邊的差值(誤差)會越來越小。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "透過上面「線性估計(Linear Approximation)」定理與「可微的(Differentiable)」定義,我們會有以下結論:", + "newline": "false", + "runs": [ + { + "text": "透過上面「" + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "」定理與「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」定義,我們會有以下結論:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "推論", + "headline": "檢驗可微分的方法", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則函數 $f(x,y)$ 在點 $(a,b)$ 是可微的。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若其偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的,則函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 請注意,如果只有 $f_x(a,b)$ 與 $f_y(a,b)$ 存在,未函數 $f(x,y)$ 在點 $(a,b)$ 是可微的!請參見下面例題。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 請注意,如果只有 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,未函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的!請參見下面例題。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "可微分 必定 連續", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若 $f(x,y)$ 在點 $(a,b)$ 是可微的,則其在點 $(a,b)$ 是連續的。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的,則其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b5205ae6ee", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "由雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的定義:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,皆趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "由雙變數函數 $f(x,y)$ 在點 $(a,b)$ 是可微的定義:$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,皆趨近於 $0$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "因此,$$\n\\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x= a+ \\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y= b+\\Delta y$", + "kind": "math" + }, + { + "text": "。則,當 " + }, + { + "latex": "$(\\Delta x, \\Delta y)\\to (0,0)$", + "kind": "math" + }, + { + "text": ",我們會有 " + }, + { + "latex": "$(x,y)\\to (a,b)$", + "kind": "math" + }, + { + "text": "。此外,由上式,我們會有" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "令 $x= a+ \\Delta x$ 與 $y= b+\\Delta y$。則,當 $(\\Delta x, \\Delta y)\\to (0,0)$,我們會有 $(x,y)\\to (a,b)$。此外,由上式,我們會有$$\n\\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ], + "content": "因此,函數 $f(x,y)$ 在點 $(a,b)$ 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n\n\n\n1. **說明極限不存在:** \n由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。\n\n這裡用**路徑比較法**來看。 \n若沿著直線\n$$\ny=mx\n$$\n趨近 $(0,0)$,代入函數後可得\n$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$\n\n這個結果會隨著 $m$ 的不同而改變。 \n例如:\n- 若 $m=0$,極限為 $0$\n- 若 $m=1$,極限為 $\\frac12$\n\n因為沿不同路徑得到的極限值不同,所以\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n**不存在**。\n\n---\n\n2. **說明在 $(0,0)$ 不連續:** \n函數在點 $(0,0)$ 連續,必須滿足\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$\n\n但由第 1 小題可知,\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n不存在,所以函數在 $(0,0)$ **不連續**。\n\n---\n\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** \n根據偏導數定義,\n$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$\n\n代入此題函數後,可以算得上式為\n$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$\n因此\n$$\nf_x(0,0)=0.\n$$\n\n同理,\n$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$\n\n所以\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n---\n\n4. **說明在 $(0,0)$ 不可微:** \n若函數在某點可微,則一定在該點連續。 \n也就是說:\n$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$\n\n但前面已經證明 $f(x,y)$ 在 $(0,0)$ **不連續**, \n因此它在 $(0,0)$ **不可能可微**。\n\n---\n\n**結論:**\n- $\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在\n- $f(x,y)$ 在 $(0,0)$ 不連續\n- $f_x(0,0)=0,\\;f_y(0,0)=0$\n- $f(x,y)$ 在 $(0,0)$ 不可微\n\n \n1. **說明極限不存在:** 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。\n\n 下面,我們來試試使用「路徑比較法」計算極限:考慮點 $(x,y)$ 沿著路徑 \n $$\n C: y= m(x-0)+0\n $$ \n 趨近 $(0,0)$,則\n $$\n \\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n $$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. $\\dfrac{1}{1+m^2}$。\n \n 所以 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. 不存在。\n \n2. **說明在 $(0,0)$ 不連續:** 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?\n \n a. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;\n b. $f(0,0)$ 有定義即可;\n c. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;\n d. 偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。\n \n 因此,由第 1 小題,$f(x,y)$ 在點 $(0,0)$ 不連續。\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** 根據定義,\n $$\n f_x(0,0) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;\n d. $\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。\n \n 代入此題函數的定義,上述極限變成?\n \n a. $\\lim\\limits_{\\Delta x\\to 0} 0= 0$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;\n d. 無法由此計算出來。\n \n 同理,可以計算出 $f_y(0,0)=0$。\n4. **說明在 $(0,0)$ 不可微:** 什麼條件?$\\Longrightarrow$ 不可微:\n \n a. 因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微; \n b. 因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;\n c. 因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微; \n d. 因為 $f(0,0)$ 沒有定義,所以不可微。\n \n\n\n---\n## 3️⃣切平面\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$\n當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成\n$$\n f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$\n當 $(x,y) \\to (a,b)$。\n\n上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮\n$$\n \\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$\n那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。\n\n注意到:\n- 圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;\n- 圖形上,\n $$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n $$ \n 是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。\n\n因此,上面近似的結果告訴我們的是:\n1. 兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。\n2. 在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。\n3. 越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。\n\n因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「**切平面(tangent plane)**」。\n\n我們將這樣的定義紀錄如下:\n\n\n定義\n切平面\n考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面\n$$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$ \n為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「**切平面(tangent plane)**」。\n\n\n---\n### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "考慮函數 $$\nf(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}\n$$", + "newline": "false", + "runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請計算 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$", + "kind": "math" + }, + { + "text": " 的極限。" + } + ], + "content": "請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續。" + } + ], + "content": "請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f_x(0,0) =0$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(0,0) =0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不可微。" + } + ], + "content": "請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是一個「偏導數存在,但函數不連續、因此不可微」的典型反例。", + "newline": "false", + "runs": [ + { + "text": "這是一個「" + }, + { + "text": "偏導數存在,但函數不連續、因此不可微", + "style": "bold" + }, + { + "text": "」的典型反例。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先回答:沿路徑 " + }, + { + "latex": "$y = mx$", + "kind": "math" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,極限值為?" + } + ], + "answers": [ + "m/(1+m^2)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "用 m 表示", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_09ea171e6c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "說明極限不存在:", + "style": "bold" + }, + { + "text": "由於此題在 " + }, + { + "latex": "$(x,y)\\to(0,0)$", + "kind": "math" + }, + { + "text": " 時,分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。" + } + ], + "content": "說明極限不存在:由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這裡用路徑比較法來看。\n若沿著直線$$\ny=mx\n$$趨近 $(0,0)$,代入函數後可得$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$", + "newline": "true", + "runs": [ + { + "text": "這裡用" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "來看。" + }, + { + "newline": "true" + }, + { + "text": "若沿著直線" + }, + { + "latex": "$$\ny=mx\n$$", + "kind": "math_block" + }, + { + "text": "趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ",代入函數後可得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個結果會隨著 $m$ 的不同而改變。\n例如:", + "newline": "true", + "runs": [ + { + "text": "這個結果會隨著 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 的不同而改變。" + }, + { + "newline": "true" + }, + { + "text": "例如:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$m=0$", + "kind": "math" + }, + { + "text": ",極限為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "若 $m=0$,極限為 $0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$m=1$", + "kind": "math" + }, + { + "text": ",極限為 " + }, + { + "latex": "$\\frac12$", + "kind": "math" + } + ], + "content": "若 $m=1$,極限為 $\\frac12$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為沿不同路徑得到的極限值不同,所以$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$不存在。", + "newline": "false", + "runs": [ + { + "text": "因為沿不同路徑得到的極限值不同,所以" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$", + "kind": "math_block" + }, + { + "text": "不存在", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不連續:", + "style": "bold" + }, + { + "text": "函數在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 連續,必須滿足" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$", + "kind": "math_block" + } + ], + "content": "說明在 $(0,0)$ 不連續:函數在點 $(0,0)$ 連續,必須滿足$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "但由第 1 小題可知,$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$不存在,所以函數在 $(0,0)$ 不連續。", + "newline": "false", + "runs": [ + { + "text": "但由第 1 小題可知," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$", + "kind": "math_block" + }, + { + "text": "不存在,所以函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不連續", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$f_y(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": "根據偏導數定義," + }, + { + "latex": "$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$", + "kind": "math_block" + } + ], + "content": "計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:根據偏導數定義,$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入此題函數後,可以算得上式為$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$因此$$\nf_x(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "代入此題函數後,可以算得上式為" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "latex": "$$\nf_x(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同理,$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "同理," + }, + { + "latex": "$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不可微:", + "style": "bold" + }, + { + "text": "若函數在某點可微,則一定在該點連續。" + }, + { + "text": "也就是說:" + }, + { + "latex": "$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$", + "kind": "math_block" + } + ], + "content": "說明在 $(0,0)$ 不可微:若函數在某點可微,則一定在該點連續。也就是說:$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "但前面已經證明 $f(x,y)$ 在 $(0,0)$ 不連續,\n因此它在 $(0,0)$ 不可能可微。", + "newline": "true", + "runs": [ + { + "text": "但前面已經證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不連續", + "style": "bold" + }, + { + "text": "," + }, + { + "newline": "true" + }, + { + "text": "因此它在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不可能可微", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "結論:", + "newline": "false", + "runs": [ + { + "text": "結論:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續" + } + ], + "content": "$f(x,y)$ 在 $(0,0)$ 不連續" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_x(0,0)=0,\\;f_y(0,0)=0$", + "kind": "math" + } + ], + "content": "$f_x(0,0)=0,\\;f_y(0,0)=0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不可微" + } + ], + "content": "$f(x,y)$ 在 $(0,0)$ 不可微" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n" + }, + { + "type": "solution", + "uid": "sol_4bcca2cf60", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "說明極限不存在:", + "style": "bold" + }, + { + "text": " 由於此題分母在 " + }, + { + "latex": "$(x,y)\\to (0,0)$", + "kind": "math" + }, + { + "text": " 時的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。" + } + ], + "content": "說明極限不存在: 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 下面,我們來試試使用「路徑比較法」計算極限:考慮點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 沿著路徑 " + }, + { + "latex": "$$\nC: y= m(x-0)+0\n$$", + "kind": "math_block" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ",則" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$m$;" + }, + { + "key": "c", + "text": "$\\dfrac{m}{1+m^2}$;" + }, + { + "key": "d", + "text": "$\\dfrac{1}{1+m^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 所以 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$", + "kind": "math" + }, + { + "newline": "true" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$m$;" + }, + { + "key": "c", + "text": "$\\dfrac{m}{1+m^2}$;" + }, + { + "key": "d", + "text": "不存在。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不連續:", + "style": "bold" + }, + { + "text": " 連續的定義:函數在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 連續,必須滿足?" + } + ], + "content": "說明在 $(0,0)$ 不連續: 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;" + }, + { + "key": "b", + "text": "$f(0,0)$ 有定義即可;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;" + }, + { + "key": "d", + "text": "偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 因此,由第 1 小題," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續。3. " + }, + { + "text": "計算偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$f_y(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 根據定義," + }, + { + "latex": "$$\nf_x(0,0) = ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "b", + "answer": "b" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 代入此題函數的定義,上述極限變成? " + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} 0= 0$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;" + }, + { + "key": "d", + "text": "無法由此計算出來。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "a", + "answer": "a" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 同理,可以計算出 " + }, + { + "latex": "$f_y(0,0)=0$", + "kind": "math" + }, + { + "text": "。4. " + }, + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不可微:", + "style": "bold" + }, + { + "text": " 什麼條件?" + }, + { + "latex": "$\\Longrightarrow$", + "kind": "math" + }, + { + "text": " 不可微: " + } + ], + "options": [ + { + "key": "a", + "text": "因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微;" + }, + { + "key": "b", + "text": "因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;" + }, + { + "key": "c", + "text": "因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微;" + }, + { + "key": "d", + "text": "因為 $f(0,0)$ 沒有定義,所以不可微。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣切平面", + "newline": "true", + "runs": [ + { + "text": "3️⃣切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成$$\nf(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$當 $(x,y) \\to (a,b)$。", + "newline": "false", + "runs": [ + { + "text": "在前面部分,我們已經知道:當雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 可微時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$", + "kind": "math_block" + }, + { + "text": "當 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",或等價地寫成" + }, + { + "latex": "$$\nf(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$", + "kind": "math_block" + }, + { + "text": "當 " + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮$$\n\\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。", + "newline": "false", + "runs": [ + { + "text": "上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮" + }, + { + "latex": "$$\n\\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "那麼,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 非常接近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時,這兩個式子所得到的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 值會非常接近;而且 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 越靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",兩者的差距也會越來越小。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意到:", + "newline": "false", + "runs": [ + { + "text": "注意到:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "圖形上," + }, + { + "latex": "$S:\\; z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是原來的函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的曲面;" + } + ], + "content": "圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "圖形上," + }, + { + "latex": "$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$", + "kind": "math_block" + }, + { + "text": "是一個通過點 " + }, + { + "latex": "$\\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": " 的平面。" + } + ], + "content": "圖形上,$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,上面近似的結果告訴我們的是:", + "newline": "false", + "runs": [ + { + "text": "因此,上面近似的結果告訴我們的是:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "兩個圖形 " + }, + { + "latex": "$S,T$", + "kind": "math" + }, + { + "text": " 都通過同一個點 " + }, + { + "latex": "$P: \\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "在這個 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 點的附近,函數曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 與這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 非常接近。" + } + ], + "content": "在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "越接近 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 點,函數曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 與這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 越接近。" + } + ], + "content": "越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「切平面(tangent plane)」。", + "newline": "false", + "runs": [ + { + "text": "因此,我們將這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 稱為函數圖形 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的「" + }, + { + "text": "切平面(tangent plane)", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將這樣的定義紀錄如下:", + "newline": "false", + "runs": [ + { + "text": "我們將這樣的定義紀錄如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "切平面", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「切平面(tangent plane)」。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。如果函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的,則我們稱平面" + }, + { + "latex": "$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$", + "kind": "math_block" + }, + { + "text": "為函數曲面 " + }, + { + "latex": "$S: z = f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P: \\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": " 的「" + }, + { + "text": "切平面(tangent plane)", + "style": "bold" + }, + { + "text": "」。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-3" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = x^2 + 2y^2\n$$", + "kind": "math_block" + }, + { + "text": "請計算此函數曲面 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": " 的切平面方程式。切平面方程式為? " + } + ], + "answers": [ + "z=3+2(x-1)+4(y-1)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?" + }, + { + "type": "solution", + "uid": "sol_a6d4342dfb", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$", + "newline": "false", + "runs": [ + { + "text": "先寫下曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切平面公式:" + }, + { + "latex": "$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算偏導數:$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算偏導數:" + }, + { + "latex": "$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為切點是 $(1,1,3)$,所以要把偏導數代入$$\n(a,b)=(1,1).\n$$", + "newline": "false", + "runs": [ + { + "text": "因為切點是 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": ",所以要把偏導數代入" + }, + { + "latex": "$$\n(a,b)=(1,1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "可得$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$", + "newline": "false", + "runs": [ + { + "text": "可得" + }, + { + "latex": "$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "又因為$$\nf(1,1)=3,\n$$所以切平面方程式為$$\nz=3+2(x-1)+4(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "又因為" + }, + { + "latex": "$$\nf(1,1)=3,\n$$", + "kind": "math_block" + }, + { + "text": "所以切平面方程式為" + }, + { + "latex": "$$\nz=3+2(x-1)+4(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果再整理一下,也可以寫成$$\nz=2x+4y-3.\n$$", + "newline": "false", + "runs": [ + { + "text": "如果再整理一下,也可以寫成" + }, + { + "latex": "$$\nz=2x+4y-3.\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n " + }, + { + "type": "solution", + "uid": "sol_a85cea3a8b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先寫下切平面方程式的一般公式:" + } + ], + "content": "先寫下切平面方程式的一般公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$;" + }, + { + "key": "b", + "text": "$z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$;" + }, + { + "key": "c", + "text": "$z = f(a,b) + f_x(a,b)x + f_y(a,b)y$;" + }, + { + "key": "d", + "text": "$dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "計算偏微分函數((" + }, + { + "latex": "$f(x,y) = x^2 + 2y^2$", + "kind": "math" + }, + { + "text": " )):" + }, + { + "latex": "$$\nf_x(x,y)=?\n$$", + "kind": "math_block" + } + ], + "content": "計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):$$\nf_x(x,y)=?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$$\nf_y(x,y)=?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "answers": [ + "4y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏微分在哪個點的值?" + } + ], + "content": "計算偏微分在哪個點的值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b) = (1,3)$;" + }, + { + "key": "b", + "text": "$(a,b) = (1,1)$;" + }, + { + "key": "c", + "text": "$(a,b) = (3,1)$;" + }, + { + "key": "d", + "text": "$(a,b) = (0,0)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,切平面方程式為:" + } + ], + "content": "因此,切平面方程式為:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "z=3+2(x-1)+4(y-1)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣全微分", + "newline": "true", + "runs": [ + { + "text": "4️⃣全微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "考慮變數 $$\nz= f(x,y)。\n$$", + "newline": "false", + "runs": [ + { + "text": "考慮變數 " + }, + { + "latex": "$$\nz= f(x,y)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$因此,$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "newline": "false", + "runs": [ + { + "text": "在前面部分,我們已經知道:當雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 可微時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為$$\n\\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是說,當變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 分別改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 時,對應的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 值會產生的增量為" + }, + { + "latex": "$$\n\\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 微分(differential),而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼$$\ndz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$", + "newline": "false", + "runs": [ + { + "text": "如果我們用符號 " + }, + { + "latex": "$dx$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$dy$", + "kind": "math" + }, + { + "text": " 代表「非常非常小的增量」,並稱之為 " + }, + { + "text": "微分(differential)", + "style": "bold" + }, + { + "text": ",而用 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 代表變數 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的「線性估計的增量」(即不含誤差項的部分),那麼" + }, + { + "latex": "$$\ndz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "重點:真實變化 $\\Delta z$ vs 線性估計 $dz$:", + "newline": "false", + "runs": [ + { + "text": "重點", + "style": "bold" + }, + { + "text": ":真實變化 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " vs 線性估計 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$", + "kind": "math" + }, + { + "text": ":真實的變化。" + } + ], + "content": "$\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$dz = f_x(a,b)dx + f_y(a,b)dy$", + "kind": "math" + }, + { + "text": ": 線性估計真實的變化。" + } + ], + "content": "$dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "若可微 " + }, + { + "latex": "$\\Rightarrow \\Delta z − dz \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "若可微 $\\Rightarrow \\Delta z − dz \\to 0$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "全微分", + "body": [ + { + "type": "paragraph", + "content": "令 $z = f(x,y)$。其 全微分(total differential) 定義為$$\n\\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。其 " + }, + { + "text": "全微分(total differential)", + "style": "bold" + }, + { + "text": " 定義為" + }, + { + "latex": "$$\n\\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "假設$$\nz = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "newline": "false", + "runs": [ + { + "text": "假設" + }, + { + "latex": "$$\nz = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請計算全微分 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請計算全微分 $dz$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算如果 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 與變化量 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 的值。" + } + ], + "content": "請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1a23061f9c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先寫出函數的全微分公式:$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$", + "newline": "false", + "runs": [ + { + "text": "先寫出函數的全微分公式:" + }, + { + "latex": "$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算偏導數:$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算偏導數:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,\n所以$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$", + "newline": "true", + "runs": [ + { + "text": "題目中," + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "," + }, + { + "newline": "true" + }, + { + "text": "所以" + }, + { + "latex": "$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "先把偏導數代入 $(2,1)$:$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$", + "newline": "false", + "runs": [ + { + "text": "先把偏導數代入 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,全微分為$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,全微分為" + }, + { + "latex": "$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以利用全微分估計,可得$$\ndz=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以利用全微分估計,可得" + }, + { + "latex": "$$\ndz=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此外,實際增量為$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$", + "newline": "false", + "runs": [ + { + "text": "此外,實際增量為" + }, + { + "latex": "$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。" + }, + { + "type": "solution", + "uid": "sol_8ee5157c9b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "寫出函數 全微分 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 的一般公式:" + } + ], + "content": "寫出函數 全微分 $dz$ 的一般公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$;" + }, + { + "key": "b", + "text": "$dz = f(x,y)\\,dx + f(x,y)\\,dy$;" + }, + { + "key": "c", + "text": "$dz = dx + dy$;" + }, + { + "key": "d", + "text": "$dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "計算偏微分函數:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x}=?\n$$", + "kind": "math_block" + } + ], + "content": "計算偏微分函數:$$\n\\frac{\\partial z}{\\partial x}=?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$y(2x-3)$;" + }, + { + "key": "b", + "text": "$2x-3$;" + }, + { + "key": "c", + "text": "$\\dfrac{2x-3}{x^2 - 3x + 3}$;" + }, + { + "key": "d", + "text": "$\\dfrac{1}{y}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial y}=?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$y$;" + }, + { + "key": "b", + "text": "$\\dfrac{1}{y}$;" + }, + { + "key": "c", + "text": "$x^2 - 3x + 3$;" + }, + { + "key": "d", + "text": "$\\dfrac{x}{y}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "題目:" + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "。代表計算 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$(x,y,dx, dy)$", + "kind": "math" + }, + { + "text": " 要設為?" + } + ], + "content": "題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(2,1,0.01,0.01)$;" + }, + { + "key": "b", + "text": "$(2,1,0.1,-0.1)$;" + }, + { + "key": "c", + "text": "$(2,1,0.01,-0.01)$;" + }, + { + "key": "d", + "text": "$(2.01,0.99,0.01,-0.01)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$(x,y)=(2,1)$", + "kind": "math" + }, + { + "text": " 代入偏導數,可得" + }, + { + "latex": "$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(2,1)=2^2-3(2)+3=1\n$$", + "kind": "math_block" + }, + { + "text": "又因為" + }, + { + "latex": "$$\ndx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n$$", + "kind": "math_block" + }, + { + "text": "所以" + }, + { + "latex": "$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n$$", + "kind": "math_block" + }, + { + "latex": "$$\ndz=1(0.01)+1(-0.01)=0.01-0.01=0\n$$", + "kind": "math_block" + }, + { + "text": "因此,全微分給出的變化量近似為" + }, + { + "latex": "$$\ndz=0.\n$$", + "kind": "math_block" + } + ], + "content": "將 $(x,y)=(2,1)$ 代入偏導數,可得$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n$$$$\nf_y(2,1)=2^2-3(2)+3=1\n$$又因為$$\ndx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n$$所以$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n$$$$\ndz=1(0.01)+1(-0.01)=0.01-0.01=0\n$$因此,全微分給出的變化量近似為$$\ndz=0.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "再來比較實際的變化量:" + }, + { + "latex": "$$\n\\Delta z=f(2.01,0.99)-f(2,1)\n$$", + "kind": "math_block" + }, + { + "text": "經過計算可得" + }, + { + "latex": "$$\n\\Delta z\\approx -0.000001\n$$", + "kind": "math_block" + }, + { + "text": "這表示函數的實際變化量非常接近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",而我們用全微分算出的" + }, + { + "latex": "$$\ndz=0\n$$", + "kind": "math_block" + }, + { + "text": "也確實是一個很好的近似值。" + } + ], + "content": "再來比較實際的變化量:$$\n\\Delta z=f(2.01,0.99)-f(2,1)\n$$經過計算可得$$\n\\Delta z\\approx -0.000001\n$$這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的$$\ndz=0\n$$也確實是一個很好的近似值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 也就是說,當 $(x,y)$ 的改變很小時,$$\n\\Delta z \\approx dz\n$$ 這就是全微分可以用來近似函數變化量的原因。", + "newline": "false", + "runs": [ + { + "text": " 也就是說,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的改變很小時," + }, + { + "latex": "$$\n\\Delta z \\approx dz\n$$", + "kind": "math_block" + }, + { + "text": " 這就是全微分可以用來近似函數變化量的原因。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣三或更多變數函數", + "newline": "true", + "runs": [ + { + "text": "5️⃣三或更多變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,", + "newline": "false", + "runs": [ + { + "text": "上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果偏導數 " + }, + { + "latex": "$f_x,f_y,f_z$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 附近都是連續的,則我們會有線性估計(Linear Approximation)公式" + }, + { + "latex": "$$\nf(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$", + "kind": "math_block" + } + ], + "content": "如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式$$\nf(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 附近,函數的改變量可以寫成" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。", + "newline": "false", + "runs": [ + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_3$", + "kind": "math" + }, + { + "text": " 皆會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y, \\Delta z)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0,0)$", + "kind": "math" + }, + { + "text": " 時,趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們稱函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是可微的(differentiable)。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是可微的,那一定也在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ], + "content": "如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$w= f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們定義全微分(total differential)為" + }, + { + "latex": "$$\ndw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "kind": "math_block" + } + ], + "content": "若 $w= f(x,y,z)$,我們定義全微分(total differential)為$$\ndw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$" + } + ] + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "線性估計與切平面", + "newline": "true", + "runs": [ + { + "text": "線性估計與切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣線性估計", + "newline": "true", + "runs": [ + { + "text": "1️⃣線性估計", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "上一節中,我們介紹了雙變數函數 $f(x,y)$ 的偏導數。以點 $(a,b)$ 為例,定義如下:$$\n\\begin{aligned}\n f_x(a,b) &= \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &= \\lim_{\\Delta y \\to 0} \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。 \n \\end{aligned}\n$$這兩個量分別代表 $f$ 在 $x$ 方向與 $y$ 方向的瞬間變化率。因此,在偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下,當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,可以將偏導數視為「變化率」,得到近似關係:$$\n\\begin{aligned}\n f_x(a,b) &\\approx \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &\\approx \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。", + "newline": "false", + "runs": [ + { + "text": "上一節中,我們介紹了雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏導數。以點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 為例,定義如下:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) &= \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &= \\lim_{\\Delta y \\to 0} \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。 \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "這兩個量分別代表 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的瞬間變化率。因此,在偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在的情況下,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時,可以將偏導數視為「變化率」,得到近似關係:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) &\\approx \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &\\approx \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由上述兩個近似式,我們可以得到 $f$ 的變化量在各方向的估計。當 $\\Delta x$ 與 $\\Delta y$ 都很小時:$$\n\\begin{aligned}\n f(a+\\Delta x , b) - f(a,b) &\\approx f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) - f(a,b) &\\approx f_y(a,b) \\Delta y。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。這兩條式子表達了一個非常直覺的觀念:應變數的變化量 = 變化率 × 自變數的變化。", + "newline": "false", + "runs": [ + { + "text": "由上述兩個近似式,我們可以得到 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化量在各方向的估計。當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都很小時:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b) - f(a,b) &\\approx f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) - f(a,b) &\\approx f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。這兩條式子表達了一個非常直覺的觀念:" + }, + { + "text": "應變數的變化量 = 變化率 × 自變數的變化", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "進一步將上式移項,可得:當偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下,$$\n\\begin{aligned}\n f(a+\\Delta x , b) &\\approx f(a,b) + f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) &\\approx f(a,b) + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。這表示:在做小幅度的變動時,$f$ 的值可以由「原本的函數值」加上「變化率 × 變動量」來估計。", + "newline": "false", + "runs": [ + { + "text": "進一步將上式移項,可得:當偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在的情況下," + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b) &\\approx f(a,b) + f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) &\\approx f(a,b) + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。這表示:" + }, + { + "text": "在做小幅度的變動時,", + "style": "bold" + }, + { + "latex": "$f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的值可以由「原本的函數值」加上「變化率 × 變動量」來估計", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "前面我們分別討論了只變動 $x$ 或只變動 $y$ 時,$f$ 的變化可以用偏導數來估計。那麼,如果現在我們 同時 對 $x$ 與 $y$ 做微小的變動,也就是 $\\Delta x$ 和 $\\Delta y$ 都接近 $0$ 時,$$\nf(a+\\Delta x , b+\\Delta y)\n$$又該如何近似呢?", + "newline": "false", + "runs": [ + { + "text": "前面我們分別討論了只變動 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 或只變動 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化可以用偏導數來估計。那麼,如果現在我們 同時 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 做微小的變動,也就是 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都接近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y)\n$$", + "kind": "math_block" + }, + { + "text": "又該如何近似呢?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_688869c490", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "直覺上," + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化會同時受到 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 這兩個方向變動的影響,因此其總變化量理應由兩項貢獻加總而成。為了正式推導線性估計,我們先觀察:" + }, + { + "latex": "$f(a+\\Delta x , b+\\Delta y) - f(a,b)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "直覺上,$f$ 的變化會同時受到 $x$ 與 $y$ 這兩個方向變動的影響,因此其總變化量理應由兩項貢獻加總而成。為了正式推導線性估計,我們先觀察:$f(a+\\Delta x , b+\\Delta y) - f(a,b)$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "利用「加減同一項」的方式,我們把變化量拆成先變 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "、再變 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 兩段。" + }, + { + "latex": "$$\n\\begin{aligned}\n &f(a+\\Delta x , b+\\Delta y) - f(a,b) \\\\\n &= \\left[ f(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\right]\n + \\left[ f(a,b+\\Delta y) - f(a,b) \\right]\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "利用「加減同一項」的方式,我們把變化量拆成先變 $y$、再變 $x$ 兩段。$$\n\\begin{aligned}\n &f(a+\\Delta x , b+\\Delta y) - f(a,b) \\\\\n &= \\left[ f(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\right]\n + \\left[ f(a,b+\\Delta y) - f(a,b) \\right]\n \\end{aligned}\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "這是多變數函數線性化中最核心的一步,常見教材直接跳過,但實際上這是『線性估計為何成立』的根本原因。" + } + ], + "content": "這是多變數函數線性化中最核心的一步,常見教材直接跳過,但實際上這是『線性估計為何成立』的根本原因。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "上述第一項可以看成是「在點 " + }, + { + "latex": "$(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 上,函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向有一個 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的變化量」,因此:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\approx ?\n$$", + "kind": "math_block" + } + ], + "content": "上述第一項可以看成是「在點 $(a,b+\\Delta y)$ 上,函數 $f$ 在 $x$ 方向有一個 $\\Delta x$ 的變化量」,因此:$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\approx ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(a,b) \\Delta x$;" + }, + { + "key": "b", + "text": "$f_x(a,b+\\Delta y) \\Delta x$;" + }, + { + "key": "c", + "text": "$f_y(a,b) \\Delta y$;" + }, + { + "key": "d", + "text": "$f_x(a,b+\\Delta x) \\Delta y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "上述第二項可以看成是「在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上,函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向有一個 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的變化量」,因此:" + }, + { + "latex": "$$\nf(a,b+\\Delta y) - f(a,b) \\approx ?\n$$", + "kind": "math_block" + } + ], + "content": "上述第二項可以看成是「在點 $(a,b)$ 上,函數 $f$ 在 $y$ 方向有一個 $\\Delta y$ 的變化量」,因此:$$\nf(a,b+\\Delta y) - f(a,b) \\approx ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(a,b) \\Delta x$;" + }, + { + "key": "b", + "text": "$f_x(a,b+\\Delta y) \\Delta x$;" + }, + { + "key": "c", + "text": "$f_y(a,b) \\Delta y$;" + }, + { + "key": "d", + "text": "$f_x(a,b+\\Delta x) \\Delta y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上面兩個推導,我們得到:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b+\\Delta y) \\Delta x + f_y(a,b) \\Delta y\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "由上面兩個推導,我們得到:$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b+\\Delta y) \\Delta x + f_y(a,b) \\Delta y\n \\end{aligned}\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 記得:", + "newline": "false", + "runs": [ + { + "text": " 記得:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "1.", + "runs": [ + { + "text": "第一項使用的是點 " + }, + { + "latex": "$(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數(此外,需要 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的);" + } + ], + "content": "第一項使用的是點 $(a,b+\\Delta y)$ 對 $x$ 的偏導數(此外,需要 $f_x(a,b+\\Delta y)$ 是存在的);" + }, + { + "indent": 2, + "marker": "2.", + "runs": [ + { + "text": "第二項使用的是點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數(此外,需要 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 是存在的)。" + } + ], + "content": "第二項使用的是點 $(a,b)$ 對 $y$ 的偏導數(此外,需要 $f_y(a,b)$ 是存在的)。" + }, + { + "indent": 0, + "marker": "6.", + "runs": [ + { + "text": "是不是很想將上式 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 呢?也就是希望:" + }, + { + "latex": "$$\nf_x(a,b+\\Delta y) \\approx f_x(a,b) ?\n$$", + "kind": "math_block" + }, + { + "text": "等價地,希望:" + }, + { + "latex": "$$\n\\lim_{\\Delta y \\to 0} f_x(a,b+\\Delta y) = f_x(a,b) ?\n$$", + "kind": "math_block" + } + ], + "content": "是不是很想將上式 $f_x(a,b+\\Delta y)$ 寫成 $f_x(a,b)$ 呢?也就是希望:$$\nf_x(a,b+\\Delta y) \\approx f_x(a,b) ?\n$$等價地,希望:$$\n\\lim_{\\Delta y \\to 0} f_x(a,b+\\Delta y) = f_x(a,b) ?\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 試想:什麼條件可以保證上式一定成立? " + } + ], + "options": [ + { + "key": "a", + "text": "任意的函數 $f_x(x,y)$ 皆會成立;" + }, + { + "key": "b", + "text": "函數 $f_x(x,y)$ 在 $(a,b)$ 的極限存在;" + }, + { + "key": "c", + "text": "函數 $f_x(x,y)$ 在 $(a,b)$ 是連續的。" + }, + { + "key": "d", + "text": "函數 $f_y(x,y)$ 在 $(a,b)$ 是連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "7.", + "runs": [ + { + "text": "因此,在偏導數連續的條件成立時:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "等價的," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ], + "content": "因此,在偏導數連續的條件成立時:$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$等價的,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將結果得到 $f(a+\\Delta x , b+\\Delta y)$ 近似的結果,紀錄如下:", + "newline": "false", + "runs": [ + { + "text": "我們將結果得到 " + }, + { + "latex": "$f(a+\\Delta x , b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 近似的結果,紀錄如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "線性估計(Linear Approximation)", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,\n則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,我們會有:$$\n\\boxed{f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y}。\n$$等價的,令 $x = a+\\Delta x$ 與 $y = b+\\Delta y$,則在 $x\\approx a$ 與 $y\\approx b$ 時,$$\n\\boxed{f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)}。\n$$以上兩式皆稱為函數 $f(x,y)$ 在點 $(a,b)$ 的 線性估計(Linear Approximation)。這兩個公式只是表達方式略有不同。此外,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。", + "newline": "true", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若其偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的," + }, + { + "newline": "true" + }, + { + "text": "則當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時,我們會有:" + }, + { + "latex": "$$\n\\boxed{f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y}。\n$$", + "kind": "math_block" + }, + { + "text": "等價的,令 " + }, + { + "latex": "$x = a+\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y = b+\\Delta y$", + "kind": "math" + }, + { + "text": ",則在 " + }, + { + "latex": "$x\\approx a$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y\\approx b$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\n\\boxed{f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)}。\n$$", + "kind": "math_block" + }, + { + "text": "以上兩式皆稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "。這兩個公式只是表達方式略有不同。此外,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 條件的要求是偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 「附近」皆是連續的,不是只有點 $(a,b)$ 而已。因為,在上面推導第 4 點中有一項要求:$f_x(a,b+\\Delta y)$ 是存在的,不是只有要求 $f_x(a,b+\\Delta y)$ 是存在的。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 條件的要求是偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 「" + }, + { + "text": "附近", + "style": "bold" + }, + { + "text": "」皆是連續的,不是只有點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 而已。因為,在上面推導第 4 點中有一項要求:" + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的,不是只有要求 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2. 上面定理,要求「偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的」,其實有一點多!只是這樣條件比較清晰簡潔。", + "newline": "false", + "runs": [ + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 上面定理,要求「偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的」,其實有一點多!只是這樣條件比較清晰簡潔。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 3. 上面定理,框起來的兩個公式,非常重要,我們將在後面反覆利用它們。一個公式,多個解釋!", + "newline": "false", + "runs": [ + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": " 上面定理,框起來的兩個公式,非常重要,我們將在後面反覆利用它們。一個公式,多個解釋!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$\n \n\n\n設函數 $f(x,y)$ 在點 $(2,1)$ 附近可用線性估計來近似。\n\n在線性估計中,我們使用的公式是\n$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$\n\n接著計算在點 $(2,1)$ 的函數值與偏導數值:\n$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$\n\n因此,函數在點 $(2,1)$ 的線性估計公式為\n$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$\n\n也就是\n$$\nL(x,y)=x+y-3.\n$$\n\n現在利用這個線性估計公式來估計\n$$\nf(2.01,0.99).\n$$\n\n代入可得\n$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$\n\n因此\n$$\nL(2.01,0.99)=0.01-0.01=0.\n$$\n\n所以\n$$\nf(2.01,0.99)\\approx 0.\n$$\n\n \n\n\n1. 寫出函數 $f(x,y)$ 在點 $(2,1)$ 的線性估計公式\n \n a. $f(x,y) = f(2,1) + f_x(x,y) (x-2) + f_y(x,y) (y-1)$;\n b. $f(x,y) = f(2,1) + f_x(x,y) (x-2.01) + f_y(x,y) (y-0.99)$;\n c. $f(x,y) = f(2,1) + f_x(2,1) (x-2) + f_y(2,1) (y-1)$;\n d. $f(x,y) = f(2,1) + f_x(2,1) (x-2.01) + f_y(2,1) (y-0.99)$。\n \n\n\n2. 先計算 $f(2,1)$,$f_x(2,1)$ 與 $f_y(2,1)$,再選出正確的線性估計公式:\n \n a. $f(x,y) \\approx -1 + 2(x-2) + (y-1)$;\n b. $f(x,y) \\approx 0 + 2(x-2) + (y-1)$;\n c. $f(x,y) \\approx 0 + 1(x-2) + 1(y-1)$;\n d. $f(x,y) \\approx 0 + (x-2) + 2(y-1)$。\n \n\n\n3. 利用上題選出的線性估計公式,將 $(2.01, 0.99)$ 代入,估計\n $$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n $$\n \n\n\n答案:$f(2.01,0.99)\\approx 0.$\n\n \n\n\n---\n## 2️⃣多變數函數的可微性\n\n在前面的「**線性估計(Linear Approximation)**」定理中,我們提到:如果偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$\n且,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。\n事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「**可微的(Differentiable)**」來描述 真正意義上 的線性近似成立。\n\n\n定義\n可微的(Differentiable)\n考慮雙變數函數 $f(x,y)$。如果在點 $(a,b)$ 附近,函數的改變量可以寫成\n$$\n f(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n或更精確的,\n$$\n f(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$\n其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 皆會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y)$ 在點 $(a,b)$ 是「**可微的(Differentiable)**」。\n\n\n**注意 1.** \n上述形式比使用近似符號 $\\approx$ 的寫法更加簡潔與嚴謹,因為它直接反映出,當 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$\n上面兩式等號左右兩項誤差越小(估計更精準)。\n\n**注意 2.** 可微性意味著,此函數在點 $(a,b)$ 附近可以被一個線性函數很好地逼近。\n\n**注意 3.**\n上述對於多變數函數 $f(x,y)$ 在點 $(a,b)$ 的可微性,這與單變數函數 $f(x)$ 在點 $a$ 的可微性定義是一致的。我們定義單變數函數 $f(x)$ 在點 $a$ 是可微的,如果 \n$$\n f'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$ \n存在。這等價於以下線性估計成立:\n$$\n f'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$\n且,當 $\\Delta x$ 趨近於 $0$ 時,左右兩邊的差值(誤差)會越來越小。\n\n透過上面「**線性估計(Linear Approximation)**」定理與「**可微的(Differentiable)**」定義,我們會有以下結論:\n\n\n推論\n檢驗可微分的方法\n考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則函數 $f(x,y)$ 在點 $(a,b)$ 是可微的。\n\n\n**注意 1.** 請注意,如果只有 $f_x(a,b)$ 與 $f_y(a,b)$ 存在,未函數 $f(x,y)$ 在點 $(a,b)$ 是可微的!請參見下面例題。\n\n\n定理\n可微分 必定 連續\n考慮雙變數函數 $f(x,y)$。若 $f(x,y)$ 在點 $(a,b)$ 是可微的,則其在點 $(a,b)$ 是連續的。\n\n\n \n1. 由雙變數函數 $f(x,y)$ 在點 $(a,b)$ 是可微的定義:\n $$\n f(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n $$\n 其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,皆趨近於 $0$。\n2. 因此,\n $$\n \\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n $$\n3. 令 $x= a+ \\Delta x$ 與 $y= b+\\Delta y$。則,當 $(\\Delta x, \\Delta y)\\to (0,0)$,我們會有 $(x,y)\\to (a,b)$。此外,由上式,我們會有\n $$\n \\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n $$\n4. 因此,函數 $f(x,y)$ 在點 $(a,b)$ 是連續的。\n\n\n\n$$\n \\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$\n\n---\n### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n\n\n\n1. **說明極限不存在:** \n由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。\n\n這裡用**路徑比較法**來看。 \n若沿著直線\n$$\ny=mx\n$$\n趨近 $(0,0)$,代入函數後可得\n$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$\n\n這個結果會隨著 $m$ 的不同而改變。 \n例如:\n- 若 $m=0$,極限為 $0$\n- 若 $m=1$,極限為 $\\frac12$\n\n因為沿不同路徑得到的極限值不同,所以\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n**不存在**。\n\n---\n\n2. **說明在 $(0,0)$ 不連續:** \n函數在點 $(0,0)$ 連續,必須滿足\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$\n\n但由第 1 小題可知,\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n不存在,所以函數在 $(0,0)$ **不連續**。\n\n---\n\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** \n根據偏導數定義,\n$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$\n\n代入此題函數後,可以算得上式為\n$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$\n因此\n$$\nf_x(0,0)=0.\n$$\n\n同理,\n$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$\n\n所以\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n---\n\n4. **說明在 $(0,0)$ 不可微:** \n若函數在某點可微,則一定在該點連續。 \n也就是說:\n$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$\n\n但前面已經證明 $f(x,y)$ 在 $(0,0)$ **不連續**, \n因此它在 $(0,0)$ **不可能可微**。\n\n---\n\n**結論:**\n- $\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在\n- $f(x,y)$ 在 $(0,0)$ 不連續\n- $f_x(0,0)=0,\\;f_y(0,0)=0$\n- $f(x,y)$ 在 $(0,0)$ 不可微\n\n \n1. **說明極限不存在:** 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。\n\n 下面,我們來試試使用「路徑比較法」計算極限:考慮點 $(x,y)$ 沿著路徑 \n $$\n C: y= m(x-0)+0\n $$ \n 趨近 $(0,0)$,則\n $$\n \\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n $$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. $\\dfrac{1}{1+m^2}$。\n \n 所以 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. 不存在。\n \n2. **說明在 $(0,0)$ 不連續:** 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?\n \n a. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;\n b. $f(0,0)$ 有定義即可;\n c. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;\n d. 偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。\n \n 因此,由第 1 小題,$f(x,y)$ 在點 $(0,0)$ 不連續。\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** 根據定義,\n $$\n f_x(0,0) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;\n d. $\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。\n \n 代入此題函數的定義,上述極限變成?\n \n a. $\\lim\\limits_{\\Delta x\\to 0} 0= 0$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;\n d. 無法由此計算出來。\n \n 同理,可以計算出 $f_y(0,0)=0$。\n4. **說明在 $(0,0)$ 不可微:** 什麼條件?$\\Longrightarrow$ 不可微:\n \n a. 因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微; \n b. 因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;\n c. 因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微; \n d. 因為 $f(0,0)$ 沒有定義,所以不可微。\n \n\n\n---\n## 3️⃣切平面\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$\n當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成\n$$\n f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$\n當 $(x,y) \\to (a,b)$。\n\n上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮\n$$\n \\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$\n那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。\n\n注意到:\n- 圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;\n- 圖形上,\n $$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n $$ \n 是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。\n\n因此,上面近似的結果告訴我們的是:\n1. 兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。\n2. 在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。\n3. 越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。\n\n因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「**切平面(tangent plane)**」。\n\n我們將這樣的定義紀錄如下:\n\n\n定義\n切平面\n考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面\n$$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$ \n為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「**切平面(tangent plane)**」。\n\n\n---\n### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-1" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "kind": "math_block" + }, + { + "text": "請利用函數在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式,估計 " + }, + { + "latex": "$f(2.01, 0.99)$", + "kind": "math" + }, + { + "text": " 的值。" + }, + { + "latex": "$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$", + "kind": "math_block" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入近似值", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$" + }, + { + "type": "solution", + "uid": "sol_20d1453615", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "設函數 $f(x,y)$ 在點 $(2,1)$ 附近可用線性估計來近似。", + "newline": "false", + "runs": [ + { + "text": "設函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 附近可用線性估計來近似。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在線性估計中,我們使用的公式是$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "在線性估計中,我們使用的公式是" + }, + { + "latex": "$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算在點 $(2,1)$ 的函數值與偏導數值:$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的函數值與偏導數值:" + }, + { + "latex": "$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,函數在點 $(2,1)$ 的線性估計公式為$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,函數在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式為" + }, + { + "latex": "$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是$$\nL(x,y)=x+y-3.\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是" + }, + { + "latex": "$$\nL(x,y)=x+y-3.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "現在利用這個線性估計公式來估計$$\nf(2.01,0.99).\n$$", + "newline": "false", + "runs": [ + { + "text": "現在利用這個線性估計公式來估計" + }, + { + "latex": "$$\nf(2.01,0.99).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入可得$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "代入可得" + }, + { + "latex": "$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此$$\nL(2.01,0.99)=0.01-0.01=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此" + }, + { + "latex": "$$\nL(2.01,0.99)=0.01-0.01=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\nf(2.01,0.99)\\approx 0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\nf(2.01,0.99)\\approx 0.\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$\n \n" + }, + { + "type": "solution", + "uid": "sol_6aafcf81a4", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": " ", + "newline": "false", + "runs": [ + { + "text": " " + } + ] + }, + { + "type": "flow", + "id": "flow-5", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "寫出函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式" + } + ], + "content": "寫出函數 $f(x,y)$ 在點 $(2,1)$ 的線性估計公式" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-5::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f(x,y) = f(2,1) + f_x(x,y) (x-2) + f_y(x,y) (y-1)$;" + }, + { + "key": "b", + "text": "$f(x,y) = f(2,1) + f_x(x,y) (x-2.01) + f_y(x,y) (y-0.99)$;" + }, + { + "key": "c", + "text": "$f(x,y) = f(2,1) + f_x(2,1) (x-2) + f_y(2,1) (y-1)$;" + }, + { + "key": "d", + "text": "$f(x,y) = f(2,1) + f_x(2,1) (x-2.01) + f_y(2,1) (y-0.99)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-5", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f(2,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_x(2,1)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(2,1)$", + "kind": "math" + }, + { + "text": ",再選出正確的線性估計公式:" + } + ], + "content": "先計算 $f(2,1)$,$f_x(2,1)$ 與 $f_y(2,1)$,再選出正確的線性估計公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-5::step-2::q2", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f(x,y) \\approx -1 + 2(x-2) + (y-1)$;" + }, + { + "key": "b", + "text": "$f(x,y) \\approx 0 + 2(x-2) + (y-1)$;" + }, + { + "key": "c", + "text": "$f(x,y) \\approx 0 + 1(x-2) + 1(y-1)$;" + }, + { + "key": "d", + "text": "$f(x,y) \\approx 0 + (x-2) + 2(y-1)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-5", + "step": "step-2" + } + ], + "gate_from": "flow-5::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "利用上題選出的線性估計公式,將 " + }, + { + "latex": "$(2.01, 0.99)$", + "kind": "math" + }, + { + "text": " 代入,估計" + }, + { + "latex": "$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$", + "kind": "math_block" + } + ], + "content": "利用上題選出的線性估計公式,將 $(2.01, 0.99)$ 代入,估計$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-5::step-3::q3", + "prompt_runs": [], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入近似值(四捨五入到小數第 2 位)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-5", + "step": "step-3" + } + ], + "gate_from": "flow-5::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$f(2.01,0.99)\\approx 0.$", + "newline": "false", + "runs": [ + { + "text": "答案:" + }, + { + "latex": "$f(2.01,0.99)\\approx 0.$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-5::step-3::q3" + } + ] + }, + { + "type": "paragraph", + "content": "\n", + "newline": "true", + "runs": [ + { + "newline": "true" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣多變數函數的可微性", + "newline": "true", + "runs": [ + { + "text": "2️⃣多變數函數的可微性", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "在前面的「線性估計(Linear Approximation)」定理中,我們提到:如果偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「可微的(Differentiable)」來描述 真正意義上 的線性近似成立。", + "newline": "false", + "runs": [ + { + "text": "在前面的「" + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "」定理中,我們提到:如果偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的,則當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」來描述 真正意義上 的線性近似成立。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "可微的(Differentiable)", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。如果在點 $(a,b)$ 附近,函數的改變量可以寫成$$\nf(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$或更精確的,$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 皆會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y)$ 在點 $(a,b)$ 是「可微的(Differentiable)」。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。如果在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近,函數的改變量可以寫成" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "或更精確的," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 皆會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們稱函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 上述形式比使用近似符號 $\\approx$ 的寫法更加簡潔與嚴謹,因為它直接反映出,當 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$上面兩式等號左右兩項誤差越小(估計更精準)。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 上述形式比使用近似符號 " + }, + { + "latex": "$\\approx$", + "kind": "math" + }, + { + "text": " 的寫法更加簡潔與嚴謹,因為它直接反映出,當 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$", + "kind": "math_block" + }, + { + "text": "上面兩式等號左右兩項誤差越小(估計更精準)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2. 可微性意味著,此函數在點 $(a,b)$ 附近可以被一個線性函數很好地逼近。", + "newline": "false", + "runs": [ + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 可微性意味著,此函數在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近可以被一個線性函數很好地逼近。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 3.上述對於多變數函數 $f(x,y)$ 在點 $(a,b)$ 的可微性,這與單變數函數 $f(x)$ 在點 $a$ 的可微性定義是一致的。我們定義單變數函數 $f(x)$ 在點 $a$ 是可微的,如果 $$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$存在。這等價於以下線性估計成立:$$\nf'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$且,當 $\\Delta x$ 趨近於 $0$ 時,左右兩邊的差值(誤差)會越來越小。", + "newline": "false", + "runs": [ + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": "上述對於多變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的可微性,這與單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的可微性定義是一致的。我們定義單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 是可微的,如果 " + }, + { + "latex": "$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$", + "kind": "math_block" + }, + { + "text": "存在。這等價於以下線性估計成立:" + }, + { + "latex": "$$\nf'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,左右兩邊的差值(誤差)會越來越小。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "透過上面「線性估計(Linear Approximation)」定理與「可微的(Differentiable)」定義,我們會有以下結論:", + "newline": "false", + "runs": [ + { + "text": "透過上面「" + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "」定理與「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」定義,我們會有以下結論:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "推論", + "headline": "檢驗可微分的方法", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則函數 $f(x,y)$ 在點 $(a,b)$ 是可微的。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若其偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的,則函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 請注意,如果只有 $f_x(a,b)$ 與 $f_y(a,b)$ 存在,未函數 $f(x,y)$ 在點 $(a,b)$ 是可微的!請參見下面例題。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 請注意,如果只有 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,未函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的!請參見下面例題。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "可微分 必定 連續", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若 $f(x,y)$ 在點 $(a,b)$ 是可微的,則其在點 $(a,b)$ 是連續的。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的,則其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b5205ae6ee", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "由雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的定義:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,皆趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "由雙變數函數 $f(x,y)$ 在點 $(a,b)$ 是可微的定義:$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,皆趨近於 $0$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "因此,$$\n\\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x= a+ \\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y= b+\\Delta y$", + "kind": "math" + }, + { + "text": "。則,當 " + }, + { + "latex": "$(\\Delta x, \\Delta y)\\to (0,0)$", + "kind": "math" + }, + { + "text": ",我們會有 " + }, + { + "latex": "$(x,y)\\to (a,b)$", + "kind": "math" + }, + { + "text": "。此外,由上式,我們會有" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "令 $x= a+ \\Delta x$ 與 $y= b+\\Delta y$。則,當 $(\\Delta x, \\Delta y)\\to (0,0)$,我們會有 $(x,y)\\to (a,b)$。此外,由上式,我們會有$$\n\\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ], + "content": "因此,函數 $f(x,y)$ 在點 $(a,b)$ 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n\n\n\n1. **說明極限不存在:** \n由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。\n\n這裡用**路徑比較法**來看。 \n若沿著直線\n$$\ny=mx\n$$\n趨近 $(0,0)$,代入函數後可得\n$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$\n\n這個結果會隨著 $m$ 的不同而改變。 \n例如:\n- 若 $m=0$,極限為 $0$\n- 若 $m=1$,極限為 $\\frac12$\n\n因為沿不同路徑得到的極限值不同,所以\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n**不存在**。\n\n---\n\n2. **說明在 $(0,0)$ 不連續:** \n函數在點 $(0,0)$ 連續,必須滿足\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$\n\n但由第 1 小題可知,\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n不存在,所以函數在 $(0,0)$ **不連續**。\n\n---\n\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** \n根據偏導數定義,\n$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$\n\n代入此題函數後,可以算得上式為\n$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$\n因此\n$$\nf_x(0,0)=0.\n$$\n\n同理,\n$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$\n\n所以\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n---\n\n4. **說明在 $(0,0)$ 不可微:** \n若函數在某點可微,則一定在該點連續。 \n也就是說:\n$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$\n\n但前面已經證明 $f(x,y)$ 在 $(0,0)$ **不連續**, \n因此它在 $(0,0)$ **不可能可微**。\n\n---\n\n**結論:**\n- $\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在\n- $f(x,y)$ 在 $(0,0)$ 不連續\n- $f_x(0,0)=0,\\;f_y(0,0)=0$\n- $f(x,y)$ 在 $(0,0)$ 不可微\n\n \n1. **說明極限不存在:** 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。\n\n 下面,我們來試試使用「路徑比較法」計算極限:考慮點 $(x,y)$ 沿著路徑 \n $$\n C: y= m(x-0)+0\n $$ \n 趨近 $(0,0)$,則\n $$\n \\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n $$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. $\\dfrac{1}{1+m^2}$。\n \n 所以 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. 不存在。\n \n2. **說明在 $(0,0)$ 不連續:** 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?\n \n a. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;\n b. $f(0,0)$ 有定義即可;\n c. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;\n d. 偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。\n \n 因此,由第 1 小題,$f(x,y)$ 在點 $(0,0)$ 不連續。\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** 根據定義,\n $$\n f_x(0,0) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;\n d. $\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。\n \n 代入此題函數的定義,上述極限變成?\n \n a. $\\lim\\limits_{\\Delta x\\to 0} 0= 0$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;\n d. 無法由此計算出來。\n \n 同理,可以計算出 $f_y(0,0)=0$。\n4. **說明在 $(0,0)$ 不可微:** 什麼條件?$\\Longrightarrow$ 不可微:\n \n a. 因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微; \n b. 因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;\n c. 因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微; \n d. 因為 $f(0,0)$ 沒有定義,所以不可微。\n \n\n\n---\n## 3️⃣切平面\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$\n當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成\n$$\n f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$\n當 $(x,y) \\to (a,b)$。\n\n上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮\n$$\n \\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$\n那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。\n\n注意到:\n- 圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;\n- 圖形上,\n $$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n $$ \n 是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。\n\n因此,上面近似的結果告訴我們的是:\n1. 兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。\n2. 在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。\n3. 越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。\n\n因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「**切平面(tangent plane)**」。\n\n我們將這樣的定義紀錄如下:\n\n\n定義\n切平面\n考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面\n$$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$ \n為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「**切平面(tangent plane)**」。\n\n\n---\n### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "考慮函數 $$\nf(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}\n$$", + "newline": "false", + "runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請計算 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$", + "kind": "math" + }, + { + "text": " 的極限。" + } + ], + "content": "請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續。" + } + ], + "content": "請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f_x(0,0) =0$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(0,0) =0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不可微。" + } + ], + "content": "請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是一個「偏導數存在,但函數不連續、因此不可微」的典型反例。", + "newline": "false", + "runs": [ + { + "text": "這是一個「" + }, + { + "text": "偏導數存在,但函數不連續、因此不可微", + "style": "bold" + }, + { + "text": "」的典型反例。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先回答:沿路徑 " + }, + { + "latex": "$y = mx$", + "kind": "math" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,極限值為?" + } + ], + "answers": [ + "m/(1+m^2)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "用 m 表示", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_09ea171e6c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "說明極限不存在:", + "style": "bold" + }, + { + "text": "由於此題在 " + }, + { + "latex": "$(x,y)\\to(0,0)$", + "kind": "math" + }, + { + "text": " 時,分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。" + } + ], + "content": "說明極限不存在:由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這裡用路徑比較法來看。\n若沿著直線$$\ny=mx\n$$趨近 $(0,0)$,代入函數後可得$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$", + "newline": "true", + "runs": [ + { + "text": "這裡用" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "來看。" + }, + { + "newline": "true" + }, + { + "text": "若沿著直線" + }, + { + "latex": "$$\ny=mx\n$$", + "kind": "math_block" + }, + { + "text": "趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ",代入函數後可得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個結果會隨著 $m$ 的不同而改變。\n例如:", + "newline": "true", + "runs": [ + { + "text": "這個結果會隨著 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 的不同而改變。" + }, + { + "newline": "true" + }, + { + "text": "例如:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$m=0$", + "kind": "math" + }, + { + "text": ",極限為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "若 $m=0$,極限為 $0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$m=1$", + "kind": "math" + }, + { + "text": ",極限為 " + }, + { + "latex": "$\\frac12$", + "kind": "math" + } + ], + "content": "若 $m=1$,極限為 $\\frac12$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為沿不同路徑得到的極限值不同,所以$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$不存在。", + "newline": "false", + "runs": [ + { + "text": "因為沿不同路徑得到的極限值不同,所以" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$", + "kind": "math_block" + }, + { + "text": "不存在", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不連續:", + "style": "bold" + }, + { + "text": "函數在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 連續,必須滿足" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$", + "kind": "math_block" + } + ], + "content": "說明在 $(0,0)$ 不連續:函數在點 $(0,0)$ 連續,必須滿足$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "但由第 1 小題可知,$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$不存在,所以函數在 $(0,0)$ 不連續。", + "newline": "false", + "runs": [ + { + "text": "但由第 1 小題可知," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$", + "kind": "math_block" + }, + { + "text": "不存在,所以函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不連續", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$f_y(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": "根據偏導數定義," + }, + { + "latex": "$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$", + "kind": "math_block" + } + ], + "content": "計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:根據偏導數定義,$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入此題函數後,可以算得上式為$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$因此$$\nf_x(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "代入此題函數後,可以算得上式為" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "latex": "$$\nf_x(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同理,$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "同理," + }, + { + "latex": "$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不可微:", + "style": "bold" + }, + { + "text": "若函數在某點可微,則一定在該點連續。" + }, + { + "text": "也就是說:" + }, + { + "latex": "$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$", + "kind": "math_block" + } + ], + "content": "說明在 $(0,0)$ 不可微:若函數在某點可微,則一定在該點連續。也就是說:$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "但前面已經證明 $f(x,y)$ 在 $(0,0)$ 不連續,\n因此它在 $(0,0)$ 不可能可微。", + "newline": "true", + "runs": [ + { + "text": "但前面已經證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不連續", + "style": "bold" + }, + { + "text": "," + }, + { + "newline": "true" + }, + { + "text": "因此它在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不可能可微", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "結論:", + "newline": "false", + "runs": [ + { + "text": "結論:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續" + } + ], + "content": "$f(x,y)$ 在 $(0,0)$ 不連續" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_x(0,0)=0,\\;f_y(0,0)=0$", + "kind": "math" + } + ], + "content": "$f_x(0,0)=0,\\;f_y(0,0)=0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不可微" + } + ], + "content": "$f(x,y)$ 在 $(0,0)$ 不可微" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n" + }, + { + "type": "solution", + "uid": "sol_4bcca2cf60", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "說明極限不存在:", + "style": "bold" + }, + { + "text": " 由於此題分母在 " + }, + { + "latex": "$(x,y)\\to (0,0)$", + "kind": "math" + }, + { + "text": " 時的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。" + } + ], + "content": "說明極限不存在: 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 下面,我們來試試使用「路徑比較法」計算極限:考慮點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 沿著路徑 " + }, + { + "latex": "$$\nC: y= m(x-0)+0\n$$", + "kind": "math_block" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ",則" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$m$;" + }, + { + "key": "c", + "text": "$\\dfrac{m}{1+m^2}$;" + }, + { + "key": "d", + "text": "$\\dfrac{1}{1+m^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 所以 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$", + "kind": "math" + }, + { + "newline": "true" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$m$;" + }, + { + "key": "c", + "text": "$\\dfrac{m}{1+m^2}$;" + }, + { + "key": "d", + "text": "不存在。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不連續:", + "style": "bold" + }, + { + "text": " 連續的定義:函數在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 連續,必須滿足?" + } + ], + "content": "說明在 $(0,0)$ 不連續: 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;" + }, + { + "key": "b", + "text": "$f(0,0)$ 有定義即可;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;" + }, + { + "key": "d", + "text": "偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 因此,由第 1 小題," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續。3. " + }, + { + "text": "計算偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$f_y(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 根據定義," + }, + { + "latex": "$$\nf_x(0,0) = ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "b", + "answer": "b" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 代入此題函數的定義,上述極限變成? " + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} 0= 0$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;" + }, + { + "key": "d", + "text": "無法由此計算出來。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "a", + "answer": "a" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 同理,可以計算出 " + }, + { + "latex": "$f_y(0,0)=0$", + "kind": "math" + }, + { + "text": "。4. " + }, + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不可微:", + "style": "bold" + }, + { + "text": " 什麼條件?" + }, + { + "latex": "$\\Longrightarrow$", + "kind": "math" + }, + { + "text": " 不可微: " + } + ], + "options": [ + { + "key": "a", + "text": "因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微;" + }, + { + "key": "b", + "text": "因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;" + }, + { + "key": "c", + "text": "因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微;" + }, + { + "key": "d", + "text": "因為 $f(0,0)$ 沒有定義,所以不可微。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣切平面", + "newline": "true", + "runs": [ + { + "text": "3️⃣切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成$$\nf(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$當 $(x,y) \\to (a,b)$。", + "newline": "false", + "runs": [ + { + "text": "在前面部分,我們已經知道:當雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 可微時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$", + "kind": "math_block" + }, + { + "text": "當 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",或等價地寫成" + }, + { + "latex": "$$\nf(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$", + "kind": "math_block" + }, + { + "text": "當 " + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮$$\n\\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。", + "newline": "false", + "runs": [ + { + "text": "上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮" + }, + { + "latex": "$$\n\\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "那麼,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 非常接近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時,這兩個式子所得到的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 值會非常接近;而且 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 越靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",兩者的差距也會越來越小。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意到:", + "newline": "false", + "runs": [ + { + "text": "注意到:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "圖形上," + }, + { + "latex": "$S:\\; z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是原來的函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的曲面;" + } + ], + "content": "圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "圖形上," + }, + { + "latex": "$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$", + "kind": "math_block" + }, + { + "text": "是一個通過點 " + }, + { + "latex": "$\\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": " 的平面。" + } + ], + "content": "圖形上,$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,上面近似的結果告訴我們的是:", + "newline": "false", + "runs": [ + { + "text": "因此,上面近似的結果告訴我們的是:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "兩個圖形 " + }, + { + "latex": "$S,T$", + "kind": "math" + }, + { + "text": " 都通過同一個點 " + }, + { + "latex": "$P: \\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "在這個 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 點的附近,函數曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 與這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 非常接近。" + } + ], + "content": "在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "越接近 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 點,函數曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 與這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 越接近。" + } + ], + "content": "越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「切平面(tangent plane)」。", + "newline": "false", + "runs": [ + { + "text": "因此,我們將這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 稱為函數圖形 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的「" + }, + { + "text": "切平面(tangent plane)", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將這樣的定義紀錄如下:", + "newline": "false", + "runs": [ + { + "text": "我們將這樣的定義紀錄如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "切平面", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「切平面(tangent plane)」。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。如果函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的,則我們稱平面" + }, + { + "latex": "$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$", + "kind": "math_block" + }, + { + "text": "為函數曲面 " + }, + { + "latex": "$S: z = f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P: \\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": " 的「" + }, + { + "text": "切平面(tangent plane)", + "style": "bold" + }, + { + "text": "」。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-3" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = x^2 + 2y^2\n$$", + "kind": "math_block" + }, + { + "text": "請計算此函數曲面 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": " 的切平面方程式。切平面方程式為? " + } + ], + "answers": [ + "z=3+2(x-1)+4(y-1)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?" + }, + { + "type": "solution", + "uid": "sol_a6d4342dfb", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$", + "newline": "false", + "runs": [ + { + "text": "先寫下曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切平面公式:" + }, + { + "latex": "$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算偏導數:$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算偏導數:" + }, + { + "latex": "$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為切點是 $(1,1,3)$,所以要把偏導數代入$$\n(a,b)=(1,1).\n$$", + "newline": "false", + "runs": [ + { + "text": "因為切點是 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": ",所以要把偏導數代入" + }, + { + "latex": "$$\n(a,b)=(1,1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "可得$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$", + "newline": "false", + "runs": [ + { + "text": "可得" + }, + { + "latex": "$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "又因為$$\nf(1,1)=3,\n$$所以切平面方程式為$$\nz=3+2(x-1)+4(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "又因為" + }, + { + "latex": "$$\nf(1,1)=3,\n$$", + "kind": "math_block" + }, + { + "text": "所以切平面方程式為" + }, + { + "latex": "$$\nz=3+2(x-1)+4(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果再整理一下,也可以寫成$$\nz=2x+4y-3.\n$$", + "newline": "false", + "runs": [ + { + "text": "如果再整理一下,也可以寫成" + }, + { + "latex": "$$\nz=2x+4y-3.\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n " + }, + { + "type": "solution", + "uid": "sol_a85cea3a8b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先寫下切平面方程式的一般公式:" + } + ], + "content": "先寫下切平面方程式的一般公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$;" + }, + { + "key": "b", + "text": "$z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$;" + }, + { + "key": "c", + "text": "$z = f(a,b) + f_x(a,b)x + f_y(a,b)y$;" + }, + { + "key": "d", + "text": "$dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "計算偏微分函數((" + }, + { + "latex": "$f(x,y) = x^2 + 2y^2$", + "kind": "math" + }, + { + "text": " )):" + }, + { + "latex": "$$\nf_x(x,y)=?\n$$", + "kind": "math_block" + } + ], + "content": "計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):$$\nf_x(x,y)=?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$$\nf_y(x,y)=?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "answers": [ + "4y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏微分在哪個點的值?" + } + ], + "content": "計算偏微分在哪個點的值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b) = (1,3)$;" + }, + { + "key": "b", + "text": "$(a,b) = (1,1)$;" + }, + { + "key": "c", + "text": "$(a,b) = (3,1)$;" + }, + { + "key": "d", + "text": "$(a,b) = (0,0)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,切平面方程式為:" + } + ], + "content": "因此,切平面方程式為:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "z=3+2(x-1)+4(y-1)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣全微分", + "newline": "true", + "runs": [ + { + "text": "4️⃣全微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "考慮變數 $$\nz= f(x,y)。\n$$", + "newline": "false", + "runs": [ + { + "text": "考慮變數 " + }, + { + "latex": "$$\nz= f(x,y)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$因此,$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "newline": "false", + "runs": [ + { + "text": "在前面部分,我們已經知道:當雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 可微時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為$$\n\\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是說,當變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 分別改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 時,對應的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 值會產生的增量為" + }, + { + "latex": "$$\n\\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 微分(differential),而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼$$\ndz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$", + "newline": "false", + "runs": [ + { + "text": "如果我們用符號 " + }, + { + "latex": "$dx$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$dy$", + "kind": "math" + }, + { + "text": " 代表「非常非常小的增量」,並稱之為 " + }, + { + "text": "微分(differential)", + "style": "bold" + }, + { + "text": ",而用 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 代表變數 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的「線性估計的增量」(即不含誤差項的部分),那麼" + }, + { + "latex": "$$\ndz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "重點:真實變化 $\\Delta z$ vs 線性估計 $dz$:", + "newline": "false", + "runs": [ + { + "text": "重點", + "style": "bold" + }, + { + "text": ":真實變化 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " vs 線性估計 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$", + "kind": "math" + }, + { + "text": ":真實的變化。" + } + ], + "content": "$\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$dz = f_x(a,b)dx + f_y(a,b)dy$", + "kind": "math" + }, + { + "text": ": 線性估計真實的變化。" + } + ], + "content": "$dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "若可微 " + }, + { + "latex": "$\\Rightarrow \\Delta z − dz \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "若可微 $\\Rightarrow \\Delta z − dz \\to 0$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "全微分", + "body": [ + { + "type": "paragraph", + "content": "令 $z = f(x,y)$。其 全微分(total differential) 定義為$$\n\\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。其 " + }, + { + "text": "全微分(total differential)", + "style": "bold" + }, + { + "text": " 定義為" + }, + { + "latex": "$$\n\\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "假設$$\nz = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "newline": "false", + "runs": [ + { + "text": "假設" + }, + { + "latex": "$$\nz = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請計算全微分 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請計算全微分 $dz$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算如果 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 與變化量 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 的值。" + } + ], + "content": "請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1a23061f9c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先寫出函數的全微分公式:$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$", + "newline": "false", + "runs": [ + { + "text": "先寫出函數的全微分公式:" + }, + { + "latex": "$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算偏導數:$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算偏導數:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,\n所以$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$", + "newline": "true", + "runs": [ + { + "text": "題目中," + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "," + }, + { + "newline": "true" + }, + { + "text": "所以" + }, + { + "latex": "$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "先把偏導數代入 $(2,1)$:$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$", + "newline": "false", + "runs": [ + { + "text": "先把偏導數代入 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,全微分為$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,全微分為" + }, + { + "latex": "$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以利用全微分估計,可得$$\ndz=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以利用全微分估計,可得" + }, + { + "latex": "$$\ndz=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此外,實際增量為$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$", + "newline": "false", + "runs": [ + { + "text": "此外,實際增量為" + }, + { + "latex": "$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。" + }, + { + "type": "solution", + "uid": "sol_8ee5157c9b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "寫出函數 全微分 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 的一般公式:" + } + ], + "content": "寫出函數 全微分 $dz$ 的一般公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$;" + }, + { + "key": "b", + "text": "$dz = f(x,y)\\,dx + f(x,y)\\,dy$;" + }, + { + "key": "c", + "text": "$dz = dx + dy$;" + }, + { + "key": "d", + "text": "$dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "計算偏微分函數:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x}=?\n$$", + "kind": "math_block" + } + ], + "content": "計算偏微分函數:$$\n\\frac{\\partial z}{\\partial x}=?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$y(2x-3)$;" + }, + { + "key": "b", + "text": "$2x-3$;" + }, + { + "key": "c", + "text": "$\\dfrac{2x-3}{x^2 - 3x + 3}$;" + }, + { + "key": "d", + "text": "$\\dfrac{1}{y}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial y}=?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$y$;" + }, + { + "key": "b", + "text": "$\\dfrac{1}{y}$;" + }, + { + "key": "c", + "text": "$x^2 - 3x + 3$;" + }, + { + "key": "d", + "text": "$\\dfrac{x}{y}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "題目:" + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "。代表計算 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$(x,y,dx, dy)$", + "kind": "math" + }, + { + "text": " 要設為?" + } + ], + "content": "題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(2,1,0.01,0.01)$;" + }, + { + "key": "b", + "text": "$(2,1,0.1,-0.1)$;" + }, + { + "key": "c", + "text": "$(2,1,0.01,-0.01)$;" + }, + { + "key": "d", + "text": "$(2.01,0.99,0.01,-0.01)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$(x,y)=(2,1)$", + "kind": "math" + }, + { + "text": " 代入偏導數,可得" + }, + { + "latex": "$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(2,1)=2^2-3(2)+3=1\n$$", + "kind": "math_block" + }, + { + "text": "又因為" + }, + { + "latex": "$$\ndx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n$$", + "kind": "math_block" + }, + { + "text": "所以" + }, + { + "latex": "$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n$$", + "kind": "math_block" + }, + { + "latex": "$$\ndz=1(0.01)+1(-0.01)=0.01-0.01=0\n$$", + "kind": "math_block" + }, + { + "text": "因此,全微分給出的變化量近似為" + }, + { + "latex": "$$\ndz=0.\n$$", + "kind": "math_block" + } + ], + "content": "將 $(x,y)=(2,1)$ 代入偏導數,可得$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n$$$$\nf_y(2,1)=2^2-3(2)+3=1\n$$又因為$$\ndx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n$$所以$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n$$$$\ndz=1(0.01)+1(-0.01)=0.01-0.01=0\n$$因此,全微分給出的變化量近似為$$\ndz=0.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "再來比較實際的變化量:" + }, + { + "latex": "$$\n\\Delta z=f(2.01,0.99)-f(2,1)\n$$", + "kind": "math_block" + }, + { + "text": "經過計算可得" + }, + { + "latex": "$$\n\\Delta z\\approx -0.000001\n$$", + "kind": "math_block" + }, + { + "text": "這表示函數的實際變化量非常接近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",而我們用全微分算出的" + }, + { + "latex": "$$\ndz=0\n$$", + "kind": "math_block" + }, + { + "text": "也確實是一個很好的近似值。" + } + ], + "content": "再來比較實際的變化量:$$\n\\Delta z=f(2.01,0.99)-f(2,1)\n$$經過計算可得$$\n\\Delta z\\approx -0.000001\n$$這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的$$\ndz=0\n$$也確實是一個很好的近似值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 也就是說,當 $(x,y)$ 的改變很小時,$$\n\\Delta z \\approx dz\n$$ 這就是全微分可以用來近似函數變化量的原因。", + "newline": "false", + "runs": [ + { + "text": " 也就是說,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的改變很小時," + }, + { + "latex": "$$\n\\Delta z \\approx dz\n$$", + "kind": "math_block" + }, + { + "text": " 這就是全微分可以用來近似函數變化量的原因。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣三或更多變數函數", + "newline": "true", + "runs": [ + { + "text": "5️⃣三或更多變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,", + "newline": "false", + "runs": [ + { + "text": "上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果偏導數 " + }, + { + "latex": "$f_x,f_y,f_z$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 附近都是連續的,則我們會有線性估計(Linear Approximation)公式" + }, + { + "latex": "$$\nf(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$", + "kind": "math_block" + } + ], + "content": "如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式$$\nf(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 附近,函數的改變量可以寫成" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。", + "newline": "false", + "runs": [ + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_3$", + "kind": "math" + }, + { + "text": " 皆會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y, \\Delta z)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0,0)$", + "kind": "math" + }, + { + "text": " 時,趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們稱函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是可微的(differentiable)。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是可微的,那一定也在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ], + "content": "如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$w= f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們定義全微分(total differential)為" + }, + { + "latex": "$$\ndw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "kind": "math_block" + } + ], + "content": "若 $w= f(x,y,z)$,我們定義全微分(total differential)為$$\ndw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$" + } + ] + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣線性估計", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣線性估計", + "newline": "true", + "runs": [ + { + "text": "1️⃣線性估計", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "上一節中,我們介紹了雙變數函數 $f(x,y)$ 的偏導數。以點 $(a,b)$ 為例,定義如下:$$\n\\begin{aligned}\n f_x(a,b) &= \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &= \\lim_{\\Delta y \\to 0} \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。 \n \\end{aligned}\n$$這兩個量分別代表 $f$ 在 $x$ 方向與 $y$ 方向的瞬間變化率。因此,在偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下,當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,可以將偏導數視為「變化率」,得到近似關係:$$\n\\begin{aligned}\n f_x(a,b) &\\approx \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &\\approx \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。", + "newline": "false", + "runs": [ + { + "text": "上一節中,我們介紹了雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的偏導數。以點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 為例,定義如下:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) &= \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &= \\lim_{\\Delta y \\to 0} \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。 \n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "這兩個量分別代表 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的瞬間變化率。因此,在偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在的情況下,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時,可以將偏導數視為「變化率」,得到近似關係:" + }, + { + "latex": "$$\n\\begin{aligned}\n f_x(a,b) &\\approx \\frac{f(a+\\Delta x , b)-f(a,b)}{\\Delta x},\\\\\n f_y(a,b) &\\approx \\frac{f(a , b+\\Delta y)-f(a,b)}{\\Delta y}。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由上述兩個近似式,我們可以得到 $f$ 的變化量在各方向的估計。當 $\\Delta x$ 與 $\\Delta y$ 都很小時:$$\n\\begin{aligned}\n f(a+\\Delta x , b) - f(a,b) &\\approx f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) - f(a,b) &\\approx f_y(a,b) \\Delta y。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。這兩條式子表達了一個非常直覺的觀念:應變數的變化量 = 變化率 × 自變數的變化。", + "newline": "false", + "runs": [ + { + "text": "由上述兩個近似式,我們可以得到 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化量在各方向的估計。當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都很小時:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b) - f(a,b) &\\approx f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) - f(a,b) &\\approx f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。這兩條式子表達了一個非常直覺的觀念:" + }, + { + "text": "應變數的變化量 = 變化率 × 自變數的變化", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "進一步將上式移項,可得:當偏導數 $f_x(a,b)$ 與 $f_y(a,b)$ 存在的情況下,$$\n\\begin{aligned}\n f(a+\\Delta x , b) &\\approx f(a,b) + f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) &\\approx f(a,b) + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,誤差越小(估計更精準)。這表示:在做小幅度的變動時,$f$ 的值可以由「原本的函數值」加上「變化率 × 變動量」來估計。", + "newline": "false", + "runs": [ + { + "text": "進一步將上式移項,可得:當偏導數 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在的情況下," + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b) &\\approx f(a,b) + f_x(a,b) \\Delta x,\\\\\n f(a , b+\\Delta y) &\\approx f(a,b) + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,誤差越小(估計更精準)。這表示:" + }, + { + "text": "在做小幅度的變動時,", + "style": "bold" + }, + { + "latex": "$f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的值可以由「原本的函數值」加上「變化率 × 變動量」來估計", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "前面我們分別討論了只變動 $x$ 或只變動 $y$ 時,$f$ 的變化可以用偏導數來估計。那麼,如果現在我們 同時 對 $x$ 與 $y$ 做微小的變動,也就是 $\\Delta x$ 和 $\\Delta y$ 都接近 $0$ 時,$$\nf(a+\\Delta x , b+\\Delta y)\n$$又該如何近似呢?", + "newline": "false", + "runs": [ + { + "text": "前面我們分別討論了只變動 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 或只變動 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化可以用偏導數來估計。那麼,如果現在我們 同時 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 做微小的變動,也就是 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都接近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y)\n$$", + "kind": "math_block" + }, + { + "text": "又該如何近似呢?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_688869c490", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "直覺上," + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的變化會同時受到 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 這兩個方向變動的影響,因此其總變化量理應由兩項貢獻加總而成。為了正式推導線性估計,我們先觀察:" + }, + { + "latex": "$f(a+\\Delta x , b+\\Delta y) - f(a,b)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "直覺上,$f$ 的變化會同時受到 $x$ 與 $y$ 這兩個方向變動的影響,因此其總變化量理應由兩項貢獻加總而成。為了正式推導線性估計,我們先觀察:$f(a+\\Delta x , b+\\Delta y) - f(a,b)$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "利用「加減同一項」的方式,我們把變化量拆成先變 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "、再變 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 兩段。" + }, + { + "latex": "$$\n\\begin{aligned}\n &f(a+\\Delta x , b+\\Delta y) - f(a,b) \\\\\n &= \\left[ f(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\right]\n + \\left[ f(a,b+\\Delta y) - f(a,b) \\right]\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "利用「加減同一項」的方式,我們把變化量拆成先變 $y$、再變 $x$ 兩段。$$\n\\begin{aligned}\n &f(a+\\Delta x , b+\\Delta y) - f(a,b) \\\\\n &= \\left[ f(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\right]\n + \\left[ f(a,b+\\Delta y) - f(a,b) \\right]\n \\end{aligned}\n$$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "text": "這是多變數函數線性化中最核心的一步,常見教材直接跳過,但實際上這是『線性估計為何成立』的根本原因。" + } + ], + "content": "這是多變數函數線性化中最核心的一步,常見教材直接跳過,但實際上這是『線性估計為何成立』的根本原因。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "上述第一項可以看成是「在點 " + }, + { + "latex": "$(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 上,函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向有一個 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 的變化量」,因此:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\approx ?\n$$", + "kind": "math_block" + } + ], + "content": "上述第一項可以看成是「在點 $(a,b+\\Delta y)$ 上,函數 $f$ 在 $x$ 方向有一個 $\\Delta x$ 的變化量」,因此:$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b+\\Delta y) \\approx ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(a,b) \\Delta x$;" + }, + { + "key": "b", + "text": "$f_x(a,b+\\Delta y) \\Delta x$;" + }, + { + "key": "c", + "text": "$f_y(a,b) \\Delta y$;" + }, + { + "key": "d", + "text": "$f_x(a,b+\\Delta x) \\Delta y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "上述第二項可以看成是「在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 上,函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向有一個 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 的變化量」,因此:" + }, + { + "latex": "$$\nf(a,b+\\Delta y) - f(a,b) \\approx ?\n$$", + "kind": "math_block" + } + ], + "content": "上述第二項可以看成是「在點 $(a,b)$ 上,函數 $f$ 在 $y$ 方向有一個 $\\Delta y$ 的變化量」,因此:$$\nf(a,b+\\Delta y) - f(a,b) \\approx ?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f_x(a,b) \\Delta x$;" + }, + { + "key": "b", + "text": "$f_x(a,b+\\Delta y) \\Delta x$;" + }, + { + "key": "c", + "text": "$f_y(a,b) \\Delta y$;" + }, + { + "key": "d", + "text": "$f_x(a,b+\\Delta x) \\Delta y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "由上面兩個推導,我們得到:" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b+\\Delta y) \\Delta x + f_y(a,b) \\Delta y\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "由上面兩個推導,我們得到:$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b+\\Delta y) \\Delta x + f_y(a,b) \\Delta y\n \\end{aligned}\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 記得:", + "newline": "false", + "runs": [ + { + "text": " 記得:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 2, + "marker": "1.", + "runs": [ + { + "text": "第一項使用的是點 " + }, + { + "latex": "$(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導數(此外,需要 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的);" + } + ], + "content": "第一項使用的是點 $(a,b+\\Delta y)$ 對 $x$ 的偏導數(此外,需要 $f_x(a,b+\\Delta y)$ 是存在的);" + }, + { + "indent": 2, + "marker": "2.", + "runs": [ + { + "text": "第二項使用的是點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的偏導數(此外,需要 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 是存在的)。" + } + ], + "content": "第二項使用的是點 $(a,b)$ 對 $y$ 的偏導數(此外,需要 $f_y(a,b)$ 是存在的)。" + }, + { + "indent": 0, + "marker": "6.", + "runs": [ + { + "text": "是不是很想將上式 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 寫成 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 呢?也就是希望:" + }, + { + "latex": "$$\nf_x(a,b+\\Delta y) \\approx f_x(a,b) ?\n$$", + "kind": "math_block" + }, + { + "text": "等價地,希望:" + }, + { + "latex": "$$\n\\lim_{\\Delta y \\to 0} f_x(a,b+\\Delta y) = f_x(a,b) ?\n$$", + "kind": "math_block" + } + ], + "content": "是不是很想將上式 $f_x(a,b+\\Delta y)$ 寫成 $f_x(a,b)$ 呢?也就是希望:$$\nf_x(a,b+\\Delta y) \\approx f_x(a,b) ?\n$$等價地,希望:$$\n\\lim_{\\Delta y \\to 0} f_x(a,b+\\Delta y) = f_x(a,b) ?\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 試想:什麼條件可以保證上式一定成立? " + } + ], + "options": [ + { + "key": "a", + "text": "任意的函數 $f_x(x,y)$ 皆會成立;" + }, + { + "key": "b", + "text": "函數 $f_x(x,y)$ 在 $(a,b)$ 的極限存在;" + }, + { + "key": "c", + "text": "函數 $f_x(x,y)$ 在 $(a,b)$ 是連續的。" + }, + { + "key": "d", + "text": "函數 $f_y(x,y)$ 在 $(a,b)$ 是連續的。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "7.", + "runs": [ + { + "text": "因此,在偏導數連續的條件成立時:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "等價的," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ], + "content": "因此,在偏導數連續的條件成立時:$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b) \\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$等價的,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將結果得到 $f(a+\\Delta x , b+\\Delta y)$ 近似的結果,紀錄如下:", + "newline": "false", + "runs": [ + { + "text": "我們將結果得到 " + }, + { + "latex": "$f(a+\\Delta x , b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 近似的結果,紀錄如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "線性估計(Linear Approximation)", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,\n則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,我們會有:$$\n\\boxed{f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y}。\n$$等價的,令 $x = a+\\Delta x$ 與 $y = b+\\Delta y$,則在 $x\\approx a$ 與 $y\\approx b$ 時,$$\n\\boxed{f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)}。\n$$以上兩式皆稱為函數 $f(x,y)$ 在點 $(a,b)$ 的 線性估計(Linear Approximation)。這兩個公式只是表達方式略有不同。此外,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。", + "newline": "true", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若其偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的," + }, + { + "newline": "true" + }, + { + "text": "則當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時,我們會有:" + }, + { + "latex": "$$\n\\boxed{f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y}。\n$$", + "kind": "math_block" + }, + { + "text": "等價的,令 " + }, + { + "latex": "$x = a+\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y = b+\\Delta y$", + "kind": "math" + }, + { + "text": ",則在 " + }, + { + "latex": "$x\\approx a$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y\\approx b$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\n\\boxed{f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)}。\n$$", + "kind": "math_block" + }, + { + "text": "以上兩式皆稱為函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "。這兩個公式只是表達方式略有不同。此外,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 條件的要求是偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 「附近」皆是連續的,不是只有點 $(a,b)$ 而已。因為,在上面推導第 4 點中有一項要求:$f_x(a,b+\\Delta y)$ 是存在的,不是只有要求 $f_x(a,b+\\Delta y)$ 是存在的。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 條件的要求是偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 「" + }, + { + "text": "附近", + "style": "bold" + }, + { + "text": "」皆是連續的,不是只有點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 而已。因為,在上面推導第 4 點中有一項要求:" + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的,不是只有要求 " + }, + { + "latex": "$f_x(a,b+\\Delta y)$", + "kind": "math" + }, + { + "text": " 是存在的。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2. 上面定理,要求「偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的」,其實有一點多!只是這樣條件比較清晰簡潔。", + "newline": "false", + "runs": [ + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 上面定理,要求「偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的」,其實有一點多!只是這樣條件比較清晰簡潔。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 3. 上面定理,框起來的兩個公式,非常重要,我們將在後面反覆利用它們。一個公式,多個解釋!", + "newline": "false", + "runs": [ + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": " 上面定理,框起來的兩個公式,非常重要,我們將在後面反覆利用它們。一個公式,多個解釋!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$\n \n\n\n設函數 $f(x,y)$ 在點 $(2,1)$ 附近可用線性估計來近似。\n\n在線性估計中,我們使用的公式是\n$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$\n\n接著計算在點 $(2,1)$ 的函數值與偏導數值:\n$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$\n\n因此,函數在點 $(2,1)$ 的線性估計公式為\n$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$\n\n也就是\n$$\nL(x,y)=x+y-3.\n$$\n\n現在利用這個線性估計公式來估計\n$$\nf(2.01,0.99).\n$$\n\n代入可得\n$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$\n\n因此\n$$\nL(2.01,0.99)=0.01-0.01=0.\n$$\n\n所以\n$$\nf(2.01,0.99)\\approx 0.\n$$\n\n \n\n\n1. 寫出函數 $f(x,y)$ 在點 $(2,1)$ 的線性估計公式\n \n a. $f(x,y) = f(2,1) + f_x(x,y) (x-2) + f_y(x,y) (y-1)$;\n b. $f(x,y) = f(2,1) + f_x(x,y) (x-2.01) + f_y(x,y) (y-0.99)$;\n c. $f(x,y) = f(2,1) + f_x(2,1) (x-2) + f_y(2,1) (y-1)$;\n d. $f(x,y) = f(2,1) + f_x(2,1) (x-2.01) + f_y(2,1) (y-0.99)$。\n \n\n\n2. 先計算 $f(2,1)$,$f_x(2,1)$ 與 $f_y(2,1)$,再選出正確的線性估計公式:\n \n a. $f(x,y) \\approx -1 + 2(x-2) + (y-1)$;\n b. $f(x,y) \\approx 0 + 2(x-2) + (y-1)$;\n c. $f(x,y) \\approx 0 + 1(x-2) + 1(y-1)$;\n d. $f(x,y) \\approx 0 + (x-2) + 2(y-1)$。\n \n\n\n3. 利用上題選出的線性估計公式,將 $(2.01, 0.99)$ 代入,估計\n $$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n $$\n \n\n\n答案:$f(2.01,0.99)\\approx 0.$\n\n \n\n\n---\n## 2️⃣多變數函數的可微性\n\n在前面的「**線性估計(Linear Approximation)**」定理中,我們提到:如果偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$\n且,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。\n事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「**可微的(Differentiable)**」來描述 真正意義上 的線性近似成立。\n\n\n定義\n可微的(Differentiable)\n考慮雙變數函數 $f(x,y)$。如果在點 $(a,b)$ 附近,函數的改變量可以寫成\n$$\n f(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n或更精確的,\n$$\n f(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$\n其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 皆會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y)$ 在點 $(a,b)$ 是「**可微的(Differentiable)**」。\n\n\n**注意 1.** \n上述形式比使用近似符號 $\\approx$ 的寫法更加簡潔與嚴謹,因為它直接反映出,當 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$\n上面兩式等號左右兩項誤差越小(估計更精準)。\n\n**注意 2.** 可微性意味著,此函數在點 $(a,b)$ 附近可以被一個線性函數很好地逼近。\n\n**注意 3.**\n上述對於多變數函數 $f(x,y)$ 在點 $(a,b)$ 的可微性,這與單變數函數 $f(x)$ 在點 $a$ 的可微性定義是一致的。我們定義單變數函數 $f(x)$ 在點 $a$ 是可微的,如果 \n$$\n f'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$ \n存在。這等價於以下線性估計成立:\n$$\n f'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$\n且,當 $\\Delta x$ 趨近於 $0$ 時,左右兩邊的差值(誤差)會越來越小。\n\n透過上面「**線性估計(Linear Approximation)**」定理與「**可微的(Differentiable)**」定義,我們會有以下結論:\n\n\n推論\n檢驗可微分的方法\n考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則函數 $f(x,y)$ 在點 $(a,b)$ 是可微的。\n\n\n**注意 1.** 請注意,如果只有 $f_x(a,b)$ 與 $f_y(a,b)$ 存在,未函數 $f(x,y)$ 在點 $(a,b)$ 是可微的!請參見下面例題。\n\n\n定理\n可微分 必定 連續\n考慮雙變數函數 $f(x,y)$。若 $f(x,y)$ 在點 $(a,b)$ 是可微的,則其在點 $(a,b)$ 是連續的。\n\n\n \n1. 由雙變數函數 $f(x,y)$ 在點 $(a,b)$ 是可微的定義:\n $$\n f(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n $$\n 其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,皆趨近於 $0$。\n2. 因此,\n $$\n \\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n $$\n3. 令 $x= a+ \\Delta x$ 與 $y= b+\\Delta y$。則,當 $(\\Delta x, \\Delta y)\\to (0,0)$,我們會有 $(x,y)\\to (a,b)$。此外,由上式,我們會有\n $$\n \\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n $$\n4. 因此,函數 $f(x,y)$ 在點 $(a,b)$ 是連續的。\n\n\n\n$$\n \\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$\n\n---\n### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n\n\n\n1. **說明極限不存在:** \n由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。\n\n這裡用**路徑比較法**來看。 \n若沿著直線\n$$\ny=mx\n$$\n趨近 $(0,0)$,代入函數後可得\n$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$\n\n這個結果會隨著 $m$ 的不同而改變。 \n例如:\n- 若 $m=0$,極限為 $0$\n- 若 $m=1$,極限為 $\\frac12$\n\n因為沿不同路徑得到的極限值不同,所以\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n**不存在**。\n\n---\n\n2. **說明在 $(0,0)$ 不連續:** \n函數在點 $(0,0)$ 連續,必須滿足\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$\n\n但由第 1 小題可知,\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n不存在,所以函數在 $(0,0)$ **不連續**。\n\n---\n\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** \n根據偏導數定義,\n$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$\n\n代入此題函數後,可以算得上式為\n$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$\n因此\n$$\nf_x(0,0)=0.\n$$\n\n同理,\n$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$\n\n所以\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n---\n\n4. **說明在 $(0,0)$ 不可微:** \n若函數在某點可微,則一定在該點連續。 \n也就是說:\n$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$\n\n但前面已經證明 $f(x,y)$ 在 $(0,0)$ **不連續**, \n因此它在 $(0,0)$ **不可能可微**。\n\n---\n\n**結論:**\n- $\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在\n- $f(x,y)$ 在 $(0,0)$ 不連續\n- $f_x(0,0)=0,\\;f_y(0,0)=0$\n- $f(x,y)$ 在 $(0,0)$ 不可微\n\n \n1. **說明極限不存在:** 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。\n\n 下面,我們來試試使用「路徑比較法」計算極限:考慮點 $(x,y)$ 沿著路徑 \n $$\n C: y= m(x-0)+0\n $$ \n 趨近 $(0,0)$,則\n $$\n \\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n $$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. $\\dfrac{1}{1+m^2}$。\n \n 所以 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. 不存在。\n \n2. **說明在 $(0,0)$ 不連續:** 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?\n \n a. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;\n b. $f(0,0)$ 有定義即可;\n c. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;\n d. 偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。\n \n 因此,由第 1 小題,$f(x,y)$ 在點 $(0,0)$ 不連續。\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** 根據定義,\n $$\n f_x(0,0) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;\n d. $\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。\n \n 代入此題函數的定義,上述極限變成?\n \n a. $\\lim\\limits_{\\Delta x\\to 0} 0= 0$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;\n d. 無法由此計算出來。\n \n 同理,可以計算出 $f_y(0,0)=0$。\n4. **說明在 $(0,0)$ 不可微:** 什麼條件?$\\Longrightarrow$ 不可微:\n \n a. 因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微; \n b. 因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;\n c. 因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微; \n d. 因為 $f(0,0)$ 沒有定義,所以不可微。\n \n\n\n---\n## 3️⃣切平面\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$\n當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成\n$$\n f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$\n當 $(x,y) \\to (a,b)$。\n\n上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮\n$$\n \\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$\n那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。\n\n注意到:\n- 圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;\n- 圖形上,\n $$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n $$ \n 是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。\n\n因此,上面近似的結果告訴我們的是:\n1. 兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。\n2. 在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。\n3. 越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。\n\n因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「**切平面(tangent plane)**」。\n\n我們將這樣的定義紀錄如下:\n\n\n定義\n切平面\n考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面\n$$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$ \n為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「**切平面(tangent plane)**」。\n\n\n---\n### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-1" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "kind": "math_block" + }, + { + "text": "請利用函數在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式,估計 " + }, + { + "latex": "$f(2.01, 0.99)$", + "kind": "math" + }, + { + "text": " 的值。" + }, + { + "latex": "$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$", + "kind": "math_block" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入近似值", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$" + }, + { + "type": "solution", + "uid": "sol_20d1453615", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "設函數 $f(x,y)$ 在點 $(2,1)$ 附近可用線性估計來近似。", + "newline": "false", + "runs": [ + { + "text": "設函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 附近可用線性估計來近似。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在線性估計中,我們使用的公式是$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "在線性估計中,我們使用的公式是" + }, + { + "latex": "$$\nL(x,y)=f(2,1)+f_x(2,1)(x-2)+f_y(2,1)(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算在點 $(2,1)$ 的函數值與偏導數值:$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的函數值與偏導數值:" + }, + { + "latex": "$$\nf(2,1)=0,\\qquad f_x(2,1)=1,\\qquad f_y(2,1)=1.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,函數在點 $(2,1)$ 的線性估計公式為$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,函數在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式為" + }, + { + "latex": "$$\nL(x,y)=0+1(x-2)+1(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是$$\nL(x,y)=x+y-3.\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是" + }, + { + "latex": "$$\nL(x,y)=x+y-3.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "現在利用這個線性估計公式來估計$$\nf(2.01,0.99).\n$$", + "newline": "false", + "runs": [ + { + "text": "現在利用這個線性估計公式來估計" + }, + { + "latex": "$$\nf(2.01,0.99).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入可得$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "代入可得" + }, + { + "latex": "$$\nL(2.01,0.99)=0+(2.01-2)+(0.99-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此$$\nL(2.01,0.99)=0.01-0.01=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此" + }, + { + "latex": "$$\nL(2.01,0.99)=0.01-0.01=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\nf(2.01,0.99)\\approx 0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\nf(2.01,0.99)\\approx 0.\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n考慮函數 \n$$\n f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n請利用函數在點 $(2,1)$ 的線性估計公式,估計 $f(2.01, 0.99)$ 的值。\n$$\n f(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$\n \n" + }, + { + "type": "solution", + "uid": "sol_6aafcf81a4", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": " ", + "newline": "false", + "runs": [ + { + "text": " " + } + ] + }, + { + "type": "flow", + "id": "flow-5", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "寫出函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的線性估計公式" + } + ], + "content": "寫出函數 $f(x,y)$ 在點 $(2,1)$ 的線性估計公式" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-5::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f(x,y) = f(2,1) + f_x(x,y) (x-2) + f_y(x,y) (y-1)$;" + }, + { + "key": "b", + "text": "$f(x,y) = f(2,1) + f_x(x,y) (x-2.01) + f_y(x,y) (y-0.99)$;" + }, + { + "key": "c", + "text": "$f(x,y) = f(2,1) + f_x(2,1) (x-2) + f_y(2,1) (y-1)$;" + }, + { + "key": "d", + "text": "$f(x,y) = f(2,1) + f_x(2,1) (x-2.01) + f_y(2,1) (y-0.99)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-5", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "先計算 " + }, + { + "latex": "$f(2,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_x(2,1)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(2,1)$", + "kind": "math" + }, + { + "text": ",再選出正確的線性估計公式:" + } + ], + "content": "先計算 $f(2,1)$,$f_x(2,1)$ 與 $f_y(2,1)$,再選出正確的線性估計公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-5::step-2::q2", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$f(x,y) \\approx -1 + 2(x-2) + (y-1)$;" + }, + { + "key": "b", + "text": "$f(x,y) \\approx 0 + 2(x-2) + (y-1)$;" + }, + { + "key": "c", + "text": "$f(x,y) \\approx 0 + 1(x-2) + 1(y-1)$;" + }, + { + "key": "d", + "text": "$f(x,y) \\approx 0 + (x-2) + 2(y-1)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-5", + "step": "step-2" + } + ], + "gate_from": "flow-5::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "利用上題選出的線性估計公式,將 " + }, + { + "latex": "$(2.01, 0.99)$", + "kind": "math" + }, + { + "text": " 代入,估計" + }, + { + "latex": "$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$", + "kind": "math_block" + } + ], + "content": "利用上題選出的線性估計公式,將 $(2.01, 0.99)$ 代入,估計$$\nf(2.01, 0.99) \\approx ? \\text{(輸入近似值(四捨五入到小數第2位))}\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-5::step-3::q3", + "prompt_runs": [], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入近似值(四捨五入到小數第 2 位)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-5", + "step": "step-3" + } + ], + "gate_from": "flow-5::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$f(2.01,0.99)\\approx 0.$", + "newline": "false", + "runs": [ + { + "text": "答案:" + }, + { + "latex": "$f(2.01,0.99)\\approx 0.$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-5::step-3::q3" + } + ] + }, + { + "type": "paragraph", + "content": "\n", + "newline": "true", + "runs": [ + { + "newline": "true" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣多變數函數的可微性", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣多變數函數的可微性", + "newline": "true", + "runs": [ + { + "text": "2️⃣多變數函數的可微性", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "在前面的「線性估計(Linear Approximation)」定理中,我們提到:如果偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則當 $\\Delta x$ 與 $\\Delta y$ 都非常小時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$且,當 $\\Delta x$, $\\Delta y$ 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「可微的(Differentiable)」來描述 真正意義上 的線性近似成立。", + "newline": "false", + "runs": [ + { + "text": "在前面的「" + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "」定理中,我們提到:如果偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的,則當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 都非常小時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 越小時,上面兩式等號左右兩項誤差越小(估計更精準)。事實上,即使偏導數在附近不連續,有些函數仍然滿足這樣的線性估計。因此,我們會用「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」來描述 真正意義上 的線性近似成立。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "可微的(Differentiable)", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。如果在點 $(a,b)$ 附近,函數的改變量可以寫成$$\nf(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$或更精確的,$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 皆會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y)$ 在點 $(a,b)$ 是「可微的(Differentiable)」。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。如果在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近,函數的改變量可以寫成" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "或更精確的," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 皆會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們稱函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 上述形式比使用近似符號 $\\approx$ 的寫法更加簡潔與嚴謹,因為它直接反映出,當 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$上面兩式等號左右兩項誤差越小(估計更精準)。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 上述形式比使用近似符號 " + }, + { + "latex": "$\\approx$", + "kind": "math" + }, + { + "text": " 的寫法更加簡潔與嚴謹,因為它直接反映出,當 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y\n$$", + "kind": "math_block" + }, + { + "text": "上面兩式等號左右兩項誤差越小(估計更精準)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 2. 可微性意味著,此函數在點 $(a,b)$ 附近可以被一個線性函數很好地逼近。", + "newline": "false", + "runs": [ + { + "text": "注意 2.", + "style": "bold" + }, + { + "text": " 可微性意味著,此函數在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近可以被一個線性函數很好地逼近。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 3.上述對於多變數函數 $f(x,y)$ 在點 $(a,b)$ 的可微性,這與單變數函數 $f(x)$ 在點 $a$ 的可微性定義是一致的。我們定義單變數函數 $f(x)$ 在點 $a$ 是可微的,如果 $$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$存在。這等價於以下線性估計成立:$$\nf'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$且,當 $\\Delta x$ 趨近於 $0$ 時,左右兩邊的差值(誤差)會越來越小。", + "newline": "false", + "runs": [ + { + "text": "注意 3.", + "style": "bold" + }, + { + "text": "上述對於多變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的可微性,這與單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 的可微性定義是一致的。我們定義單變數函數 " + }, + { + "latex": "$f(x)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 是可微的,如果 " + }, + { + "latex": "$$\nf'(a) = \\lim_{\\Delta x \\to 0} \\frac{f(a+\\Delta x) -f(a)}{\\Delta x}\n$$", + "kind": "math_block" + }, + { + "text": "存在。這等價於以下線性估計成立:" + }, + { + "latex": "$$\nf'(a) \\approx \\frac{f(a+\\Delta x) - f(a)}{\\Delta x}\n \\Longleftrightarrow \n f(a+\\Delta x) \\approx f(a) + f'(a) \\Delta x\n$$", + "kind": "math_block" + }, + { + "text": "且,當 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,左右兩邊的差值(誤差)會越來越小。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "透過上面「線性估計(Linear Approximation)」定理與「可微的(Differentiable)」定義,我們會有以下結論:", + "newline": "false", + "runs": [ + { + "text": "透過上面「" + }, + { + "text": "線性估計(Linear Approximation)", + "style": "bold" + }, + { + "text": "」定理與「" + }, + { + "text": "可微的(Differentiable)", + "style": "bold" + }, + { + "text": "」定義,我們會有以下結論:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "推論", + "headline": "檢驗可微分的方法", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若其偏導數 $f_x(x,y)$ 與 $f_y(x,y)$ 在點 $(a,b)$ 附近皆是連續的,則函數 $f(x,y)$ 在點 $(a,b)$ 是可微的。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若其偏導數 " + }, + { + "latex": "$f_x(x,y)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近皆是連續的,則函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意 1. 請注意,如果只有 $f_x(a,b)$ 與 $f_y(a,b)$ 存在,未函數 $f(x,y)$ 在點 $(a,b)$ 是可微的!請參見下面例題。", + "newline": "false", + "runs": [ + { + "text": "注意 1.", + "style": "bold" + }, + { + "text": " 請注意,如果只有 " + }, + { + "latex": "$f_x(a,b)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(a,b)$", + "kind": "math" + }, + { + "text": " 存在,未函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的!請參見下面例題。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "可微分 必定 連續", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。若 $f(x,y)$ 在點 $(a,b)$ 是可微的,則其在點 $(a,b)$ 是連續的。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。若 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的,則其在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b5205ae6ee", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "由雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的定義:" + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,皆趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "由雙變數函數 $f(x,y)$ 在點 $(a,b)$ 是可微的定義:$$\nf(a+\\Delta x , b+\\Delta y) = \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y。\n$$其中 $\\varepsilon_1$ 與 $\\varepsilon_2$ 會在 $(\\Delta x, \\Delta y)$ 趨近於 $(0,0)$ 時,皆趨近於 $0$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$$\n\\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "因此,$$\n\\begin{aligned}\n \\lim_{(\\Delta x, \\Delta y)\\to (0,0)} f(a+\\Delta x , b+\\Delta y) &=\n &= f(a,b)。\n \\end{aligned}\n$$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x= a+ \\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y= b+\\Delta y$", + "kind": "math" + }, + { + "text": "。則,當 " + }, + { + "latex": "$(\\Delta x, \\Delta y)\\to (0,0)$", + "kind": "math" + }, + { + "text": ",我們會有 " + }, + { + "latex": "$(x,y)\\to (a,b)$", + "kind": "math" + }, + { + "text": "。此外,由上式,我們會有" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n$$", + "kind": "math_block" + } + ], + "content": "令 $x= a+ \\Delta x$ 與 $y= b+\\Delta y$。則,當 $(\\Delta x, \\Delta y)\\to (0,0)$,我們會有 $(x,y)\\to (a,b)$。此外,由上式,我們會有$$\n\\lim_{(x,y)\\to (a,b)} f(x , y) = f(a,b)。\n$$" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ], + "content": "因此,函數 $f(x,y)$ 在點 $(a,b)$ 是連續的。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{f_x(x,y), f_y(x,y) \\;在\\; (a,b) \\;附近連續} \n \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;可微} \\Longrightarrow \\boxed{f(x,y) \\;在\\; (a,b) \\;連續}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n\n\n\n1. **說明極限不存在:** \n由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。\n\n這裡用**路徑比較法**來看。 \n若沿著直線\n$$\ny=mx\n$$\n趨近 $(0,0)$,代入函數後可得\n$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$\n\n這個結果會隨著 $m$ 的不同而改變。 \n例如:\n- 若 $m=0$,極限為 $0$\n- 若 $m=1$,極限為 $\\frac12$\n\n因為沿不同路徑得到的極限值不同,所以\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n**不存在**。\n\n---\n\n2. **說明在 $(0,0)$ 不連續:** \n函數在點 $(0,0)$ 連續,必須滿足\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$\n\n但由第 1 小題可知,\n$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$\n不存在,所以函數在 $(0,0)$ **不連續**。\n\n---\n\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** \n根據偏導數定義,\n$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$\n\n代入此題函數後,可以算得上式為\n$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$\n因此\n$$\nf_x(0,0)=0.\n$$\n\n同理,\n$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$\n\n所以\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n---\n\n4. **說明在 $(0,0)$ 不可微:** \n若函數在某點可微,則一定在該點連續。 \n也就是說:\n$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$\n\n但前面已經證明 $f(x,y)$ 在 $(0,0)$ **不連續**, \n因此它在 $(0,0)$ **不可能可微**。\n\n---\n\n**結論:**\n- $\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在\n- $f(x,y)$ 在 $(0,0)$ 不連續\n- $f_x(0,0)=0,\\;f_y(0,0)=0$\n- $f(x,y)$ 在 $(0,0)$ 不可微\n\n \n1. **說明極限不存在:** 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。\n\n 下面,我們來試試使用「路徑比較法」計算極限:考慮點 $(x,y)$ 沿著路徑 \n $$\n C: y= m(x-0)+0\n $$ \n 趨近 $(0,0)$,則\n $$\n \\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n $$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. $\\dfrac{1}{1+m^2}$。\n \n 所以 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$ \n \n a. $0$;\n b. $m$;\n c. $\\dfrac{m}{1+m^2}$;\n d. 不存在。\n \n2. **說明在 $(0,0)$ 不連續:** 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?\n \n a. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;\n b. $f(0,0)$ 有定義即可;\n c. $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;\n d. 偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。\n \n 因此,由第 1 小題,$f(x,y)$ 在點 $(0,0)$ 不連續。\n3. **計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:** 根據定義,\n $$\n f_x(0,0) = ?\n $$\n \n a. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;\n d. $\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。\n \n 代入此題函數的定義,上述極限變成?\n \n a. $\\lim\\limits_{\\Delta x\\to 0} 0= 0$;\n b. $\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;\n c. $\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;\n d. 無法由此計算出來。\n \n 同理,可以計算出 $f_y(0,0)=0$。\n4. **說明在 $(0,0)$ 不可微:** 什麼條件?$\\Longrightarrow$ 不可微:\n \n a. 因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微; \n b. 因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;\n c. 因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微; \n d. 因為 $f(0,0)$ 沒有定義,所以不可微。\n \n\n\n---\n## 3️⃣切平面\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$\n當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成\n$$\n f(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$\n當 $(x,y) \\to (a,b)$。\n\n上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮\n$$\n \\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$\n那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。\n\n注意到:\n- 圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;\n- 圖形上,\n $$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n $$ \n 是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。\n\n因此,上面近似的結果告訴我們的是:\n1. 兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。\n2. 在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。\n3. 越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。\n\n因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「**切平面(tangent plane)**」。\n\n我們將這樣的定義紀錄如下:\n\n\n定義\n切平面\n考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面\n$$\n T:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$ \n為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「**切平面(tangent plane)**」。\n\n\n---\n### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "考慮函數 $$\nf(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}\n$$", + "newline": "false", + "runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請計算 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$", + "kind": "math" + }, + { + "text": " 的極限。" + } + ], + "content": "請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續。" + } + ], + "content": "請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f_x(0,0) =0$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_y(0,0) =0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "請證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不可微。" + } + ], + "content": "請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是一個「偏導數存在,但函數不連續、因此不可微」的典型反例。", + "newline": "false", + "runs": [ + { + "text": "這是一個「" + }, + { + "text": "偏導數存在,但函數不連續、因此不可微", + "style": "bold" + }, + { + "text": "」的典型反例。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先回答:沿路徑 " + }, + { + "latex": "$y = mx$", + "kind": "math" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 時,極限值為?" + } + ], + "answers": [ + "m/(1+m^2)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "用 m 表示", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_09ea171e6c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "說明極限不存在:", + "style": "bold" + }, + { + "text": "由於此題在 " + }, + { + "latex": "$(x,y)\\to(0,0)$", + "kind": "math" + }, + { + "text": " 時,分母的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。" + } + ], + "content": "說明極限不存在:由於此題在 $(x,y)\\to(0,0)$ 時,分母的極限為 $0$,因此不能直接套用極限的四則運算,必須改用其他方法判斷,例如化簡法、路徑比較法或極座標法。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這裡用路徑比較法來看。\n若沿著直線$$\ny=mx\n$$趨近 $(0,0)$,代入函數後可得$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$", + "newline": "true", + "runs": [ + { + "text": "這裡用" + }, + { + "text": "路徑比較法", + "style": "bold" + }, + { + "text": "來看。" + }, + { + "newline": "true" + }, + { + "text": "若沿著直線" + }, + { + "latex": "$$\ny=mx\n$$", + "kind": "math_block" + }, + { + "text": "趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ",代入函數後可得" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)\\text{ 沿 }y=mx} f(x,y)\n=\\frac{m}{1+m^2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個結果會隨著 $m$ 的不同而改變。\n例如:", + "newline": "true", + "runs": [ + { + "text": "這個結果會隨著 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 的不同而改變。" + }, + { + "newline": "true" + }, + { + "text": "例如:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$m=0$", + "kind": "math" + }, + { + "text": ",極限為 " + }, + { + "latex": "$0$", + "kind": "math" + } + ], + "content": "若 $m=0$,極限為 $0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$m=1$", + "kind": "math" + }, + { + "text": ",極限為 " + }, + { + "latex": "$\\frac12$", + "kind": "math" + } + ], + "content": "若 $m=1$,極限為 $\\frac12$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為沿不同路徑得到的極限值不同,所以$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$不存在。", + "newline": "false", + "runs": [ + { + "text": "因為沿不同路徑得到的極限值不同,所以" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$", + "kind": "math_block" + }, + { + "text": "不存在", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不連續:", + "style": "bold" + }, + { + "text": "函數在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 連續,必須滿足" + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$", + "kind": "math_block" + } + ], + "content": "說明在 $(0,0)$ 不連續:函數在點 $(0,0)$ 連續,必須滿足$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)=f(0,0).\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "但由第 1 小題可知,$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$不存在,所以函數在 $(0,0)$ 不連續。", + "newline": "false", + "runs": [ + { + "text": "但由第 1 小題可知," + }, + { + "latex": "$$\n\\lim_{(x,y)\\to(0,0)} f(x,y)\n$$", + "kind": "math_block" + }, + { + "text": "不存在,所以函數在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不連續", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$f_y(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": "根據偏導數定義," + }, + { + "latex": "$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$", + "kind": "math_block" + } + ], + "content": "計算偏導數 $f_x(0,0)$ 與 $f_y(0,0)$:根據偏導數定義,$$\nf_x(0,0)=\\lim_{\\Delta x\\to 0}\\frac{f(\\Delta x,0)-f(0,0)}{\\Delta x}.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入此題函數後,可以算得上式為$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$因此$$\nf_x(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "代入此題函數後,可以算得上式為" + }, + { + "latex": "$$\n\\lim_{\\Delta x\\to 0} 0=0,\n$$", + "kind": "math_block" + }, + { + "text": "因此" + }, + { + "latex": "$$\nf_x(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同理,$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "同理," + }, + { + "latex": "$$\nf_y(0,0)=\\lim_{\\Delta y\\to 0}\\frac{f(0,\\Delta y)-f(0,0)}{\\Delta y}=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不可微:", + "style": "bold" + }, + { + "text": "若函數在某點可微,則一定在該點連續。" + }, + { + "text": "也就是說:" + }, + { + "latex": "$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$", + "kind": "math_block" + } + ], + "content": "說明在 $(0,0)$ 不可微:若函數在某點可微,則一定在該點連續。也就是說:$$\n\\text{可微} \\Longrightarrow \\text{連續}.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "但前面已經證明 $f(x,y)$ 在 $(0,0)$ 不連續,\n因此它在 $(0,0)$ 不可能可微。", + "newline": "true", + "runs": [ + { + "text": "但前面已經證明 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不連續", + "style": "bold" + }, + { + "text": "," + }, + { + "newline": "true" + }, + { + "text": "因此它在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "不可能可微", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "結論:", + "newline": "false", + "runs": [ + { + "text": "結論:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在" + } + ], + "content": "$\\lim\\limits_{(x,y)\\to(0,0)} f(x,y)$ 不存在" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續" + } + ], + "content": "$f(x,y)$ 在 $(0,0)$ 不連續" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f_x(0,0)=0,\\;f_y(0,0)=0$", + "kind": "math" + } + ], + "content": "$f_x(0,0)=0,\\;f_y(0,0)=0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不可微" + } + ], + "content": "$f(x,y)$ 在 $(0,0)$ 不可微" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n考慮函數 \n$$f(x,y) = \\begin{cases} \\dfrac{xy}{x^2+y^2} &\\text{if } (x,y)\\neq (0,0),\\\\ 0 &\\text{if } (x,y)= (0,0)。 \\end{cases}$$ \n1. 請計算 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 的極限。\n2. 請證明 $f(x,y)$ 在點 $(0,0)$ 不連續。\n3. 請證明 $f_x(0,0) =0$ 與 $f_y(0,0) =0$。\n4. 請證明 $f(x,y)$ 在點 $(0,0)$ 不可微。\n\n這是一個「**偏導數存在,但函數不連續、因此不可微**」的典型反例。\n\n請先回答:沿路徑 $y = mx$ 趨近 $(0,0)$ 時,極限值為?\n\n" + }, + { + "type": "solution", + "uid": "sol_4bcca2cf60", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "說明極限不存在:", + "style": "bold" + }, + { + "text": " 由於此題分母在 " + }, + { + "latex": "$(x,y)\\to (0,0)$", + "kind": "math" + }, + { + "text": " 時的極限為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。" + } + ], + "content": "說明極限不存在: 由於此題分母在 $(x,y)\\to (0,0)$ 時的極限為 $0$,因此極限的四則運算不能套用,必須使用其他技巧來計算極限,比如「化簡法」、「路徑比較法」、「極座標法」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 下面,我們來試試使用「路徑比較法」計算極限:考慮點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 沿著路徑 " + }, + { + "latex": "$$\nC: y= m(x-0)+0\n$$", + "kind": "math_block" + }, + { + "text": " 趨近 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ",則" + }, + { + "latex": "$$\n\\lim\\limits_{(x,y)\\to (0,0) \\;沿著\\; C} f(x,y) = \\lim\\limits_{x\\to 0} ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$m$;" + }, + { + "key": "c", + "text": "$\\dfrac{m}{1+m^2}$;" + }, + { + "key": "d", + "text": "$\\dfrac{1}{1+m^2}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 所以 " + }, + { + "latex": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=?$", + "kind": "math" + }, + { + "newline": "true" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$0$;" + }, + { + "key": "b", + "text": "$m$;" + }, + { + "key": "c", + "text": "$\\dfrac{m}{1+m^2}$;" + }, + { + "key": "d", + "text": "不存在。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不連續:", + "style": "bold" + }, + { + "text": " 連續的定義:函數在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 連續,必須滿足?" + } + ], + "content": "說明在 $(0,0)$ 不連續: 連續的定義:函數在點 $(0,0)$ 連續,必須滿足?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)$ 存在即可;" + }, + { + "key": "b", + "text": "$f(0,0)$ 有定義即可;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{(x,y)\\to (0,0)} f(x,y) = f(0,0)$;" + }, + { + "key": "d", + "text": "偏導數 $f_x(0,0)$ 與 $f_y(0,0)$ 存在即可。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 因此,由第 1 小題," + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 不連續。3. " + }, + { + "text": "計算偏導數 ", + "style": "bold" + }, + { + "latex": "$f_x(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$f_y(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": ":", + "style": "bold" + }, + { + "text": " 根據定義," + }, + { + "latex": "$$\nf_x(0,0) = ?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,\\Delta x)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(\\Delta x,0)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{f(0,\\Delta x)-f(0,0)}{\\Delta x}$;" + }, + { + "key": "d", + "text": "$\\lim\\limits_{\\Delta x\\to 0} f(\\Delta x,0)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "b", + "answer": "b" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 代入此題函數的定義,上述極限變成? " + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{\\Delta x\\to 0} 0= 0$;" + }, + { + "key": "b", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\dfrac{1}{\\Delta x}$;" + }, + { + "key": "c", + "text": "$\\lim\\limits_{\\Delta x\\to 0} \\Delta x= 0= 0$;" + }, + { + "key": "d", + "text": "無法由此計算出來。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "a", + "answer": "a" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": " 同理,可以計算出 " + }, + { + "latex": "$f_y(0,0)=0$", + "kind": "math" + }, + { + "text": "。4. " + }, + { + "text": "說明在 ", + "style": "bold" + }, + { + "latex": "$(0,0)$", + "kind": "math", + "style": "bold" + }, + { + "text": " 不可微:", + "style": "bold" + }, + { + "text": " 什麼條件?" + }, + { + "latex": "$\\Longrightarrow$", + "kind": "math" + }, + { + "text": " 不可微: " + } + ], + "options": [ + { + "key": "a", + "text": "因為 $f(x,y)$ 在 $(0,0)$ 不連續,所以不可能在 $(0,0)$ 可微;" + }, + { + "key": "b", + "text": "因為 $f_x(0,0)$ 與 $f_y(0,0)$ 都不存在,所以不可微;" + }, + { + "key": "c", + "text": "因為 $\\lim\\limits_{(x,y)\\to (0,0)} f(x,y)=0$,所以不可微;" + }, + { + "key": "d", + "text": "因為 $f(0,0)$ 沒有定義,所以不可微。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣切平面", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣切平面", + "newline": "true", + "runs": [ + { + "text": "3️⃣切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$當 $(\\Delta x, \\Delta y) \\to (0,0)$,或等價地寫成$$\nf(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$當 $(x,y) \\to (a,b)$。", + "newline": "false", + "runs": [ + { + "text": "在前面部分,我們已經知道:當雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 可微時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y,\n$$", + "kind": "math_block" + }, + { + "text": "當 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",或等價地寫成" + }, + { + "latex": "$$\nf(x , y) \\approx f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)。\n$$", + "kind": "math_block" + }, + { + "text": "當 " + }, + { + "latex": "$(x,y) \\to (a,b)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮$$\n\\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$那麼,當 $(x,y)$ 非常接近 $(a,b)$ 時,這兩個式子所得到的 $z$ 值會非常接近;而且 $(x,y)$ 越靠近 $(a,b)$,兩者的差距也會越來越小。", + "newline": "false", + "runs": [ + { + "text": "上面公式除了給了一個估計外,在幾何上,也具有重要的意含:考慮" + }, + { + "latex": "$$\n\\begin{cases}\n z &= f(x,y)\\\\\n z &= f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n \\end{cases}\n$$", + "kind": "math_block" + }, + { + "text": "那麼,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 非常接近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時,這兩個式子所得到的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 值會非常接近;而且 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 越靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ",兩者的差距也會越來越小。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "注意到:", + "newline": "false", + "runs": [ + { + "text": "注意到:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "圖形上," + }, + { + "latex": "$S:\\; z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是原來的函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的曲面;" + } + ], + "content": "圖形上,$S:\\; z = f(x,y)$ 是原來的函數 $f(x,y)$ 的曲面;" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "圖形上," + }, + { + "latex": "$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$", + "kind": "math_block" + }, + { + "text": "是一個通過點 " + }, + { + "latex": "$\\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": " 的平面。" + } + ], + "content": "圖形上,$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$是一個通過點 $\\left( a,b,f(a,b) \\right)$ 的平面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,上面近似的結果告訴我們的是:", + "newline": "false", + "runs": [ + { + "text": "因此,上面近似的結果告訴我們的是:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "兩個圖形 " + }, + { + "latex": "$S,T$", + "kind": "math" + }, + { + "text": " 都通過同一個點 " + }, + { + "latex": "$P: \\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "兩個圖形 $S,T$ 都通過同一個點 $P: \\left( a,b,f(a,b) \\right)$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "在這個 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 點的附近,函數曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 與這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 非常接近。" + } + ], + "content": "在這個 $P$ 點的附近,函數曲面 $S$ 與這個平面 $T$ 非常接近。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "越接近 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 點,函數曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 與這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 越接近。" + } + ], + "content": "越接近 $P$ 點,函數曲面 $S$ 與這個平面 $T$ 越接近。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,我們將這個平面 $T$ 稱為函數圖形 $S$ 在點 $P$ 的「切平面(tangent plane)」。", + "newline": "false", + "runs": [ + { + "text": "因此,我們將這個平面 " + }, + { + "latex": "$T$", + "kind": "math" + }, + { + "text": " 稱為函數圖形 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的「" + }, + { + "text": "切平面(tangent plane)", + "style": "bold" + }, + { + "text": "」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們將這樣的定義紀錄如下:", + "newline": "false", + "runs": [ + { + "text": "我們將這樣的定義紀錄如下:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "切平面", + "body": [ + { + "type": "paragraph", + "content": "考慮雙變數函數 $f(x,y)$。如果函數 $f(x,y)$ 在點 $(a,b)$ 是可微的,則我們稱平面$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$為函數曲面 $S: z = f(x,y)$ 在點 $P: \\left( a,b,f(a,b) \\right)$ 的「切平面(tangent plane)」。", + "newline": "false", + "runs": [ + { + "text": "考慮雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": "。如果函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是可微的,則我們稱平面" + }, + { + "latex": "$$\nT:\\; z = f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)\n$$", + "kind": "math_block" + }, + { + "text": "為函數曲面 " + }, + { + "latex": "$S: z = f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P: \\left( a,b,f(a,b) \\right)$", + "kind": "math" + }, + { + "text": " 的「" + }, + { + "text": "切平面(tangent plane)", + "style": "bold" + }, + { + "text": "」。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n \n\n先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:\n$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$\n\n接著計算偏導數:\n$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$\n\n因為切點是 $(1,1,3)$,所以要把偏導數代入\n$$\n(a,b)=(1,1).\n$$\n\n可得\n$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$\n\n又因為\n$$\nf(1,1)=3,\n$$\n所以切平面方程式為\n$$\nz=3+2(x-1)+4(y-1).\n$$\n\n如果再整理一下,也可以寫成\n$$\nz=2x+4y-3.\n$$\n\n \n1. 先寫下切平面方程式的一般公式:\n \n a. $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$; \n b. $z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$; \n c. $z = f(a,b) + f_x(a,b)x + f_y(a,b)y$; \n d. $dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。\n \n2. 計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):\n $$\n f_x(x,y)=?\n $$\n \n \n $$\n f_y(x,y)=?\n $$\n \n \n3. 計算偏微分在哪個點的值?\n \n a. $(a,b) = (1,3)$; \n b. $(a,b) = (1,1)$; \n c. $(a,b) = (3,1)$; \n d. $(a,b) = (0,0)$。\n \n4. 因此,切平面方程式為:\n \n \n\n\n---\n## 4️⃣全微分\n\n考慮變數 \n$$\n z= f(x,y)。\n$$\n\n在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,\n$$\n f(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n因此,\n$$\n f(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$\n\n也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為\n$$\n \\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$\n\n如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 **微分(differential)**,而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼\n$$\n dz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$\n\n**重點**:真實變化 $\\Delta z$ vs 線性估計 $dz$:\n1. $\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。\n2. $dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。\n3. 若可微 $\\Rightarrow \\Delta z − dz \\to 0$。\n\n\n定義\n全微分\n令 $z = f(x,y)$。其 **全微分(total differential)** 定義為\n$$\n \\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$ \n\n\n---\n### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-3" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "考慮函數 " + }, + { + "latex": "$$\nf(x,y) = x^2 + 2y^2\n$$", + "kind": "math_block" + }, + { + "text": "請計算此函數曲面 " + }, + { + "latex": "$z= f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": " 的切平面方程式。切平面方程式為? " + } + ], + "answers": [ + "z=3+2(x-1)+4(y-1)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?" + }, + { + "type": "solution", + "uid": "sol_a6d4342dfb", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先寫下曲面 $z=f(x,y)$ 在點 $(a,b,f(a,b))$ 的切平面公式:$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$", + "newline": "false", + "runs": [ + { + "text": "先寫下曲面 " + }, + { + "latex": "$z=f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,f(a,b))$", + "kind": "math" + }, + { + "text": " 的切平面公式:" + }, + { + "latex": "$$\nz=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算偏導數:$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算偏導數:" + }, + { + "latex": "$$\nf_x(x,y)=2x,\\qquad f_y(x,y)=4y.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為切點是 $(1,1,3)$,所以要把偏導數代入$$\n(a,b)=(1,1).\n$$", + "newline": "false", + "runs": [ + { + "text": "因為切點是 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": ",所以要把偏導數代入" + }, + { + "latex": "$$\n(a,b)=(1,1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "可得$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$", + "newline": "false", + "runs": [ + { + "text": "可得" + }, + { + "latex": "$$\nf_x(1,1)=2,\\qquad f_y(1,1)=4.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "又因為$$\nf(1,1)=3,\n$$所以切平面方程式為$$\nz=3+2(x-1)+4(y-1).\n$$", + "newline": "false", + "runs": [ + { + "text": "又因為" + }, + { + "latex": "$$\nf(1,1)=3,\n$$", + "kind": "math_block" + }, + { + "text": "所以切平面方程式為" + }, + { + "latex": "$$\nz=3+2(x-1)+4(y-1).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果再整理一下,也可以寫成$$\nz=2x+4y-3.\n$$", + "newline": "false", + "runs": [ + { + "text": "如果再整理一下,也可以寫成" + }, + { + "latex": "$$\nz=2x+4y-3.\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n考慮函數 \n$$\n f(x,y) = x^2 + 2y^2\n$$ \n請計算此函數曲面 $z= f(x,y)$ 在點 $(1,1,3)$ 的切平面方程式。\n切平面方程式為?\n \n " + }, + { + "type": "solution", + "uid": "sol_a85cea3a8b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "先寫下切平面方程式的一般公式:" + } + ], + "content": "先寫下切平面方程式的一般公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$;" + }, + { + "key": "b", + "text": "$z = f_x(x,y)(x-a) + f_y(x,y)(y-b)$;" + }, + { + "key": "c", + "text": "$z = f(a,b) + f_x(a,b)x + f_y(a,b)y$;" + }, + { + "key": "d", + "text": "$dz = f_x(a,b)\\,dx + f_y(a,b)\\,dy$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "計算偏微分函數((" + }, + { + "latex": "$f(x,y) = x^2 + 2y^2$", + "kind": "math" + }, + { + "text": " )):" + }, + { + "latex": "$$\nf_x(x,y)=?\n$$", + "kind": "math_block" + } + ], + "content": "計算偏微分函數(($f(x,y) = x^2 + 2y^2$ )):$$\nf_x(x,y)=?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$$\nf_y(x,y)=?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "answers": [ + "4y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "計算偏微分在哪個點的值?" + } + ], + "content": "計算偏微分在哪個點的值?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(a,b) = (1,3)$;" + }, + { + "key": "b", + "text": "$(a,b) = (1,1)$;" + }, + { + "key": "c", + "text": "$(a,b) = (3,1)$;" + }, + { + "key": "d", + "text": "$(a,b) = (0,0)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "因此,切平面方程式為:" + } + ], + "content": "因此,切平面方程式為:" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "z=3+2(x-1)+4(y-1)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-4", + "title": "4️⃣全微分", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "4️⃣全微分", + "newline": "true", + "runs": [ + { + "text": "4️⃣全微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "考慮變數 $$\nz= f(x,y)。\n$$", + "newline": "false", + "runs": [ + { + "text": "考慮變數 " + }, + { + "latex": "$$\nz= f(x,y)。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在前面部分,我們已經知道:當雙變數函數 $f(x,y)$ 在點 $(a,b)$ 可微時,$$\nf(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$因此,$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "newline": "false", + "runs": [ + { + "text": "在前面部分,我們已經知道:當雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 可微時," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) \\approx \n f(a,b) + f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + }, + { + "text": "因此," + }, + { + "latex": "$$\nf(a+\\Delta x , b+\\Delta y) - f(a,b)= \n f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也就是說,當變數 $x$ 與 $y$ 分別改變 $\\Delta x$ 與 $\\Delta y$ 時,對應的 $z$ 值會產生的增量為$$\n\\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "也就是說,當變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 分別改變 " + }, + { + "latex": "$\\Delta x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\Delta y$", + "kind": "math" + }, + { + "text": " 時,對應的 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 值會產生的增量為" + }, + { + "latex": "$$\n\\begin{aligned}\n \\Delta z \n &:= f(a+\\Delta x,b+\\Delta y)-f(a,b) \\\\\n &\\approx f_x(a,b) \\Delta x + f_y(a,b) \\Delta y。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果我們用符號 $dx$ 與 $dy$ 代表「非常非常小的增量」,並稱之為 微分(differential),而用 $dz$ 代表變數 $z$ 的「線性估計的增量」(即不含誤差項的部分),那麼$$\ndz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$", + "newline": "false", + "runs": [ + { + "text": "如果我們用符號 " + }, + { + "latex": "$dx$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$dy$", + "kind": "math" + }, + { + "text": " 代表「非常非常小的增量」,並稱之為 " + }, + { + "text": "微分(differential)", + "style": "bold" + }, + { + "text": ",而用 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 代表變數 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 的「線性估計的增量」(即不含誤差項的部分),那麼" + }, + { + "latex": "$$\ndz := f_x(a,b) dx + f_y(a,b) dy \\approx \\Delta z。\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "重點:真實變化 $\\Delta z$ vs 線性估計 $dz$:", + "newline": "false", + "runs": [ + { + "text": "重點", + "style": "bold" + }, + { + "text": ":真實變化 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " vs 線性估計 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$", + "kind": "math" + }, + { + "text": ":真實的變化。" + } + ], + "content": "$\\Delta z = f(a+\\Delta x,b+\\Delta y) − f(a,b)$:真實的變化。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$dz = f_x(a,b)dx + f_y(a,b)dy$", + "kind": "math" + }, + { + "text": ": 線性估計真實的變化。" + } + ], + "content": "$dz = f_x(a,b)dx + f_y(a,b)dy$: 線性估計真實的變化。" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "若可微 " + }, + { + "latex": "$\\Rightarrow \\Delta z − dz \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "若可微 $\\Rightarrow \\Delta z − dz \\to 0$。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "全微分", + "body": [ + { + "type": "paragraph", + "content": "令 $z = f(x,y)$。其 全微分(total differential) 定義為$$\n\\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。其 " + }, + { + "text": "全微分(total differential)", + "style": "bold" + }, + { + "text": " 定義為" + }, + { + "latex": "$$\n\\begin{aligned}\n dz &= f_x(x,y) dx + f_y(x,y) dy \\\\\n &= \\frac{\\partial z}{\\partial x} dx + \\frac{\\partial z}{\\partial y} dy。\n \\end{aligned}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。\n\n\n先寫出函數的全微分公式:\n$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$\n\n接著計算偏導數:\n$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$\n\n題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$, \n所以\n$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$\n\n先把偏導數代入 $(2,1)$:\n$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$\n$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$\n\n因此,全微分為\n$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$\n\n所以利用全微分估計,可得\n$$\ndz=0.\n$$\n\n此外,實際增量為\n$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$\n\n\n \n1. 寫出函數 全微分 $dz$ 的一般公式:\n \n a. $dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$; \n b. $dz = f(x,y)\\,dx + f(x,y)\\,dy$; \n c. $dz = dx + dy$; \n d. $dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。\n \n2. 計算偏微分函數:\n $$\n \\frac{\\partial z}{\\partial x}=?\n $$\n \n a. $y(2x-3)$;\n b. $2x-3$;\n c. $\\dfrac{2x-3}{x^2 - 3x + 3}$;\n d. $\\dfrac{1}{y}$。\n \n $$\n \\frac{\\partial z}{\\partial y}=?\n $$\n \n a. $y$;\n b. $\\dfrac{1}{y}$;\n c. $x^2 - 3x + 3$;\n d. $\\dfrac{x}{y}$。\n \n3. 題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?\n \n a. $(2,1,0.01,0.01)$; \n b. $(2,1,0.1,-0.1)$; \n c. $(2,1,0.01,-0.01)$; \n d. $(2.01,0.99,0.01,-0.01)$。\n \n\n4. 將 $(x,y)=(2,1)$ 代入偏導數,可得\n $$\n f_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n $$\n $$\n f_y(2,1)=2^2-3(2)+3=1\n $$\n 又因為\n $$\n dx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n $$\n 所以\n $$\n dz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n $$\n $$\n dz=1(0.01)+1(-0.01)=0.01-0.01=0\n $$\n 因此,全微分給出的變化量近似為\n $$\n dz=0.\n $$\n\n5. 再來比較實際的變化量:\n $$\n \\Delta z=f(2.01,0.99)-f(2,1)\n $$\n 經過計算可得\n $$\n \\Delta z\\approx -0.000001\n $$\n 這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的\n $$\n dz=0\n $$\n 也確實是一個很好的近似值。\n\n 也就是說,當 $(x,y)$ 的改變很小時,\n $$\n \\Delta z \\approx dz\n $$\n 這就是全微分可以用來近似函數變化量的原因。\n\n\n---\n## 5️⃣三或更多變數函數\n\n上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,\n\n1. 如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式\n$$\n f(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$\n2. 如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成\n$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$\n\n其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。\n3. 如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。\n4. 若 $w= f(x,y,z)$,我們定義全微分(total differential)為\n$$\n dw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "假設$$\nz = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "newline": "false", + "runs": [ + { + "text": "假設" + }, + { + "latex": "$$\nz = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "請計算全微分 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "請計算全微分 $dz$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "請計算如果 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 與變化量 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 的值。" + } + ], + "content": "請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_1a23061f9c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先寫出函數的全微分公式:$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$", + "newline": "false", + "runs": [ + { + "text": "先寫出函數的全微分公式:" + }, + { + "latex": "$$\ndz=f_x(x,y)\\,dx+f_y(x,y)\\,dy.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著計算偏導數:$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著計算偏導數:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x}=\\frac{2x-3}{x^2-3x+3},\n\\qquad\n\\frac{\\partial z}{\\partial y}=x^2-3x+3.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "題目中,$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,\n所以$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$", + "newline": "true", + "runs": [ + { + "text": "題目中," + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "," + }, + { + "newline": "true" + }, + { + "text": "所以" + }, + { + "latex": "$$\nx=2,\\qquad y=1,\\qquad dx=0.01,\\qquad dy=-0.01.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "先把偏導數代入 $(2,1)$:$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$", + "newline": "false", + "runs": [ + { + "text": "先把偏導數代入 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1,\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(2,1)=2^2-3(2)+3=1.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,全微分為$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,全微分為" + }, + { + "latex": "$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n=1(0.01)+1(-0.01)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以利用全微分估計,可得$$\ndz=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以利用全微分估計,可得" + }, + { + "latex": "$$\ndz=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此外,實際增量為$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$", + "newline": "false", + "runs": [ + { + "text": "此外,實際增量為" + }, + { + "latex": "$$\n\\Delta z=f(2.01,0.99)-f(2,1)\\approx -0.000001.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + } + ], + "ai_prompt_md": "### Example 4\n假設\n$$\n z = f(x,y) = \\ln ( x^2y - 3xy + 3y )\n$$ \n1. 請計算全微分 $dz$。\n2. 請計算如果 $x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$,$dz$ 與變化量 $\\Delta z$ 的值。" + }, + { + "type": "solution", + "uid": "sol_8ee5157c9b", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "寫出函數 全微分 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 的一般公式:" + } + ], + "content": "寫出函數 全微分 $dz$ 的一般公式:" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$dz = f_x(x,y)\\,dx + f_y(x,y)\\,dy$;" + }, + { + "key": "b", + "text": "$dz = f(x,y)\\,dx + f(x,y)\\,dy$;" + }, + { + "key": "c", + "text": "$dz = dx + dy$;" + }, + { + "key": "d", + "text": "$dz = f_x(a,b)\\,x + f_y(a,b)\\,y$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "計算偏微分函數:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x}=?\n$$", + "kind": "math_block" + } + ], + "content": "計算偏微分函數:$$\n\\frac{\\partial z}{\\partial x}=?\n$$" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$y(2x-3)$;" + }, + { + "key": "b", + "text": "$2x-3$;" + }, + { + "key": "c", + "text": "$\\dfrac{2x-3}{x^2 - 3x + 3}$;" + }, + { + "key": "d", + "text": "$\\dfrac{1}{y}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial y}=?\n$$", + "kind": "math_block" + }, + { + "text": " " + } + ], + "options": [ + { + "key": "a", + "text": "$y$;" + }, + { + "key": "b", + "text": "$\\dfrac{1}{y}$;" + }, + { + "key": "c", + "text": "$x^2 - 3x + 3$;" + }, + { + "key": "d", + "text": "$\\dfrac{x}{y}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "題目:" + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$2$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$2.01$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 由 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 變成 " + }, + { + "latex": "$0.99$", + "kind": "math" + }, + { + "text": "。代表計算 " + }, + { + "latex": "$dz$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$(x,y,dx, dy)$", + "kind": "math" + }, + { + "text": " 要設為?" + } + ], + "content": "題目:$x$ 由 $2$ 變成 $2.01$,$y$ 由 $1$ 變成 $0.99$。代表計算 $dz$ 時,$(x,y,dx, dy)$ 要設為?" + } + ] + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "$(2,1,0.01,0.01)$;" + }, + { + "key": "b", + "text": "$(2,1,0.1,-0.1)$;" + }, + { + "key": "c", + "text": "$(2,1,0.01,-0.01)$;" + }, + { + "key": "d", + "text": "$(2.01,0.99,0.01,-0.01)$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$(x,y)=(2,1)$", + "kind": "math" + }, + { + "text": " 代入偏導數,可得" + }, + { + "latex": "$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(2,1)=2^2-3(2)+3=1\n$$", + "kind": "math_block" + }, + { + "text": "又因為" + }, + { + "latex": "$$\ndx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n$$", + "kind": "math_block" + }, + { + "text": "所以" + }, + { + "latex": "$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n$$", + "kind": "math_block" + }, + { + "latex": "$$\ndz=1(0.01)+1(-0.01)=0.01-0.01=0\n$$", + "kind": "math_block" + }, + { + "text": "因此,全微分給出的變化量近似為" + }, + { + "latex": "$$\ndz=0.\n$$", + "kind": "math_block" + } + ], + "content": "將 $(x,y)=(2,1)$ 代入偏導數,可得$$\nf_x(2,1)=\\frac{2(2)-3}{2^2-3(2)+3}=\\frac{1}{1}=1\n$$$$\nf_y(2,1)=2^2-3(2)+3=1\n$$又因為$$\ndx=2.01-2=0.01,\\qquad dy=0.99-1=-0.01\n$$所以$$\ndz=f_x(2,1)\\,dx+f_y(2,1)\\,dy\n$$$$\ndz=1(0.01)+1(-0.01)=0.01-0.01=0\n$$因此,全微分給出的變化量近似為$$\ndz=0.\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "5.", + "runs": [ + { + "text": "再來比較實際的變化量:" + }, + { + "latex": "$$\n\\Delta z=f(2.01,0.99)-f(2,1)\n$$", + "kind": "math_block" + }, + { + "text": "經過計算可得" + }, + { + "latex": "$$\n\\Delta z\\approx -0.000001\n$$", + "kind": "math_block" + }, + { + "text": "這表示函數的實際變化量非常接近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",而我們用全微分算出的" + }, + { + "latex": "$$\ndz=0\n$$", + "kind": "math_block" + }, + { + "text": "也確實是一個很好的近似值。" + } + ], + "content": "再來比較實際的變化量:$$\n\\Delta z=f(2.01,0.99)-f(2,1)\n$$經過計算可得$$\n\\Delta z\\approx -0.000001\n$$這表示函數的實際變化量非常接近 $0$,而我們用全微分算出的$$\ndz=0\n$$也確實是一個很好的近似值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": " 也就是說,當 $(x,y)$ 的改變很小時,$$\n\\Delta z \\approx dz\n$$ 這就是全微分可以用來近似函數變化量的原因。", + "newline": "false", + "runs": [ + { + "text": " 也就是說,當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 的改變很小時," + }, + { + "latex": "$$\n\\Delta z \\approx dz\n$$", + "kind": "math_block" + }, + { + "text": " 這就是全微分可以用來近似函數變化量的原因。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-5", + "title": "5️⃣三或更多變數函數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "5️⃣三或更多變數函數", + "newline": "true", + "runs": [ + { + "text": "5️⃣三或更多變數函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 $f(x,y,z)$,", + "newline": "false", + "runs": [ + { + "text": "上面部份,我們雖然考慮的函數都是雙變數函數,但是對於三或多變數函數,我們也都是做同樣的定義,而得到的結果也都是類似相同的。比如對於三變數函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": "," + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "如果偏導數 " + }, + { + "latex": "$f_x,f_y,f_z$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 附近都是連續的,則我們會有線性估計(Linear Approximation)公式" + }, + { + "latex": "$$\nf(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$", + "kind": "math_block" + } + ], + "content": "如果偏導數 $f_x,f_y,f_z$ 在點 $(a,b,c)$ 附近都是連續的,則我們會有線性估計(Linear Approximation)公式$$\nf(x,y,z) \\approx f(a,b,c) + f_x(a,b,c) (x-a) + f_y(a,b,c) (y-b)+ f_z(a,b,c) (z-c)。\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "如果在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 附近,函數的改變量可以寫成" + }, + { + "latex": "$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$", + "kind": "math_block" + } + ], + "content": "如果在點 $(a,b,c)$ 附近,函數的改變量可以寫成$$\n\\begin{aligned}\n f(a+\\Delta x , b+\\Delta y, c+& \\Delta z) =\\\\\n f(a,b,c) + & f_x(a,b,c) \\Delta x + f_y(a,b,c) \\Delta y + f_z(a,b,c) \\Delta z\n + \\varepsilon_1 \\Delta x + \\varepsilon_2 \\Delta y + \\varepsilon_3 \\Delta z。\n\\end{aligned}\n$$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中 $\\varepsilon_1$, $\\varepsilon_2$ 與 $\\varepsilon_3$ 皆會在 $(\\Delta x, \\Delta y, \\Delta z)$ 趨近於 $(0,0,0)$ 時,趨近於 $0$,我們稱函數 $f(x,y,z)$ 在點 $(a,b,c)$ 是可微的(differentiable)。", + "newline": "false", + "runs": [ + { + "text": "其中 " + }, + { + "latex": "$\\varepsilon_1$", + "kind": "math" + }, + { + "text": ", " + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\varepsilon_3$", + "kind": "math" + }, + { + "text": " 皆會在 " + }, + { + "latex": "$(\\Delta x, \\Delta y, \\Delta z)$", + "kind": "math" + }, + { + "text": " 趨近於 " + }, + { + "latex": "$(0,0,0)$", + "kind": "math" + }, + { + "text": " 時,趨近於 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",我們稱函數 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是可微的(differentiable)。" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是可微的,那一定也在 " + }, + { + "latex": "$(a,b,c)$", + "kind": "math" + }, + { + "text": " 是連續的。" + } + ], + "content": "如果 $f(x,y,z)$ 在 $(a,b,c)$ 是可微的,那一定也在 $(a,b,c)$ 是連續的。" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$w= f(x,y,z)$", + "kind": "math" + }, + { + "text": ",我們定義全微分(total differential)為" + }, + { + "latex": "$$\ndw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$", + "kind": "math_block" + } + ], + "content": "若 $w= f(x,y,z)$,我們定義全微分(total differential)為$$\ndw = f_x(x,y,z) dx + f_y(x,y,z) dy+ f_z(x,y,z) dz。\n$$" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/C14_5/Dash_Ch14_5.py b/pages/Ch14/C14_5/Dash_Ch14_5.py new file mode 100644 index 0000000000000000000000000000000000000000..6d6606dc41cbfffccaceb71dc708749908f98f39 --- /dev/null +++ b/pages/Ch14/C14_5/Dash_Ch14_5.py @@ -0,0 +1,11 @@ +import dash +from layout.page_builder import make_test_page +from pathlib import Path + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_5.json" + +dash.register_page(__name__, path="/Ch14_5", title="Ch14_5") + +def layout(): + return make_test_page(str(JSON_PATH), top_offset=90) diff --git a/pages/Ch14/C14_5/Md_14_5.md b/pages/Ch14/C14_5/Md_14_5.md new file mode 100644 index 0000000000000000000000000000000000000000..b62ced283b5b0c6dd77af900bfb2996e28bba86b --- /dev/null +++ b/pages/Ch14/C14_5/Md_14_5.md @@ -0,0 +1,926 @@ +# 連鎖律 + + +回想 +單變數的連鎖律 +如果 $y = f(x)$,且 $x = g(t)$,其中 $f$ 與 $g$ 都可微,那麼 $y$ 是 $t$ 的可微函數,而且: +$$ \frac{dy}{dt} = \frac{dy}{dx}\cdot\frac{dx}{dt} $$ + + +**為什麼需要多變數連鎖律?** + +想像你在一座山上健行,山上每個位置 $(x, y)$ 的氣溫為 $T(x, y)$。 +你沿著一條步道行走,你的位置隨時間 $t$ 改變:$x = x(t),\ y = y(t)$。 +你想知道的是:**你感受到的溫度變化速率** $\dfrac{dT}{dt}$ 是多少? + +這就是多變數連鎖律要解決的問題:**中間變數受到一個或多個自變數控制,如何計算最終變化率。** + +--- + +## 1️⃣ 連鎖律:形式 1 + +第一種形式處理的情況是:$z = f(x, y)$,而 $x$ 與 $y$ 都是某單一變數 $t$ 的函數。 +也就是說,$x = g(t),\ y = h(t)$,因此 $z = f(g(t), h(t))$。 + + +定理 +連鎖律(形式 1) +假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(t)$ 與 $y = h(t)$ 都是 $t$ 的可微函數。 +則 $z$ 是 $t$ 的可微函數,而且: +$$ \frac{dz}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt} + \frac{\partial z}{\partial y}\frac{dy}{dt} $$ + + + +註解 +直覺理解 +把 $\dfrac{dz}{dt}$ 拆成兩條「路徑」: +- $t \to x \to z$:貢獻 $\dfrac{\partial z}{\partial x}\cdot\dfrac{dx}{dt}$ +- $t \to y \to z$:貢獻 $\dfrac{\partial z}{\partial y}\cdot\dfrac{dy}{dt}$ + +![|w=200](/assets/chain_tree_card1.svg) +兩條路徑加起來,就是 $z$ 對 $t$ 的總變化率。這正是**樹狀圖**的核心概念。 + + + +**Step 1:設定變化量** + +當自變數 $t$ 改變 $\Delta t$ 時,中間變數與應變數會連鎖反應: + +$$t \xrightarrow{+\Delta t} \begin{cases} x \xrightarrow{+\Delta x} \\ y \xrightarrow{+\Delta y} \end{cases} \xrightarrow{} z \xrightarrow{+\Delta z}$$ + +具體來說: +$$\Delta x = g(t+\Delta t) - g(t), \qquad \Delta y = h(t+\Delta t) - h(t)$$ +$$\Delta z = f(x+\Delta x,\; y+\Delta y) - f(x,y)$$ + +我們的目標是求 $\dfrac{dz}{dt} = \lim_{\Delta t \to 0}\dfrac{\Delta z}{\Delta t}$。 + +--- + +**Step 2:展開 $\Delta z$(可微的定義)** + +因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\Delta z$ 可以精確地寫成: + +$$\Delta z = \underbrace{\frac{\partial f}{\partial x}\Delta x + \frac{\partial f}{\partial y}\Delta y}_{\text{線性主部}} + \underbrace{\varepsilon_1\Delta x + \varepsilon_2\Delta y}_{\text{高階誤差項}}$$ + +其中誤差項 $\varepsilon_1, \varepsilon_2$ 滿足: +$$\varepsilon_1 \to 0,\quad \varepsilon_2 \to 0 \quad \text{當} \quad (\Delta x, \Delta y) \to (0,0)$$ + +**關鍵想法**:$f$ 的可微性讓我們能把 $\Delta z$ 分成「線性主部」和「趨向零的誤差」兩部分。$\varepsilon_1, \varepsilon_2$ 描述線性近似的殘差——當步長趨近 $0$ 時,殘差也趨近 $0$。 + +--- + +**Step 3:兩邊除以 $\Delta t$** + +把展開式兩邊同除以 $\Delta t \neq 0$: + +$$\frac{\Delta z}{\Delta t} = \frac{\partial f}{\partial x}\cdot\frac{\Delta x}{\Delta t} + \frac{\partial f}{\partial y}\cdot\frac{\Delta y}{\Delta t} + \varepsilon_1\cdot\frac{\Delta x}{\Delta t} + \varepsilon_2\cdot\frac{\Delta y}{\Delta t}$$ + +這樣做的目的是讓右邊出現 $\dfrac{\Delta x}{\Delta t}$ 和 $\dfrac{\Delta y}{\Delta t}$,當 $\Delta t \to 0$ 時,它們分別趨向 $\dfrac{dx}{dt}$ 和 $\dfrac{dy}{dt}$。 + +--- + +**Step 4:令 $\Delta t \to 0$,處理誤差項** + +令 $\Delta t \to 0$,逐一看每一項的極限: + +- $\dfrac{\partial f}{\partial x}\cdot\dfrac{\Delta x}{\Delta t} \;\to\; \dfrac{\partial f}{\partial x}\cdot\dfrac{dx}{dt}$(導數定義) +- $\dfrac{\partial f}{\partial y}\cdot\dfrac{\Delta y}{\Delta t} \;\to\; \dfrac{\partial f}{\partial y}\cdot\dfrac{dy}{dt}$(導數定義) +- $\varepsilon_1\cdot\dfrac{\Delta x}{\Delta t} \;\to\; 0$(見說明) +- $\varepsilon_2\cdot\dfrac{\Delta y}{\Delta t} \;\to\; 0$(見說明) + +**誤差項為何趨向 0?** + +因為 $g$ 可微,所以 $g$ 也連續,因此 $\Delta t \to 0$ 時 $\Delta x = g(t+\Delta t)-g(t) \to 0$,同理 $\Delta y \to 0$。 + +由於 $(\Delta x, \Delta y) \to (0,0)$,由可微定義知 $\varepsilon_1 \to 0$,$\varepsilon_2 \to 0$。 + +而 $\dfrac{\Delta x}{\Delta t} \to \dfrac{dx}{dt}$ 是有限值,所以 $\varepsilon_1 \cdot \dfrac{\Delta x}{\Delta t} \to 0 \cdot \dfrac{dx}{dt} = 0$,$\varepsilon_2$ 同理。 + +--- + +**Step 5:合併得到結論** + +$$\frac{dz}{dt} = \lim_{\Delta t\to 0}\frac{\Delta z}{\Delta t} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt} + 0 + 0$$ + +$$\boxed{\frac{dz}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}} \qquad \blacksquare$$ + +**邏輯主線:** +可微 $\Rightarrow$ $\Delta z$ 可線性展開 $\Rightarrow$ 除以 $\Delta t$ $\Rightarrow$ 取極限(誤差項消失)$\Rightarrow$ 連鎖律 + + + + + +**Step 1:設定變化量** + +當自變數 $t$ 改變 $\Delta t$ 時,中間變數與應變數會連鎖反應: + +$$t \xrightarrow{+\Delta t} \begin{cases} x \xrightarrow{+\Delta x} \\ y \xrightarrow{+\Delta y} \end{cases} \xrightarrow{} z \xrightarrow{+\Delta z}$$ + +具體來說: +$$\Delta x = g(t+\Delta t) - g(t), \qquad \Delta y = h(t+\Delta t) - h(t)$$ +$$\Delta z = f(x+\Delta x,\; y+\Delta y) - f(x,y)$$ + +下面哪一項是我們最終想求的? + +a. $\dfrac{\Delta z}{\Delta x}$($z$ 對 $x$ 的平均變化率) +b. $\dfrac{dz}{dt} = \lim_{\Delta t \to 0}\dfrac{\Delta z}{\Delta t}$($z$ 對 $t$ 的瞬時變化率) +c. $\dfrac{\partial z}{\partial x}$($z$ 對 $x$ 的偏導) + + + + +**Step 2:展開 $\Delta z$(可微的定義)** + +因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\Delta z$ 可以精確地寫成: + +$$\Delta z = \underbrace{\frac{\partial f}{\partial x}\Delta x + \frac{\partial f}{\partial y}\Delta y}_{\text{線性主部}} + \underbrace{\varepsilon_1\Delta x + \varepsilon_2\Delta y}_{\text{高階誤差項}}$$ + +其中誤差項 $\varepsilon_1, \varepsilon_2$ 滿足: +$$\varepsilon_1 \to 0,\quad \varepsilon_2 \to 0 \quad \text{當} \quad (\Delta x, \Delta y) \to (0,0)$$ + +**關鍵想法**:可微性讓我們能把 $\Delta z$ 分成「線性主部」和「可以忽略的誤差」兩部分。 + +為什麼需要 $\varepsilon_1, \varepsilon_2$ 這兩個誤差項? + +a. 因為偏導數本身就不準確 +b. 因為 $f$ 不一定是線性函數,線性近似有殘差,$\varepsilon$ 描述這個殘差在 $\Delta x, \Delta y \to 0$ 時消失 +c. 因為 $\Delta t$ 不夠小 + + + + +**Step 3:兩邊除以 $\Delta t$** + +把 $\Delta z$ 的展開式兩邊同除以 $\Delta t \neq 0$: + +$$\frac{\Delta z}{\Delta t} = \frac{\partial f}{\partial x}\cdot\frac{\Delta x}{\Delta t} + \frac{\partial f}{\partial y}\cdot\frac{\Delta y}{\Delta t} + \varepsilon_1\cdot\frac{\Delta x}{\Delta t} + \varepsilon_2\cdot\frac{\Delta y}{\Delta t}$$ + +這樣做的目的是讓右邊出現 $\dfrac{\Delta x}{\Delta t}$ 和 $\dfrac{\Delta y}{\Delta t}$,當 $\Delta t \to 0$ 時,它們分別趨向: + +a. $\dfrac{dx}{dt}$ 和 $\dfrac{dy}{dt}$ +b. $\dfrac{\partial x}{\partial t}$ 和 $\dfrac{\partial y}{\partial t}$ +c. $0$ 和 $0$ + + + + +**Step 4:令 $\Delta t \to 0$,處理誤差項** + +令 $\Delta t \to 0$,逐一看每一項的極限: + +- $\dfrac{\partial f}{\partial x}\cdot\dfrac{\Delta x}{\Delta t} \;\to\; \dfrac{\partial f}{\partial x}\cdot\dfrac{dx}{dt}$(導數定義) +- $\dfrac{\partial f}{\partial y}\cdot\dfrac{\Delta y}{\Delta t} \;\to\; \dfrac{\partial f}{\partial y}\cdot\dfrac{dy}{dt}$(導數定義) +- $\varepsilon_1\cdot\dfrac{\Delta x}{\Delta t} \;\to\; 0$(見說明) +- $\varepsilon_2\cdot\dfrac{\Delta y}{\Delta t} \;\to\; 0$(見說明) +**為什麼 $\varepsilon_1 \to 0$?** + +因為 $g$ 可微,所以 $g$ 也連續,因此當 $\Delta t \to 0$ 時,$\Delta x = g(t+\Delta t) - g(t) \to 0$。 +同理 $\Delta y \to 0$。 + +由於 $(\Delta x, \Delta y) \to (0,0)$,由可微定義知 $\varepsilon_1 \to 0$,$\varepsilon_2 \to 0$。 + +那麼誤差項 $\varepsilon_1\cdot\dfrac{\Delta x}{\Delta t}$ 的極限是多少? + +a. $0$,因為 $\varepsilon_1 \to 0$ 而 $\dfrac{\Delta x}{\Delta t} \to \dfrac{dx}{dt}$(有限值),有限值乘以 $0$ 等於 $0$ +b. 不確定,因為 $0 \times \infty$ 型不定式 +c. $\dfrac{dx}{dt}$,因為 $\varepsilon_1$ 消失了 + + + + +**Step 5:合併得到結論** + +把四項的極限合併: + +$$\frac{dz}{dt} = \lim_{\Delta t\to 0}\frac{\Delta z}{\Delta t} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt} + 0 + 0$$ + +$$\boxed{\frac{dz}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}} \qquad \blacksquare$$ + +**整個證明的邏輯主線:** + +可微 $\Rightarrow$ $\Delta z$ 可線性展開 $\Rightarrow$ 除以 $\Delta t$ $\Rightarrow$ 取極限(誤差項消失)$\Rightarrow$ 連鎖律 + + + +--- + + +註解 +常見錯誤提醒 +注意符號的區別: +- $\dfrac{dz}{dt}$:**全微分**,$z$ 只透過 $x(t), y(t)$ 依賴 $t$ +- $\dfrac{\partial z}{\partial t}$:**偏微分**,只對 $t$ 做偏微分,其他變數視為常數 + +兩者意義不同,在連鎖律中用錯會導致錯誤結果。 + + +--- + +### Example 1 + +若 $z = x^2y + 3xy^4$,其中 $x = \sin(2t)$,$y = \cos t$,求 $\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。 + +請先試著算出答案: + + + +不會的話可以看看下面的解法! + + +**Step 1:列出連鎖律公式** + +$$\frac{dz}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt} + \frac{\partial z}{\partial y}\frac{dy}{dt}$$ + +**Step 2:計算各偏導數** + +$$\frac{\partial z}{\partial x} = 2xy + 3y^4, \qquad \frac{\partial z}{\partial y} = x^2 + 12xy^3$$ + +$$\frac{dx}{dt} = 2\cos(2t), \qquad \frac{dy}{dt} = -\sin t$$ + +**Step 3:代入公式** + +$$\frac{dz}{dt} = (2xy + 3y^4)(2\cos 2t) + (x^2 + 12xy^3)(-\sin t)$$ + +**Step 4:代入 $t = 0$(此時 $x = 0,\ y = 1$)** + +$$\frac{dz}{dt}\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6$$ + + + + + +連鎖律公式為 $\dfrac{dz}{dt} = \dfrac{\partial z}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial z}{\partial y}\dfrac{dy}{dt}$。 + +先求偏導數:$\dfrac{\partial z}{\partial x} = \dfrac{\partial}{\partial x}(x^2y + 3xy^4) = ?$ + +a. $2x + 3y^4$ +b. $2xy + 3y^4$ +c. $x^2 + 12xy^3$ +d. $2y + 3y^4$ + + + + +再求:$\dfrac{\partial z}{\partial y} = \dfrac{\partial}{\partial y}(x^2y + 3xy^4) = ?$ + + + + + +求對 $t$ 的導數:$\dfrac{dx}{dt} = \dfrac{d}{dt}\sin(2t) = ?$ + + + + + +$\dfrac{dy}{dt} = \dfrac{d}{dt}\cos t = ?$ + + + + + +代入 $t = 0$:此時 $x = \sin 0 = 0$,$y = \cos 0 = 1$。 + +$$\frac{dz}{dt}\bigg|_{t=0} = (2xy + 3y^4)(2\cos 0) + (x^2 + 12xy^3)(-\sin 0)$$ + +代入 $x=0,\ y=1$,結果是? + +a. $3$ +b. $12$ +c. $6$ +d. $0$ + + + + +**答案:** +$$\frac{dz}{dt}\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6$$ + + + + +--- + + +註解 +形式 1 小結 +- 適用情況:$z = f(x,y)$,且 $x, y$ 均為**同一變數** $t$ 的函數 +- 公式:$\dfrac{dz}{dt} = \dfrac{\partial z}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial z}{\partial y}\dfrac{dy}{dt}$ +- 記憶口訣:**有幾個中間變數,就有幾項相加** + + +--- + +## 2️⃣ 連鎖律:形式 2 + +形式 1 的 $x, y$ 只依賴一個自變數 $t$。 + +**當 $x, y$ 同時依賴兩個自變數 $s, t$ 時,形式 1 就不夠用了。** + +此時 $z = f(x,y)$,$x = g(s,t)$,$y = h(s,t)$,我們要求 $\dfrac{\partial z}{\partial s}$ 與 $\dfrac{\partial z}{\partial t}$。 + +計算 $\dfrac{\partial z}{\partial t}$ 時,可以把 $s$ 視為常數,只觀察 $t$ 的變化;此時就像對單一變數套用形式 1。 + + +定理 +連鎖律(形式 2) +假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(s,t)$、$y = h(s,t)$ 都是 $s, t$ 的可微函數,則: +$$ \frac{\partial z}{\partial s}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial s} $$ +$$ \frac{\partial z}{\partial t}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial t} $$ + +![](/assets/chain_tree.svg) + +--- + +### Example 2 + +若 $z = e^x \sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\dfrac{\partial z}{\partial s}$ 與 $\dfrac{\partial z}{\partial t}$。 + +請先試著寫出 $\dfrac{\partial z}{\partial s}$(以 $s, t$ 表示,化簡後): + + + + +**Step 1:列出連鎖律** + +$$\frac{\partial z}{\partial s} = \frac{\partial z}{\partial x}\frac{\partial x}{\partial s} + \frac{\partial z}{\partial y}\frac{\partial y}{\partial s}, \qquad +\frac{\partial z}{\partial t} = \frac{\partial z}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial z}{\partial y}\frac{\partial y}{\partial t}$$ + +**Step 2:計算各偏導數** + +$$\frac{\partial z}{\partial x} = e^x \sin y, \qquad \frac{\partial z}{\partial y} = e^x \cos y$$ + +$$\frac{\partial x}{\partial s} = t^2, \quad \frac{\partial x}{\partial t} = 2st, \quad \frac{\partial y}{\partial s} = 2st, \quad \frac{\partial y}{\partial t} = s^2$$ + +**Step 3:代入** + +$$\frac{\partial z}{\partial s} = t^2 e^{st^2}\sin(s^2 t) + 2st\, e^{st^2}\cos(s^2 t)$$ + +$$\frac{\partial z}{\partial t} = 2st\, e^{st^2}\sin(s^2 t) + s^2 e^{st^2}\cos(s^2 t)$$ + + + + + +先求 $z = e^x \sin y$ 對中間變數的偏導:$\dfrac{\partial z}{\partial x} = ?$ + +a. $e^x \cos y$ +b. $e^x \sin y$ +c. $\sin y$ +d. $xe^x \sin y$ + + + + +$\dfrac{\partial z}{\partial y} = ?$ + + + + + +再求對自變數 $s$ 的偏導(其中 $x = st^2$,$y = s^2t$): +$\dfrac{\partial x}{\partial s} = ?$,$\dfrac{\partial y}{\partial s} = ?$ + +a. $\dfrac{\partial x}{\partial s} = 2st,\ \dfrac{\partial y}{\partial s} = t^2$ +b. $\dfrac{\partial x}{\partial s} = t^2,\ \dfrac{\partial y}{\partial s} = 2st$ +c. $\dfrac{\partial x}{\partial s} = s,\ \dfrac{\partial y}{\partial s} = 2s$ + + + + +代入連鎖律公式,$\dfrac{\partial z}{\partial s}$ 是哪一個? + +a. $t^2 e^{st^2}\sin(s^2t) + 2st\, e^{st^2}\cos(s^2t)$ +b. $2st\, e^{st^2}\sin(s^2t) + t^2 e^{st^2}\cos(s^2t)$ +c. $t^2 e^{st^2}\cos(s^2t) + 2st\, e^{st^2}\sin(s^2t)$ + + + + +**答案:** +$$\frac{\partial z}{\partial s} = t^2 e^{st^2}\sin(s^2t) + 2st\, e^{st^2}\cos(s^2t)$$ +$$\frac{\partial z}{\partial t} = 2st\, e^{st^2}\sin(s^2t) + s^2 e^{st^2}\cos(s^2t)$$ + + + + +--- + + +註解 +形式 2 小結 +- 適用情況:$z = f(x,y)$,$x, y$ 均為**兩個自變數** $s, t$ 的函數 +- 每個偏導(對 $s$ 或對 $t$)各有兩項 + + +--- + +## 3️⃣ 連鎖律:一般形式 + +推廣至最一般的情況: + +- 應變數 $u$ 是 $n$ 個中間變數 $x_1, \dots, x_n$ 的函數 +- 每個 $x_j$ 又是 $m$ 個自變數 $t_1, \dots, t_m$ 的函數 + +最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。 + + +定理 +連鎖律(一般形式) +假設 $u$ 是 $x_1, x_2, \dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \dots, t_m$ 的可微函數。 +則對每個 $i = 1, 2, \dots, m$: +$$ \frac{\partial u}{\partial t_i} = \frac{\partial u}{\partial x_1}\frac{\partial x_1}{\partial t_i} + \frac{\partial u}{\partial x_2}\frac{\partial x_2}{\partial t_i} + \cdots + \frac{\partial u}{\partial x_n}\frac{\partial x_n}{\partial t_i} $$ + +固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。 +如果把 $t_1,t_2,\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$ m\times n $個乘積項。 +--- + +### Example 4 + +寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\ y = y(u,v),\ z = z(u,v),\ t = t(u,v)$。 + +$\dfrac{\partial w}{\partial u}$ 共有幾項相加? + + + + +**分析變數結構** + +- 中間變數:$x, y, z, t$(共 $n = 4$ 個) +- 自變數:$u, v$(共 $m = 2$ 個) + +樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。 + +![](/assets/Ch14_5_ex4.svg) + +$$\frac{\partial w}{\partial u} = \frac{\partial w}{\partial x}\frac{\partial x}{\partial u} + \frac{\partial w}{\partial y}\frac{\partial y}{\partial u} + \frac{\partial w}{\partial z}\frac{\partial z}{\partial u} + \frac{\partial w}{\partial t}\frac{\partial t}{\partial u}$$ + +$$\frac{\partial w}{\partial v} = \frac{\partial w}{\partial x}\frac{\partial x}{\partial v} + \frac{\partial w}{\partial y}\frac{\partial y}{\partial v} + \frac{\partial w}{\partial z}\frac{\partial z}{\partial v} + \frac{\partial w}{\partial t}\frac{\partial t}{\partial v}$$ + + + + + +一般形式的連鎖律:項數等於**中間變數的個數**。 + +這題的中間變數是哪些? + +a. $u, v$(2 個) +b. $x, y, z, t$(4 個) +c. $w$(1 個) +d. $x, y, z, t, u, v$(6 個) + + + + +所以 $\dfrac{\partial w}{\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。 + +下列哪一個是完整的 $\dfrac{\partial w}{\partial u}$? + +a. $\dfrac{\partial w}{\partial x}\dfrac{\partial x}{\partial u} + \dfrac{\partial w}{\partial y}\dfrac{\partial y}{\partial u} + \dfrac{\partial w}{\partial z}\dfrac{\partial z}{\partial u} + \dfrac{\partial w}{\partial t}\dfrac{\partial t}{\partial u}$ +b. $\dfrac{\partial w}{\partial x}\dfrac{\partial x}{\partial v} + \dfrac{\partial w}{\partial y}\dfrac{\partial y}{\partial v} + \dfrac{\partial w}{\partial z}\dfrac{\partial z}{\partial v} + \dfrac{\partial w}{\partial t}\dfrac{\partial t}{\partial v}$ +c. $\dfrac{\partial w}{\partial u} + \dfrac{\partial w}{\partial v}$ + + + + +**答案:** +$$\frac{\partial w}{\partial u} = \frac{\partial w}{\partial x}\frac{\partial x}{\partial u} + \frac{\partial w}{\partial y}\frac{\partial y}{\partial u} + \frac{\partial w}{\partial z}\frac{\partial z}{\partial u} + \frac{\partial w}{\partial t}\frac{\partial t}{\partial u}$$ +$$\frac{\partial w}{\partial v} = \frac{\partial w}{\partial x}\frac{\partial x}{\partial v} + \frac{\partial w}{\partial y}\frac{\partial y}{\partial v} + \frac{\partial w}{\partial z}\frac{\partial z}{\partial v} + \frac{\partial w}{\partial t}\frac{\partial t}{\partial v}$$ + + + + +--- + +### Example 5 + +若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\ y = rs^2 e^{-t},\ z = r^2 s \sin t$,求 $\dfrac{\partial u}{\partial s}$ 在 $r=2, s=1, t=0$ 時的值。 + +請先試著算出答案: + + + + +**Step 1:列出連鎖律(用樹狀圖輔助)** + +![](/assets/Ch14_5_ex5.svg) + +$$\frac{\partial u}{\partial s} = \frac{\partial u}{\partial x}\frac{\partial x}{\partial s} + \frac{\partial u}{\partial y}\frac{\partial y}{\partial s} + \frac{\partial u}{\partial z}\frac{\partial z}{\partial s}$$ + +**Step 2:計算對中間變數的偏導** + +$$\frac{\partial u}{\partial x} = 4x^3 y, \qquad \frac{\partial u}{\partial y} = x^4 + 2yz^3, \qquad \frac{\partial u}{\partial z} = 3y^2 z^2$$ + +**Step 3:計算對 $s$ 的偏導** + +$$\frac{\partial x}{\partial s} = re^t, \qquad \frac{\partial y}{\partial s} = 2rse^{-t}, \qquad \frac{\partial z}{\partial s} = r^2\sin t$$ + +**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\ y=2,\ z=0$)** + +$$\frac{\partial u}{\partial s} = (4\cdot 8\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$ + + + + + +先求對中間變數的偏導:$\dfrac{\partial u}{\partial x} = \dfrac{\partial}{\partial x}(x^4y + y^2z^3) = ?$ + + + + + +$\dfrac{\partial u}{\partial y} = ?$ + + + + + +$\dfrac{\partial u}{\partial z} = ?$ + + + + + +再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\sin t$): +$\dfrac{\partial x}{\partial s},\ \dfrac{\partial y}{\partial s},\ \dfrac{\partial z}{\partial s}$ 分別是哪一組? + +a. $re^t,\ rs^2e^{-t},\ r^2s\sin t$ +b. $re^t,\ 2rse^{-t},\ r^2\sin t$ +c. $se^t,\ 2rse^{-t},\ r^2s$ + + + + +代入 $r=2,\ s=1,\ t=0$,此時 $x=2,\ y=2,\ z=0$。 + +$\dfrac{\partial u}{\partial s}$ 的計算結果是? + +a. $128$ +b. $64$ +c. $192$ +d. $256$ + + + + +**答案:** +$$\frac{\partial u}{\partial s} = (4\cdot8\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$ + + + + +--- + +### Example 6 + +若 $g(s,t) = f(s^2 - t^2,\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\dfrac{\partial g}{\partial s} + s\dfrac{\partial g}{\partial t} = 0$。 + + + +**Step 1:設中間變數** + +令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。 + +**Step 2:用連鎖律對 $s$ 微分** + +$$\frac{\partial g}{\partial s} = \frac{\partial f}{\partial x}(2s) + \frac{\partial f}{\partial y}(-2s)$$ + +**Step 3:用連鎖律對 $t$ 微分** + +$$\frac{\partial g}{\partial t} = \frac{\partial f}{\partial x}(-2t) + \frac{\partial f}{\partial y}(2t)$$ + +**Step 4:代入驗證** + +$$t\frac{\partial g}{\partial s} + s\frac{\partial g}{\partial t} += t\!\left(2s\frac{\partial f}{\partial x} - 2s\frac{\partial f}{\partial y}\right) + s\!\left(-2t\frac{\partial f}{\partial x} + 2t\frac{\partial f}{\partial y}\right)$$ + +$$= 2st\frac{\partial f}{\partial x} - 2st\frac{\partial f}{\partial y} - 2st\frac{\partial f}{\partial x} + 2st\frac{\partial f}{\partial y} = 0 \qquad \blacksquare$$ + + + + + +令 $x = s^2 - t^2$,$y = t^2 - s^2$。 + +用連鎖律對 $s$ 微分:$\dfrac{\partial g}{\partial s} = \dfrac{\partial f}{\partial x}\dfrac{\partial x}{\partial s} + \dfrac{\partial f}{\partial y}\dfrac{\partial y}{\partial s}$ + +請問 $\dfrac{\partial x}{\partial s}$ 和 $\dfrac{\partial y}{\partial s}$ 分別是? + +a. $\dfrac{\partial x}{\partial s} = -2s,\ \dfrac{\partial y}{\partial s} = 2s$ +b. $\dfrac{\partial x}{\partial s} = 2s,\ \dfrac{\partial y}{\partial s} = -2s$ +c. $\dfrac{\partial x}{\partial s} = 2t,\ \dfrac{\partial y}{\partial s} = -2t$ + + + + +所以 $\dfrac{\partial g}{\partial s} = 2s\dfrac{\partial f}{\partial x} - 2s\dfrac{\partial f}{\partial y}$。 + +再對 $t$ 微分:$\dfrac{\partial x}{\partial t}$ 和 $\dfrac{\partial y}{\partial t}$ 分別是? + +a. $\dfrac{\partial x}{\partial t} = -2t,\ \dfrac{\partial y}{\partial t} = 2t$ +b. $\dfrac{\partial x}{\partial t} = 2t,\ \dfrac{\partial y}{\partial t} = -2t$ +c. $\dfrac{\partial x}{\partial t} = -2s,\ \dfrac{\partial y}{\partial t} = 2s$ + + + + +所以 $\dfrac{\partial g}{\partial t} = -2t\dfrac{\partial f}{\partial x} + 2t\dfrac{\partial f}{\partial y}$。 + +現在代入 $t\dfrac{\partial g}{\partial s} + s\dfrac{\partial g}{\partial t}$,展開後各項是否完全相消? + +a. 是,結果為 $0$ +b. 否,結果不為 $0$ + + + + +**答案(展開驗證):** +$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \qquad \blacksquare$$ + + + + +--- + +### Example 7 + +若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\dfrac{\partial z}{\partial r}$,(b) $\dfrac{\partial^2 z}{\partial r^2}$。 + +(a) 請先寫出 $\dfrac{\partial z}{\partial r}$(以 $r, s$ 和偏導符號表示): + + + + +**(a) 計算 $\dfrac{\partial z}{\partial r}$** + +![](/assets/Ch14_5_ex7.svg) + +$$\frac{\partial z}{\partial r} = \frac{\partial z}{\partial x}(2r) + \frac{\partial z}{\partial y}(2s)$$ + +**(b) 計算 $\dfrac{\partial^2 z}{\partial r^2}$** + +對 (a) 再對 $r$ 微分,使用乘法法則: + +$$\frac{\partial^2 z}{\partial r^2} = 2\frac{\partial z}{\partial x} + 2r\frac{\partial}{\partial r}\!\left(\frac{\partial z}{\partial x}\right) + 2s\frac{\partial}{\partial r}\!\left(\frac{\partial z}{\partial y}\right)$$ + +再次使用連鎖律: + +$$\frac{\partial}{\partial r}\!\left(\frac{\partial z}{\partial x}\right) = \frac{\partial^2 z}{\partial x^2}(2r) + \frac{\partial^2 z}{\partial y\,\partial x}(2s)$$ + +$$\frac{\partial}{\partial r}\!\left(\frac{\partial z}{\partial y}\right) = \frac{\partial^2 z}{\partial x\,\partial y}(2r) + \frac{\partial^2 z}{\partial y^2}(2s)$$ + +由連續二階偏導數,混合偏導相等,代入整理: + +$$\boxed{\frac{\partial^2 z}{\partial r^2} = 2\frac{\partial z}{\partial x} + 4r^2\frac{\partial^2 z}{\partial x^2} + 8rs\frac{\partial^2 z}{\partial x\,\partial y} + 4s^2\frac{\partial^2 z}{\partial y^2}}$$ + + + + + +(a) 由連鎖律:$\dfrac{\partial z}{\partial r} = \dfrac{\partial z}{\partial x}\dfrac{\partial x}{\partial r} + \dfrac{\partial z}{\partial y}\dfrac{\partial y}{\partial r}$ + +其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\dfrac{\partial x}{\partial r}$ 和 $\dfrac{\partial y}{\partial r}$ 分別是? + +a. $\dfrac{\partial x}{\partial r} = 2s,\ \dfrac{\partial y}{\partial r} = 2r$ +b. $\dfrac{\partial x}{\partial r} = 2r,\ \dfrac{\partial y}{\partial r} = 2s$ +c. $\dfrac{\partial x}{\partial r} = r^2,\ \dfrac{\partial y}{\partial r} = s$ + + + + +所以 $\dfrac{\partial z}{\partial r} = 2r\dfrac{\partial z}{\partial x} + 2s\dfrac{\partial z}{\partial y}$。 + +(b) 對上式再對 $r$ 微分,用乘法法則: +$$\frac{\partial^2 z}{\partial r^2} = 2\frac{\partial z}{\partial x} + 2r\frac{\partial}{\partial r}\!\left(\frac{\partial z}{\partial x}\right) + 2s\frac{\partial}{\partial r}\!\left(\frac{\partial z}{\partial y}\right)$$ + +現在需要再用連鎖律展開 $\dfrac{\partial}{\partial r}\!\left(\dfrac{\partial z}{\partial x}\right)$,結果是? + +a. $\dfrac{\partial^2 z}{\partial x^2}(2r) + \dfrac{\partial^2 z}{\partial y\,\partial x}(2s)$ +b. $\dfrac{\partial^2 z}{\partial x^2}(2s) + \dfrac{\partial^2 z}{\partial y\,\partial x}(2r)$ +c. $\dfrac{\partial^2 z}{\partial x^2} + \dfrac{\partial^2 z}{\partial y\,\partial x}$ + + + + +同理 $\dfrac{\partial}{\partial r}\!\left(\dfrac{\partial z}{\partial y}\right) = \dfrac{\partial^2 z}{\partial x\,\partial y}(2r) + \dfrac{\partial^2 z}{\partial y^2}(2s)$。 + +由連續二階偏導,$\dfrac{\partial^2 z}{\partial y\,\partial x} = \dfrac{\partial^2 z}{\partial x\,\partial y}$,代入整理後,$\dfrac{\partial^2 z}{\partial r^2}$ 的 $\dfrac{\partial^2 z}{\partial x\,\partial y}$ 項的係數是? + + + + + +**答案:** +$$\frac{\partial^2 z}{\partial r^2} = 2\frac{\partial z}{\partial x} + 4r^2\frac{\partial^2 z}{\partial x^2} + 8rs\frac{\partial^2 z}{\partial x\,\partial y} + 4s^2\frac{\partial^2 z}{\partial y^2}$$ + + + + +--- + + +註解 +一般形式小結 +- 公式項數 = 中間變數個數 $n$ +- 直接套用樹狀圖:路徑乘積求和 +- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導) + + +--- + +## 4️⃣ 隱函數微分 + +假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。 + +由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1): + +$$\frac{\partial F}{\partial x}\cdot\frac{dx}{dx} + \frac{\partial F}{\partial y}\cdot\frac{dy}{dx} = 0$$ + +因為 $\dfrac{dx}{dx} = 1$,且 $F_y \neq 0$,可解出: + +$$\frac{dy}{dx} = -\frac{F_x}{F_y}$$ + + +定理 +隱函數定理 +若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足: +- $F(a,b) = 0$ +- $F_y(a,b) \neq 0$ +- $F_x$ 與 $F_y$ 在該區域內連續 + +則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為: +$$\frac{dy}{dx} = -\frac{F_x}{F_y}$$ + + +--- + +### Example 8 + +求 $y'$,若 $x^3 + y^3 = 6xy$。 + +請先試著算出 $y'$: + + + + +**Step 1:整理成 $F(x,y) = 0$** + +$$F(x,y) = x^3 + y^3 - 6xy = 0$$ + +**Step 2:計算偏導數** + +$$F_x = 3x^2 - 6y, \qquad F_y = 3y^2 - 6x$$ + +**Step 3:套用公式** + +$$\frac{dy}{dx} = -\frac{F_x}{F_y} = -\frac{3x^2 - 6y}{3y^2 - 6x} = -\frac{x^2 - 2y}{y^2 - 2x}$$ + + + + + +令 $F(x,y) = x^3 + y^3 - 6xy$。 + +隱函數微分公式為 $\dfrac{dy}{dx} = -\dfrac{F_x}{F_y}$,請問 $F_x$ 是? + + + + + +$F_y$ 是? + + + + + +代入公式 $y' = -\dfrac{F_x}{F_y}$,化簡後是哪一個? + +a. $-\dfrac{x^2 + 2y}{y^2 + 2x}$ +b. $-\dfrac{x^2 - 2y}{y^2 - 2x}$ +c. $\dfrac{x^2 - 2y}{y^2 - 2x}$ +d. $-\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡) + + + + +**答案:** +$$y' = -\frac{x^2 - 2y}{y^2 - 2x}$$ + + + + + +若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\dfrac{dy}{dx}$ 為何? +a. $\dfrac{y}{x}$ +b. $-\dfrac{x}{y}$ +c. $\dfrac{x}{y}$ +d. $-\dfrac{y}{x}$ + + +--- + +## 5️⃣ 三變數隱函數 + +假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。 + +對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。 + +$$\frac{\partial F}{\partial x}\cdot 1 + \frac{\partial F}{\partial y}\cdot 0 + \frac{\partial F}{\partial z}\cdot\frac{\partial z}{\partial x} = 0$$ + +若 $F_z \neq 0$,解出 $\dfrac{\partial z}{\partial x}$;同理可得 $\dfrac{\partial z}{\partial y}$。 + + +定理 +三變數隱微分公式 +若 $F(x,y,z) = 0$ 且 $F_z \neq 0$,則: +$$\frac{\partial z}{\partial x} = -\frac{F_x}{F_z}, \qquad \frac{\partial z}{\partial y} = -\frac{F_y}{F_z}$$ + + + +註解 +公式記憶法 +分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\dfrac{dy}{dx} = -\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。 + + +--- + +### Example 9 + +求 $\dfrac{\partial z}{\partial x}$ 與 $\dfrac{\partial z}{\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。 + +請先試著算出 $\dfrac{\partial z}{\partial x}$: + + + + +**Step 1:定義 $F$** + +$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$ + +**Step 2:計算各偏導數** + +$$F_x = 3x^2 + 6yz, \qquad F_y = 3y^2 + 6xz, \qquad F_z = 3z^2 + 6xy$$ + +**Step 3:套用公式** + +$$\frac{\partial z}{\partial x} = -\frac{F_x}{F_z} = -\frac{x^2 + 2yz}{z^2 + 2xy}$$ + +$$\frac{\partial z}{\partial y} = -\frac{F_y}{F_z} = -\frac{y^2 + 2xz}{z^2 + 2xy}$$ + + + + + +令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$: + + + + + +求 $F_y$: + + + + + +求 $F_z$: + + + + + +代入公式 $\dfrac{\partial z}{\partial x} = -\dfrac{F_x}{F_z}$,化簡後是? + +a. $-\dfrac{x^2 + 2yz}{z^2 - 2xy}$ +b. $-\dfrac{x^2 + 2yz}{z^2 + 2xy}$ +c. $\dfrac{x^2 + 2yz}{z^2 + 2xy}$ + + + + +代入公式 $\dfrac{\partial z}{\partial y} = -\dfrac{F_y}{F_z}$,化簡後是? + +a. $-\dfrac{y^2 + 2xz}{z^2 + 2xy}$ +b. $\dfrac{y^2 + 2xz}{z^2 + 2xy}$ +c. $-\dfrac{y^2 + 2xz}{z^2 - 2xy}$ + + + + +**答案:** +$$\frac{\partial z}{\partial x} = -\frac{x^2 + 2yz}{z^2 + 2xy}, \qquad \frac{\partial z}{\partial y} = -\frac{y^2 + 2xz}{z^2 + 2xy}$$ + + + + + +若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\dfrac{\partial z}{\partial x}$ 為何? +a. $-\dfrac{x}{z}$ +b. $\dfrac{x}{z}$ +c. $-\dfrac{z}{x}$ +d. $\dfrac{z}{x}$ + + +--- diff --git a/pages/Ch14/C14_5/exported_result_14_5.json b/pages/Ch14/C14_5/exported_result_14_5.json new file mode 100644 index 0000000000000000000000000000000000000000..ca1e68436035807c08b848512ca37722d91a643b --- /dev/null +++ b/pages/Ch14/C14_5/exported_result_14_5.json @@ -0,0 +1,23897 @@ +{ + "toc": [ + { + "label": "連鎖律", + "id": "sec", + "level": 1 + }, + { + "label": "1️⃣ 連鎖律:形式 1", + "id": "1-1", + "level": 2 + }, + { + "label": "Example 1", + "id": "Example-1", + "level": 3 + }, + { + "label": "2️⃣ 連鎖律:形式 2", + "id": "2-2", + "level": 2 + }, + { + "label": "Example 2", + "id": "Example-2", + "level": 3 + }, + { + "label": "3️⃣ 連鎖律:一般形式", + "id": "3", + "level": 2 + }, + { + "label": "Example 4", + "id": "Example-4", + "level": 3 + }, + { + "label": "Example 5", + "id": "Example-5", + "level": 3 + }, + { + "label": "Example 6", + "id": "Example-6", + "level": 3 + }, + { + "label": "Example 7", + "id": "Example-7", + "level": 3 + }, + { + "label": "4️⃣ 隱函數微分", + "id": "4", + "level": 2 + }, + { + "label": "Example 8", + "id": "Example-8", + "level": 3 + }, + { + "label": "5️⃣ 三變數隱函數", + "id": "5", + "level": 2 + }, + { + "label": "Example 9", + "id": "Example-9", + "level": 3 + } + ], + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "連鎖律", + "newline": "true", + "runs": [ + { + "text": "連鎖律", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "card", + "kind": "回想", + "headline": "單變數的連鎖律", + "body": [ + { + "type": "paragraph", + "content": "如果 $y = f(x)$,且 $x = g(t)$,其中 $f$ 與 $g$ 都可微,那麼 $y$ 是 $t$ 的可微函數,而且:$$\n\\frac{dy}{dt} = \\frac{dy}{dx}\\cdot\\frac{dx}{dt}\n$$", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$x = g(t)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 都可微,那麼 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數,而且:" + }, + { + "latex": "$$\n\\frac{dy}{dt} = \\frac{dy}{dx}\\cdot\\frac{dx}{dt}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "為什麼需要多變數連鎖律?", + "newline": "false", + "runs": [ + { + "text": "為什麼需要多變數連鎖律?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "想像你在一座山上健行,山上每個位置 $(x, y)$ 的氣溫為 $T(x, y)$。你沿著一條步道行走,你的位置隨時間 $t$ 改變:$x = x(t),\\ y = y(t)$。你想知道的是:你感受到的溫度變化速率 $\\dfrac{dT}{dt}$ 是多少?", + "newline": "false", + "runs": [ + { + "text": "想像你在一座山上健行,山上每個位置 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 的氣溫為 " + }, + { + "latex": "$T(x, y)$", + "kind": "math" + }, + { + "text": "。你沿著一條步道行走,你的位置隨時間 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變:" + }, + { + "latex": "$x = x(t),\\ y = y(t)$", + "kind": "math" + }, + { + "text": "。你想知道的是:" + }, + { + "text": "你感受到的溫度變化速率", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\dfrac{dT}{dt}$", + "kind": "math" + }, + { + "text": " 是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這就是多變數連鎖律要解決的問題:中間變數受到一個或多個自變數控制,如何計算最終變化率。", + "newline": "false", + "runs": [ + { + "text": "這就是多變數連鎖律要解決的問題:" + }, + { + "text": "中間變數受到一個或多個自變數控制,如何計算最終變化率。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 連鎖律:形式 1", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 連鎖律:形式 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1-1" + }, + { + "type": "paragraph", + "content": "第一種形式處理的情況是:$z = f(x, y)$,而 $x$ 與 $y$ 都是某單一變數 $t$ 的函數。也就是說,$x = g(t),\\ y = h(t)$,因此 $z = f(g(t), h(t))$。", + "newline": "false", + "runs": [ + { + "text": "第一種形式處理的情況是:" + }, + { + "latex": "$z = f(x, y)$", + "kind": "math" + }, + { + "text": ",而 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 都是某單一變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的函數。也就是說," + }, + { + "latex": "$x = g(t),\\ y = h(t)$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$z = f(g(t), h(t))$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(形式 1)", + "body": [ + { + "type": "paragraph", + "content": "假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(t)$ 與 $y = h(t)$ 都是 $t$ 的可微函數。則 $z$ 是 $t$ 的可微函數,而且:$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 的可微函數,且 " + }, + { + "latex": "$x = g(t)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y = h(t)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數。則 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數,而且:" + }, + { + "latex": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "直覺理解", + "body": [ + { + "type": "paragraph", + "content": "把 $\\dfrac{dz}{dt}$ 拆成兩條「路徑」:", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": " 拆成兩條「路徑」:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$t \\to x \\to z$", + "kind": "math" + }, + { + "text": ":貢獻 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + } + ], + "content": "$t \\to x \\to z$:貢獻 $\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$t \\to y \\to z$", + "kind": "math" + }, + { + "text": ":貢獻 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + } + ], + "content": "$t \\to y \\to z$:貢獻 $\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=200", + "src": "/assets/chain_tree_card1.svg" + }, + { + "type": "paragraph", + "content": "兩條路徑加起來,就是 $z$ 對 $t$ 的總變化率。這正是樹狀圖的核心概念。", + "newline": "false", + "runs": [ + { + "text": "兩條路徑加起來,就是 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的總變化率。這正是" + }, + { + "text": "樹狀圖", + "style": "bold" + }, + { + "text": "的核心概念。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_bcc9a5132e", + "label": "詳細證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設定變化量", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定變化量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當自變數 $t$ 改變 $\\Delta t$ 時,中間變數與應變數會連鎖反應:", + "newline": "false", + "runs": [ + { + "text": "當自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " 時,中間變數與應變數會連鎖反應:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "具體來說:$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "newline": "false", + "runs": [ + { + "text": "具體來說:" + }, + { + "latex": "$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們的目標是求 $\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$。", + "newline": "false", + "runs": [ + { + "text": "我們的目標是求 " + }, + { + "latex": "$\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 2:展開 $\\Delta z$(可微的定義)", + "newline": "false", + "runs": [ + { + "text": "Step 2:展開 ", + "style": "bold" + }, + { + "latex": "$\\Delta z$", + "kind": "math", + "style": "bold" + }, + { + "text": "(可微的定義)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\\Delta z$ 可以精確地寫成:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是可微函數,在點 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可以精確地寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中誤差項 $\\varepsilon_1, \\varepsilon_2$ 滿足:$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "newline": "false", + "runs": [ + { + "text": "其中誤差項 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:$f$ 的可微性讓我們能把 $\\Delta z$ 分成「線性主部」和「趨向零的誤差」兩部分。$\\varepsilon_1, \\varepsilon_2$ 描述線性近似的殘差——當步長趨近 $0$ 時,殘差也趨近 $0$。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的可微性讓我們能把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 分成「線性主部」和「趨向零的誤差」兩部分。" + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 描述線性近似的殘差——當步長趨近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,殘差也趨近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 3:兩邊除以 $\\Delta t$", + "newline": "false", + "runs": [ + { + "text": "Step 3:兩邊除以 ", + "style": "bold" + }, + { + "latex": "$\\Delta t$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把展開式兩邊同除以 $\\Delta t \\neq 0$:", + "newline": "false", + "runs": [ + { + "text": "把展開式兩邊同除以 " + }, + { + "latex": "$\\Delta t \\neq 0$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣做的目的是讓右邊出現 $\\dfrac{\\Delta x}{\\Delta t}$ 和 $\\dfrac{\\Delta y}{\\Delta t}$,當 $\\Delta t \\to 0$ 時,它們分別趨向 $\\dfrac{dx}{dt}$ 和 $\\dfrac{dy}{dt}$。", + "newline": "false", + "runs": [ + { + "text": "這樣做的目的是讓右邊出現 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\Delta y}{\\Delta t}$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時,它們分別趨向 " + }, + { + "latex": "$\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 4:令 $\\Delta t \\to 0$,處理誤差項", + "newline": "false", + "runs": [ + { + "text": "Step 4:令 ", + "style": "bold" + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",處理誤差項", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\Delta t \\to 0$,逐一看每一項的極限:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": ",逐一看每一項的極限:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$(見說明)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$(見說明)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "誤差項為何趨向 0?", + "newline": "false", + "runs": [ + { + "text": "誤差項為何趨向 0?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $g$ 可微,所以 $g$ 也連續,因此 $\\Delta t \\to 0$ 時 $\\Delta x = g(t+\\Delta t)-g(t) \\to 0$,同理 $\\Delta y \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 可微,所以 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 也連續,因此 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時 " + }, + { + "latex": "$\\Delta x = g(t+\\Delta t)-g(t) \\to 0$", + "kind": "math" + }, + { + "text": ",同理 " + }, + { + "latex": "$\\Delta y \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $(\\Delta x, \\Delta y) \\to (0,0)$,由可微定義知 $\\varepsilon_1 \\to 0$,$\\varepsilon_2 \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",由可微定義知 " + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2 \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "而 $\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$ 是有限值,所以 $\\varepsilon_1 \\cdot \\dfrac{\\Delta x}{\\Delta t} \\to 0 \\cdot \\dfrac{dx}{dt} = 0$,$\\varepsilon_2$ 同理。", + "newline": "false", + "runs": [ + { + "text": "而 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": " 是有限值,所以 " + }, + { + "latex": "$\\varepsilon_1 \\cdot \\dfrac{\\Delta x}{\\Delta t} \\to 0 \\cdot \\dfrac{dx}{dt} = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 同理。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 5:合併得到結論", + "newline": "false", + "runs": [ + { + "text": "Step 5:合併得到結論", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邏輯主線:可微 $\\Rightarrow$ $\\Delta z$ 可線性展開 $\\Rightarrow$ 除以 $\\Delta t$ $\\Rightarrow$ 取極限(誤差項消失)$\\Rightarrow$ 連鎖律", + "newline": "false", + "runs": [ + { + "text": "邏輯主線:", + "style": "bold" + }, + { + "text": "可微 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可線性展開 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 除以 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 取極限(誤差項消失)" + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 連鎖律" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0ccc22fcf7", + "label": "引導證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-6", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 1:設定變化量", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定變化量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當自變數 $t$ 改變 $\\Delta t$ 時,中間變數與應變數會連鎖反應:", + "newline": "false", + "runs": [ + { + "text": "當自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " 時,中間變數與應變數會連鎖反應:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "具體來說:$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "newline": "false", + "runs": [ + { + "text": "具體來說:" + }, + { + "latex": "$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-1::q1", + "prompt_runs": [ + { + "text": "下面哪一項是我們最終想求的?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\Delta z}{\\Delta x}$($z$ 對 $x$ 的平均變化率)" + }, + { + "key": "b", + "text": "$\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$($z$ 對 $t$ 的瞬時變化率)" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial z}{\\partial x}$($z$ 對 $x$ 的偏導)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-6", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 2:展開 $\\Delta z$(可微的定義)", + "newline": "false", + "runs": [ + { + "text": "Step 2:展開 ", + "style": "bold" + }, + { + "latex": "$\\Delta z$", + "kind": "math", + "style": "bold" + }, + { + "text": "(可微的定義)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\\Delta z$ 可以精確地寫成:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是可微函數,在點 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可以精確地寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中誤差項 $\\varepsilon_1, \\varepsilon_2$ 滿足:$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "newline": "false", + "runs": [ + { + "text": "其中誤差項 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:可微性讓我們能把 $\\Delta z$ 分成「線性主部」和「可以忽略的誤差」兩部分。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":可微性讓我們能把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 分成「線性主部」和「可以忽略的誤差」兩部分。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-2::q2", + "prompt_runs": [ + { + "text": "為什麼需要 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 這兩個誤差項?" + } + ], + "options": [ + { + "key": "a", + "text": "因為偏導數本身就不準確" + }, + { + "key": "b", + "text": "因為 $f$ 不一定是線性函數,線性近似有殘差,$\\varepsilon$ 描述這個殘差在 $\\Delta x, \\Delta y \\to 0$ 時消失" + }, + { + "key": "c", + "text": "因為 $\\Delta t$ 不夠小" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-6", + "step": "step-2" + } + ], + "gate_from": "flow-6::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 3:兩邊除以 $\\Delta t$", + "newline": "false", + "runs": [ + { + "text": "Step 3:兩邊除以 ", + "style": "bold" + }, + { + "latex": "$\\Delta t$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把 $\\Delta z$ 的展開式兩邊同除以 $\\Delta t \\neq 0$:", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 的展開式兩邊同除以 " + }, + { + "latex": "$\\Delta t \\neq 0$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-3::q3", + "prompt_runs": [ + { + "text": "這樣做的目的是讓右邊出現 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\Delta y}{\\Delta t}$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時,它們分別趨向:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{dx}{dt}$ 和 $\\dfrac{dy}{dt}$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$" + }, + { + "key": "c", + "text": "$0$ 和 $0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-6", + "step": "step-3" + } + ], + "gate_from": "flow-6::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 4:令 $\\Delta t \\to 0$,處理誤差項", + "newline": "false", + "runs": [ + { + "text": "Step 4:令 ", + "style": "bold" + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",處理誤差項", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\Delta t \\to 0$,逐一看每一項的極限:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": ",逐一看每一項的極限:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$(見說明)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + }, + { + "text": "為什麼 ", + "style": "bold" + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": "?", + "style": "bold" + } + ], + "content": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$(見說明)為什麼 $\\varepsilon_1 \\to 0$?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $g$ 可微,所以 $g$ 也連續,因此當 $\\Delta t \\to 0$ 時,$\\Delta x = g(t+\\Delta t) - g(t) \\to 0$。同理 $\\Delta y \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 可微,所以 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 也連續,因此當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$\\Delta x = g(t+\\Delta t) - g(t) \\to 0$", + "kind": "math" + }, + { + "text": "。同理 " + }, + { + "latex": "$\\Delta y \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $(\\Delta x, \\Delta y) \\to (0,0)$,由可微定義知 $\\varepsilon_1 \\to 0$,$\\varepsilon_2 \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",由可微定義知 " + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2 \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-4::q4", + "prompt_runs": [ + { + "text": "那麼誤差項 " + }, + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 的極限是多少?" + } + ], + "options": [ + { + "key": "a", + "text": "$0$,因為 $\\varepsilon_1 \\to 0$ 而 $\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$(有限值),有限值乘以 $0$ 等於 $0$" + }, + { + "key": "b", + "text": "不確定,因為 $0 \\times \\infty$ 型不定式" + }, + { + "key": "c", + "text": "$\\dfrac{dx}{dt}$,因為 $\\varepsilon_1$ 消失了" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-6", + "step": "step-4" + } + ], + "gate_from": "flow-6::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 5:合併得到結論", + "newline": "false", + "runs": [ + { + "text": "Step 5:合併得到結論", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把四項的極限合併:", + "newline": "false", + "runs": [ + { + "text": "把四項的極限合併:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "整個證明的邏輯主線:", + "newline": "false", + "runs": [ + { + "text": "整個證明的邏輯主線:", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "可微 $\\Rightarrow$ $\\Delta z$ 可線性展開 $\\Rightarrow$ 除以 $\\Delta t$ $\\Rightarrow$ 取極限(誤差項消失)$\\Rightarrow$ 連鎖律", + "newline": "false", + "runs": [ + { + "text": "可微 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可線性展開 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 除以 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 取極限(誤差項消失)" + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 連鎖律" + } + ] + } + ], + "gate_from": "flow-6::step-4::q4" + } + ] + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "常見錯誤提醒", + "body": [ + { + "type": "paragraph", + "content": "注意符號的區別:", + "newline": "false", + "runs": [ + { + "text": "注意符號的區別:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "text": "全微分", + "style": "bold" + }, + { + "text": "," + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 只透過 " + }, + { + "latex": "$x(t), y(t)$", + "kind": "math" + }, + { + "text": " 依賴 " + }, + { + "latex": "$t$", + "kind": "math" + } + ], + "content": "$\\dfrac{dz}{dt}$:全微分,$z$ 只透過 $x(t), y(t)$ 依賴 $t$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "text": "偏微分", + "style": "bold" + }, + { + "text": ",只對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 做偏微分,其他變數視為常數" + } + ], + "content": "$\\dfrac{\\partial z}{\\partial t}$:偏微分,只對 $t$ 做偏微分,其他變數視為常數" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "兩者意義不同,在連鎖律中用錯會導致錯誤結果。", + "newline": "false", + "runs": [ + { + "text": "兩者意義不同,在連鎖律中用錯會導致錯誤結果。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:\n\n\n\n不會的話可以看看下面的解法!\n\n\n**Step 1:列出連鎖律公式**\n\n$$\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3$$\n\n$$\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t$$\n\n**Step 3:代入公式**\n\n$$\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)$$\n\n**Step 4:代入 $t = 0$(此時 $x = 0,\\ y = 1$)**\n\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6$$\n\n\n\n\n\n連鎖律公式為 $\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$。\n\n先求偏導數:$\\dfrac{\\partial z}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^2y + 3xy^4) = ?$\n\na. $2x + 3y^4$\nb. $2xy + 3y^4$\nc. $x^2 + 12xy^3$\nd. $2y + 3y^4$\n\n\n\n\n再求:$\\dfrac{\\partial z}{\\partial y} = \\dfrac{\\partial}{\\partial y}(x^2y + 3xy^4) = ?$\n\n\n\n\n\n求對 $t$ 的導數:$\\dfrac{dx}{dt} = \\dfrac{d}{dt}\\sin(2t) = ?$\n\n\n\n\n\n$\\dfrac{dy}{dt} = \\dfrac{d}{dt}\\cos t = ?$\n\n\n\n\n\n代入 $t = 0$:此時 $x = \\sin 0 = 0$,$y = \\cos 0 = 1$。\n\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)$$\n\n代入 $x=0,\\ y=1$,結果是?\n\na. $3$\nb. $12$\nc. $6$\nd. $0$\n\n\n\n\n**答案:**\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6$$\n\n\n\n\n---\n\n\n註解\n形式 1 小結\n- 適用情況:$z = f(x,y)$,且 $x, y$ 均為**同一變數** $t$ 的函數\n- 公式:$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$\n- 記憶口訣:**有幾個中間變數,就有幾項相加**\n\n\n---\n\n## 2️⃣ 連鎖律:形式 2\n\n形式 1 的 $x, y$ 只依賴一個自變數 $t$。\n\n**當 $x, y$ 同時依賴兩個自變數 $s, t$ 時,形式 1 就不夠用了。**\n\n此時 $z = f(x,y)$,$x = g(s,t)$,$y = h(s,t)$,我們要求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n計算 $\\dfrac{\\partial z}{\\partial t}$ 時,可以把 $s$ 視為常數,只觀察 $t$ 的變化;此時就像對單一變數套用形式 1。\n\n\n定理\n連鎖律(形式 2)\n假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(s,t)$、$y = h(s,t)$ 都是 $s, t$ 的可微函數,則:\n$$ \\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s} $$\n$$ \\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t} $$\n\n![](/assets/chain_tree.svg)\n\n---\n\n### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n\n\n\n**Step 1:列出連鎖律**\n\n$$\\frac{\\partial z}{\\partial s} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}, \\qquad\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y$$\n\n$$\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2$$\n\n**Step 3:代入**\n\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)$$\n\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)$$\n\n\n\n\n\n先求 $z = e^x \\sin y$ 對中間變數的偏導:$\\dfrac{\\partial z}{\\partial x} = ?$\n\na. $e^x \\cos y$\nb. $e^x \\sin y$\nc. $\\sin y$\nd. $xe^x \\sin y$\n\n\n\n\n$\\dfrac{\\partial z}{\\partial y} = ?$\n\n\n\n\n\n再求對自變數 $s$ 的偏導(其中 $x = st^2$,$y = s^2t$):\n$\\dfrac{\\partial x}{\\partial s} = ?$,$\\dfrac{\\partial y}{\\partial s} = ?$\n\na. $\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$\nb. $\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$\nc. $\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\n\n\n\n\n代入連鎖律公式,$\\dfrac{\\partial z}{\\partial s}$ 是哪一個?\n\na. $t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$\nb. $2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$\nc. $t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$$\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)$$\n\n\n\n\n---\n\n\n註解\n形式 2 小結\n- 適用情況:$z = f(x,y)$,$x, y$ 均為**兩個自變數** $s, t$ 的函數\n- 每個偏導(對 $s$ 或對 $t$)各有兩項\n\n\n---\n\n## 3️⃣ 連鎖律:一般形式\n\n推廣至最一般的情況:\n\n- 應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數\n- 每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數\n\n最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。\n\n\n定理\n連鎖律(一般形式)\n假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。\n則對每個 $i = 1, 2, \\dots, m$:\n$$ \\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i} $$\n\n固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。 \n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$ m\\times n $個乘積項。 \n---\n\n### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = x^2y + 3xy^4$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = \\sin(2t)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = \\cos t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$t = 0$", + "kind": "math" + }, + { + "text": " 時的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出答案:" + } + ], + "answers": [ + "6" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "不會的話可以看看下面的解法!", + "newline": "false", + "runs": [ + { + "text": "不會的話可以看看下面的解法!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_90548e97f1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律公式", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:代入公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:代入公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $t = 0$(此時 $x = 0,\\ y = 1$)", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$t = 0$", + "kind": "math", + "style": "bold" + }, + { + "text": "(此時 ", + "style": "bold" + }, + { + "latex": "$x = 0,\\ y = 1$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:\n\n\n\n不會的話可以看看下面的解法!" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ad59aa11f2", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-7", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "連鎖律公式為 $\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$。", + "newline": "false", + "runs": [ + { + "text": "連鎖律公式為 " + }, + { + "latex": "$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-7::step-1::q1", + "prompt_runs": [ + { + "text": "先求偏導數:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^2y + 3xy^4) = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$2x + 3y^4$" + }, + { + "key": "b", + "text": "$2xy + 3y^4$" + }, + { + "key": "c", + "text": "$x^2 + 12xy^3$" + }, + { + "key": "d", + "text": "$2y + 3y^4$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-7", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-2::q2", + "prompt_runs": [ + { + "text": "再求:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = \\dfrac{\\partial}{\\partial y}(x^2y + 3xy^4) = ?$", + "kind": "math" + } + ], + "answers": [ + "x^2+12*x*y^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-2" + } + ], + "gate_from": "flow-7::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-3::q3", + "prompt_runs": [ + { + "text": "求對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的導數:" + }, + { + "latex": "$\\dfrac{dx}{dt} = \\dfrac{d}{dt}\\sin(2t) = ?$", + "kind": "math" + } + ], + "answers": [ + "2*cos(2*t)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-3" + } + ], + "gate_from": "flow-7::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-4::q4", + "prompt_runs": [ + { + "latex": "$\\dfrac{dy}{dt} = \\dfrac{d}{dt}\\cos t = ?$", + "kind": "math" + } + ], + "answers": [ + "-sin(t)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-4" + } + ], + "gate_from": "flow-7::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入 $t = 0$:此時 $x = \\sin 0 = 0$,$y = \\cos 0 = 1$。", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$t = 0$", + "kind": "math" + }, + { + "text": ":此時 " + }, + { + "latex": "$x = \\sin 0 = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = \\cos 0 = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-7::step-5::q5", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$x=0,\\ y=1$", + "kind": "math" + }, + { + "text": ",結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$3$" + }, + { + "key": "b", + "text": "$12$" + }, + { + "key": "c", + "text": "$6$" + }, + { + "key": "d", + "text": "$0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-7", + "step": "step-5" + } + ], + "gate_from": "flow-7::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-7::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "形式 1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "適用情況:" + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 均為" + }, + { + "text": "同一變數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "適用情況:$z = f(x,y)$,且 $x, y$ 均為同一變數 $t$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "公式:" + }, + { + "latex": "$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$", + "kind": "math" + } + ], + "content": "公式:$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "記憶口訣:" + }, + { + "text": "有幾個中間變數,就有幾項相加", + "style": "bold" + } + ], + "content": "記憶口訣:有幾個中間變數,就有幾項相加" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 連鎖律:形式 2", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 連鎖律:形式 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2-2" + }, + { + "type": "paragraph", + "content": "形式 1 的 $x, y$ 只依賴一個自變數 $t$。", + "newline": "false", + "runs": [ + { + "text": "形式 1 的 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 只依賴一個自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當 $x, y$ 同時依賴兩個自變數 $s, t$ 時,形式 1 就不夠用了。", + "newline": "false", + "runs": [ + { + "text": "當 ", + "style": "bold" + }, + { + "latex": "$x, y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 同時依賴兩個自變數 ", + "style": "bold" + }, + { + "latex": "$s, t$", + "kind": "math", + "style": "bold" + }, + { + "text": " 時,形式 1 就不夠用了。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此時 $z = f(x,y)$,$x = g(s,t)$,$y = h(s,t)$,我們要求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。", + "newline": "false", + "runs": [ + { + "text": "此時 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x = g(s,t)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = h(s,t)$", + "kind": "math" + }, + { + "text": ",我們要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "計算 $\\dfrac{\\partial z}{\\partial t}$ 時,可以把 $s$ 視為常數,只觀察 $t$ 的變化;此時就像對單一變數套用形式 1。", + "newline": "false", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": " 時,可以把 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 視為常數,只觀察 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的變化;此時就像對單一變數套用形式 1。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(形式 2)", + "body": [ + { + "type": "paragraph", + "content": "假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(s,t)$、$y = h(s,t)$ 都是 $s, t$ 的可微函數,則:$$\n\\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}\n$$$$\n\\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 的可微函數,且 " + }, + { + "latex": "$x = g(s,t)$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y = h(s,t)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 的可微函數,則:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "picture", + "alt": "", + "src": "/assets/chain_tree.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n\n\n\n**Step 1:列出連鎖律**\n\n$$\\frac{\\partial z}{\\partial s} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}, \\qquad\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y$$\n\n$$\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2$$\n\n**Step 3:代入**\n\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)$$\n\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)$$\n\n\n\n\n\n先求 $z = e^x \\sin y$ 對中間變數的偏導:$\\dfrac{\\partial z}{\\partial x} = ?$\n\na. $e^x \\cos y$\nb. $e^x \\sin y$\nc. $\\sin y$\nd. $xe^x \\sin y$\n\n\n\n\n$\\dfrac{\\partial z}{\\partial y} = ?$\n\n\n\n\n\n再求對自變數 $s$ 的偏導(其中 $x = st^2$,$y = s^2t$):\n$\\dfrac{\\partial x}{\\partial s} = ?$,$\\dfrac{\\partial y}{\\partial s} = ?$\n\na. $\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$\nb. $\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$\nc. $\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\n\n\n\n\n代入連鎖律公式,$\\dfrac{\\partial z}{\\partial s}$ 是哪一個?\n\na. $t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$\nb. $2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$\nc. $t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$$\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)$$\n\n\n\n\n---\n\n\n註解\n形式 2 小結\n- 適用情況:$z = f(x,y)$,$x, y$ 均為**兩個自變數** $s, t$ 的函數\n- 每個偏導(對 $s$ 或對 $t$)各有兩項\n\n\n---\n\n## 3️⃣ 連鎖律:一般形式\n\n推廣至最一般的情況:\n\n- 應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數\n- 每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數\n\n最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。\n\n\n定理\n連鎖律(一般形式)\n假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。\n則對每個 $i = 1, 2, \\dots, m$:\n$$ \\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i} $$\n\n固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。 \n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$ m\\times n $個乘積項。 \n---\n\n### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = e^x \\sin y$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = st^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = s^2 t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著寫出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 表示,化簡後):" + } + ], + "answers": [ + "t^2*e^(s*t^2)*sin(s^2*t)+2*s*t*e^(s*t^2)*cos(s^2*t)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f0e2037481", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:代入", + "newline": "false", + "runs": [ + { + "text": "Step 3:代入", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_4f474d4a19", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-8", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-1::q1", + "prompt_runs": [ + { + "text": "先求 " + }, + { + "latex": "$z = e^x \\sin y$", + "kind": "math" + }, + { + "text": " 對中間變數的偏導:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$e^x \\cos y$" + }, + { + "key": "b", + "text": "$e^x \\sin y$" + }, + { + "key": "c", + "text": "$\\sin y$" + }, + { + "key": "d", + "text": "$xe^x \\sin y$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-8", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-8::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = ?$", + "kind": "math" + } + ], + "answers": [ + "e^x*cos(y)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-8", + "step": "step-2" + } + ], + "gate_from": "flow-8::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-3::q3", + "prompt_runs": [ + { + "text": "再求對自變數 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 的偏導(其中 " + }, + { + "latex": "$x = st^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = s^2t$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s} = ?$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial s} = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-8", + "step": "step-3" + } + ], + "gate_from": "flow-8::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-4::q4", + "prompt_runs": [ + { + "text": "代入連鎖律公式," + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$" + }, + { + "key": "b", + "text": "$2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$" + }, + { + "key": "c", + "text": "$t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-8", + "step": "step-4" + } + ], + "gate_from": "flow-8::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)\n$$$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-8::step-4::q4" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "形式 2 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "適用情況:" + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 均為" + }, + { + "text": "兩個自變數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "適用情況:$z = f(x,y)$,$x, y$ 均為兩個自變數 $s, t$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "每個偏導(對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 或對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": ")各有兩項" + } + ], + "content": "每個偏導(對 $s$ 或對 $t$)各有兩項" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 連鎖律:一般形式", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 連鎖律:一般形式", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "推廣至最一般的情況:", + "newline": "false", + "runs": [ + { + "text": "推廣至最一般的情況:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "應變數 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 個中間變數 " + }, + { + "latex": "$x_1, \\dots, x_n$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "每個 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 又是 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 個自變數 " + }, + { + "latex": "$t_1, \\dots, t_m$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。", + "newline": "false", + "runs": [ + { + "text": "最終公式對每個 " + }, + { + "latex": "$t_i$", + "kind": "math" + }, + { + "text": " 都有 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 項(每個中間變數 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 各貢獻一項)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(一般形式)", + "body": [ + { + "type": "paragraph", + "content": "假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。則對每個 $i = 1, 2, \\dots, m$:$$\n\\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x_1, x_2, \\dots, x_n$", + "kind": "math" + }, + { + "text": " 的可微函數,且每個 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$t_1, t_2, \\dots, t_m$", + "kind": "math" + }, + { + "text": " 的可微函數。則對每個 " + }, + { + "latex": "$i = 1, 2, \\dots, m$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。\n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$m\\times n$個乘積項。\n", + "newline": "true", + "runs": [ + { + "text": "固定一個 " + }, + { + "latex": "$t_i$", + "kind": "math" + }, + { + "text": " 時,公式右邊會對所有中間變數" + }, + { + "latex": "$x_1,x_2,\\ldots,x_n$", + "kind": "math" + }, + { + "text": " 加總,因此每一條公式有 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 個乘積項。" + }, + { + "newline": "true" + }, + { + "text": "如果把 " + }, + { + "latex": "$t_1,t_2,\\ldots,t_m$", + "kind": "math" + }, + { + "text": " 的公式全部列出來,會有 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 條公式,每條 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 項,所以全部展開共有" + }, + { + "latex": "$m\\times n$", + "kind": "math" + }, + { + "text": "個乘積項。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。", + "newline": "false", + "runs": [ + { + "text": "寫出連鎖律在以下情況下的形式:" + }, + { + "latex": "$w = f(x, y, z, t)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": " 共有幾項相加?" + } + ], + "answers": [ + "4" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入項數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_bab1488cbd", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "分析變數結構", + "newline": "false", + "runs": [ + { + "text": "分析變數結構", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "中間變數:" + }, + { + "latex": "$x, y, z, t$", + "kind": "math" + }, + { + "text": "(共 " + }, + { + "latex": "$n = 4$", + "kind": "math" + }, + { + "text": " 個)" + } + ], + "content": "中間變數:$x, y, z, t$(共 $n = 4$ 個)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "自變數:" + }, + { + "latex": "$u, v$", + "kind": "math" + }, + { + "text": "(共 " + }, + { + "latex": "$m = 2$", + "kind": "math" + }, + { + "text": " 個)" + } + ], + "content": "自變數:$u, v$(共 $m = 2$ 個)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。", + "newline": "false", + "runs": [ + { + "text": "樹狀圖讀法:從 " + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 出發,沿著每條路徑往下走到 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$v$", + "kind": "math" + }, + { + "text": ",把路徑上的偏導數相乘,再把所有路徑加起來。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex4.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_db1a3d11c9", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-9", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "一般形式的連鎖律:項數等於中間變數的個數。", + "newline": "false", + "runs": [ + { + "text": "一般形式的連鎖律:項數等於" + }, + { + "text": "中間變數的個數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-9::step-1::q1", + "prompt_runs": [ + { + "text": "這題的中間變數是哪些?" + } + ], + "options": [ + { + "key": "a", + "text": "$u, v$(2 個)" + }, + { + "key": "b", + "text": "$x, y, z, t$(4 個)" + }, + { + "key": "c", + "text": "$w$(1 個)" + }, + { + "key": "d", + "text": "$x, y, z, t, u, v$(6 個)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-9", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": " 共有 4 項,對應 4 個中間變數,每項是「" + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 對中間變數的偏導」乘以「中間變數對 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 的偏導」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-9::step-2::q2", + "prompt_runs": [ + { + "text": "下列哪一個是完整的 " + }, + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": "?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-9", + "step": "step-2" + } + ], + "gate_from": "flow-9::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-9::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$u = x^4 y + y^2 z^3$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial u}{\\partial s}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$r=2, s=1, t=0$", + "kind": "math" + }, + { + "text": " 時的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出答案:" + } + ], + "answers": [ + "192" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_739644c706", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律(用樹狀圖輔助)", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律(用樹狀圖輔助)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex5.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算對中間變數的偏導", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算對中間變數的偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算對 $s$ 的偏導", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算對 ", + "style": "bold" + }, + { + "latex": "$s$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$r=2, s=1, t=0$", + "kind": "math", + "style": "bold" + }, + { + "text": "(此時 ", + "style": "bold" + }, + { + "latex": "$x=2,\\ y=2,\\ z=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ce79fc3d89", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-10", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-1::q1", + "prompt_runs": [ + { + "text": "先求對中間變數的偏導:" + }, + { + "latex": "$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$", + "kind": "math" + } + ], + "answers": [ + "4*x^3*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial y} = ?$", + "kind": "math" + } + ], + "answers": [ + "x^4+2*y*z^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-2" + } + ], + "gate_from": "flow-10::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-3::q3", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial z} = ?$", + "kind": "math" + } + ], + "answers": [ + "3*y^2*z^2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-3" + } + ], + "gate_from": "flow-10::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-10::step-4::q4", + "prompt_runs": [ + { + "text": "再求對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 的偏導(其中 " + }, + { + "latex": "$x = rse^t$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = rs^2e^{-t}$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$z = r^2s\\sin t$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 分別是哪一組?" + } + ], + "options": [ + { + "key": "a", + "text": "$re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$" + }, + { + "key": "b", + "text": "$re^t,\\ 2rse^{-t},\\ r^2\\sin t$" + }, + { + "key": "c", + "text": "$se^t,\\ 2rse^{-t},\\ r^2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-10", + "step": "step-4" + } + ], + "gate_from": "flow-10::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$r=2,\\ s=1,\\ t=0$", + "kind": "math" + }, + { + "text": ",此時 " + }, + { + "latex": "$x=2,\\ y=2,\\ z=0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-10::step-5::q5", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial s}$", + "kind": "math" + }, + { + "text": " 的計算結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$128$" + }, + { + "key": "b", + "text": "$64$" + }, + { + "key": "c", + "text": "$192$" + }, + { + "key": "d", + "text": "$256$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-10", + "step": "step-5" + } + ], + "gate_from": "flow-10::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-10::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 為可微函數,證明 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a8bf37848a", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設中間變數", + "newline": "false", + "runs": [ + { + "text": "Step 1:設中間變數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x = s^2 - t^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = t^2 - s^2$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$g(s,t) = f(x,y)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$y = -x$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:用連鎖律對 $s$ 微分", + "newline": "false", + "runs": [ + { + "text": "Step 2:用連鎖律對 ", + "style": "bold" + }, + { + "latex": "$s$", + "kind": "math", + "style": "bold" + }, + { + "text": " 微分", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:用連鎖律對 $t$ 微分", + "newline": "false", + "runs": [ + { + "text": "Step 3:用連鎖律對 ", + "style": "bold" + }, + { + "latex": "$t$", + "kind": "math", + "style": "bold" + }, + { + "text": " 微分", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入驗證", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入驗證", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7668e6674f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-11", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $x = s^2 - t^2$,$y = t^2 - s^2$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x = s^2 - t^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = t^2 - s^2$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$", + "newline": "false", + "runs": [ + { + "text": "用連鎖律對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-1::q1", + "prompt_runs": [ + { + "text": "請問 " + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial s}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-11", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-2::q2", + "prompt_runs": [ + { + "text": "再對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial t}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-11", + "step": "step-2" + } + ], + "gate_from": "flow-11::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-3::q3", + "prompt_runs": [ + { + "text": "現在代入 " + }, + { + "latex": "$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$", + "kind": "math" + }, + { + "text": ",展開後各項是否完全相消?" + } + ], + "options": [ + { + "key": "a", + "text": "是,結果為 $0$" + }, + { + "key": "b", + "text": "否,結果不為 $0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-11", + "step": "step-3" + } + ], + "gate_from": "flow-11::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案(展開驗證):$$\nt(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "答案(展開驗證):", + "style": "bold" + }, + { + "latex": "$$\nt(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-11::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 具有連續的二階偏導數,且 " + }, + { + "latex": "$x = r^2 + s^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2rs$", + "kind": "math" + }, + { + "text": ",求:(a) " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math" + }, + { + "text": ",(b) " + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 請先寫出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$r, s$", + "kind": "math" + }, + { + "text": " 和偏導符號表示):" + } + ], + "answers": [ + "2*r*dz/dx+2*s*dz/dy" + ], + "normalize": [ + "nospace" + ], + "placeholder": "例:2r(dz/dx)+2s(dz/∂y)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_76da149e19", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "(a) 計算 $\\dfrac{\\partial z}{\\partial r}$", + "newline": "false", + "runs": [ + { + "text": "(a) 計算 ", + "style": "bold" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex7.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$", + "newline": "false", + "runs": [ + { + "text": "(b) 計算 ", + "style": "bold" + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對 (a) 再對 $r$ 微分,使用乘法法則:", + "newline": "false", + "runs": [ + { + "text": "對 (a) 再對 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 微分,使用乘法法則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "再次使用連鎖律:", + "newline": "false", + "runs": [ + { + "text": "再次使用連鎖律:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由連續二階偏導數,混合偏導相等,代入整理:", + "newline": "false", + "runs": [ + { + "text": "由連續二階偏導數,混合偏導相等,代入整理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_8af43e2ac6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-12", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$", + "newline": "false", + "runs": [ + { + "text": "(a) 由連鎖律:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-12::step-1::q1", + "prompt_runs": [ + { + "text": "其中 " + }, + { + "latex": "$x = r^2 + s^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2rs$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial r}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial r}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-12", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "(b) 對上式再對 $r$ 微分,用乘法法則:$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "text": "(b) 對上式再對 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 微分,用乘法法則:" + }, + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-12::step-2::q2", + "prompt_runs": [ + { + "text": "現在需要再用連鎖律展開 " + }, + { + "latex": "$\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$", + "kind": "math" + }, + { + "text": ",結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-12", + "step": "step-2" + } + ], + "gate_from": "flow-12::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。", + "newline": "false", + "runs": [ + { + "text": "同理 " + }, + { + "latex": "$\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-12::step-3::q3", + "prompt_runs": [ + { + "text": "由連續二階偏導," + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$", + "kind": "math" + }, + { + "text": ",代入整理後," + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$", + "kind": "math" + }, + { + "text": " 項的係數是?" + } + ], + "answers": [ + "8*r*s" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-12", + "step": "step-3" + } + ], + "gate_from": "flow-12::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-12::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "一般形式小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "公式項數 = 中間變數個數 " + }, + { + "latex": "$n$", + "kind": "math" + } + ], + "content": "公式項數 = 中間變數個數 $n$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "直接套用樹狀圖:路徑乘積求和" + } + ], + "content": "直接套用樹狀圖:路徑乘積求和" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "二階偏導需" + }, + { + "text": "兩次", + "style": "bold" + }, + { + "text": "使用連鎖律,注意混合偏導相等的條件(連續二階偏導)" + } + ], + "content": "二階偏導需兩次使用連鎖律,注意混合偏導相等的條件(連續二階偏導)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 隱函數微分", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 隱函數微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。", + "newline": "false", + "runs": [ + { + "text": "假設方程式 " + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math" + }, + { + "text": " 將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 隱式定義為 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的可微函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的函數,對方程式兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 微分,使用連鎖律(形式 1):" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$\\dfrac{dx}{dx} = 1$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$F_y \\neq 0$", + "kind": "math" + }, + { + "text": ",可解出:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "隱函數定理", + "body": [ + { + "type": "paragraph", + "content": "若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F$", + "kind": "math" + }, + { + "text": " 在包含點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的某個圓盤區域內滿足:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F(a,b) = 0$", + "kind": "math" + } + ], + "content": "$F(a,b) = 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F_y(a,b) \\neq 0$", + "kind": "math" + } + ], + "content": "$F_y(a,b) \\neq 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": " 在該區域內連續" + } + ], + "content": "$F_x$ 與 $F_y$ 在該區域內連續" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "newline": "false", + "runs": [ + { + "text": "則在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近," + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math" + }, + { + "text": " 可將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 表示為 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的函數,其導數為:" + }, + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "求 $y'$,若 $x^3 + y^3 = 6xy$。", + "newline": "false", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$y'$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$x^3 + y^3 = 6xy$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$y'$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "-(x^2-2*y)/(y^2-2*x)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_16f618c2c3", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:整理成 $F(x,y) = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 1:整理成 ", + "style": "bold" + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y) = x^3 + y^3 - 6xy = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y) = x^3 + y^3 - 6xy = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d2a98b7336", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-13", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $F(x,y) = x^3 + y^3 - 6xy$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$F(x,y) = x^3 + y^3 - 6xy$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-13::step-1::q1", + "prompt_runs": [ + { + "text": "隱函數微分公式為 " + }, + { + "latex": "$\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": " 是?" + } + ], + "answers": [ + "3*x^2-6*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-13", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-13::step-2::q2", + "prompt_runs": [ + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": " 是?" + } + ], + "answers": [ + "3*y^2-6*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-13", + "step": "step-2" + } + ], + "gate_from": "flow-13::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-13::step-3::q3", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$y' = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",化簡後是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{x^2 + 2y}{y^2 + 2x}$" + }, + { + "key": "b", + "text": "$-\\dfrac{x^2 - 2y}{y^2 - 2x}$" + }, + { + "key": "c", + "text": "$\\dfrac{x^2 - 2y}{y^2 - 2x}$" + }, + { + "key": "d", + "text": "$-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-13", + "step": "step-3" + } + ], + "gate_from": "flow-13::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\ny' = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\ny' = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-13::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 三變數隱函數", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 三變數隱函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 隱式定義為 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。", + "newline": "false", + "runs": [ + { + "text": "對方程式對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微分時,固定 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "。此時 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 本身對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的導數為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",而 " + }, + { + "latex": "$z=z(x,y)$", + "kind": "math" + }, + { + "text": " 會隨 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 改變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F_z \\neq 0$", + "kind": "math" + }, + { + "text": ",解出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": ";同理可得 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "三變數隱微分公式", + "body": [ + { + "type": "paragraph", + "content": "若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}\n$$", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$F_z \\neq 0$", + "kind": "math" + }, + { + "text": ",則:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "公式記憶法", + "body": [ + { + "type": "paragraph", + "content": "分母永遠是對 $z$ 的偏導 $F_z$,分子是對要求變數的偏導,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。", + "newline": "false", + "runs": [ + { + "text": "分母永遠是" + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$F_z$", + "kind": "math" + }, + { + "text": ",分子是" + }, + { + "text": "對要求變數的偏導", + "style": "bold" + }, + { + "text": ",最前面加負號。可類比二變數公式 " + }, + { + "latex": "$\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 換成 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 即可。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。", + "newline": "false", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$x^3 + y^3 + z^3 + 6xyz + 4 = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "-(x^2+2*y*z)/(z^2+2*x*y)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7b4786a8d0", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義 $F$", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義 ", + "style": "bold" + }, + { + "latex": "$F$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c53360cb29", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-14", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-1::q1", + "prompt_runs": [ + { + "text": "令 " + }, + { + "latex": "$F = x^3 + y^3 + z^3 + 6xyz + 4$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*x^2+6*y*z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-2::q2", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*y^2+6*x*z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-2" + } + ], + "gate_from": "flow-14::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-3::q3", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$F_z$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*z^2+6*x*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-3" + } + ], + "gate_from": "flow-14::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-14::step-4::q4", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$", + "kind": "math" + }, + { + "text": ",化簡後是?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$" + }, + { + "key": "b", + "text": "$-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$" + }, + { + "key": "c", + "text": "$\\dfrac{x^2 + 2yz}{z^2 + 2xy}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-14", + "step": "step-4" + } + ], + "gate_from": "flow-14::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-14::step-5::q5", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$", + "kind": "math" + }, + { + "text": ",化簡後是?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$" + }, + { + "key": "b", + "text": "$\\dfrac{y^2 + 2xz}{z^2 + 2xy}$" + }, + { + "key": "c", + "text": "$-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-14", + "step": "step-5" + } + ], + "gate_from": "flow-14::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-14::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "連鎖律", + "newline": "true", + "runs": [ + { + "text": "連鎖律", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "card", + "kind": "回想", + "headline": "單變數的連鎖律", + "body": [ + { + "type": "paragraph", + "content": "如果 $y = f(x)$,且 $x = g(t)$,其中 $f$ 與 $g$ 都可微,那麼 $y$ 是 $t$ 的可微函數,而且:$$\n\\frac{dy}{dt} = \\frac{dy}{dx}\\cdot\\frac{dx}{dt}\n$$", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$x = g(t)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 都可微,那麼 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數,而且:" + }, + { + "latex": "$$\n\\frac{dy}{dt} = \\frac{dy}{dx}\\cdot\\frac{dx}{dt}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "為什麼需要多變數連鎖律?", + "newline": "false", + "runs": [ + { + "text": "為什麼需要多變數連鎖律?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "想像你在一座山上健行,山上每個位置 $(x, y)$ 的氣溫為 $T(x, y)$。你沿著一條步道行走,你的位置隨時間 $t$ 改變:$x = x(t),\\ y = y(t)$。你想知道的是:你感受到的溫度變化速率 $\\dfrac{dT}{dt}$ 是多少?", + "newline": "false", + "runs": [ + { + "text": "想像你在一座山上健行,山上每個位置 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 的氣溫為 " + }, + { + "latex": "$T(x, y)$", + "kind": "math" + }, + { + "text": "。你沿著一條步道行走,你的位置隨時間 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變:" + }, + { + "latex": "$x = x(t),\\ y = y(t)$", + "kind": "math" + }, + { + "text": "。你想知道的是:" + }, + { + "text": "你感受到的溫度變化速率", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\dfrac{dT}{dt}$", + "kind": "math" + }, + { + "text": " 是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這就是多變數連鎖律要解決的問題:中間變數受到一個或多個自變數控制,如何計算最終變化率。", + "newline": "false", + "runs": [ + { + "text": "這就是多變數連鎖律要解決的問題:" + }, + { + "text": "中間變數受到一個或多個自變數控制,如何計算最終變化率。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 連鎖律:形式 1", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 連鎖律:形式 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1-1" + }, + { + "type": "paragraph", + "content": "第一種形式處理的情況是:$z = f(x, y)$,而 $x$ 與 $y$ 都是某單一變數 $t$ 的函數。也就是說,$x = g(t),\\ y = h(t)$,因此 $z = f(g(t), h(t))$。", + "newline": "false", + "runs": [ + { + "text": "第一種形式處理的情況是:" + }, + { + "latex": "$z = f(x, y)$", + "kind": "math" + }, + { + "text": ",而 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 都是某單一變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的函數。也就是說," + }, + { + "latex": "$x = g(t),\\ y = h(t)$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$z = f(g(t), h(t))$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(形式 1)", + "body": [ + { + "type": "paragraph", + "content": "假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(t)$ 與 $y = h(t)$ 都是 $t$ 的可微函數。則 $z$ 是 $t$ 的可微函數,而且:$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 的可微函數,且 " + }, + { + "latex": "$x = g(t)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y = h(t)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數。則 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數,而且:" + }, + { + "latex": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "直覺理解", + "body": [ + { + "type": "paragraph", + "content": "把 $\\dfrac{dz}{dt}$ 拆成兩條「路徑」:", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": " 拆成兩條「路徑」:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$t \\to x \\to z$", + "kind": "math" + }, + { + "text": ":貢獻 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + } + ], + "content": "$t \\to x \\to z$:貢獻 $\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$t \\to y \\to z$", + "kind": "math" + }, + { + "text": ":貢獻 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + } + ], + "content": "$t \\to y \\to z$:貢獻 $\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=200", + "src": "/assets/chain_tree_card1.svg" + }, + { + "type": "paragraph", + "content": "兩條路徑加起來,就是 $z$ 對 $t$ 的總變化率。這正是樹狀圖的核心概念。", + "newline": "false", + "runs": [ + { + "text": "兩條路徑加起來,就是 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的總變化率。這正是" + }, + { + "text": "樹狀圖", + "style": "bold" + }, + { + "text": "的核心概念。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_bcc9a5132e", + "label": "詳細證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設定變化量", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定變化量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當自變數 $t$ 改變 $\\Delta t$ 時,中間變數與應變數會連鎖反應:", + "newline": "false", + "runs": [ + { + "text": "當自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " 時,中間變數與應變數會連鎖反應:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "具體來說:$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "newline": "false", + "runs": [ + { + "text": "具體來說:" + }, + { + "latex": "$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們的目標是求 $\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$。", + "newline": "false", + "runs": [ + { + "text": "我們的目標是求 " + }, + { + "latex": "$\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 2:展開 $\\Delta z$(可微的定義)", + "newline": "false", + "runs": [ + { + "text": "Step 2:展開 ", + "style": "bold" + }, + { + "latex": "$\\Delta z$", + "kind": "math", + "style": "bold" + }, + { + "text": "(可微的定義)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\\Delta z$ 可以精確地寫成:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是可微函數,在點 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可以精確地寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中誤差項 $\\varepsilon_1, \\varepsilon_2$ 滿足:$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "newline": "false", + "runs": [ + { + "text": "其中誤差項 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:$f$ 的可微性讓我們能把 $\\Delta z$ 分成「線性主部」和「趨向零的誤差」兩部分。$\\varepsilon_1, \\varepsilon_2$ 描述線性近似的殘差——當步長趨近 $0$ 時,殘差也趨近 $0$。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的可微性讓我們能把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 分成「線性主部」和「趨向零的誤差」兩部分。" + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 描述線性近似的殘差——當步長趨近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,殘差也趨近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 3:兩邊除以 $\\Delta t$", + "newline": "false", + "runs": [ + { + "text": "Step 3:兩邊除以 ", + "style": "bold" + }, + { + "latex": "$\\Delta t$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把展開式兩邊同除以 $\\Delta t \\neq 0$:", + "newline": "false", + "runs": [ + { + "text": "把展開式兩邊同除以 " + }, + { + "latex": "$\\Delta t \\neq 0$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣做的目的是讓右邊出現 $\\dfrac{\\Delta x}{\\Delta t}$ 和 $\\dfrac{\\Delta y}{\\Delta t}$,當 $\\Delta t \\to 0$ 時,它們分別趨向 $\\dfrac{dx}{dt}$ 和 $\\dfrac{dy}{dt}$。", + "newline": "false", + "runs": [ + { + "text": "這樣做的目的是讓右邊出現 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\Delta y}{\\Delta t}$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時,它們分別趨向 " + }, + { + "latex": "$\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 4:令 $\\Delta t \\to 0$,處理誤差項", + "newline": "false", + "runs": [ + { + "text": "Step 4:令 ", + "style": "bold" + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",處理誤差項", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\Delta t \\to 0$,逐一看每一項的極限:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": ",逐一看每一項的極限:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$(見說明)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$(見說明)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "誤差項為何趨向 0?", + "newline": "false", + "runs": [ + { + "text": "誤差項為何趨向 0?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $g$ 可微,所以 $g$ 也連續,因此 $\\Delta t \\to 0$ 時 $\\Delta x = g(t+\\Delta t)-g(t) \\to 0$,同理 $\\Delta y \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 可微,所以 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 也連續,因此 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時 " + }, + { + "latex": "$\\Delta x = g(t+\\Delta t)-g(t) \\to 0$", + "kind": "math" + }, + { + "text": ",同理 " + }, + { + "latex": "$\\Delta y \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $(\\Delta x, \\Delta y) \\to (0,0)$,由可微定義知 $\\varepsilon_1 \\to 0$,$\\varepsilon_2 \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",由可微定義知 " + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2 \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "而 $\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$ 是有限值,所以 $\\varepsilon_1 \\cdot \\dfrac{\\Delta x}{\\Delta t} \\to 0 \\cdot \\dfrac{dx}{dt} = 0$,$\\varepsilon_2$ 同理。", + "newline": "false", + "runs": [ + { + "text": "而 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": " 是有限值,所以 " + }, + { + "latex": "$\\varepsilon_1 \\cdot \\dfrac{\\Delta x}{\\Delta t} \\to 0 \\cdot \\dfrac{dx}{dt} = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 同理。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 5:合併得到結論", + "newline": "false", + "runs": [ + { + "text": "Step 5:合併得到結論", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邏輯主線:可微 $\\Rightarrow$ $\\Delta z$ 可線性展開 $\\Rightarrow$ 除以 $\\Delta t$ $\\Rightarrow$ 取極限(誤差項消失)$\\Rightarrow$ 連鎖律", + "newline": "false", + "runs": [ + { + "text": "邏輯主線:", + "style": "bold" + }, + { + "text": "可微 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可線性展開 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 除以 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 取極限(誤差項消失)" + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 連鎖律" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0ccc22fcf7", + "label": "引導證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-6", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 1:設定變化量", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定變化量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當自變數 $t$ 改變 $\\Delta t$ 時,中間變數與應變數會連鎖反應:", + "newline": "false", + "runs": [ + { + "text": "當自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " 時,中間變數與應變數會連鎖反應:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "具體來說:$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "newline": "false", + "runs": [ + { + "text": "具體來說:" + }, + { + "latex": "$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-1::q1", + "prompt_runs": [ + { + "text": "下面哪一項是我們最終想求的?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\Delta z}{\\Delta x}$($z$ 對 $x$ 的平均變化率)" + }, + { + "key": "b", + "text": "$\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$($z$ 對 $t$ 的瞬時變化率)" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial z}{\\partial x}$($z$ 對 $x$ 的偏導)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-6", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 2:展開 $\\Delta z$(可微的定義)", + "newline": "false", + "runs": [ + { + "text": "Step 2:展開 ", + "style": "bold" + }, + { + "latex": "$\\Delta z$", + "kind": "math", + "style": "bold" + }, + { + "text": "(可微的定義)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\\Delta z$ 可以精確地寫成:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是可微函數,在點 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可以精確地寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中誤差項 $\\varepsilon_1, \\varepsilon_2$ 滿足:$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "newline": "false", + "runs": [ + { + "text": "其中誤差項 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:可微性讓我們能把 $\\Delta z$ 分成「線性主部」和「可以忽略的誤差」兩部分。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":可微性讓我們能把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 分成「線性主部」和「可以忽略的誤差」兩部分。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-2::q2", + "prompt_runs": [ + { + "text": "為什麼需要 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 這兩個誤差項?" + } + ], + "options": [ + { + "key": "a", + "text": "因為偏導數本身就不準確" + }, + { + "key": "b", + "text": "因為 $f$ 不一定是線性函數,線性近似有殘差,$\\varepsilon$ 描述這個殘差在 $\\Delta x, \\Delta y \\to 0$ 時消失" + }, + { + "key": "c", + "text": "因為 $\\Delta t$ 不夠小" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-6", + "step": "step-2" + } + ], + "gate_from": "flow-6::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 3:兩邊除以 $\\Delta t$", + "newline": "false", + "runs": [ + { + "text": "Step 3:兩邊除以 ", + "style": "bold" + }, + { + "latex": "$\\Delta t$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把 $\\Delta z$ 的展開式兩邊同除以 $\\Delta t \\neq 0$:", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 的展開式兩邊同除以 " + }, + { + "latex": "$\\Delta t \\neq 0$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-3::q3", + "prompt_runs": [ + { + "text": "這樣做的目的是讓右邊出現 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\Delta y}{\\Delta t}$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時,它們分別趨向:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{dx}{dt}$ 和 $\\dfrac{dy}{dt}$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$" + }, + { + "key": "c", + "text": "$0$ 和 $0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-6", + "step": "step-3" + } + ], + "gate_from": "flow-6::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 4:令 $\\Delta t \\to 0$,處理誤差項", + "newline": "false", + "runs": [ + { + "text": "Step 4:令 ", + "style": "bold" + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",處理誤差項", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\Delta t \\to 0$,逐一看每一項的極限:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": ",逐一看每一項的極限:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$(見說明)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + }, + { + "text": "為什麼 ", + "style": "bold" + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": "?", + "style": "bold" + } + ], + "content": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$(見說明)為什麼 $\\varepsilon_1 \\to 0$?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $g$ 可微,所以 $g$ 也連續,因此當 $\\Delta t \\to 0$ 時,$\\Delta x = g(t+\\Delta t) - g(t) \\to 0$。同理 $\\Delta y \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 可微,所以 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 也連續,因此當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$\\Delta x = g(t+\\Delta t) - g(t) \\to 0$", + "kind": "math" + }, + { + "text": "。同理 " + }, + { + "latex": "$\\Delta y \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $(\\Delta x, \\Delta y) \\to (0,0)$,由可微定義知 $\\varepsilon_1 \\to 0$,$\\varepsilon_2 \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",由可微定義知 " + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2 \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-4::q4", + "prompt_runs": [ + { + "text": "那麼誤差項 " + }, + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 的極限是多少?" + } + ], + "options": [ + { + "key": "a", + "text": "$0$,因為 $\\varepsilon_1 \\to 0$ 而 $\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$(有限值),有限值乘以 $0$ 等於 $0$" + }, + { + "key": "b", + "text": "不確定,因為 $0 \\times \\infty$ 型不定式" + }, + { + "key": "c", + "text": "$\\dfrac{dx}{dt}$,因為 $\\varepsilon_1$ 消失了" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-6", + "step": "step-4" + } + ], + "gate_from": "flow-6::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 5:合併得到結論", + "newline": "false", + "runs": [ + { + "text": "Step 5:合併得到結論", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把四項的極限合併:", + "newline": "false", + "runs": [ + { + "text": "把四項的極限合併:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "整個證明的邏輯主線:", + "newline": "false", + "runs": [ + { + "text": "整個證明的邏輯主線:", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "可微 $\\Rightarrow$ $\\Delta z$ 可線性展開 $\\Rightarrow$ 除以 $\\Delta t$ $\\Rightarrow$ 取極限(誤差項消失)$\\Rightarrow$ 連鎖律", + "newline": "false", + "runs": [ + { + "text": "可微 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可線性展開 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 除以 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 取極限(誤差項消失)" + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 連鎖律" + } + ] + } + ], + "gate_from": "flow-6::step-4::q4" + } + ] + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "常見錯誤提醒", + "body": [ + { + "type": "paragraph", + "content": "注意符號的區別:", + "newline": "false", + "runs": [ + { + "text": "注意符號的區別:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "text": "全微分", + "style": "bold" + }, + { + "text": "," + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 只透過 " + }, + { + "latex": "$x(t), y(t)$", + "kind": "math" + }, + { + "text": " 依賴 " + }, + { + "latex": "$t$", + "kind": "math" + } + ], + "content": "$\\dfrac{dz}{dt}$:全微分,$z$ 只透過 $x(t), y(t)$ 依賴 $t$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "text": "偏微分", + "style": "bold" + }, + { + "text": ",只對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 做偏微分,其他變數視為常數" + } + ], + "content": "$\\dfrac{\\partial z}{\\partial t}$:偏微分,只對 $t$ 做偏微分,其他變數視為常數" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "兩者意義不同,在連鎖律中用錯會導致錯誤結果。", + "newline": "false", + "runs": [ + { + "text": "兩者意義不同,在連鎖律中用錯會導致錯誤結果。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:\n\n\n\n不會的話可以看看下面的解法!\n\n\n**Step 1:列出連鎖律公式**\n\n$$\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3$$\n\n$$\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t$$\n\n**Step 3:代入公式**\n\n$$\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)$$\n\n**Step 4:代入 $t = 0$(此時 $x = 0,\\ y = 1$)**\n\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6$$\n\n\n\n\n\n連鎖律公式為 $\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$。\n\n先求偏導數:$\\dfrac{\\partial z}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^2y + 3xy^4) = ?$\n\na. $2x + 3y^4$\nb. $2xy + 3y^4$\nc. $x^2 + 12xy^3$\nd. $2y + 3y^4$\n\n\n\n\n再求:$\\dfrac{\\partial z}{\\partial y} = \\dfrac{\\partial}{\\partial y}(x^2y + 3xy^4) = ?$\n\n\n\n\n\n求對 $t$ 的導數:$\\dfrac{dx}{dt} = \\dfrac{d}{dt}\\sin(2t) = ?$\n\n\n\n\n\n$\\dfrac{dy}{dt} = \\dfrac{d}{dt}\\cos t = ?$\n\n\n\n\n\n代入 $t = 0$:此時 $x = \\sin 0 = 0$,$y = \\cos 0 = 1$。\n\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)$$\n\n代入 $x=0,\\ y=1$,結果是?\n\na. $3$\nb. $12$\nc. $6$\nd. $0$\n\n\n\n\n**答案:**\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6$$\n\n\n\n\n---\n\n\n註解\n形式 1 小結\n- 適用情況:$z = f(x,y)$,且 $x, y$ 均為**同一變數** $t$ 的函數\n- 公式:$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$\n- 記憶口訣:**有幾個中間變數,就有幾項相加**\n\n\n---\n\n## 2️⃣ 連鎖律:形式 2\n\n形式 1 的 $x, y$ 只依賴一個自變數 $t$。\n\n**當 $x, y$ 同時依賴兩個自變數 $s, t$ 時,形式 1 就不夠用了。**\n\n此時 $z = f(x,y)$,$x = g(s,t)$,$y = h(s,t)$,我們要求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n計算 $\\dfrac{\\partial z}{\\partial t}$ 時,可以把 $s$ 視為常數,只觀察 $t$ 的變化;此時就像對單一變數套用形式 1。\n\n\n定理\n連鎖律(形式 2)\n假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(s,t)$、$y = h(s,t)$ 都是 $s, t$ 的可微函數,則:\n$$ \\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s} $$\n$$ \\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t} $$\n\n![](/assets/chain_tree.svg)\n\n---\n\n### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n\n\n\n**Step 1:列出連鎖律**\n\n$$\\frac{\\partial z}{\\partial s} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}, \\qquad\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y$$\n\n$$\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2$$\n\n**Step 3:代入**\n\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)$$\n\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)$$\n\n\n\n\n\n先求 $z = e^x \\sin y$ 對中間變數的偏導:$\\dfrac{\\partial z}{\\partial x} = ?$\n\na. $e^x \\cos y$\nb. $e^x \\sin y$\nc. $\\sin y$\nd. $xe^x \\sin y$\n\n\n\n\n$\\dfrac{\\partial z}{\\partial y} = ?$\n\n\n\n\n\n再求對自變數 $s$ 的偏導(其中 $x = st^2$,$y = s^2t$):\n$\\dfrac{\\partial x}{\\partial s} = ?$,$\\dfrac{\\partial y}{\\partial s} = ?$\n\na. $\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$\nb. $\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$\nc. $\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\n\n\n\n\n代入連鎖律公式,$\\dfrac{\\partial z}{\\partial s}$ 是哪一個?\n\na. $t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$\nb. $2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$\nc. $t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$$\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)$$\n\n\n\n\n---\n\n\n註解\n形式 2 小結\n- 適用情況:$z = f(x,y)$,$x, y$ 均為**兩個自變數** $s, t$ 的函數\n- 每個偏導(對 $s$ 或對 $t$)各有兩項\n\n\n---\n\n## 3️⃣ 連鎖律:一般形式\n\n推廣至最一般的情況:\n\n- 應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數\n- 每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數\n\n最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。\n\n\n定理\n連鎖律(一般形式)\n假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。\n則對每個 $i = 1, 2, \\dots, m$:\n$$ \\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i} $$\n\n固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。 \n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$ m\\times n $個乘積項。 \n---\n\n### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = x^2y + 3xy^4$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = \\sin(2t)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = \\cos t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$t = 0$", + "kind": "math" + }, + { + "text": " 時的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出答案:" + } + ], + "answers": [ + "6" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "不會的話可以看看下面的解法!", + "newline": "false", + "runs": [ + { + "text": "不會的話可以看看下面的解法!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_90548e97f1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律公式", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:代入公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:代入公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $t = 0$(此時 $x = 0,\\ y = 1$)", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$t = 0$", + "kind": "math", + "style": "bold" + }, + { + "text": "(此時 ", + "style": "bold" + }, + { + "latex": "$x = 0,\\ y = 1$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:\n\n\n\n不會的話可以看看下面的解法!" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ad59aa11f2", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-7", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "連鎖律公式為 $\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$。", + "newline": "false", + "runs": [ + { + "text": "連鎖律公式為 " + }, + { + "latex": "$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-7::step-1::q1", + "prompt_runs": [ + { + "text": "先求偏導數:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^2y + 3xy^4) = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$2x + 3y^4$" + }, + { + "key": "b", + "text": "$2xy + 3y^4$" + }, + { + "key": "c", + "text": "$x^2 + 12xy^3$" + }, + { + "key": "d", + "text": "$2y + 3y^4$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-7", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-2::q2", + "prompt_runs": [ + { + "text": "再求:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = \\dfrac{\\partial}{\\partial y}(x^2y + 3xy^4) = ?$", + "kind": "math" + } + ], + "answers": [ + "x^2+12*x*y^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-2" + } + ], + "gate_from": "flow-7::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-3::q3", + "prompt_runs": [ + { + "text": "求對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的導數:" + }, + { + "latex": "$\\dfrac{dx}{dt} = \\dfrac{d}{dt}\\sin(2t) = ?$", + "kind": "math" + } + ], + "answers": [ + "2*cos(2*t)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-3" + } + ], + "gate_from": "flow-7::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-4::q4", + "prompt_runs": [ + { + "latex": "$\\dfrac{dy}{dt} = \\dfrac{d}{dt}\\cos t = ?$", + "kind": "math" + } + ], + "answers": [ + "-sin(t)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-4" + } + ], + "gate_from": "flow-7::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入 $t = 0$:此時 $x = \\sin 0 = 0$,$y = \\cos 0 = 1$。", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$t = 0$", + "kind": "math" + }, + { + "text": ":此時 " + }, + { + "latex": "$x = \\sin 0 = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = \\cos 0 = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-7::step-5::q5", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$x=0,\\ y=1$", + "kind": "math" + }, + { + "text": ",結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$3$" + }, + { + "key": "b", + "text": "$12$" + }, + { + "key": "c", + "text": "$6$" + }, + { + "key": "d", + "text": "$0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-7", + "step": "step-5" + } + ], + "gate_from": "flow-7::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-7::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "形式 1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "適用情況:" + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 均為" + }, + { + "text": "同一變數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "適用情況:$z = f(x,y)$,且 $x, y$ 均為同一變數 $t$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "公式:" + }, + { + "latex": "$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$", + "kind": "math" + } + ], + "content": "公式:$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "記憶口訣:" + }, + { + "text": "有幾個中間變數,就有幾項相加", + "style": "bold" + } + ], + "content": "記憶口訣:有幾個中間變數,就有幾項相加" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 連鎖律:形式 2", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 連鎖律:形式 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2-2" + }, + { + "type": "paragraph", + "content": "形式 1 的 $x, y$ 只依賴一個自變數 $t$。", + "newline": "false", + "runs": [ + { + "text": "形式 1 的 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 只依賴一個自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當 $x, y$ 同時依賴兩個自變數 $s, t$ 時,形式 1 就不夠用了。", + "newline": "false", + "runs": [ + { + "text": "當 ", + "style": "bold" + }, + { + "latex": "$x, y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 同時依賴兩個自變數 ", + "style": "bold" + }, + { + "latex": "$s, t$", + "kind": "math", + "style": "bold" + }, + { + "text": " 時,形式 1 就不夠用了。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此時 $z = f(x,y)$,$x = g(s,t)$,$y = h(s,t)$,我們要求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。", + "newline": "false", + "runs": [ + { + "text": "此時 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x = g(s,t)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = h(s,t)$", + "kind": "math" + }, + { + "text": ",我們要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "計算 $\\dfrac{\\partial z}{\\partial t}$ 時,可以把 $s$ 視為常數,只觀察 $t$ 的變化;此時就像對單一變數套用形式 1。", + "newline": "false", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": " 時,可以把 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 視為常數,只觀察 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的變化;此時就像對單一變數套用形式 1。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(形式 2)", + "body": [ + { + "type": "paragraph", + "content": "假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(s,t)$、$y = h(s,t)$ 都是 $s, t$ 的可微函數,則:$$\n\\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}\n$$$$\n\\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 的可微函數,且 " + }, + { + "latex": "$x = g(s,t)$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y = h(s,t)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 的可微函數,則:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "picture", + "alt": "", + "src": "/assets/chain_tree.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n\n\n\n**Step 1:列出連鎖律**\n\n$$\\frac{\\partial z}{\\partial s} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}, \\qquad\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y$$\n\n$$\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2$$\n\n**Step 3:代入**\n\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)$$\n\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)$$\n\n\n\n\n\n先求 $z = e^x \\sin y$ 對中間變數的偏導:$\\dfrac{\\partial z}{\\partial x} = ?$\n\na. $e^x \\cos y$\nb. $e^x \\sin y$\nc. $\\sin y$\nd. $xe^x \\sin y$\n\n\n\n\n$\\dfrac{\\partial z}{\\partial y} = ?$\n\n\n\n\n\n再求對自變數 $s$ 的偏導(其中 $x = st^2$,$y = s^2t$):\n$\\dfrac{\\partial x}{\\partial s} = ?$,$\\dfrac{\\partial y}{\\partial s} = ?$\n\na. $\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$\nb. $\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$\nc. $\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\n\n\n\n\n代入連鎖律公式,$\\dfrac{\\partial z}{\\partial s}$ 是哪一個?\n\na. $t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$\nb. $2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$\nc. $t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$$\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)$$\n\n\n\n\n---\n\n\n註解\n形式 2 小結\n- 適用情況:$z = f(x,y)$,$x, y$ 均為**兩個自變數** $s, t$ 的函數\n- 每個偏導(對 $s$ 或對 $t$)各有兩項\n\n\n---\n\n## 3️⃣ 連鎖律:一般形式\n\n推廣至最一般的情況:\n\n- 應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數\n- 每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數\n\n最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。\n\n\n定理\n連鎖律(一般形式)\n假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。\n則對每個 $i = 1, 2, \\dots, m$:\n$$ \\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i} $$\n\n固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。 \n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$ m\\times n $個乘積項。 \n---\n\n### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = e^x \\sin y$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = st^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = s^2 t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著寫出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 表示,化簡後):" + } + ], + "answers": [ + "t^2*e^(s*t^2)*sin(s^2*t)+2*s*t*e^(s*t^2)*cos(s^2*t)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f0e2037481", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:代入", + "newline": "false", + "runs": [ + { + "text": "Step 3:代入", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_4f474d4a19", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-8", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-1::q1", + "prompt_runs": [ + { + "text": "先求 " + }, + { + "latex": "$z = e^x \\sin y$", + "kind": "math" + }, + { + "text": " 對中間變數的偏導:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$e^x \\cos y$" + }, + { + "key": "b", + "text": "$e^x \\sin y$" + }, + { + "key": "c", + "text": "$\\sin y$" + }, + { + "key": "d", + "text": "$xe^x \\sin y$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-8", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-8::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = ?$", + "kind": "math" + } + ], + "answers": [ + "e^x*cos(y)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-8", + "step": "step-2" + } + ], + "gate_from": "flow-8::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-3::q3", + "prompt_runs": [ + { + "text": "再求對自變數 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 的偏導(其中 " + }, + { + "latex": "$x = st^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = s^2t$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s} = ?$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial s} = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-8", + "step": "step-3" + } + ], + "gate_from": "flow-8::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-4::q4", + "prompt_runs": [ + { + "text": "代入連鎖律公式," + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$" + }, + { + "key": "b", + "text": "$2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$" + }, + { + "key": "c", + "text": "$t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-8", + "step": "step-4" + } + ], + "gate_from": "flow-8::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)\n$$$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-8::step-4::q4" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "形式 2 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "適用情況:" + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 均為" + }, + { + "text": "兩個自變數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "適用情況:$z = f(x,y)$,$x, y$ 均為兩個自變數 $s, t$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "每個偏導(對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 或對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": ")各有兩項" + } + ], + "content": "每個偏導(對 $s$ 或對 $t$)各有兩項" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 連鎖律:一般形式", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 連鎖律:一般形式", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "推廣至最一般的情況:", + "newline": "false", + "runs": [ + { + "text": "推廣至最一般的情況:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "應變數 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 個中間變數 " + }, + { + "latex": "$x_1, \\dots, x_n$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "每個 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 又是 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 個自變數 " + }, + { + "latex": "$t_1, \\dots, t_m$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。", + "newline": "false", + "runs": [ + { + "text": "最終公式對每個 " + }, + { + "latex": "$t_i$", + "kind": "math" + }, + { + "text": " 都有 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 項(每個中間變數 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 各貢獻一項)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(一般形式)", + "body": [ + { + "type": "paragraph", + "content": "假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。則對每個 $i = 1, 2, \\dots, m$:$$\n\\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x_1, x_2, \\dots, x_n$", + "kind": "math" + }, + { + "text": " 的可微函數,且每個 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$t_1, t_2, \\dots, t_m$", + "kind": "math" + }, + { + "text": " 的可微函數。則對每個 " + }, + { + "latex": "$i = 1, 2, \\dots, m$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。\n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$m\\times n$個乘積項。\n", + "newline": "true", + "runs": [ + { + "text": "固定一個 " + }, + { + "latex": "$t_i$", + "kind": "math" + }, + { + "text": " 時,公式右邊會對所有中間變數" + }, + { + "latex": "$x_1,x_2,\\ldots,x_n$", + "kind": "math" + }, + { + "text": " 加總,因此每一條公式有 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 個乘積項。" + }, + { + "newline": "true" + }, + { + "text": "如果把 " + }, + { + "latex": "$t_1,t_2,\\ldots,t_m$", + "kind": "math" + }, + { + "text": " 的公式全部列出來,會有 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 條公式,每條 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 項,所以全部展開共有" + }, + { + "latex": "$m\\times n$", + "kind": "math" + }, + { + "text": "個乘積項。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。", + "newline": "false", + "runs": [ + { + "text": "寫出連鎖律在以下情況下的形式:" + }, + { + "latex": "$w = f(x, y, z, t)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": " 共有幾項相加?" + } + ], + "answers": [ + "4" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入項數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_bab1488cbd", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "分析變數結構", + "newline": "false", + "runs": [ + { + "text": "分析變數結構", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "中間變數:" + }, + { + "latex": "$x, y, z, t$", + "kind": "math" + }, + { + "text": "(共 " + }, + { + "latex": "$n = 4$", + "kind": "math" + }, + { + "text": " 個)" + } + ], + "content": "中間變數:$x, y, z, t$(共 $n = 4$ 個)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "自變數:" + }, + { + "latex": "$u, v$", + "kind": "math" + }, + { + "text": "(共 " + }, + { + "latex": "$m = 2$", + "kind": "math" + }, + { + "text": " 個)" + } + ], + "content": "自變數:$u, v$(共 $m = 2$ 個)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。", + "newline": "false", + "runs": [ + { + "text": "樹狀圖讀法:從 " + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 出發,沿著每條路徑往下走到 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$v$", + "kind": "math" + }, + { + "text": ",把路徑上的偏導數相乘,再把所有路徑加起來。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex4.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_db1a3d11c9", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-9", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "一般形式的連鎖律:項數等於中間變數的個數。", + "newline": "false", + "runs": [ + { + "text": "一般形式的連鎖律:項數等於" + }, + { + "text": "中間變數的個數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-9::step-1::q1", + "prompt_runs": [ + { + "text": "這題的中間變數是哪些?" + } + ], + "options": [ + { + "key": "a", + "text": "$u, v$(2 個)" + }, + { + "key": "b", + "text": "$x, y, z, t$(4 個)" + }, + { + "key": "c", + "text": "$w$(1 個)" + }, + { + "key": "d", + "text": "$x, y, z, t, u, v$(6 個)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-9", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": " 共有 4 項,對應 4 個中間變數,每項是「" + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 對中間變數的偏導」乘以「中間變數對 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 的偏導」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-9::step-2::q2", + "prompt_runs": [ + { + "text": "下列哪一個是完整的 " + }, + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": "?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-9", + "step": "step-2" + } + ], + "gate_from": "flow-9::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-9::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$u = x^4 y + y^2 z^3$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial u}{\\partial s}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$r=2, s=1, t=0$", + "kind": "math" + }, + { + "text": " 時的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出答案:" + } + ], + "answers": [ + "192" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_739644c706", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律(用樹狀圖輔助)", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律(用樹狀圖輔助)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex5.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算對中間變數的偏導", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算對中間變數的偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算對 $s$ 的偏導", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算對 ", + "style": "bold" + }, + { + "latex": "$s$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$r=2, s=1, t=0$", + "kind": "math", + "style": "bold" + }, + { + "text": "(此時 ", + "style": "bold" + }, + { + "latex": "$x=2,\\ y=2,\\ z=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ce79fc3d89", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-10", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-1::q1", + "prompt_runs": [ + { + "text": "先求對中間變數的偏導:" + }, + { + "latex": "$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$", + "kind": "math" + } + ], + "answers": [ + "4*x^3*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial y} = ?$", + "kind": "math" + } + ], + "answers": [ + "x^4+2*y*z^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-2" + } + ], + "gate_from": "flow-10::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-3::q3", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial z} = ?$", + "kind": "math" + } + ], + "answers": [ + "3*y^2*z^2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-3" + } + ], + "gate_from": "flow-10::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-10::step-4::q4", + "prompt_runs": [ + { + "text": "再求對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 的偏導(其中 " + }, + { + "latex": "$x = rse^t$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = rs^2e^{-t}$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$z = r^2s\\sin t$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 分別是哪一組?" + } + ], + "options": [ + { + "key": "a", + "text": "$re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$" + }, + { + "key": "b", + "text": "$re^t,\\ 2rse^{-t},\\ r^2\\sin t$" + }, + { + "key": "c", + "text": "$se^t,\\ 2rse^{-t},\\ r^2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-10", + "step": "step-4" + } + ], + "gate_from": "flow-10::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$r=2,\\ s=1,\\ t=0$", + "kind": "math" + }, + { + "text": ",此時 " + }, + { + "latex": "$x=2,\\ y=2,\\ z=0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-10::step-5::q5", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial s}$", + "kind": "math" + }, + { + "text": " 的計算結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$128$" + }, + { + "key": "b", + "text": "$64$" + }, + { + "key": "c", + "text": "$192$" + }, + { + "key": "d", + "text": "$256$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-10", + "step": "step-5" + } + ], + "gate_from": "flow-10::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-10::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 為可微函數,證明 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a8bf37848a", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設中間變數", + "newline": "false", + "runs": [ + { + "text": "Step 1:設中間變數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x = s^2 - t^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = t^2 - s^2$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$g(s,t) = f(x,y)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$y = -x$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:用連鎖律對 $s$ 微分", + "newline": "false", + "runs": [ + { + "text": "Step 2:用連鎖律對 ", + "style": "bold" + }, + { + "latex": "$s$", + "kind": "math", + "style": "bold" + }, + { + "text": " 微分", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:用連鎖律對 $t$ 微分", + "newline": "false", + "runs": [ + { + "text": "Step 3:用連鎖律對 ", + "style": "bold" + }, + { + "latex": "$t$", + "kind": "math", + "style": "bold" + }, + { + "text": " 微分", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入驗證", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入驗證", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7668e6674f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-11", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $x = s^2 - t^2$,$y = t^2 - s^2$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x = s^2 - t^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = t^2 - s^2$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$", + "newline": "false", + "runs": [ + { + "text": "用連鎖律對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-1::q1", + "prompt_runs": [ + { + "text": "請問 " + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial s}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-11", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-2::q2", + "prompt_runs": [ + { + "text": "再對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial t}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-11", + "step": "step-2" + } + ], + "gate_from": "flow-11::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-3::q3", + "prompt_runs": [ + { + "text": "現在代入 " + }, + { + "latex": "$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$", + "kind": "math" + }, + { + "text": ",展開後各項是否完全相消?" + } + ], + "options": [ + { + "key": "a", + "text": "是,結果為 $0$" + }, + { + "key": "b", + "text": "否,結果不為 $0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-11", + "step": "step-3" + } + ], + "gate_from": "flow-11::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案(展開驗證):$$\nt(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "答案(展開驗證):", + "style": "bold" + }, + { + "latex": "$$\nt(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-11::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 具有連續的二階偏導數,且 " + }, + { + "latex": "$x = r^2 + s^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2rs$", + "kind": "math" + }, + { + "text": ",求:(a) " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math" + }, + { + "text": ",(b) " + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 請先寫出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$r, s$", + "kind": "math" + }, + { + "text": " 和偏導符號表示):" + } + ], + "answers": [ + "2*r*dz/dx+2*s*dz/dy" + ], + "normalize": [ + "nospace" + ], + "placeholder": "例:2r(dz/dx)+2s(dz/∂y)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_76da149e19", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "(a) 計算 $\\dfrac{\\partial z}{\\partial r}$", + "newline": "false", + "runs": [ + { + "text": "(a) 計算 ", + "style": "bold" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex7.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$", + "newline": "false", + "runs": [ + { + "text": "(b) 計算 ", + "style": "bold" + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對 (a) 再對 $r$ 微分,使用乘法法則:", + "newline": "false", + "runs": [ + { + "text": "對 (a) 再對 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 微分,使用乘法法則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "再次使用連鎖律:", + "newline": "false", + "runs": [ + { + "text": "再次使用連鎖律:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由連續二階偏導數,混合偏導相等,代入整理:", + "newline": "false", + "runs": [ + { + "text": "由連續二階偏導數,混合偏導相等,代入整理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_8af43e2ac6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-12", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$", + "newline": "false", + "runs": [ + { + "text": "(a) 由連鎖律:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-12::step-1::q1", + "prompt_runs": [ + { + "text": "其中 " + }, + { + "latex": "$x = r^2 + s^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2rs$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial r}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial r}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-12", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "(b) 對上式再對 $r$ 微分,用乘法法則:$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "text": "(b) 對上式再對 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 微分,用乘法法則:" + }, + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-12::step-2::q2", + "prompt_runs": [ + { + "text": "現在需要再用連鎖律展開 " + }, + { + "latex": "$\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$", + "kind": "math" + }, + { + "text": ",結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-12", + "step": "step-2" + } + ], + "gate_from": "flow-12::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。", + "newline": "false", + "runs": [ + { + "text": "同理 " + }, + { + "latex": "$\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-12::step-3::q3", + "prompt_runs": [ + { + "text": "由連續二階偏導," + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$", + "kind": "math" + }, + { + "text": ",代入整理後," + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$", + "kind": "math" + }, + { + "text": " 項的係數是?" + } + ], + "answers": [ + "8*r*s" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-12", + "step": "step-3" + } + ], + "gate_from": "flow-12::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-12::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "一般形式小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "公式項數 = 中間變數個數 " + }, + { + "latex": "$n$", + "kind": "math" + } + ], + "content": "公式項數 = 中間變數個數 $n$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "直接套用樹狀圖:路徑乘積求和" + } + ], + "content": "直接套用樹狀圖:路徑乘積求和" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "二階偏導需" + }, + { + "text": "兩次", + "style": "bold" + }, + { + "text": "使用連鎖律,注意混合偏導相等的條件(連續二階偏導)" + } + ], + "content": "二階偏導需兩次使用連鎖律,注意混合偏導相等的條件(連續二階偏導)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 隱函數微分", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 隱函數微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。", + "newline": "false", + "runs": [ + { + "text": "假設方程式 " + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math" + }, + { + "text": " 將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 隱式定義為 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的可微函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的函數,對方程式兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 微分,使用連鎖律(形式 1):" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$\\dfrac{dx}{dx} = 1$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$F_y \\neq 0$", + "kind": "math" + }, + { + "text": ",可解出:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "隱函數定理", + "body": [ + { + "type": "paragraph", + "content": "若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F$", + "kind": "math" + }, + { + "text": " 在包含點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的某個圓盤區域內滿足:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F(a,b) = 0$", + "kind": "math" + } + ], + "content": "$F(a,b) = 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F_y(a,b) \\neq 0$", + "kind": "math" + } + ], + "content": "$F_y(a,b) \\neq 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": " 在該區域內連續" + } + ], + "content": "$F_x$ 與 $F_y$ 在該區域內連續" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "newline": "false", + "runs": [ + { + "text": "則在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近," + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math" + }, + { + "text": " 可將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 表示為 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的函數,其導數為:" + }, + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "求 $y'$,若 $x^3 + y^3 = 6xy$。", + "newline": "false", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$y'$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$x^3 + y^3 = 6xy$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$y'$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "-(x^2-2*y)/(y^2-2*x)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_16f618c2c3", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:整理成 $F(x,y) = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 1:整理成 ", + "style": "bold" + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y) = x^3 + y^3 - 6xy = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y) = x^3 + y^3 - 6xy = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d2a98b7336", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-13", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $F(x,y) = x^3 + y^3 - 6xy$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$F(x,y) = x^3 + y^3 - 6xy$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-13::step-1::q1", + "prompt_runs": [ + { + "text": "隱函數微分公式為 " + }, + { + "latex": "$\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": " 是?" + } + ], + "answers": [ + "3*x^2-6*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-13", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-13::step-2::q2", + "prompt_runs": [ + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": " 是?" + } + ], + "answers": [ + "3*y^2-6*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-13", + "step": "step-2" + } + ], + "gate_from": "flow-13::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-13::step-3::q3", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$y' = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",化簡後是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{x^2 + 2y}{y^2 + 2x}$" + }, + { + "key": "b", + "text": "$-\\dfrac{x^2 - 2y}{y^2 - 2x}$" + }, + { + "key": "c", + "text": "$\\dfrac{x^2 - 2y}{y^2 - 2x}$" + }, + { + "key": "d", + "text": "$-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-13", + "step": "step-3" + } + ], + "gate_from": "flow-13::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\ny' = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\ny' = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-13::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 三變數隱函數", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 三變數隱函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 隱式定義為 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。", + "newline": "false", + "runs": [ + { + "text": "對方程式對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微分時,固定 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "。此時 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 本身對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的導數為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",而 " + }, + { + "latex": "$z=z(x,y)$", + "kind": "math" + }, + { + "text": " 會隨 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 改變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F_z \\neq 0$", + "kind": "math" + }, + { + "text": ",解出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": ";同理可得 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "三變數隱微分公式", + "body": [ + { + "type": "paragraph", + "content": "若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}\n$$", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$F_z \\neq 0$", + "kind": "math" + }, + { + "text": ",則:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "公式記憶法", + "body": [ + { + "type": "paragraph", + "content": "分母永遠是對 $z$ 的偏導 $F_z$,分子是對要求變數的偏導,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。", + "newline": "false", + "runs": [ + { + "text": "分母永遠是" + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$F_z$", + "kind": "math" + }, + { + "text": ",分子是" + }, + { + "text": "對要求變數的偏導", + "style": "bold" + }, + { + "text": ",最前面加負號。可類比二變數公式 " + }, + { + "latex": "$\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 換成 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 即可。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。", + "newline": "false", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$x^3 + y^3 + z^3 + 6xyz + 4 = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "-(x^2+2*y*z)/(z^2+2*x*y)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7b4786a8d0", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義 $F$", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義 ", + "style": "bold" + }, + { + "latex": "$F$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c53360cb29", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-14", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-1::q1", + "prompt_runs": [ + { + "text": "令 " + }, + { + "latex": "$F = x^3 + y^3 + z^3 + 6xyz + 4$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*x^2+6*y*z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-2::q2", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*y^2+6*x*z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-2" + } + ], + "gate_from": "flow-14::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-3::q3", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$F_z$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*z^2+6*x*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-3" + } + ], + "gate_from": "flow-14::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-14::step-4::q4", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$", + "kind": "math" + }, + { + "text": ",化簡後是?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$" + }, + { + "key": "b", + "text": "$-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$" + }, + { + "key": "c", + "text": "$\\dfrac{x^2 + 2yz}{z^2 + 2xy}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-14", + "step": "step-4" + } + ], + "gate_from": "flow-14::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-14::step-5::q5", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$", + "kind": "math" + }, + { + "text": ",化簡後是?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$" + }, + { + "key": "b", + "text": "$\\dfrac{y^2 + 2xz}{z^2 + 2xy}$" + }, + { + "key": "c", + "text": "$-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-14", + "step": "step-5" + } + ], + "gate_from": "flow-14::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-14::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣ 連鎖律:形式 1", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣ 連鎖律:形式 1", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 連鎖律:形式 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1-1" + }, + { + "type": "paragraph", + "content": "第一種形式處理的情況是:$z = f(x, y)$,而 $x$ 與 $y$ 都是某單一變數 $t$ 的函數。也就是說,$x = g(t),\\ y = h(t)$,因此 $z = f(g(t), h(t))$。", + "newline": "false", + "runs": [ + { + "text": "第一種形式處理的情況是:" + }, + { + "latex": "$z = f(x, y)$", + "kind": "math" + }, + { + "text": ",而 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 都是某單一變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的函數。也就是說," + }, + { + "latex": "$x = g(t),\\ y = h(t)$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$z = f(g(t), h(t))$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(形式 1)", + "body": [ + { + "type": "paragraph", + "content": "假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(t)$ 與 $y = h(t)$ 都是 $t$ 的可微函數。則 $z$ 是 $t$ 的可微函數,而且:$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 的可微函數,且 " + }, + { + "latex": "$x = g(t)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y = h(t)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數。則 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的可微函數,而且:" + }, + { + "latex": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "直覺理解", + "body": [ + { + "type": "paragraph", + "content": "把 $\\dfrac{dz}{dt}$ 拆成兩條「路徑」:", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": " 拆成兩條「路徑」:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$t \\to x \\to z$", + "kind": "math" + }, + { + "text": ":貢獻 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + } + ], + "content": "$t \\to x \\to z$:貢獻 $\\dfrac{\\partial z}{\\partial x}\\cdot\\dfrac{dx}{dt}$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$t \\to y \\to z$", + "kind": "math" + }, + { + "text": ":貢獻 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + } + ], + "content": "$t \\to y \\to z$:貢獻 $\\dfrac{\\partial z}{\\partial y}\\cdot\\dfrac{dy}{dt}$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=200", + "src": "/assets/chain_tree_card1.svg" + }, + { + "type": "paragraph", + "content": "兩條路徑加起來,就是 $z$ 對 $t$ 的總變化率。這正是樹狀圖的核心概念。", + "newline": "false", + "runs": [ + { + "text": "兩條路徑加起來,就是 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的總變化率。這正是" + }, + { + "text": "樹狀圖", + "style": "bold" + }, + { + "text": "的核心概念。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_bcc9a5132e", + "label": "詳細證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設定變化量", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定變化量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當自變數 $t$ 改變 $\\Delta t$ 時,中間變數與應變數會連鎖反應:", + "newline": "false", + "runs": [ + { + "text": "當自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " 時,中間變數與應變數會連鎖反應:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "具體來說:$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "newline": "false", + "runs": [ + { + "text": "具體來說:" + }, + { + "latex": "$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們的目標是求 $\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$。", + "newline": "false", + "runs": [ + { + "text": "我們的目標是求 " + }, + { + "latex": "$\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 2:展開 $\\Delta z$(可微的定義)", + "newline": "false", + "runs": [ + { + "text": "Step 2:展開 ", + "style": "bold" + }, + { + "latex": "$\\Delta z$", + "kind": "math", + "style": "bold" + }, + { + "text": "(可微的定義)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\\Delta z$ 可以精確地寫成:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是可微函數,在點 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可以精確地寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中誤差項 $\\varepsilon_1, \\varepsilon_2$ 滿足:$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "newline": "false", + "runs": [ + { + "text": "其中誤差項 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:$f$ 的可微性讓我們能把 $\\Delta z$ 分成「線性主部」和「趨向零的誤差」兩部分。$\\varepsilon_1, \\varepsilon_2$ 描述線性近似的殘差——當步長趨近 $0$ 時,殘差也趨近 $0$。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的可微性讓我們能把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 分成「線性主部」和「趨向零的誤差」兩部分。" + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 描述線性近似的殘差——當步長趨近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 時,殘差也趨近 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 3:兩邊除以 $\\Delta t$", + "newline": "false", + "runs": [ + { + "text": "Step 3:兩邊除以 ", + "style": "bold" + }, + { + "latex": "$\\Delta t$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把展開式兩邊同除以 $\\Delta t \\neq 0$:", + "newline": "false", + "runs": [ + { + "text": "把展開式兩邊同除以 " + }, + { + "latex": "$\\Delta t \\neq 0$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這樣做的目的是讓右邊出現 $\\dfrac{\\Delta x}{\\Delta t}$ 和 $\\dfrac{\\Delta y}{\\Delta t}$,當 $\\Delta t \\to 0$ 時,它們分別趨向 $\\dfrac{dx}{dt}$ 和 $\\dfrac{dy}{dt}$。", + "newline": "false", + "runs": [ + { + "text": "這樣做的目的是讓右邊出現 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\Delta y}{\\Delta t}$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時,它們分別趨向 " + }, + { + "latex": "$\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 4:令 $\\Delta t \\to 0$,處理誤差項", + "newline": "false", + "runs": [ + { + "text": "Step 4:令 ", + "style": "bold" + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",處理誤差項", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\Delta t \\to 0$,逐一看每一項的極限:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": ",逐一看每一項的極限:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$(見說明)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$(見說明)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "誤差項為何趨向 0?", + "newline": "false", + "runs": [ + { + "text": "誤差項為何趨向 0?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $g$ 可微,所以 $g$ 也連續,因此 $\\Delta t \\to 0$ 時 $\\Delta x = g(t+\\Delta t)-g(t) \\to 0$,同理 $\\Delta y \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 可微,所以 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 也連續,因此 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時 " + }, + { + "latex": "$\\Delta x = g(t+\\Delta t)-g(t) \\to 0$", + "kind": "math" + }, + { + "text": ",同理 " + }, + { + "latex": "$\\Delta y \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $(\\Delta x, \\Delta y) \\to (0,0)$,由可微定義知 $\\varepsilon_1 \\to 0$,$\\varepsilon_2 \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",由可微定義知 " + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2 \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "而 $\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$ 是有限值,所以 $\\varepsilon_1 \\cdot \\dfrac{\\Delta x}{\\Delta t} \\to 0 \\cdot \\dfrac{dx}{dt} = 0$,$\\varepsilon_2$ 同理。", + "newline": "false", + "runs": [ + { + "text": "而 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": " 是有限值,所以 " + }, + { + "latex": "$\\varepsilon_1 \\cdot \\dfrac{\\Delta x}{\\Delta t} \\to 0 \\cdot \\dfrac{dx}{dt} = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2$", + "kind": "math" + }, + { + "text": " 同理。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "Step 5:合併得到結論", + "newline": "false", + "runs": [ + { + "text": "Step 5:合併得到結論", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邏輯主線:可微 $\\Rightarrow$ $\\Delta z$ 可線性展開 $\\Rightarrow$ 除以 $\\Delta t$ $\\Rightarrow$ 取極限(誤差項消失)$\\Rightarrow$ 連鎖律", + "newline": "false", + "runs": [ + { + "text": "邏輯主線:", + "style": "bold" + }, + { + "text": "可微 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可線性展開 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 除以 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 取極限(誤差項消失)" + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 連鎖律" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_0ccc22fcf7", + "label": "引導證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-6", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 1:設定變化量", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定變化量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當自變數 $t$ 改變 $\\Delta t$ 時,中間變數與應變數會連鎖反應:", + "newline": "false", + "runs": [ + { + "text": "當自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 改變 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " 時,中間變數與應變數會連鎖反應:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nt \\xrightarrow{+\\Delta t} \\begin{cases} x \\xrightarrow{+\\Delta x} \\\\ y \\xrightarrow{+\\Delta y} \\end{cases} \\xrightarrow{} z \\xrightarrow{+\\Delta z}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "具體來說:$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "newline": "false", + "runs": [ + { + "text": "具體來說:" + }, + { + "latex": "$$\n\\Delta x = g(t+\\Delta t) - g(t), \\qquad \\Delta y = h(t+\\Delta t) - h(t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\Delta z = f(x+\\Delta x,\\; y+\\Delta y) - f(x,y)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-1::q1", + "prompt_runs": [ + { + "text": "下面哪一項是我們最終想求的?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\Delta z}{\\Delta x}$($z$ 對 $x$ 的平均變化率)" + }, + { + "key": "b", + "text": "$\\dfrac{dz}{dt} = \\lim_{\\Delta t \\to 0}\\dfrac{\\Delta z}{\\Delta t}$($z$ 對 $t$ 的瞬時變化率)" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial z}{\\partial x}$($z$ 對 $x$ 的偏導)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-6", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 2:展開 $\\Delta z$(可微的定義)", + "newline": "false", + "runs": [ + { + "text": "Step 2:展開 ", + "style": "bold" + }, + { + "latex": "$\\Delta z$", + "kind": "math", + "style": "bold" + }, + { + "text": "(可微的定義)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $f$ 是可微函數,在點 $(x, y)$ 處,$\\Delta z$ 可以精確地寫成:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是可微函數,在點 " + }, + { + "latex": "$(x, y)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可以精確地寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\Delta z = \\underbrace{\\frac{\\partial f}{\\partial x}\\Delta x + \\frac{\\partial f}{\\partial y}\\Delta y}_{\\text{線性主部}} + \\underbrace{\\varepsilon_1\\Delta x + \\varepsilon_2\\Delta y}_{\\text{高階誤差項}}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中誤差項 $\\varepsilon_1, \\varepsilon_2$ 滿足:$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "newline": "false", + "runs": [ + { + "text": "其中誤差項 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$$\n\\varepsilon_1 \\to 0,\\quad \\varepsilon_2 \\to 0 \\quad \\text{當} \\quad (\\Delta x, \\Delta y) \\to (0,0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:可微性讓我們能把 $\\Delta z$ 分成「線性主部」和「可以忽略的誤差」兩部分。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":可微性讓我們能把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 分成「線性主部」和「可以忽略的誤差」兩部分。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-2::q2", + "prompt_runs": [ + { + "text": "為什麼需要 " + }, + { + "latex": "$\\varepsilon_1, \\varepsilon_2$", + "kind": "math" + }, + { + "text": " 這兩個誤差項?" + } + ], + "options": [ + { + "key": "a", + "text": "因為偏導數本身就不準確" + }, + { + "key": "b", + "text": "因為 $f$ 不一定是線性函數,線性近似有殘差,$\\varepsilon$ 描述這個殘差在 $\\Delta x, \\Delta y \\to 0$ 時消失" + }, + { + "key": "c", + "text": "因為 $\\Delta t$ 不夠小" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-6", + "step": "step-2" + } + ], + "gate_from": "flow-6::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 3:兩邊除以 $\\Delta t$", + "newline": "false", + "runs": [ + { + "text": "Step 3:兩邊除以 ", + "style": "bold" + }, + { + "latex": "$\\Delta t$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把 $\\Delta z$ 的展開式兩邊同除以 $\\Delta t \\neq 0$:", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 的展開式兩邊同除以 " + }, + { + "latex": "$\\Delta t \\neq 0$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\cdot\\frac{\\Delta x}{\\Delta t} + \\frac{\\partial f}{\\partial y}\\cdot\\frac{\\Delta y}{\\Delta t} + \\varepsilon_1\\cdot\\frac{\\Delta x}{\\Delta t} + \\varepsilon_2\\cdot\\frac{\\Delta y}{\\Delta t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-3::q3", + "prompt_runs": [ + { + "text": "這樣做的目的是讓右邊出現 " + }, + { + "latex": "$\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\Delta y}{\\Delta t}$", + "kind": "math" + }, + { + "text": ",當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時,它們分別趨向:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{dx}{dt}$ 和 $\\dfrac{dy}{dt}$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$" + }, + { + "key": "c", + "text": "$0$ 和 $0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-6", + "step": "step-3" + } + ], + "gate_from": "flow-6::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 4:令 $\\Delta t \\to 0$,處理誤差項", + "newline": "false", + "runs": [ + { + "text": "Step 4:令 ", + "style": "bold" + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",處理誤差項", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $\\Delta t \\to 0$,逐一看每一項的極限:", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": ",逐一看每一項的極限:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial x}\\cdot\\dfrac{dx}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "(導數定義)" + } + ], + "content": "$\\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; \\dfrac{\\partial f}{\\partial y}\\cdot\\dfrac{dy}{dt}$(導數定義)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + } + ], + "content": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t} \\;\\to\\; 0$(見說明)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$", + "kind": "math" + }, + { + "text": "(見說明)" + }, + { + "text": "為什麼 ", + "style": "bold" + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math", + "style": "bold" + }, + { + "text": "?", + "style": "bold" + } + ], + "content": "$\\varepsilon_2\\cdot\\dfrac{\\Delta y}{\\Delta t} \\;\\to\\; 0$(見說明)為什麼 $\\varepsilon_1 \\to 0$?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $g$ 可微,所以 $g$ 也連續,因此當 $\\Delta t \\to 0$ 時,$\\Delta x = g(t+\\Delta t) - g(t) \\to 0$。同理 $\\Delta y \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 可微,所以 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 也連續,因此當 " + }, + { + "latex": "$\\Delta t \\to 0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$\\Delta x = g(t+\\Delta t) - g(t) \\to 0$", + "kind": "math" + }, + { + "text": "。同理 " + }, + { + "latex": "$\\Delta y \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $(\\Delta x, \\Delta y) \\to (0,0)$,由可微定義知 $\\varepsilon_1 \\to 0$,$\\varepsilon_2 \\to 0$。", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$(\\Delta x, \\Delta y) \\to (0,0)$", + "kind": "math" + }, + { + "text": ",由可微定義知 " + }, + { + "latex": "$\\varepsilon_1 \\to 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\varepsilon_2 \\to 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-6::step-4::q4", + "prompt_runs": [ + { + "text": "那麼誤差項 " + }, + { + "latex": "$\\varepsilon_1\\cdot\\dfrac{\\Delta x}{\\Delta t}$", + "kind": "math" + }, + { + "text": " 的極限是多少?" + } + ], + "options": [ + { + "key": "a", + "text": "$0$,因為 $\\varepsilon_1 \\to 0$ 而 $\\dfrac{\\Delta x}{\\Delta t} \\to \\dfrac{dx}{dt}$(有限值),有限值乘以 $0$ 等於 $0$" + }, + { + "key": "b", + "text": "不確定,因為 $0 \\times \\infty$ 型不定式" + }, + { + "key": "c", + "text": "$\\dfrac{dx}{dt}$,因為 $\\varepsilon_1$ 消失了" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-6", + "step": "step-4" + } + ], + "gate_from": "flow-6::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "Step 5:合併得到結論", + "newline": "false", + "runs": [ + { + "text": "Step 5:合併得到結論", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把四項的極限合併:", + "newline": "false", + "runs": [ + { + "text": "把四項的極限合併:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\lim_{\\Delta t\\to 0}\\frac{\\Delta z}{\\Delta t} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt} + 0 + 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{dz}{dt} = \\frac{\\partial f}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dt}} \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "整個證明的邏輯主線:", + "newline": "false", + "runs": [ + { + "text": "整個證明的邏輯主線:", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "可微 $\\Rightarrow$ $\\Delta z$ 可線性展開 $\\Rightarrow$ 除以 $\\Delta t$ $\\Rightarrow$ 取極限(誤差項消失)$\\Rightarrow$ 連鎖律", + "newline": "false", + "runs": [ + { + "text": "可微 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Delta z$", + "kind": "math" + }, + { + "text": " 可線性展開 " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 除以 " + }, + { + "latex": "$\\Delta t$", + "kind": "math" + }, + { + "text": " " + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 取極限(誤差項消失)" + }, + { + "latex": "$\\Rightarrow$", + "kind": "math" + }, + { + "text": " 連鎖律" + } + ] + } + ], + "gate_from": "flow-6::step-4::q4" + } + ] + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "常見錯誤提醒", + "body": [ + { + "type": "paragraph", + "content": "注意符號的區別:", + "newline": "false", + "runs": [ + { + "text": "注意符號的區別:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "text": "全微分", + "style": "bold" + }, + { + "text": "," + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 只透過 " + }, + { + "latex": "$x(t), y(t)$", + "kind": "math" + }, + { + "text": " 依賴 " + }, + { + "latex": "$t$", + "kind": "math" + } + ], + "content": "$\\dfrac{dz}{dt}$:全微分,$z$ 只透過 $x(t), y(t)$ 依賴 $t$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": ":" + }, + { + "text": "偏微分", + "style": "bold" + }, + { + "text": ",只對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 做偏微分,其他變數視為常數" + } + ], + "content": "$\\dfrac{\\partial z}{\\partial t}$:偏微分,只對 $t$ 做偏微分,其他變數視為常數" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "兩者意義不同,在連鎖律中用錯會導致錯誤結果。", + "newline": "false", + "runs": [ + { + "text": "兩者意義不同,在連鎖律中用錯會導致錯誤結果。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:\n\n\n\n不會的話可以看看下面的解法!\n\n\n**Step 1:列出連鎖律公式**\n\n$$\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3$$\n\n$$\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t$$\n\n**Step 3:代入公式**\n\n$$\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)$$\n\n**Step 4:代入 $t = 0$(此時 $x = 0,\\ y = 1$)**\n\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6$$\n\n\n\n\n\n連鎖律公式為 $\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$。\n\n先求偏導數:$\\dfrac{\\partial z}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^2y + 3xy^4) = ?$\n\na. $2x + 3y^4$\nb. $2xy + 3y^4$\nc. $x^2 + 12xy^3$\nd. $2y + 3y^4$\n\n\n\n\n再求:$\\dfrac{\\partial z}{\\partial y} = \\dfrac{\\partial}{\\partial y}(x^2y + 3xy^4) = ?$\n\n\n\n\n\n求對 $t$ 的導數:$\\dfrac{dx}{dt} = \\dfrac{d}{dt}\\sin(2t) = ?$\n\n\n\n\n\n$\\dfrac{dy}{dt} = \\dfrac{d}{dt}\\cos t = ?$\n\n\n\n\n\n代入 $t = 0$:此時 $x = \\sin 0 = 0$,$y = \\cos 0 = 1$。\n\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)$$\n\n代入 $x=0,\\ y=1$,結果是?\n\na. $3$\nb. $12$\nc. $6$\nd. $0$\n\n\n\n\n**答案:**\n$$\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6$$\n\n\n\n\n---\n\n\n註解\n形式 1 小結\n- 適用情況:$z = f(x,y)$,且 $x, y$ 均為**同一變數** $t$ 的函數\n- 公式:$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$\n- 記憶口訣:**有幾個中間變數,就有幾項相加**\n\n\n---\n\n## 2️⃣ 連鎖律:形式 2\n\n形式 1 的 $x, y$ 只依賴一個自變數 $t$。\n\n**當 $x, y$ 同時依賴兩個自變數 $s, t$ 時,形式 1 就不夠用了。**\n\n此時 $z = f(x,y)$,$x = g(s,t)$,$y = h(s,t)$,我們要求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n計算 $\\dfrac{\\partial z}{\\partial t}$ 時,可以把 $s$ 視為常數,只觀察 $t$ 的變化;此時就像對單一變數套用形式 1。\n\n\n定理\n連鎖律(形式 2)\n假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(s,t)$、$y = h(s,t)$ 都是 $s, t$ 的可微函數,則:\n$$ \\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s} $$\n$$ \\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t} $$\n\n![](/assets/chain_tree.svg)\n\n---\n\n### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n\n\n\n**Step 1:列出連鎖律**\n\n$$\\frac{\\partial z}{\\partial s} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}, \\qquad\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y$$\n\n$$\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2$$\n\n**Step 3:代入**\n\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)$$\n\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)$$\n\n\n\n\n\n先求 $z = e^x \\sin y$ 對中間變數的偏導:$\\dfrac{\\partial z}{\\partial x} = ?$\n\na. $e^x \\cos y$\nb. $e^x \\sin y$\nc. $\\sin y$\nd. $xe^x \\sin y$\n\n\n\n\n$\\dfrac{\\partial z}{\\partial y} = ?$\n\n\n\n\n\n再求對自變數 $s$ 的偏導(其中 $x = st^2$,$y = s^2t$):\n$\\dfrac{\\partial x}{\\partial s} = ?$,$\\dfrac{\\partial y}{\\partial s} = ?$\n\na. $\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$\nb. $\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$\nc. $\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\n\n\n\n\n代入連鎖律公式,$\\dfrac{\\partial z}{\\partial s}$ 是哪一個?\n\na. $t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$\nb. $2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$\nc. $t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$$\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)$$\n\n\n\n\n---\n\n\n註解\n形式 2 小結\n- 適用情況:$z = f(x,y)$,$x, y$ 均為**兩個自變數** $s, t$ 的函數\n- 每個偏導(對 $s$ 或對 $t$)各有兩項\n\n\n---\n\n## 3️⃣ 連鎖律:一般形式\n\n推廣至最一般的情況:\n\n- 應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數\n- 每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數\n\n最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。\n\n\n定理\n連鎖律(一般形式)\n假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。\n則對每個 $i = 1, 2, \\dots, m$:\n$$ \\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i} $$\n\n固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。 \n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$ m\\times n $個乘積項。 \n---\n\n### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = x^2y + 3xy^4$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = \\sin(2t)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = \\cos t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{dz}{dt}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$t = 0$", + "kind": "math" + }, + { + "text": " 時的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出答案:" + } + ], + "answers": [ + "6" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "不會的話可以看看下面的解法!", + "newline": "false", + "runs": [ + { + "text": "不會的話可以看看下面的解法!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_90548e97f1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律公式", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = \\frac{\\partial z}{\\partial x}\\frac{dx}{dt} + \\frac{\\partial z}{\\partial y}\\frac{dy}{dt}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = 2xy + 3y^4, \\qquad \\frac{\\partial z}{\\partial y} = x^2 + 12xy^3\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dx}{dt} = 2\\cos(2t), \\qquad \\frac{dy}{dt} = -\\sin t\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:代入公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:代入公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt} = (2xy + 3y^4)(2\\cos 2t) + (x^2 + 12xy^3)(-\\sin t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $t = 0$(此時 $x = 0,\\ y = 1$)", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$t = 0$", + "kind": "math", + "style": "bold" + }, + { + "text": "(此時 ", + "style": "bold" + }, + { + "latex": "$x = 0,\\ y = 1$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0 + 0)(0) = 6\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n若 $z = x^2y + 3xy^4$,其中 $x = \\sin(2t)$,$y = \\cos t$,求 $\\dfrac{dz}{dt}$ 在 $t = 0$ 時的值。\n\n請先試著算出答案:\n\n\n\n不會的話可以看看下面的解法!" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ad59aa11f2", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-7", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "連鎖律公式為 $\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$。", + "newline": "false", + "runs": [ + { + "text": "連鎖律公式為 " + }, + { + "latex": "$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-7::step-1::q1", + "prompt_runs": [ + { + "text": "先求偏導數:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^2y + 3xy^4) = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$2x + 3y^4$" + }, + { + "key": "b", + "text": "$2xy + 3y^4$" + }, + { + "key": "c", + "text": "$x^2 + 12xy^3$" + }, + { + "key": "d", + "text": "$2y + 3y^4$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-7", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-2::q2", + "prompt_runs": [ + { + "text": "再求:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = \\dfrac{\\partial}{\\partial y}(x^2y + 3xy^4) = ?$", + "kind": "math" + } + ], + "answers": [ + "x^2+12*x*y^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-2" + } + ], + "gate_from": "flow-7::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-3::q3", + "prompt_runs": [ + { + "text": "求對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的導數:" + }, + { + "latex": "$\\dfrac{dx}{dt} = \\dfrac{d}{dt}\\sin(2t) = ?$", + "kind": "math" + } + ], + "answers": [ + "2*cos(2*t)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-3" + } + ], + "gate_from": "flow-7::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-7::step-4::q4", + "prompt_runs": [ + { + "latex": "$\\dfrac{dy}{dt} = \\dfrac{d}{dt}\\cos t = ?$", + "kind": "math" + } + ], + "answers": [ + "-sin(t)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-7", + "step": "step-4" + } + ], + "gate_from": "flow-7::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入 $t = 0$:此時 $x = \\sin 0 = 0$,$y = \\cos 0 = 1$。", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$t = 0$", + "kind": "math" + }, + { + "text": ":此時 " + }, + { + "latex": "$x = \\sin 0 = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = \\cos 0 = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (2xy + 3y^4)(2\\cos 0) + (x^2 + 12xy^3)(-\\sin 0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-7::step-5::q5", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$x=0,\\ y=1$", + "kind": "math" + }, + { + "text": ",結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$3$" + }, + { + "key": "b", + "text": "$12$" + }, + { + "key": "c", + "text": "$6$" + }, + { + "key": "d", + "text": "$0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-7", + "step": "step-5" + } + ], + "gate_from": "flow-7::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{dz}{dt}\\bigg|_{t=0} = (0 + 3)(2) + (0)(0) = 6\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-7::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "形式 1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "適用情況:" + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 均為" + }, + { + "text": "同一變數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "適用情況:$z = f(x,y)$,且 $x, y$ 均為同一變數 $t$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "公式:" + }, + { + "latex": "$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$", + "kind": "math" + } + ], + "content": "公式:$\\dfrac{dz}{dt} = \\dfrac{\\partial z}{\\partial x}\\dfrac{dx}{dt} + \\dfrac{\\partial z}{\\partial y}\\dfrac{dy}{dt}$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "記憶口訣:" + }, + { + "text": "有幾個中間變數,就有幾項相加", + "style": "bold" + } + ], + "content": "記憶口訣:有幾個中間變數,就有幾項相加" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣ 連鎖律:形式 2", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣ 連鎖律:形式 2", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 連鎖律:形式 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2-2" + }, + { + "type": "paragraph", + "content": "形式 1 的 $x, y$ 只依賴一個自變數 $t$。", + "newline": "false", + "runs": [ + { + "text": "形式 1 的 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 只依賴一個自變數 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "當 $x, y$ 同時依賴兩個自變數 $s, t$ 時,形式 1 就不夠用了。", + "newline": "false", + "runs": [ + { + "text": "當 ", + "style": "bold" + }, + { + "latex": "$x, y$", + "kind": "math", + "style": "bold" + }, + { + "text": " 同時依賴兩個自變數 ", + "style": "bold" + }, + { + "latex": "$s, t$", + "kind": "math", + "style": "bold" + }, + { + "text": " 時,形式 1 就不夠用了。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此時 $z = f(x,y)$,$x = g(s,t)$,$y = h(s,t)$,我們要求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。", + "newline": "false", + "runs": [ + { + "text": "此時 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x = g(s,t)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = h(s,t)$", + "kind": "math" + }, + { + "text": ",我們要求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "計算 $\\dfrac{\\partial z}{\\partial t}$ 時,可以把 $s$ 視為常數,只觀察 $t$ 的變化;此時就像對單一變數套用形式 1。", + "newline": "false", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": " 時,可以把 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 視為常數,只觀察 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 的變化;此時就像對單一變數套用形式 1。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(形式 2)", + "body": [ + { + "type": "paragraph", + "content": "假設 $z = f(x,y)$ 是 $x, y$ 的可微函數,且 $x = g(s,t)$、$y = h(s,t)$ 都是 $s, t$ 的可微函數,則:$$\n\\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}\n$$$$\n\\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 的可微函數,且 " + }, + { + "latex": "$x = g(s,t)$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y = h(s,t)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 的可微函數,則:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial s}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial t}=\\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t}+\\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "picture", + "alt": "", + "src": "/assets/chain_tree.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n\n\n\n**Step 1:列出連鎖律**\n\n$$\\frac{\\partial z}{\\partial s} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial s}, \\qquad\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}$$\n\n**Step 2:計算各偏導數**\n\n$$\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y$$\n\n$$\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2$$\n\n**Step 3:代入**\n\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)$$\n\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)$$\n\n\n\n\n\n先求 $z = e^x \\sin y$ 對中間變數的偏導:$\\dfrac{\\partial z}{\\partial x} = ?$\n\na. $e^x \\cos y$\nb. $e^x \\sin y$\nc. $\\sin y$\nd. $xe^x \\sin y$\n\n\n\n\n$\\dfrac{\\partial z}{\\partial y} = ?$\n\n\n\n\n\n再求對自變數 $s$ 的偏導(其中 $x = st^2$,$y = s^2t$):\n$\\dfrac{\\partial x}{\\partial s} = ?$,$\\dfrac{\\partial y}{\\partial s} = ?$\n\na. $\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$\nb. $\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$\nc. $\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\n\n\n\n\n代入連鎖律公式,$\\dfrac{\\partial z}{\\partial s}$ 是哪一個?\n\na. $t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$\nb. $2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$\nc. $t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$$\n$$\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)$$\n\n\n\n\n---\n\n\n註解\n形式 2 小結\n- 適用情況:$z = f(x,y)$,$x, y$ 均為**兩個自變數** $s, t$ 的函數\n- 每個偏導(對 $s$ 或對 $t$)各有兩項\n\n\n---\n\n## 3️⃣ 連鎖律:一般形式\n\n推廣至最一般的情況:\n\n- 應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數\n- 每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數\n\n最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。\n\n\n定理\n連鎖律(一般形式)\n假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。\n則對每個 $i = 1, 2, \\dots, m$:\n$$ \\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i} $$\n\n固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。 \n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$ m\\times n $個乘積項。 \n---\n\n### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = e^x \\sin y$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = st^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = s^2 t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial t}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著寫出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 表示,化簡後):" + } + ], + "answers": [ + "t^2*e^(s*t^2)*sin(s^2*t)+2*s*t*e^(s*t^2)*cos(s^2*t)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_f0e2037481", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = \\frac{\\partial z}{\\partial x}\\frac{\\partial x}{\\partial t} + \\frac{\\partial z}{\\partial y}\\frac{\\partial y}{\\partial t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = e^x \\sin y, \\qquad \\frac{\\partial z}{\\partial y} = e^x \\cos y\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial x}{\\partial s} = t^2, \\quad \\frac{\\partial x}{\\partial t} = 2st, \\quad \\frac{\\partial y}{\\partial s} = 2st, \\quad \\frac{\\partial y}{\\partial t} = s^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:代入", + "newline": "false", + "runs": [ + { + "text": "Step 3:代入", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2 t) + 2st\\, e^{st^2}\\cos(s^2 t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2 t) + s^2 e^{st^2}\\cos(s^2 t)\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n若 $z = e^x \\sin y$,其中 $x = st^2$,$y = s^2 t$,求 $\\dfrac{\\partial z}{\\partial s}$ 與 $\\dfrac{\\partial z}{\\partial t}$。\n\n請先試著寫出 $\\dfrac{\\partial z}{\\partial s}$(以 $s, t$ 表示,化簡後):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_4f474d4a19", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-8", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-1::q1", + "prompt_runs": [ + { + "text": "先求 " + }, + { + "latex": "$z = e^x \\sin y$", + "kind": "math" + }, + { + "text": " 對中間變數的偏導:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$e^x \\cos y$" + }, + { + "key": "b", + "text": "$e^x \\sin y$" + }, + { + "key": "c", + "text": "$\\sin y$" + }, + { + "key": "d", + "text": "$xe^x \\sin y$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-8", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-8::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = ?$", + "kind": "math" + } + ], + "answers": [ + "e^x*cos(y)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-8", + "step": "step-2" + } + ], + "gate_from": "flow-8::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-3::q3", + "prompt_runs": [ + { + "text": "再求對自變數 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 的偏導(其中 " + }, + { + "latex": "$x = st^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = s^2t$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s} = ?$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial s} = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2st,\\ \\dfrac{\\partial y}{\\partial s} = t^2$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial s} = t^2,\\ \\dfrac{\\partial y}{\\partial s} = 2st$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial s} = s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-8", + "step": "step-3" + } + ], + "gate_from": "flow-8::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-8::step-4::q4", + "prompt_runs": [ + { + "text": "代入連鎖律公式," + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)$" + }, + { + "key": "b", + "text": "$2st\\, e^{st^2}\\sin(s^2t) + t^2 e^{st^2}\\cos(s^2t)$" + }, + { + "key": "c", + "text": "$t^2 e^{st^2}\\cos(s^2t) + 2st\\, e^{st^2}\\sin(s^2t)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-8", + "step": "step-4" + } + ], + "gate_from": "flow-8::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)\n$$$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial s} = t^2 e^{st^2}\\sin(s^2t) + 2st\\, e^{st^2}\\cos(s^2t)\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial t} = 2st\\, e^{st^2}\\sin(s^2t) + s^2 e^{st^2}\\cos(s^2t)\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-8::step-4::q4" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "形式 2 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "適用情況:" + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x, y$", + "kind": "math" + }, + { + "text": " 均為" + }, + { + "text": "兩個自變數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$s, t$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "適用情況:$z = f(x,y)$,$x, y$ 均為兩個自變數 $s, t$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "每個偏導(對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 或對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": ")各有兩項" + } + ], + "content": "每個偏導(對 $s$ 或對 $t$)各有兩項" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣ 連鎖律:一般形式", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣ 連鎖律:一般形式", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 連鎖律:一般形式", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "推廣至最一般的情況:", + "newline": "false", + "runs": [ + { + "text": "推廣至最一般的情況:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "應變數 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 個中間變數 " + }, + { + "latex": "$x_1, \\dots, x_n$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "應變數 $u$ 是 $n$ 個中間變數 $x_1, \\dots, x_n$ 的函數" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "每個 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 又是 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 個自變數 " + }, + { + "latex": "$t_1, \\dots, t_m$", + "kind": "math" + }, + { + "text": " 的函數" + } + ], + "content": "每個 $x_j$ 又是 $m$ 個自變數 $t_1, \\dots, t_m$ 的函數" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最終公式對每個 $t_i$ 都有 $n$ 項(每個中間變數 $x_j$ 各貢獻一項)。", + "newline": "false", + "runs": [ + { + "text": "最終公式對每個 " + }, + { + "latex": "$t_i$", + "kind": "math" + }, + { + "text": " 都有 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 項(每個中間變數 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 各貢獻一項)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "連鎖律(一般形式)", + "body": [ + { + "type": "paragraph", + "content": "假設 $u$ 是 $x_1, x_2, \\dots, x_n$ 的可微函數,且每個 $x_j$ 都是 $t_1, t_2, \\dots, t_m$ 的可微函數。則對每個 $i = 1, 2, \\dots, m$:$$\n\\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i}\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "latex": "$x_1, x_2, \\dots, x_n$", + "kind": "math" + }, + { + "text": " 的可微函數,且每個 " + }, + { + "latex": "$x_j$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$t_1, t_2, \\dots, t_m$", + "kind": "math" + }, + { + "text": " 的可微函數。則對每個 " + }, + { + "latex": "$i = 1, 2, \\dots, m$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\frac{\\partial u}{\\partial t_i} = \\frac{\\partial u}{\\partial x_1}\\frac{\\partial x_1}{\\partial t_i} + \\frac{\\partial u}{\\partial x_2}\\frac{\\partial x_2}{\\partial t_i} + \\cdots + \\frac{\\partial u}{\\partial x_n}\\frac{\\partial x_n}{\\partial t_i}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "固定一個 $t_i$ 時,公式右邊會對所有中間變數$x_1,x_2,\\ldots,x_n$ 加總,因此每一條公式有 $n$ 個乘積項。\n如果把 $t_1,t_2,\\ldots,t_m$ 的公式全部列出來,會有 $m$ 條公式,每條 $n$ 項,所以全部展開共有$m\\times n$個乘積項。\n", + "newline": "true", + "runs": [ + { + "text": "固定一個 " + }, + { + "latex": "$t_i$", + "kind": "math" + }, + { + "text": " 時,公式右邊會對所有中間變數" + }, + { + "latex": "$x_1,x_2,\\ldots,x_n$", + "kind": "math" + }, + { + "text": " 加總,因此每一條公式有 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 個乘積項。" + }, + { + "newline": "true" + }, + { + "text": "如果把 " + }, + { + "latex": "$t_1,t_2,\\ldots,t_m$", + "kind": "math" + }, + { + "text": " 的公式全部列出來,會有 " + }, + { + "latex": "$m$", + "kind": "math" + }, + { + "text": " 條公式,每條 " + }, + { + "latex": "$n$", + "kind": "math" + }, + { + "text": " 項,所以全部展開共有" + }, + { + "latex": "$m\\times n$", + "kind": "math" + }, + { + "text": "個乘積項。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n\n\n\n**分析變數結構**\n\n- 中間變數:$x, y, z, t$(共 $n = 4$ 個)\n- 自變數:$u, v$(共 $m = 2$ 個)\n\n樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。\n\n![](/assets/Ch14_5_ex4.svg)\n\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n\n一般形式的連鎖律:項數等於**中間變數的個數**。\n\n這題的中間變數是哪些?\n\na. $u, v$(2 個)\nb. $x, y, z, t$(4 個)\nc. $w$(1 個)\nd. $x, y, z, t, u, v$(6 個)\n\n\n\n\n所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。\n\n下列哪一個是完整的 $\\dfrac{\\partial w}{\\partial u}$?\n\na. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$\nb. $\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$\nc. $\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}$$\n$$\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}$$\n\n\n\n\n---\n\n### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。", + "newline": "false", + "runs": [ + { + "text": "寫出連鎖律在以下情況下的形式:" + }, + { + "latex": "$w = f(x, y, z, t)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": " 共有幾項相加?" + } + ], + "answers": [ + "4" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入項數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_bab1488cbd", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "分析變數結構", + "newline": "false", + "runs": [ + { + "text": "分析變數結構", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "中間變數:" + }, + { + "latex": "$x, y, z, t$", + "kind": "math" + }, + { + "text": "(共 " + }, + { + "latex": "$n = 4$", + "kind": "math" + }, + { + "text": " 個)" + } + ], + "content": "中間變數:$x, y, z, t$(共 $n = 4$ 個)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "自變數:" + }, + { + "latex": "$u, v$", + "kind": "math" + }, + { + "text": "(共 " + }, + { + "latex": "$m = 2$", + "kind": "math" + }, + { + "text": " 個)" + } + ], + "content": "自變數:$u, v$(共 $m = 2$ 個)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "樹狀圖讀法:從 $w$ 出發,沿著每條路徑往下走到 $u$ 或 $v$,把路徑上的偏導數相乘,再把所有路徑加起來。", + "newline": "false", + "runs": [ + { + "text": "樹狀圖讀法:從 " + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 出發,沿著每條路徑往下走到 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$v$", + "kind": "math" + }, + { + "text": ",把路徑上的偏導數相乘,再把所有路徑加起來。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex4.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n寫出連鎖律在以下情況下的形式:$w = f(x, y, z, t)$,其中 $x = x(u,v),\\ y = y(u,v),\\ z = z(u,v),\\ t = t(u,v)$。\n\n$\\dfrac{\\partial w}{\\partial u}$ 共有幾項相加?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_db1a3d11c9", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-9", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "一般形式的連鎖律:項數等於中間變數的個數。", + "newline": "false", + "runs": [ + { + "text": "一般形式的連鎖律:項數等於" + }, + { + "text": "中間變數的個數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-9::step-1::q1", + "prompt_runs": [ + { + "text": "這題的中間變數是哪些?" + } + ], + "options": [ + { + "key": "a", + "text": "$u, v$(2 個)" + }, + { + "key": "b", + "text": "$x, y, z, t$(4 個)" + }, + { + "key": "c", + "text": "$w$(1 個)" + }, + { + "key": "d", + "text": "$x, y, z, t, u, v$(6 個)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-9", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial w}{\\partial u}$ 共有 4 項,對應 4 個中間變數,每項是「$w$ 對中間變數的偏導」乘以「中間變數對 $u$ 的偏導」。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": " 共有 4 項,對應 4 個中間變數,每項是「" + }, + { + "latex": "$w$", + "kind": "math" + }, + { + "text": " 對中間變數的偏導」乘以「中間變數對 " + }, + { + "latex": "$u$", + "kind": "math" + }, + { + "text": " 的偏導」。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-9::step-2::q2", + "prompt_runs": [ + { + "text": "下列哪一個是完整的 " + }, + { + "latex": "$\\dfrac{\\partial w}{\\partial u}$", + "kind": "math" + }, + { + "text": "?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial u} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial u} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial u} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial u}$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial w}{\\partial x}\\dfrac{\\partial x}{\\partial v} + \\dfrac{\\partial w}{\\partial y}\\dfrac{\\partial y}{\\partial v} + \\dfrac{\\partial w}{\\partial z}\\dfrac{\\partial z}{\\partial v} + \\dfrac{\\partial w}{\\partial t}\\dfrac{\\partial t}{\\partial v}$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial w}{\\partial u} + \\dfrac{\\partial w}{\\partial v}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-9", + "step": "step-2" + } + ], + "gate_from": "flow-9::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial w}{\\partial u} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial u} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial u} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial u} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial u}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{\\partial w}{\\partial v} = \\frac{\\partial w}{\\partial x}\\frac{\\partial x}{\\partial v} + \\frac{\\partial w}{\\partial y}\\frac{\\partial y}{\\partial v} + \\frac{\\partial w}{\\partial z}\\frac{\\partial z}{\\partial v} + \\frac{\\partial w}{\\partial t}\\frac{\\partial t}{\\partial v}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-9::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n\n\n\n**Step 1:列出連鎖律(用樹狀圖輔助)**\n\n![](/assets/Ch14_5_ex5.svg)\n\n$$\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}$$\n\n**Step 2:計算對中間變數的偏導**\n\n$$\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2$$\n\n**Step 3:計算對 $s$ 的偏導**\n\n$$\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t$$\n\n**Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)**\n\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192$$\n\n\n\n\n\n先求對中間變數的偏導:$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial y} = ?$\n\n\n\n\n\n$\\dfrac{\\partial u}{\\partial z} = ?$\n\n\n\n\n\n再求對 $s$ 的偏導(其中 $x = rse^t$,$y = rs^2e^{-t}$,$z = r^2s\\sin t$):\n$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$ 分別是哪一組?\n\na. $re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$\nb. $re^t,\\ 2rse^{-t},\\ r^2\\sin t$\nc. $se^t,\\ 2rse^{-t},\\ r^2s$\n\n\n\n\n代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。\n\n$\\dfrac{\\partial u}{\\partial s}$ 的計算結果是?\n\na. $128$\nb. $64$\nc. $192$\nd. $256$\n\n\n\n\n**答案:**\n$$\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192$$\n\n\n\n\n---\n\n### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$u = x^4 y + y^2 z^3$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\dfrac{\\partial u}{\\partial s}$", + "kind": "math" + }, + { + "text": " 在 " + }, + { + "latex": "$r=2, s=1, t=0$", + "kind": "math" + }, + { + "text": " 時的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出答案:" + } + ], + "answers": [ + "192" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_739644c706", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:列出連鎖律(用樹狀圖輔助)", + "newline": "false", + "runs": [ + { + "text": "Step 1:列出連鎖律(用樹狀圖輔助)", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex5.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = \\frac{\\partial u}{\\partial x}\\frac{\\partial x}{\\partial s} + \\frac{\\partial u}{\\partial y}\\frac{\\partial y}{\\partial s} + \\frac{\\partial u}{\\partial z}\\frac{\\partial z}{\\partial s}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算對中間變數的偏導", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算對中間變數的偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial x} = 4x^3 y, \\qquad \\frac{\\partial u}{\\partial y} = x^4 + 2yz^3, \\qquad \\frac{\\partial u}{\\partial z} = 3y^2 z^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算對 $s$ 的偏導", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算對 ", + "style": "bold" + }, + { + "latex": "$s$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial x}{\\partial s} = re^t, \\qquad \\frac{\\partial y}{\\partial s} = 2rse^{-t}, \\qquad \\frac{\\partial z}{\\partial s} = r^2\\sin t\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $r=2, s=1, t=0$(此時 $x=2,\\ y=2,\\ z=0$)", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$r=2, s=1, t=0$", + "kind": "math", + "style": "bold" + }, + { + "text": "(此時 ", + "style": "bold" + }, + { + "latex": "$x=2,\\ y=2,\\ z=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ")", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot 8\\cdot 2)(2) + (16 + 0)(4) + (0)(0) = 128 + 64 + 0 = 192\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n若 $u = x^4 y + y^2 z^3$,其中 $x = rse^t,\\ y = rs^2 e^{-t},\\ z = r^2 s \\sin t$,求 $\\dfrac{\\partial u}{\\partial s}$ 在 $r=2, s=1, t=0$ 時的值。\n\n請先試著算出答案:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ce79fc3d89", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-10", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-1::q1", + "prompt_runs": [ + { + "text": "先求對中間變數的偏導:" + }, + { + "latex": "$\\dfrac{\\partial u}{\\partial x} = \\dfrac{\\partial}{\\partial x}(x^4y + y^2z^3) = ?$", + "kind": "math" + } + ], + "answers": [ + "4*x^3*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial y} = ?$", + "kind": "math" + } + ], + "answers": [ + "x^4+2*y*z^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-2" + } + ], + "gate_from": "flow-10::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-10::step-3::q3", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial z} = ?$", + "kind": "math" + } + ], + "answers": [ + "3*y^2*z^2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-10", + "step": "step-3" + } + ], + "gate_from": "flow-10::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-10::step-4::q4", + "prompt_runs": [ + { + "text": "再求對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 的偏導(其中 " + }, + { + "latex": "$x = rse^t$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = rs^2e^{-t}$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$z = r^2s\\sin t$", + "kind": "math" + }, + { + "text": "):" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s},\\ \\dfrac{\\partial y}{\\partial s},\\ \\dfrac{\\partial z}{\\partial s}$", + "kind": "math" + }, + { + "text": " 分別是哪一組?" + } + ], + "options": [ + { + "key": "a", + "text": "$re^t,\\ rs^2e^{-t},\\ r^2s\\sin t$" + }, + { + "key": "b", + "text": "$re^t,\\ 2rse^{-t},\\ r^2\\sin t$" + }, + { + "key": "c", + "text": "$se^t,\\ 2rse^{-t},\\ r^2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-10", + "step": "step-4" + } + ], + "gate_from": "flow-10::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入 $r=2,\\ s=1,\\ t=0$,此時 $x=2,\\ y=2,\\ z=0$。", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$r=2,\\ s=1,\\ t=0$", + "kind": "math" + }, + { + "text": ",此時 " + }, + { + "latex": "$x=2,\\ y=2,\\ z=0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-10::step-5::q5", + "prompt_runs": [ + { + "latex": "$\\dfrac{\\partial u}{\\partial s}$", + "kind": "math" + }, + { + "text": " 的計算結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$128$" + }, + { + "key": "b", + "text": "$64$" + }, + { + "key": "c", + "text": "$192$" + }, + { + "key": "d", + "text": "$256$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-10", + "step": "step-5" + } + ], + "gate_from": "flow-10::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial u}{\\partial s} = (4\\cdot8\\cdot2)(2) + (16+0)(4) + (0)(0) = 128 + 64 = 192\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-10::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。\n\n\n\n**Step 1:設中間變數**\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。\n\n**Step 2:用連鎖律對 $s$ 微分**\n\n$$\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)$$\n\n**Step 3:用連鎖律對 $t$ 微分**\n\n$$\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)$$\n\n**Step 4:代入驗證**\n\n$$t\\frac{\\partial g}{\\partial s} + s\\frac{\\partial g}{\\partial t}\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)$$\n\n$$= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare$$\n\n\n\n\n\n令 $x = s^2 - t^2$,$y = t^2 - s^2$。\n\n用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$\n\n請問 $\\dfrac{\\partial x}{\\partial s}$ 和 $\\dfrac{\\partial y}{\\partial s}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$\nb. $\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$\nc. $\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。\n\n再對 $t$ 微分:$\\dfrac{\\partial x}{\\partial t}$ 和 $\\dfrac{\\partial y}{\\partial t}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$\nb. $\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$\nc. $\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$\n\n\n\n\n所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。\n\n現在代入 $t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$,展開後各項是否完全相消?\n\na. 是,結果為 $0$\nb. 否,結果不為 $0$\n\n\n\n\n**答案(展開驗證):**\n$$t(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare$$\n\n\n\n\n---\n\n### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 為可微函數,證明 " + }, + { + "latex": "$g$", + "kind": "math" + }, + { + "text": " 滿足:" + }, + { + "latex": "$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a8bf37848a", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設中間變數", + "newline": "false", + "runs": [ + { + "text": "Step 1:設中間變數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $x = s^2 - t^2$,$y = t^2 - s^2$,則 $g(s,t) = f(x,y)$,且 $y = -x$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x = s^2 - t^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = t^2 - s^2$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$g(s,t) = f(x,y)$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$y = -x$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:用連鎖律對 $s$ 微分", + "newline": "false", + "runs": [ + { + "text": "Step 2:用連鎖律對 ", + "style": "bold" + }, + { + "latex": "$s$", + "kind": "math", + "style": "bold" + }, + { + "text": " 微分", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial g}{\\partial s} = \\frac{\\partial f}{\\partial x}(2s) + \\frac{\\partial f}{\\partial y}(-2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:用連鎖律對 $t$ 微分", + "newline": "false", + "runs": [ + { + "text": "Step 3:用連鎖律對 ", + "style": "bold" + }, + { + "latex": "$t$", + "kind": "math", + "style": "bold" + }, + { + "text": " 微分", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial g}{\\partial t} = \\frac{\\partial f}{\\partial x}(-2t) + \\frac{\\partial f}{\\partial y}(2t)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入驗證", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入驗證", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n= t\\!\\left(2s\\frac{\\partial f}{\\partial x} - 2s\\frac{\\partial f}{\\partial y}\\right) + s\\!\\left(-2t\\frac{\\partial f}{\\partial x} + 2t\\frac{\\partial f}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n= 2st\\frac{\\partial f}{\\partial x} - 2st\\frac{\\partial f}{\\partial y} - 2st\\frac{\\partial f}{\\partial x} + 2st\\frac{\\partial f}{\\partial y} = 0 \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 6\n\n若 $g(s,t) = f(s^2 - t^2,\\ t^2 - s^2)$ 且 $f$ 為可微函數,證明 $g$ 滿足:$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t} = 0$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7668e6674f", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-11", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $x = s^2 - t^2$,$y = t^2 - s^2$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$x = s^2 - t^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = t^2 - s^2$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "用連鎖律對 $s$ 微分:$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$", + "newline": "false", + "runs": [ + { + "text": "用連鎖律對 " + }, + { + "latex": "$s$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial s} = \\dfrac{\\partial f}{\\partial x}\\dfrac{\\partial x}{\\partial s} + \\dfrac{\\partial f}{\\partial y}\\dfrac{\\partial y}{\\partial s}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-1::q1", + "prompt_runs": [ + { + "text": "請問 " + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial s}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial s}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial s} = -2s,\\ \\dfrac{\\partial y}{\\partial s} = 2s$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2s,\\ \\dfrac{\\partial y}{\\partial s} = -2s$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial s} = 2t,\\ \\dfrac{\\partial y}{\\partial s} = -2t$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-11", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial s} = 2s\\dfrac{\\partial f}{\\partial x} - 2s\\dfrac{\\partial f}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-2::q2", + "prompt_runs": [ + { + "text": "再對 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial t}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial t}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial t} = -2t,\\ \\dfrac{\\partial y}{\\partial t} = 2t$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial t} = 2t,\\ \\dfrac{\\partial y}{\\partial t} = -2t$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial t} = -2s,\\ \\dfrac{\\partial y}{\\partial t} = 2s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-11", + "step": "step-2" + } + ], + "gate_from": "flow-11::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial g}{\\partial t} = -2t\\dfrac{\\partial f}{\\partial x} + 2t\\dfrac{\\partial f}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-11::step-3::q3", + "prompt_runs": [ + { + "text": "現在代入 " + }, + { + "latex": "$t\\dfrac{\\partial g}{\\partial s} + s\\dfrac{\\partial g}{\\partial t}$", + "kind": "math" + }, + { + "text": ",展開後各項是否完全相消?" + } + ], + "options": [ + { + "key": "a", + "text": "是,結果為 $0$" + }, + { + "key": "b", + "text": "否,結果不為 $0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-11", + "step": "step-3" + } + ], + "gate_from": "flow-11::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案(展開驗證):$$\nt(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "答案(展開驗證):", + "style": "bold" + }, + { + "latex": "$$\nt(2sf_x - 2sf_y) + s(-2tf_x + 2tf_y) = 2stf_x - 2stf_y - 2stf_x + 2stf_y = 0 \\qquad \\blacksquare\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-11::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n\n\n\n**(a) 計算 $\\dfrac{\\partial z}{\\partial r}$**\n\n![](/assets/Ch14_5_ex7.svg)\n\n$$\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)$$\n\n**(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$**\n\n對 (a) 再對 $r$ 微分,使用乘法法則:\n\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n再次使用連鎖律:\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$$\n\n$$\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)$$\n\n由連續二階偏導數,混合偏導相等,代入整理:\n\n$$\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}$$\n\n\n\n\n\n(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$\n\n其中 $x = r^2 + s^2$,$y = 2rs$,請問 $\\dfrac{\\partial x}{\\partial r}$ 和 $\\dfrac{\\partial y}{\\partial r}$ 分別是?\n\na. $\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$\nb. $\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$\nc. $\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$\n\n\n\n\n所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。\n\n(b) 對上式再對 $r$ 微分,用乘法法則:\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)$$\n\n現在需要再用連鎖律展開 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$,結果是?\n\na. $\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$\nb. $\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$\nc. $\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$\n\n\n\n\n同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。\n\n由連續二階偏導,$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$,代入整理後,$\\dfrac{\\partial^2 z}{\\partial r^2}$ 的 $\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$ 項的係數是?\n\n\n\n\n\n**答案:**\n$$\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}$$\n\n\n\n\n---\n\n\n註解\n一般形式小結\n- 公式項數 = 中間變數個數 $n$\n- 直接套用樹狀圖:路徑乘積求和\n- 二階偏導需**兩次**使用連鎖律,注意混合偏導相等的條件(連續二階偏導)\n\n\n---\n\n## 4️⃣ 隱函數微分\n\n假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。\n\n由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):\n\n$$\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0$$\n\n因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n定理\n隱函數定理\n若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:\n- $F(a,b) = 0$\n- $F_y(a,b) \\neq 0$\n- $F_x$ 與 $F_y$ 在該區域內連續\n\n則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y}$$\n\n\n---\n\n### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 具有連續的二階偏導數,且 " + }, + { + "latex": "$x = r^2 + s^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2rs$", + "kind": "math" + }, + { + "text": ",求:(a) " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math" + }, + { + "text": ",(b) " + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 請先寫出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math" + }, + { + "text": "(以 " + }, + { + "latex": "$r, s$", + "kind": "math" + }, + { + "text": " 和偏導符號表示):" + } + ], + "answers": [ + "2*r*dz/dx+2*s*dz/dy" + ], + "normalize": [ + "nospace" + ], + "placeholder": "例:2r(dz/dx)+2s(dz/∂y)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_76da149e19", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "(a) 計算 $\\dfrac{\\partial z}{\\partial r}$", + "newline": "false", + "runs": [ + { + "text": "(a) 計算 ", + "style": "bold" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r}$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_5_ex7.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial r} = \\frac{\\partial z}{\\partial x}(2r) + \\frac{\\partial z}{\\partial y}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "(b) 計算 $\\dfrac{\\partial^2 z}{\\partial r^2}$", + "newline": "false", + "runs": [ + { + "text": "(b) 計算 ", + "style": "bold" + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對 (a) 再對 $r$ 微分,使用乘法法則:", + "newline": "false", + "runs": [ + { + "text": "對 (a) 再對 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 微分,使用乘法法則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "再次使用連鎖律:", + "newline": "false", + "runs": [ + { + "text": "再次使用連鎖律:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) = \\frac{\\partial^2 z}{\\partial x^2}(2r) + \\frac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right) = \\frac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\frac{\\partial^2 z}{\\partial y^2}(2s)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由連續二階偏導數,混合偏導相等,代入整理:", + "newline": "false", + "runs": [ + { + "text": "由連續二階偏導數,混合偏導相等,代入整理:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\boxed{\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 7\n\n若 $z = f(x,y)$ 具有連續的二階偏導數,且 $x = r^2 + s^2$,$y = 2rs$,求:(a) $\\dfrac{\\partial z}{\\partial r}$,(b) $\\dfrac{\\partial^2 z}{\\partial r^2}$。\n\n(a) 請先寫出 $\\dfrac{\\partial z}{\\partial r}$(以 $r, s$ 和偏導符號表示):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_8af43e2ac6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-12", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "(a) 由連鎖律:$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$", + "newline": "false", + "runs": [ + { + "text": "(a) 由連鎖律:" + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r} = \\dfrac{\\partial z}{\\partial x}\\dfrac{\\partial x}{\\partial r} + \\dfrac{\\partial z}{\\partial y}\\dfrac{\\partial y}{\\partial r}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-12::step-1::q1", + "prompt_runs": [ + { + "text": "其中 " + }, + { + "latex": "$x = r^2 + s^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2rs$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$\\dfrac{\\partial x}{\\partial r}$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\dfrac{\\partial y}{\\partial r}$", + "kind": "math" + }, + { + "text": " 分別是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial x}{\\partial r} = 2s,\\ \\dfrac{\\partial y}{\\partial r} = 2r$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial x}{\\partial r} = 2r,\\ \\dfrac{\\partial y}{\\partial r} = 2s$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial x}{\\partial r} = r^2,\\ \\dfrac{\\partial y}{\\partial r} = s$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-12", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以 $\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "所以 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial r} = 2r\\dfrac{\\partial z}{\\partial x} + 2s\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "(b) 對上式再對 $r$ 微分,用乘法法則:$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "newline": "false", + "runs": [ + { + "text": "(b) 對上式再對 " + }, + { + "latex": "$r$", + "kind": "math" + }, + { + "text": " 微分,用乘法法則:" + }, + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 2r\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial x}\\right) + 2s\\frac{\\partial}{\\partial r}\\!\\left(\\frac{\\partial z}{\\partial y}\\right)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-12::step-2::q2", + "prompt_runs": [ + { + "text": "現在需要再用連鎖律展開 " + }, + { + "latex": "$\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial x}\\right)$", + "kind": "math" + }, + { + "text": ",結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2}(2r) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2s)$" + }, + { + "key": "b", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2}(2s) + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}(2r)$" + }, + { + "key": "c", + "text": "$\\dfrac{\\partial^2 z}{\\partial x^2} + \\dfrac{\\partial^2 z}{\\partial y\\,\\partial x}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-12", + "step": "step-2" + } + ], + "gate_from": "flow-12::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "同理 $\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$。", + "newline": "false", + "runs": [ + { + "text": "同理 " + }, + { + "latex": "$\\dfrac{\\partial}{\\partial r}\\!\\left(\\dfrac{\\partial z}{\\partial y}\\right) = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}(2r) + \\dfrac{\\partial^2 z}{\\partial y^2}(2s)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-12::step-3::q3", + "prompt_runs": [ + { + "text": "由連續二階偏導," + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial y\\,\\partial x} = \\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$", + "kind": "math" + }, + { + "text": ",代入整理後," + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial r^2}$", + "kind": "math" + }, + { + "text": " 的 " + }, + { + "latex": "$\\dfrac{\\partial^2 z}{\\partial x\\,\\partial y}$", + "kind": "math" + }, + { + "text": " 項的係數是?" + } + ], + "answers": [ + "8*r*s" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-12", + "step": "step-3" + } + ], + "gate_from": "flow-12::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial^2 z}{\\partial r^2} = 2\\frac{\\partial z}{\\partial x} + 4r^2\\frac{\\partial^2 z}{\\partial x^2} + 8rs\\frac{\\partial^2 z}{\\partial x\\,\\partial y} + 4s^2\\frac{\\partial^2 z}{\\partial y^2}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-12::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "一般形式小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "公式項數 = 中間變數個數 " + }, + { + "latex": "$n$", + "kind": "math" + } + ], + "content": "公式項數 = 中間變數個數 $n$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "直接套用樹狀圖:路徑乘積求和" + } + ], + "content": "直接套用樹狀圖:路徑乘積求和" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "二階偏導需" + }, + { + "text": "兩次", + "style": "bold" + }, + { + "text": "使用連鎖律,注意混合偏導相等的條件(連續二階偏導)" + } + ], + "content": "二階偏導需兩次使用連鎖律,注意混合偏導相等的條件(連續二階偏導)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-4", + "title": "4️⃣ 隱函數微分", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "4️⃣ 隱函數微分", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 隱函數微分", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "假設方程式 $F(x,y) = 0$ 將 $y$ 隱式定義為 $x$ 的可微函數 $y = f(x)$。", + "newline": "false", + "runs": [ + { + "text": "假設方程式 " + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math" + }, + { + "text": " 將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 隱式定義為 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的可微函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由於 $x$ 和 $y = f(x)$ 都是 $x$ 的函數,對方程式兩邊對 $x$ 微分,使用連鎖律(形式 1):", + "newline": "false", + "runs": [ + { + "text": "由於 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 都是 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的函數,對方程式兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 微分,使用連鎖律(形式 1):" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial F}{\\partial x}\\cdot\\frac{dx}{dx} + \\frac{\\partial F}{\\partial y}\\cdot\\frac{dy}{dx} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $\\dfrac{dx}{dx} = 1$,且 $F_y \\neq 0$,可解出:", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$\\dfrac{dx}{dx} = 1$", + "kind": "math" + }, + { + "text": ",且 " + }, + { + "latex": "$F_y \\neq 0$", + "kind": "math" + }, + { + "text": ",可解出:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "隱函數定理", + "body": [ + { + "type": "paragraph", + "content": "若 $F$ 在包含點 $(a,b)$ 的某個圓盤區域內滿足:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F$", + "kind": "math" + }, + { + "text": " 在包含點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 的某個圓盤區域內滿足:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F(a,b) = 0$", + "kind": "math" + } + ], + "content": "$F(a,b) = 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F_y(a,b) \\neq 0$", + "kind": "math" + } + ], + "content": "$F_y(a,b) \\neq 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": " 在該區域內連續" + } + ], + "content": "$F_x$ 與 $F_y$ 在該區域內連續" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "則在點 $(a,b)$ 附近,$F(x,y) = 0$ 可將 $y$ 表示為 $x$ 的函數,其導數為:$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "newline": "false", + "runs": [ + { + "text": "則在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 附近," + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math" + }, + { + "text": " 可將 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 表示為 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的函數,其導數為:" + }, + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 8", + "newline": "true", + "runs": [ + { + "text": "Example 8", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n\n\n\n**Step 1:整理成 $F(x,y) = 0$**\n\n$$F(x,y) = x^3 + y^3 - 6xy = 0$$\n\n**Step 2:計算偏導數**\n\n$$F_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x$$\n\n**Step 3:套用公式**\n\n$$\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n令 $F(x,y) = x^3 + y^3 - 6xy$。\n\n隱函數微分公式為 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,請問 $F_x$ 是?\n\n\n\n\n\n$F_y$ 是?\n\n\n\n\n\n代入公式 $y' = -\\dfrac{F_x}{F_y}$,化簡後是哪一個?\n\na. $-\\dfrac{x^2 + 2y}{y^2 + 2x}$\nb. $-\\dfrac{x^2 - 2y}{y^2 - 2x}$\nc. $\\dfrac{x^2 - 2y}{y^2 - 2x}$\nd. $-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)\n\n\n\n\n**答案:**\n$$y' = -\\frac{x^2 - 2y}{y^2 - 2x}$$\n\n\n\n\n\n若 $F(x,y) = x^2 + y^2 - 1 = 0$,則 $\\dfrac{dy}{dx}$ 為何?\na. $\\dfrac{y}{x}$\nb. $-\\dfrac{x}{y}$\nc. $\\dfrac{x}{y}$\nd. $-\\dfrac{y}{x}$\n\n\n---\n\n## 5️⃣ 三變數隱函數\n\n假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。\n\n對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。\n\n$$\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0$$\n\n若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。\n\n\n定理\n三變數隱微分公式\n若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}$$\n\n\n\n註解\n公式記憶法\n分母永遠是**對 $z$ 的偏導** $F_z$,分子是**對要求變數的偏導**,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。\n\n\n---\n\n### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-8" + }, + { + "type": "paragraph", + "content": "求 $y'$,若 $x^3 + y^3 = 6xy$。", + "newline": "false", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$y'$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$x^3 + y^3 = 6xy$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$y'$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "-(x^2-2*y)/(y^2-2*x)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_16f618c2c3", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:整理成 $F(x,y) = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 1:整理成 ", + "style": "bold" + }, + { + "latex": "$F(x,y) = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y) = x^3 + y^3 - 6xy = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y) = x^3 + y^3 - 6xy = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 3x^2 - 6y, \\qquad F_y = 3y^2 - 6x\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{dy}{dx} = -\\frac{F_x}{F_y} = -\\frac{3x^2 - 6y}{3y^2 - 6x} = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 8\n\n求 $y'$,若 $x^3 + y^3 = 6xy$。\n\n請先試著算出 $y'$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d2a98b7336", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-13", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $F(x,y) = x^3 + y^3 - 6xy$。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$F(x,y) = x^3 + y^3 - 6xy$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-13::step-1::q1", + "prompt_runs": [ + { + "text": "隱函數微分公式為 " + }, + { + "latex": "$\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": " 是?" + } + ], + "answers": [ + "3*x^2-6*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-13", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-13::step-2::q2", + "prompt_runs": [ + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": " 是?" + } + ], + "answers": [ + "3*y^2-6*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-13", + "step": "step-2" + } + ], + "gate_from": "flow-13::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-13::step-3::q3", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$y' = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",化簡後是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{x^2 + 2y}{y^2 + 2x}$" + }, + { + "key": "b", + "text": "$-\\dfrac{x^2 - 2y}{y^2 - 2x}$" + }, + { + "key": "c", + "text": "$\\dfrac{x^2 - 2y}{y^2 - 2x}$" + }, + { + "key": "d", + "text": "$-\\dfrac{3x^2 - 6y}{3y^2 - 6x}$(未化簡)" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-13", + "step": "step-3" + } + ], + "gate_from": "flow-13::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\ny' = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\ny' = -\\frac{x^2 - 2y}{y^2 - 2x}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-13::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-5", + "title": "5️⃣ 三變數隱函數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "5️⃣ 三變數隱函數", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 三變數隱函數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "假設 $F(x,y,z) = 0$ 將 $z$ 隱式定義為 $z = f(x,y)$。", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 將 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 隱式定義為 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對方程式對 $x$ 偏微分時,固定 $y$。此時 $x$ 本身對 $x$ 的導數為 $1$,$y$ 對 $x$ 的偏導為 $0$,而 $z=z(x,y)$ 會隨 $x$ 改變。", + "newline": "false", + "runs": [ + { + "text": "對方程式對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 偏微分時,固定 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": "。此時 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 本身對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的導數為 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 的偏導為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",而 " + }, + { + "latex": "$z=z(x,y)$", + "kind": "math" + }, + { + "text": " 會隨 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 改變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial F}{\\partial x}\\cdot 1 + \\frac{\\partial F}{\\partial y}\\cdot 0 + \\frac{\\partial F}{\\partial z}\\cdot\\frac{\\partial z}{\\partial x} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若 $F_z \\neq 0$,解出 $\\dfrac{\\partial z}{\\partial x}$;同理可得 $\\dfrac{\\partial z}{\\partial y}$。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F_z \\neq 0$", + "kind": "math" + }, + { + "text": ",解出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": ";同理可得 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "三變數隱微分公式", + "body": [ + { + "type": "paragraph", + "content": "若 $F(x,y,z) = 0$ 且 $F_z \\neq 0$,則:$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}\n$$", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$F_z \\neq 0$", + "kind": "math" + }, + { + "text": ",則:" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "公式記憶法", + "body": [ + { + "type": "paragraph", + "content": "分母永遠是對 $z$ 的偏導 $F_z$,分子是對要求變數的偏導,最前面加負號。可類比二變數公式 $\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$,把 $y$ 換成 $z$ 即可。", + "newline": "false", + "runs": [ + { + "text": "分母永遠是" + }, + { + "text": "對 ", + "style": "bold" + }, + { + "latex": "$z$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的偏導", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$F_z$", + "kind": "math" + }, + { + "text": ",分子是" + }, + { + "text": "對要求變數的偏導", + "style": "bold" + }, + { + "text": ",最前面加負號。可類比二變數公式 " + }, + { + "latex": "$\\dfrac{dy}{dx} = -\\dfrac{F_x}{F_y}$", + "kind": "math" + }, + { + "text": ",把 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 換成 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 即可。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 9", + "newline": "true", + "runs": [ + { + "text": "Example 9", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 8, + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n\n\n\n**Step 1:定義 $F$**\n\n$$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4$$\n\n**Step 2:計算各偏導數**\n\n$$F_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy$$\n\n**Step 3:套用公式**\n\n$$\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}$$\n\n$$\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n令 $F = x^3 + y^3 + z^3 + 6xyz + 4$,求 $F_x$:\n\n\n\n\n\n求 $F_y$:\n\n\n\n\n\n求 $F_z$:\n\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$,化簡後是?\n\na. $-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$\nb. $-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\nc. $\\dfrac{x^2 + 2yz}{z^2 + 2xy}$\n\n\n\n\n代入公式 $\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$,化簡後是?\n\na. $-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nb. $\\dfrac{y^2 + 2xz}{z^2 + 2xy}$\nc. $-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$\n\n\n\n\n**答案:**\n$$\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}$$\n\n\n\n\n\n若 $F(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$,則 $\\dfrac{\\partial z}{\\partial x}$ 為何?\na. $-\\dfrac{x}{z}$\nb. $\\dfrac{x}{z}$\nc. $-\\dfrac{z}{x}$\nd. $\\dfrac{z}{x}$\n\n\n---", + "id": "Example-9" + }, + { + "type": "paragraph", + "content": "求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。", + "newline": "false", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y}$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$x^3 + y^3 + z^3 + 6xyz + 4 = 0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x}$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "-(x^2+2*y*z)/(z^2+2*x*y)" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7b4786a8d0", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義 $F$", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義 ", + "style": "bold" + }, + { + "latex": "$F$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = x^3 + y^3 + z^3 + 6xyz + 4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算各偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算各偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 3x^2 + 6yz, \\qquad F_y = 3y^2 + 6xz, \\qquad F_z = 3z^2 + 6xy\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{F_x}{F_z} = -\\frac{x^2 + 2yz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{\\partial z}{\\partial y} = -\\frac{F_y}{F_z} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 9\n\n求 $\\dfrac{\\partial z}{\\partial x}$ 與 $\\dfrac{\\partial z}{\\partial y}$,若 $x^3 + y^3 + z^3 + 6xyz + 4 = 0$。\n\n請先試著算出 $\\dfrac{\\partial z}{\\partial x}$:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c53360cb29", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-14", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-1::q1", + "prompt_runs": [ + { + "text": "令 " + }, + { + "latex": "$F = x^3 + y^3 + z^3 + 6xyz + 4$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$F_x$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*x^2+6*y*z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-2::q2", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$F_y$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*y^2+6*x*z" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-2" + } + ], + "gate_from": "flow-14::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-14::step-3::q3", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$F_z$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "3*z^2+6*x*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-14", + "step": "step-3" + } + ], + "gate_from": "flow-14::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-14::step-4::q4", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial x} = -\\dfrac{F_x}{F_z}$", + "kind": "math" + }, + { + "text": ",化簡後是?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{x^2 + 2yz}{z^2 - 2xy}$" + }, + { + "key": "b", + "text": "$-\\dfrac{x^2 + 2yz}{z^2 + 2xy}$" + }, + { + "key": "c", + "text": "$\\dfrac{x^2 + 2yz}{z^2 + 2xy}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-14", + "step": "step-4" + } + ], + "gate_from": "flow-14::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-14::step-5::q5", + "prompt_runs": [ + { + "text": "代入公式 " + }, + { + "latex": "$\\dfrac{\\partial z}{\\partial y} = -\\dfrac{F_y}{F_z}$", + "kind": "math" + }, + { + "text": ",化簡後是?" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{y^2 + 2xz}{z^2 + 2xy}$" + }, + { + "key": "b", + "text": "$\\dfrac{y^2 + 2xz}{z^2 + 2xy}$" + }, + { + "key": "c", + "text": "$-\\dfrac{y^2 + 2xz}{z^2 - 2xy}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-14", + "step": "step-5" + } + ], + "gate_from": "flow-14::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\frac{\\partial z}{\\partial x} = -\\frac{x^2 + 2yz}{z^2 + 2xy}, \\qquad \\frac{\\partial z}{\\partial y} = -\\frac{y^2 + 2xz}{z^2 + 2xy}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-14::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/C14_6/Dash_Ch14_6.py b/pages/Ch14/C14_6/Dash_Ch14_6.py new file mode 100644 index 0000000000000000000000000000000000000000..7c59b94ac2551ad87b08501252da5451af31cd47 --- /dev/null +++ b/pages/Ch14/C14_6/Dash_Ch14_6.py @@ -0,0 +1,11 @@ +import dash +from layout.page_builder import make_test_page +from pathlib import Path + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_6.json" + +dash.register_page(__name__, path="/Ch14_6", title="Ch14_6") + +def layout(): + return make_test_page(str(JSON_PATH), top_offset=90) diff --git a/pages/Ch14/C14_6/Md_14_6.md b/pages/Ch14/C14_6/Md_14_6.md new file mode 100644 index 0000000000000000000000000000000000000000..a568dc65aa398b0644f19aa2deae5ec8e86a7606 --- /dev/null +++ b/pages/Ch14/C14_6/Md_14_6.md @@ -0,0 +1,1120 @@ +# 方向導數和梯度向量 +## 1️⃣ 方向導數 + +在正式進入這個單元之前,我們先來回想一下偏導數。 + + +回顧 +偏導數(Partial Derivatives) +若 $z = f(x,y)$,則在點 $(x_0, y_0)$ 的偏導數定義為: +$$f_x(x_0,y_0) = \lim_{h\to 0}\frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}$$ +$$f_y(x_0,y_0) = \lim_{h\to 0}\frac{f(x_0,y_0+h)-f(x_0,y_0)}{h}$$ +它們分別代表 $z$ 對 $x$ 方向與對 $y$ 方向的變化率。 + + +偏導數只能沿著 $x$ 軸或 $y$ 軸方向測量變化率。但在現實中,我可能想往斜 30 度或斜 45 度的方向測量,這時候該怎麼計算? + + +我們可以引入一個**單位方向向量** $\mathbf{u} = \langle a, b \rangle$,其中 $a$ 代表往 $x$ 方向的比例,$b$ 代表往 $y$ 方向的比例,且必須滿足 $a^2 + b^2 = 1$。 + +只要找出沿著 $\mathbf{u}$ 方向的變化率,就是我們要求的**方向導數** $D_{\mathbf{u}}f$。 + +![單位向量|w=400](/assets/unit_vector.svg) + + + + + +--- + + +不知道大家有沒有看過日本的**箱根驛傳**?這是一場總長 217.1 公里、由 10 人接力完成的長距離賽事。 + +我們如果在地圖上把賽事用座標表示: +- 跑者位置:$P = (x, y)$ +- 海拔是一個函數:$h(x, y)$(單位:公尺) + +**問題:** 跑者沿著「路線方向」前進時,海拔上升(或下降)的速率是多少? + +這個「速率」就是**方向導數**。 + +--- + +在平面上,「方向」可以用一個向量表示。但我們希望方向導數代表「每前進 1 個單位距離」的變化率,因此要把方向向量標準化成**單位向量**: +$$\mathbf{u} = \frac{\mathbf{v}}{|\mathbf{v}|}, \qquad |\mathbf{u}| = 1$$ + +跑者在點 $P$,沿著方向 $\mathbf{u}$ 前進距離 $t$ 後,海拔改變量是 $h(P+t\mathbf{u}) - h(P)$。因此沿著方向 $\mathbf{u}$ 的海拔變化率定義為: +$$D_{\mathbf{u}}h(P) = \lim_{t\to 0}\frac{h(P+t\mathbf{u})-h(P)}{t}$$ + +以競賽中的第 5 跑區為例:最高點在 16.2 km 附近,之後轉成下坡。這表示沿著路線方向的方向導數 $D_{\mathbf{u}}h$,前半段多為正(爬升),到最高點接近 0,後半段變負(下坡)。 + +**方向導數的符號,直接對應你沿著那個方向是在上坡、持平,還是下坡。** + + + + +--- + +## 2️⃣ 方向導數定義 + + +定義 +方向導數 Directional Derivatives +令 $\mathbf{u} = \langle a, b \rangle$ 為**單位向量**(即 $\|\mathbf{u}\| = 1$)。函數 $f$ 在點 $(x_0, y_0)$ 沿著方向 $\mathbf{u}$ 的方向導數定義為: +$$D_{\mathbf{u}}f(x_0,y_0) = \lim_{h\to 0}\frac{f(x_0+ha,\;y_0+hb)-f(x_0,y_0)}{h}$$ +若此極限存在。 + + +**Q:為什麼 $\mathbf{u}$ 要是單位向量?** + + + +a. 不然連鎖律不能用 +b. 不然方向導數會被向量長度影響,不再代表「每 1 單位距離」的變化率 +c. 不然 $f_x, f_y$ 會改變 +d. 不然極限不存在 + + + +如果 $\mathbf{u}$ 不是單位向量,等於你「每次前進的距離」被放大或縮小,變化率就會跟著被放大或縮小;用單位向量才能代表「每走 1 單位距離」的瞬時變化率。 + + + +--- + + +定理 +方向導數的公式 +1. 若 $f$ 在點 $(x,y)$ 可微,則 $f$ 在該點沿任意單位向量 $\mathbf{u} = \langle a, b \rangle$ 方向上的方向導數存在,且: +$$D_{\mathbf{u}}f(x,y) = f_x(x,y)\,a + f_y(x,y)\,b$$ +2. 若單位向量 $\mathbf{u}$ 與正 $x$ 軸夾角為 $\theta$,則 $\mathbf{u} = \langle \cos\theta, \sin\theta \rangle$,代入上式得: +$$D_{\mathbf{u}}f(x,y) = f_x(x,y)\cos\theta + f_y(x,y)\sin\theta$$ + + + +我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\mathbf{u} = \langle a, b \rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。 + +因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\mathbf{u}$ 前進 $h$ 時的函數值。 + +根據單變數導數的定義: +$$g'(0) = \lim\limits_{h \to 0} \dfrac{g(h) - g(0)}{h}$$ + +將 $g(h)$ 與 $g(0)$ 代回後可得: +$$g'(0) = \lim\limits_{h\to 0}\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}$$ + +而這正是 $D_{\mathbf{u}}f(x_0,y_0)$ 的定義,因此: +$$D_{\mathbf{u}}f(x_0,y_0)=g'(0)$$ + +接著改用連鎖律計算 $g'(h)$,其中 $x = x_0 + ha$,$y = y_0 + hb$: +$$g'(h) = \frac{\partial f}{\partial x}\frac{dx}{dh} + \frac{\partial f}{\partial y}\frac{dy}{dh}$$ + +因為 +$$\frac{dx}{dh}=a,\qquad \frac{dy}{dh}=b$$ + +所以 +$$g'(h)=f_x(x,y)\,a+f_y(x,y)\,b$$ + +令 $h = 0$,則 $x = x_0$,$y = y_0$,得到: +$$g'(0) = f_x(x_0, y_0)\,a + f_y(x_0, y_0)\,b$$ + +因此: +$$D_{\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\,a + f_y(x_0, y_0)\,b \quad \blacksquare$$ + +若單位向量 $\mathbf{u}$ 與正 $x$ 軸夾角為 $\theta$,則 $\mathbf{u} = \langle \cos\theta, \sin\theta \rangle$,代入即得: +$$D_{\mathbf{u}}f(x,y) = f_x\cos\theta + f_y\sin\theta$$ + +![|w=400](/assets/unit_vector_theta.svg) + + + + + +我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\mathbf{u} = \langle a, b \rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。 + +因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\mathbf{u}$ 前進 $h$ 時的函數值。 + +$g'(0) = \lim\limits_{h \to 0} \dfrac{g(h) - g(0)}{h}$,請問將 $g(h)$ 代回後是哪一個? + +a. $\lim\limits_{h\to 0}\dfrac{f(x_0+ha, y_0) - f(x_0, y_0)}{h}$ +b. $\lim\limits_{h\to 0}\dfrac{f(x_0+a, y_0+b) - f(x_0, y_0)}{h}$ +c. $\lim\limits_{h\to 0}\dfrac{f(x_0+h, y_0+h) - f(x_0, y_0)}{h}$ +d. $\lim\limits_{h\to 0}\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}$ + + + + +而這也是 $D_{\mathbf{u}}f$ 的定義。 + +改用連鎖律計算 $g'(h)$,其中 $x = x_0 + ha$,$y = y_0 + hb$: +$$g'(h) = \frac{\partial f}{\partial x}\frac{dx}{dh} + \frac{\partial f}{\partial y}\frac{dy}{dh} = \;?$$ + +a. $f_x(x,y)\,a + f_y(x,y)\,b$ +b. $f_x(x,y) + f_y(x,y)$ +c. $f_x(x,y)\,h + f_y(x,y)\,h$ +d. $a + b$ + + + + +令 $h = 0$,則 $x = x_0$,$y = y_0$,得到: +$$g'(0) = f_x(x_0, y_0)\,a + f_y(x_0, y_0)\,b$$ + +因此: +$$D_{\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\,a + f_y(x_0, y_0)\,b \quad \blacksquare$$ + +若單位向量 $\mathbf{u}$ 與正 $x$ 軸夾角為 $\theta$,則 $\mathbf{u} = \langle \cos\theta, \sin\theta \rangle$,代入即得: +$$D_{\mathbf{u}}f(x,y) = f_x\cos\theta + f_y\sin\theta$$ + +![|w=400](/assets/unit_vector_theta.svg) + + + + +--- + +### Example 1 + +已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\mathbf{u}$ 是與正 $x$ 軸夾角 $\theta = \dfrac{\pi}{6}$ 的單位向量。求 $D_{\mathbf{u}}f(x,y)$,並計算 $D_{\mathbf{u}}f(1,2)$。 + +![](/assets/Ch14_6_ex1.svg) + +請先試著算出 $D_{\mathbf{u}}f(1,2)$: + + + +不會的話可以看看下面引導解法或是詳細解法喔。 + + +**Step 1:寫出單位向量** + +$$\mathbf{u} = \left\langle \cos\frac{\pi}{6}, \sin\frac{\pi}{6} \right\rangle = \left\langle \frac{\sqrt{3}}{2}, \frac{1}{2} \right\rangle$$ + +**Step 2:計算偏導數** + +$$f_x(x,y) = 3x^2 - 3y, \qquad f_y(x,y) = -3x + 8y$$ + +**Step 3:套用公式** + +$$D_{\mathbf{u}}f(x,y) = (3x^2-3y)\frac{\sqrt{3}}{2} + (-3x+8y)\frac{1}{2}$$ + +**Step 4:代入 $(1,2)$** + +$$D_{\mathbf{u}}f(1,2) = \frac{\sqrt{3}(3-6)}{2} + \frac{-3+16}{2} = \frac{-3\sqrt{3}}{2} + \frac{13}{2} = \frac{13 - 3\sqrt{3}}{2}$$ + + + + + +題目要求方向導數 $D_{\mathbf{u}}f(x,y)$,若 $\mathbf{u}$ 與 $x$ 軸夾角為 $\theta$,正確公式是哪個? + +a. $f_x(x,y)\sin\theta + f_y(x,y)\cos\theta$ +b. $f_x(x,y) + f_y(x,y)$ +c. $f_x(x,y)\cos\theta + f_y(x,y)\sin\theta$ + + + + +已知 $\theta = \dfrac{\pi}{6}$,方向向量的分量 $(\cos\theta, \sin\theta)$ 為何? + +a. $\left(\dfrac{1}{2}, \dfrac{\sqrt{3}}{2}\right)$ +b. $\left(\dfrac{\sqrt{3}}{2}, \dfrac{1}{2}\right)$ +c. $\left(-\dfrac{\sqrt{3}}{2}, \dfrac{1}{2}\right)$ + + + + +接下來求偏導數:$f_x(x,y) = \dfrac{\partial}{\partial x}(x^3-3xy+4y^2) = $ ? + + + + + +$f_y(x,y) = \dfrac{\partial}{\partial y}(x^3-3xy+4y^2) = $ ? + + + + + +偏導數:$f_x = 3x^2 - 3y$,$f_y = -3x + 8y$。 + +代入公式: +$$D_{\mathbf{u}}f(x,y) = (3x^2-3y)\frac{\sqrt{3}}{2} + (-3x+8y)\frac{1}{2}$$ + +最後算 $(1,2)$ 的值: + +a. $\dfrac{13 - 3\sqrt{3}}{2}$ +b. $\dfrac{13 + 3\sqrt{3}}{2}$ +c. $13 - 3\sqrt{3}$ + + + + +**答案:** +$D_{\mathbf{u}}f(x,y) = (3x^2-3y)\dfrac{\sqrt{3}}{2} + (-3x+8y)\dfrac{1}{2}$ + +$D_{\mathbf{u}}f(1,2) = \dfrac{13-3\sqrt{3}}{2}$ + + + + +--- + +## 3️⃣ 梯度向量 + +由方向導數公式可知: + +$$D_{\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \langle f_x(x,y), f_y(x,y) \rangle \cdot \langle a, b \rangle = \langle f_x, f_y \rangle \cdot \mathbf{u}$$ + +其中向量 $\langle f_x, f_y \rangle$ 會在很多地方反覆出現,我們給它一個特別的名字:**梯度(gradient)**,以符號 $\nabla f$($\nabla$ 讀作「nabla」或「del」)表示。 + +--- + + +定義 +梯度向量 The Gradient Vector +如果 $f$ 是二變數 $x$ 與 $y$ 的函數,則 $f$ 的梯度是一個向量函數 $\nabla f$,定義為: +$$\nabla f(x,y) = \langle f_x(x,y),\, f_y(x,y) \rangle = \frac{\partial f}{\partial x}\,\mathbf{i} + \frac{\partial f}{\partial y}\,\mathbf{j}$$ +通常簡寫成 $\nabla f = \langle f_x, f_y \rangle$。 + + + +定理 +方向導數的向量公式 +使用梯度向量的記號後,方向導數可以寫成: +$$D_{\mathbf{u}}f(x,y) = \nabla f(x,y) \cdot \mathbf{u}$$ +這個式子表示:沿著單位向量 $\mathbf{u}$ 的方向導數,等於把梯度向量 $\nabla f$ 投影到 $\mathbf{u}$ 上的「純量投影」(也就是梯度在該方向上的分量)。 + + +--- + +### Example 2 + +如果 $f(x,y) = \sin x + e^{xy}$,求 $\nabla f(0,1) = \langle a, b \rangle$。 + + + + + +**Step 1:計算梯度** + +$$\nabla f(x,y) = \langle f_x, f_y \rangle = \langle \cos x + ye^{xy},\; xe^{xy} \rangle$$ + +**Step 2:代入 $(0,1)$** + +$$\nabla f(0,1) = \langle \cos 0 + 1\cdot e^0,\; 0\cdot e^0 \rangle = \langle 2, 0 \rangle$$ + + + + + +首先請問 $\nabla f(x,y) = $ ? + +a. $\langle \cos x + e^{xy},\; e^{xy} \rangle$ +b. $\langle \cos x + ye^{xy},\; xe^{xy} \rangle$ +c. $\langle \cos x + xe^{xy},\; ye^{xy} \rangle$ +d. $\langle \cos x + ye^{xy},\; \cos x + xe^{xy} \rangle$ + + + + +代入 $(0,1)$ 後可得: + +a. $\langle 2, 0 \rangle$ +b. $\langle 2, 1 \rangle$ +c. $\langle 1, 1 \rangle$ + + + + +**答案:** +$\nabla f(x,y) = \langle \cos x + ye^{xy},\; xe^{xy} \rangle$ +$\nabla f(0,1) = \langle 2, 0 \rangle$ + + + + +--- + +### Example 3 + +求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\mathbf{v} = 2\mathbf{i} + 5\mathbf{j}$ 方向的方向導數。 + +![|w=400](/assets/Ch14_6_ex3.svg) + +請試著算出方向導數: + + + +**Step 1:計算梯度** + +$$\nabla f(x,y) = \langle 2xy^3,\; 3x^2y^2-4 \rangle$$ + +代入 $(2,-1)$: + +$$\nabla f(2,-1) = \langle -4, 8 \rangle$$ + +**Step 2:注意!題目給的是方向向量,不是單位向量** + +$$\|\mathbf{v}\| = \sqrt{4+25} = \sqrt{29}, \qquad \mathbf{u} = \frac{\mathbf{v}}{\|\mathbf{v}\|} = \left\langle \frac{2}{\sqrt{29}}, \frac{5}{\sqrt{29}} \right\rangle$$ + +**Step 3:計算方向導數** + +$$D_{\mathbf{u}}f(2,-1) = \nabla f(2,-1) \cdot \mathbf{u} = \langle -4, 8 \rangle \cdot \left\langle \frac{2}{\sqrt{29}}, \frac{5}{\sqrt{29}} \right\rangle = \frac{-8+40}{\sqrt{29}} = \frac{32}{\sqrt{29}}$$ + + + +套用方向導數的向量公式:$D_{\mathbf{u}}f(x,y) = \nabla f(x,y) \cdot \mathbf{u}$ + + +若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$ + + + + + +再求另一個偏導數:$f_y(x,y) = ?$ + + + + + +梯度向量為 $\nabla f(x,y) = \langle 2xy^3,\; 3x^2y^2-4 \rangle$。 + +把 $(2,-1)$ 代入後,$\nabla f(2,-1)$ 等於多少? + +a. $\langle 4,\; 8 \rangle$ +b. $\langle -4,\; -8 \rangle$ +c. $\langle -4,\; 8 \rangle$ + + + + +注意!直接用 $\langle -4, 8 \rangle \cdot \langle 2, 5 \rangle$ 對嗎? + + + + + +你答對了!方向導數要用**單位向量** $\mathbf{u}$,但題目給的 $\mathbf{v}$ 不一定是單位向量,要先算長度 $\|\mathbf{v}\|$: + +a. $\sqrt{7}$ +b. $\sqrt{29}$ +c. $29$ + + + + +所以單位向量 $\mathbf{u} = \left\langle \dfrac{2}{\sqrt{29}}, \dfrac{5}{\sqrt{29}} \right\rangle$。 + +最後套用方向導數公式: +$$D_{\mathbf{u}}f(2,-1) = \langle -4, 8 \rangle \cdot \left\langle \frac{2}{\sqrt{29}}, \frac{5}{\sqrt{29}} \right\rangle = ?$$ + +a. $\dfrac{32}{\sqrt{29}}$ +b. $\dfrac{-32}{\sqrt{29}}$ +c. $\dfrac{12}{\sqrt{29}}$ + + + + +**答案:** +$$D_{\mathbf{u}}f(2,-1) = \frac{-4\cdot 2 + 8\cdot 5}{\sqrt{29}} = \frac{32}{\sqrt{29}}$$ + + + + +--- + +## 4️⃣ 三變數函數的方向導數 + +對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。 + + +定義 +三變數的方向導數 +若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\mathbf{u} = \langle a, b, c \rangle$ 的方向導數: +$$D_{\mathbf{u}}f(x_0,y_0,z_0) = \lim_{h\to 0}\frac{f(x_0+ha,\;y_0+hb,\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$ + + + +定義 +三變數的梯度(Gradient) +$$\nabla f(x,y,z) = \langle f_x,\, f_y,\, f_z \rangle = \frac{\partial f}{\partial x}\mathbf{i} + \frac{\partial f}{\partial y}\mathbf{j} + \frac{\partial f}{\partial z}\mathbf{k}$$ + +方向導數可寫成: +$$D_{\mathbf{u}}f(x,y,z) = \nabla f(x,y,z) \cdot \mathbf{u} = f_x a + f_y b + f_z c$$ + + +--- + +### Example 4 + +已知 $f(x,y,z) = x\sin(yz)$。 + +(a) 求 $\nabla f(x,y,z) = \langle a, b, c \rangle$: + + + +(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\mathbf{v} = \mathbf{i} + 2\mathbf{j} - \mathbf{k}$ 的方向導數: + + + + +**Step 1:計算梯度** + +$$\nabla f(x,y,z) = \langle \sin(yz),\; xz\cos(yz),\; xy\cos(yz) \rangle$$ + +代入 $(1,3,0)$: + +$$\nabla f(1,3,0) = \langle \sin 0,\; 0,\; 3\cos 0 \rangle = \langle 0, 0, 3 \rangle$$ + +**Step 2:單位化方向向量** + +$$\|\mathbf{v}\| = \sqrt{1+4+1} = \sqrt{6}, \qquad \mathbf{u} = \left\langle \frac{1}{\sqrt{6}}, \frac{2}{\sqrt{6}}, -\frac{1}{\sqrt{6}} \right\rangle$$ + +**Step 3:計算方向導數** + +$$D_{\mathbf{u}}f(1,3,0) = \langle 0,0,3 \rangle \cdot \mathbf{u} = 3\cdot\left(-\frac{1}{\sqrt{6}}\right) = -\frac{3}{\sqrt{6}} = -\sqrt{\frac{3}{2}}$$ + + + + + +先回想:方向導數 $D_{\mathbf{u}}f$ 等於? + +a. $D_{\mathbf{u}}f = \nabla f \times \mathbf{u}$ +b. $D_{\mathbf{u}}f = \nabla f \cdot \mathbf{u}$ +c. $D_{\mathbf{u}}f = f_x + f_y + f_z$ + + + + +求 $f_x = \dfrac{\partial}{\partial x}\big(x\sin(yz)\big) = ?$ + + + + + +求 $f_y = \dfrac{\partial}{\partial y}\big(x\sin(yz)\big) = ?$ + + + + + +求 $f_z = \dfrac{\partial}{\partial z}\big(x\sin(yz)\big) = ?$ + + + + + +代入點 $(1,3,0)$,$\nabla f(1,3,0)$ 是哪一個? + +a. $\langle 0,\; 3,\; 0 \rangle$ +b. $\langle 1,\; 0,\; 3 \rangle$ +c. $\langle 0,\; 0,\; 3 \rangle$ + + + + +方向向量 $\mathbf{v} = \langle 1, 2, -1 \rangle$,先算長度 $\|\mathbf{v}\|$: + +a. $\sqrt{5}$ +b. $\sqrt{6}$ +c. $6$ + + + + +最後套用公式: +$$D_{\mathbf{u}}f(1,3,0) = \langle 0,0,3 \rangle \cdot \left\langle \frac{1}{\sqrt{6}}, \frac{2}{\sqrt{6}}, -\frac{1}{\sqrt{6}} \right\rangle = ?$$ + +a. $-\sqrt{\dfrac{3}{2}}$ +b. $\sqrt{\dfrac{3}{2}}$ +c. $\dfrac{3}{\sqrt{6}}$ + + + + +**答案:** +$$\nabla f(x,y,z) = \langle \sin(yz),\; xz\cos(yz),\; xy\cos(yz) \rangle$$ +$$D_{\mathbf{u}}f(1,3,0) = -\frac{3}{\sqrt{6}} = -\sqrt{\frac{3}{2}}$$ + + + + +--- + +## 5️⃣ 最大方向導數 + +我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?** + +由內積公式,方向導數可以寫成: + + +定理 +方向導數的內積形式 +$$D_{\mathbf{u}}f = \nabla f \cdot \mathbf{u} = |\nabla f|\,|\mathbf{u}|\cos\theta = |\nabla f|\cos\theta$$ +其中 $\theta$ 是梯度 $\nabla f$ 與方向向量 $\mathbf{u}$ 的夾角,$|\mathbf{u}| = 1$。 + + + +由方向導數公式 $D_{\mathbf{u}}f = \nabla f \cdot \mathbf{u}$ 以及向量內積的幾何定義 $\mathbf{A} \cdot \mathbf{B} = |\mathbf{A}||\mathbf{B}|\cos\theta$,令 $\mathbf{A} = \nabla f$,$\mathbf{B} = \mathbf{u}$,即得: +$$D_{\mathbf{u}}f = |\nabla f|\,|\mathbf{u}|\cos\theta = |\nabla f|\cos\theta$$ +(因為 $|\mathbf{u}| = 1$) + + +--- + +三個角色的分析: +- $|\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值** +- $|\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1** +- $\cos\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向 + +**Q1:$\cos\theta$ 在 $[0, 2\pi]$ 間最大值是多少?** + + + +此時 $\theta$ 是幾度? + + + +方向 $\mathbf{u}$ 跟梯度 $\nabla f$ 是什麼關係? + + + +a. 兩者方向相同 +b. 兩者方向相反 +c. 兩者互相垂直 +d. 兩者夾 45 度角 + + + +跟著梯度走,上升最快。此時變化率為 $|\nabla f| \cdot 1 \cdot 1 = |\nabla f|$。 + + + +**Q2:$\cos\theta$ 在 $[0, 2\pi]$ 間最小值是多少?** + + + +此時 $\theta$ 是多少? + + + +方向 $\mathbf{u}$ 跟梯度 $\nabla f$ 是什麼關係? + + + +a. 兩者方向相同 +b. 兩者方向相反 +c. 兩者互相垂直 +d. 兩者夾 45 度角 + + + +往梯度的反方向走,下降最快。此時變化率為 $-|\nabla f|$。 + + + + +定理 +最大方向導數與梯度 +若 $f$ 是二變數或三變數的可微函數,則: +- **最大上升**:$\mathbf{u}$ 與 $\nabla f$ **同方向**時,$D_{\mathbf{u}}f$ 最大,最大值為 $\|\nabla f\|$ +- **最大下降**:$\mathbf{u}$ 與 $\nabla f$ **反方向**時,$D_{\mathbf{u}}f$ 最小,最小值為 $-\|\nabla f\|$ +- **無變化**:$\mathbf{u}$ 與 $\nabla f$ **垂直**時,$D_{\mathbf{u}}f = 0$(沿著等值曲線方向) + + + + + + + +**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?** + + + +a. 梯度 $\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\|\nabla f\|$ +b. 梯度 $\nabla f$ 的方向與等高線的切線方向相同 +c. 最大方向導數等於 $f_x + f_y$ +d. 最大方向導數的方向與梯度垂直 + + + +梯度垂直於等高線,不是沿著等高線方向。 +最大方向導數為 $\|\nabla f\| = \sqrt{f_x^2 + f_y^2}$。 +最大方向導數的方向與梯度**平行**,不是垂直。 + + + +--- + +### Example 5 + +如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處: +(a) 沿著從 $P$ 到 $Q\!\left(\dfrac{1}{2}, 2\right)$ 方向的方向導數 +(b) 函數增加最快的方向 $\langle a, b \rangle$ 及最大增加率 + +![|w=500](/assets/Ch14_6_ex5.svg) + +(a) 沿 $\overrightarrow{PQ}$ 方向的方向導數: + + + +(b) 最大增加率: + + + + +**Step 1:計算梯度** + +$$\nabla f(x,y) = \langle e^y,\; xe^y \rangle, \qquad \nabla f(2,0) = \langle 1, 2 \rangle$$ + +**Step 2:求 $\overrightarrow{PQ}$ 的單位向量** + +$$\overrightarrow{PQ} = \left\langle \frac{1}{2}-2,\; 2-0 \right\rangle = \left\langle -\frac{3}{2},\; 2 \right\rangle, \qquad \|\overrightarrow{PQ}\| = \sqrt{\frac{9}{4}+4} = \frac{5}{2}$$ + +$$\mathbf{u} = \frac{\overrightarrow{PQ}}{\|\overrightarrow{PQ}\|} = \left\langle -\frac{3}{5},\; \frac{4}{5} \right\rangle$$ + +**Step 3:沿 $\overrightarrow{PQ}$ 的方向導數** + +$$D_{\mathbf{u}}f(2,0) = \langle 1,2 \rangle \cdot \left\langle -\frac{3}{5}, \frac{4}{5} \right\rangle = -\frac{3}{5} + \frac{8}{5} = 1$$ + +**Step 4:最大增加方向與最大增加率** + +最大增加方向為 $\nabla f(2,0) = \langle 1, 2 \rangle$ 的方向。 + +最大增加率為 $\|\nabla f(2,0)\| = \sqrt{1+4} = \sqrt{5}$。 + + + + + +我們知道 $\nabla f = \langle f_x, f_y \rangle$,請問 $\langle f_x, f_y \rangle = ?$ + +a. $\langle xe^y,\; e^y \rangle$ +b. $\langle e^y,\; x \rangle$ +c. $\langle e^y,\; xe^y \rangle$ +d. $\langle ye^y,\; xe^y \rangle$ + + + + +代入點 $P(2,0)$:$\nabla f(2,0) = \langle 1, 2 \rangle$。 + +$\overrightarrow{PQ} = \langle -\dfrac{3}{2}, 2 \rangle$,算 $|\overrightarrow{PQ}|$: + +a. $\dfrac{25}{4}$ +b. $\dfrac{5}{2}$ +c. $\sqrt{5}$ + + + + +單位向量 $\mathbf{u} = \langle -\dfrac{3}{5}, \dfrac{4}{5} \rangle$。 + +$D_{\mathbf{u}}f(2,0) = \langle 1, 2 \rangle \cdot \langle -\dfrac{3}{5}, \dfrac{4}{5} \rangle = ?$ + +a. $-\dfrac{11}{5}$ +b. $\dfrac{3}{5}$ +c. $1$ + + + + +最大上升方向是哪一個? + +a. $\nabla f(2,0) = \langle 1, 2 \rangle$ 的方向 +b. $\mathbf{u} = \langle -\dfrac{3}{5}, \dfrac{4}{5} \rangle$ 的方向 +c. $\langle -1, -2 \rangle$ 的方向 + + + + +最大上升率應該是? + +a. $\nabla f(2,0)$ +b. $|\nabla f(2,0)|$ +c. $\mathbf{u} \cdot \mathbf{u}$ + + + + +**答案:** +沿 $\overrightarrow{PQ}$ 的變化率 $= 1$ +最大上升方向:$\nabla f(2,0) = \langle 1, 2 \rangle$;最大上升率:$|\nabla f(2,0)| = \sqrt{5}$ + + + + +--- + +## 6️⃣ 等值曲面的切平面 + +在三維中,曲面在某一點附近的「局部描述」就是**切平面**。 + +**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。 + +若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\nabla F(x_0, y_0, z_0)$。 + + + + + +先從比較熟悉的二維圖形開始想。 + +考慮橢圓 +$$ +3x^2+4y^2=16 +$$ +在點 $(2,1)$ 的切線。 + +### 一、二維:切線與梯度 + +如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成 +$$ +3x^2+4y^2(x)=16. +$$ + +兩邊對 $x$ 微分: +$$ +6x+8y(x)y'(x)=0. +$$ + +把 $(2,1)$ 代入: +$$ +12+8y'(2)=0, +$$ +所以 +$$ +y'(2)=-\frac{3}{2}. +$$ + +因此,橢圓在點 $(2,1)$ 的切線斜率是 +$$ +-\frac{3}{2}. +$$ + +接著改用梯度來看。令 +$$ +F(x,y)=3x^2+4y^2-16. +$$ + +那麼橢圓可以看成等值曲線 +$$ +F(x,y)=0. +$$ + +梯度為 +$$ +\nabla F(x,y)=\langle 6x,8y\rangle. +$$ + +在點 $(2,1)$, +$$ +\nabla F(2,1)=\langle 12,8\rangle. +$$ + +重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。 + +因此,切線方向向量 $\mathbf v$ 必須和梯度垂直: +$$ +\nabla F(2,1)\cdot \mathbf v=0. +$$ + +例如可以取 +$$ +\mathbf v=\langle -8,12\rangle. +$$ + +因為 +$$ +\langle 12,8\rangle\cdot \langle -8,12\rangle=-96+96=0. +$$ + +這個方向向量的斜率是 +$$ +\frac{12}{-8}=-\frac{3}{2}, +$$ +和前面用隱函數微分算出來的斜率一樣。 + +所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。 + +--- + +### 二、三維:切平面與梯度 + +現在把同樣的想法推廣到三維。 + +考慮曲面 +$$ +3x^2+4y^2+5z^2=12 +$$ +以及曲面上的點 $(1,1,1)$。 + +令 +$$ +F(x,y,z)=3x^2+4y^2+5z^2-12. +$$ + +那麼這個曲面可以寫成等值曲面 +$$ +F(x,y,z)=0. +$$ + +先求梯度: +$$ +\nabla F(x,y,z)=\langle 6x,8y,10z\rangle. +$$ + +在點 $(1,1,1)$, +$$ +\nabla F(1,1,1)=\langle 6,8,10\rangle. +$$ + +和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。 + +因此,切平面上的所有方向向量都會和梯度垂直。也就是說, +$$ +\nabla F(1,1,1)=\langle 6,8,10\rangle +$$ +就是這個切平面的法向量。 + +接著用「點法式」寫出平面方程式。 + +已知切平面通過點 +$$ +P=(1,1,1), +$$ +而切平面上的任意一點記為 +$$ +Q=(x,y,z). +$$ + +則從 $P$ 指向 $Q$ 的向量是 +$$ +\overrightarrow{PQ}=\langle x-1,y-1,z-1\rangle. +$$ + +因為 $\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\langle 6,8,10\rangle$ 垂直: +$$ +\langle 6,8,10\rangle\cdot \langle x-1,y-1,z-1\rangle=0. +$$ + +展開後得到切平面方程式: +$$ +6(x-1)+8(y-1)+10(z-1)=0. +$$ + +所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。 + + +--- + + +定理 +等值曲面的法向量、切平面與法線 +若 $\nabla F(x_0, y_0, z_0) \neq \mathbf{0}$,則: + +- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\mathbf{n} = \nabla F(x_0, y_0, z_0) = \langle F_x, F_y, F_z \rangle$ +- **切平面**:通過點 $P$ 且以 $\overrightarrow\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$ +- **法線對稱式**:通過點 $P$ 且平行於法向量 $\overrightarrow\mathbf{n}$ 的直線。其對稱式為 $\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ +(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。) + + +--- + +### Example 6 + +求橢球面 $\dfrac{x^2}{4} + y^2 + \dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。 + +![](/assets/Ch14_6_ex6.svg) + +切平面方程式: + + + +法線方程式(對稱式): + + + + +**Step 1:定義 $F$ 並計算偏導數** + +$$F(x,y,z) = \frac{x^2}{4} + y^2 + \frac{z^2}{9}$$ + +$$F_x = \frac{x}{2}, \qquad F_y = 2y, \qquad F_z = \frac{2z}{9}$$ + +**Step 2:代入點 $(-2,1,-3)$** + +$$F_x = -1, \qquad F_y = 2, \qquad F_z = -\frac{2}{3}$$ + +$$\nabla F(-2,1,-3) = \left\langle -1, 2, -\frac{2}{3} \right\rangle$$ + +**Step 3:切平面方程式** + +$$-1(x+2) + 2(y-1) - \frac{2}{3}(z+3) = 0 \implies 3x - 6y + 2z + 18 = 0$$ + +**Step 4:法線方程式** + +$$\frac{x+2}{-1} = \frac{y-1}{2} = \frac{z+3}{-\frac{2}{3}}$$ + + + +該橢球面是 $F(x,y,z) = \dfrac{x^2}{4} + y^2 + \dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。 + + + +求偏導 $F_x, F_y, F_z$,下列哪一組正確? + +a. $F_x = \dfrac{x}{2},\; F_y = 2y,\; F_z = \dfrac{2z}{9}$ +b. $F_x = \dfrac{x^2}{4},\; F_y = y,\; F_z = \dfrac{z^2}{9}$ +c. $F_x = \dfrac{2}{x},\; F_y = 2,\; F_z = \dfrac{9}{2z}$ +d. $F_x = \dfrac{x}{4},\; F_y = y^2,\; F_z = \dfrac{z}{9}$ + + + + +代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\dfrac{2}{3}$。 + +切平面方程式(化簡後)是哪一個? + +a. $3x + 6y + 2z + 18 = 0$ +b. $3x - 6y + 2z - 18 = 0$ +c. $3x - 6y + 2z + 18 = 0$ +d. $x - 2y + \dfrac{2}{3}z + 6 = 0$ + + + + +法線對稱方程式(方向向量與 $\nabla F = \langle -1, 2, -\dfrac{2}{3} \rangle$ 同向): + +a. $\dfrac{x+2}{1} = \dfrac{y-1}{2} = \dfrac{z+3}{\frac{2}{3}}$ +b. $\dfrac{x+2}{-1} = \dfrac{y-1}{2} = \dfrac{z+3}{-\frac{2}{3}}$ +c. $\dfrac{x-2}{-1} = \dfrac{y+1}{2} = \dfrac{z-3}{-\frac{2}{3}}$ +d. $\dfrac{x+2}{-2} = \dfrac{y-1}{1} = \dfrac{z+3}{-\frac{2}{3}}$ + + + + +**答案:** +切平面:$3x - 6y + 2z + 18 = 0$ +法線:$\dfrac{x+2}{-1} = \dfrac{y-1}{2} = \dfrac{z+3}{-\frac{2}{3}}$ + + + + +--- + +## 7️⃣ 雙變數函數曲面的切平面 + +當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成: + +$$F(x,y,z) = f(x,y) - z = 0$$ + +這是等值曲面的特例(取 $k = 0$)。 + +計算 $F$ 的偏導數: + +$$F_x = f_x(x_0, y_0), \qquad F_y = f_y(x_0, y_0), \qquad F_z = -1$$ + +代入切平面公式,得到: + +$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$ + + +註解 +兩種切平面公式的對照 +曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ + +曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ + +後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。 + + +--- + +### Example 7 + +求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。 + +切平面方程式: + + + + +**Step 1:改寫為 $F = 0$** + +$$F(x,y,z) = 2x^2 + y^2 - z = 0$$ + +**Step 2:計算偏導並代入點 $(1,1,3)$** + +$$F_x = 4x \to 4, \qquad F_y = 2y \to 2, \qquad F_z = -1$$ + +**Step 3:寫出切平面** + +$$4(x-1) + 2(y-1) - (z-3) = 0 \implies z = 4x + 2y - 3$$ + + + + + +將 $F = 2x^2 + y^2 - z$ 計算偏導數: + +a. $F_x = 4x,\; F_y = 2y,\; F_z = -1$ +b. $F_x = 4,\; F_y = 2,\; F_z = -1$ +c. $F_x = 2x,\; F_y = y,\; F_z = 1$ +d. $F_x = 4x,\; F_y = 2y,\; F_z = 1$ + + + + +代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\mathbf{n} = \langle 4, 2, -1 \rangle$。 + +切平面方程式是哪一個? + +a. $z = 4x + 2y - 3$ +b. $z = 4x + 2y + 3$ +c. $z = 4x - 2y - 3$ +d. $z = -4x - 2y + 3$ + + + + +**答案:** $z = 4x + 2y - 3$ + +也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。 + + + + +--- + +## 8️⃣ 梯度向量的幾何意義 + +現在我們把梯度的兩個核心性質放在一起理解。 + +在三維中: +- $\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向** +- $\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$ + +這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。 + +同樣地,對二變數函數 $f(x,y)$: +- $\nabla f(x_0, y_0)$ 指向函數增加最快的方向 +- $\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$ + +![](/assets/Ch14_6_8.svg) + +--- + + +特性 +梯度向量的性質 +設 $f$ 為二變數或三變數的可微函數,且 $\nabla f(\mathbf{x}) \neq \mathbf{0}$,則: + +1. **方向導數公式**:$D_{\mathbf{u}}f(\mathbf{x}) = \nabla f(\mathbf{x}) \cdot \mathbf{u}$ +2. **最大上升方向**:$\nabla f(\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\nabla f(\mathbf{x})|$ +3. **垂直性質**:$\nabla f(\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線) + + +--- diff --git a/pages/Ch14/C14_6/exported_result_14_6.json b/pages/Ch14/C14_6/exported_result_14_6.json new file mode 100644 index 0000000000000000000000000000000000000000..d831eb79e163695f015e5fc1a55150c2075dfa27 --- /dev/null +++ b/pages/Ch14/C14_6/exported_result_14_6.json @@ -0,0 +1,26220 @@ +{ + "toc": [ + { + "label": "方向導數和梯度向量", + "id": "sec", + "level": 1 + }, + { + "label": "1️⃣ 方向導數", + "id": "1", + "level": 2 + }, + { + "label": "2️⃣ 方向導數定義", + "id": "2", + "level": 2 + }, + { + "label": "Example 1", + "id": "Example-1", + "level": 3 + }, + { + "label": "3️⃣ 梯度向量", + "id": "3", + "level": 2 + }, + { + "label": "Example 2", + "id": "Example-2", + "level": 3 + }, + { + "label": "Example 3", + "id": "Example-3", + "level": 3 + }, + { + "label": "4️⃣ 三變數函數的方向導數", + "id": "4", + "level": 2 + }, + { + "label": "Example 4", + "id": "Example-4", + "level": 3 + }, + { + "label": "5️⃣ 最大方向導數", + "id": "5", + "level": 2 + }, + { + "label": "Example 5", + "id": "Example-5", + "level": 3 + }, + { + "label": "6️⃣ 等值曲面的切平面", + "id": "6", + "level": 2 + }, + { + "label": "Example 6", + "id": "Example-6", + "level": 3 + }, + { + "label": "7️⃣ 雙變數函數曲面的切平面", + "id": "7", + "level": 2 + }, + { + "label": "Example 7", + "id": "Example-7", + "level": 3 + }, + { + "label": "8️⃣ 梯度向量的幾何意義", + "id": "8", + "level": 2 + } + ], + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "方向導數和梯度向量", + "newline": "true", + "runs": [ + { + "text": "方向導數和梯度向量", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 方向導數", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "在正式進入這個單元之前,我們先來回想一下偏導數。", + "newline": "false", + "runs": [ + { + "text": "在正式進入這個單元之前,我們先來回想一下偏導數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "回顧", + "headline": "偏導數(Partial Derivatives)", + "body": [ + { + "type": "paragraph", + "content": "若 $z = f(x,y)$,則在點 $(x_0, y_0)$ 的偏導數定義為:$$\nf_x(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}\n$$$$\nf_y(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0,y_0+h)-f(x_0,y_0)}{h}\n$$它們分別代表 $z$ 對 $x$ 方向與對 $y$ 方向的變化率。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",則在點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 的偏導數定義為:" + }, + { + "latex": "$$\nf_x(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0,y_0+h)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "text": "它們分別代表 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向與對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的變化率。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "偏導數只能沿著 $x$ 軸或 $y$ 軸方向測量變化率。但在現實中,我可能想往斜 30 度或斜 45 度的方向測量,這時候該怎麼計算?", + "newline": "false", + "runs": [ + { + "text": "偏導數只能沿著 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸或 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 軸方向測量變化率。但在現實中,我可能想往斜 30 度或斜 45 度的方向測量,這時候該怎麼計算?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6b7b12086b", + "label": "想想看解答", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "我們可以引入一個單位方向向量 $\\mathbf{u} = \\langle a, b \\rangle$,其中 $a$ 代表往 $x$ 方向的比例,$b$ 代表往 $y$ 方向的比例,且必須滿足 $a^2 + b^2 = 1$。", + "newline": "false", + "runs": [ + { + "text": "我們可以引入一個" + }, + { + "text": "單位方向向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 代表往 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向的比例," + }, + { + "latex": "$b$", + "kind": "math" + }, + { + "text": " 代表往 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的比例,且必須滿足 " + }, + { + "latex": "$a^2 + b^2 = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "只要找出沿著 $\\mathbf{u}$ 方向的變化率,就是我們要求的方向導數 $D_{\\mathbf{u}}f$。", + "newline": "false", + "runs": [ + { + "text": "只要找出沿著 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 方向的變化率,就是我們要求的" + }, + { + "text": "方向導數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "單位向量|w=400", + "src": "/assets/unit_vector.svg" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_93a3f52ee1", + "label": "方向導數幾何例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "xcr7r7rx", + "width": "100%", + "height": "480", + "border": "0", + "caption": "方向導數", + "card": "0" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_21fcf97b41", + "label": "生活化例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "不知道大家有沒有看過日本的箱根驛傳?這是一場總長 217.1 公里、由 10 人接力完成的長距離賽事。", + "newline": "false", + "runs": [ + { + "text": "不知道大家有沒有看過日本的" + }, + { + "text": "箱根驛傳", + "style": "bold" + }, + { + "text": "?這是一場總長 217.1 公里、由 10 人接力完成的長距離賽事。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們如果在地圖上把賽事用座標表示:", + "newline": "false", + "runs": [ + { + "text": "我們如果在地圖上把賽事用座標表示:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "跑者位置:" + }, + { + "latex": "$P = (x, y)$", + "kind": "math" + } + ], + "content": "跑者位置:$P = (x, y)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "海拔是一個函數:" + }, + { + "latex": "$h(x, y)$", + "kind": "math" + }, + { + "text": "(單位:公尺)" + } + ], + "content": "海拔是一個函數:$h(x, y)$(單位:公尺)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "問題: 跑者沿著「路線方向」前進時,海拔上升(或下降)的速率是多少?", + "newline": "false", + "runs": [ + { + "text": "問題:", + "style": "bold" + }, + { + "text": " 跑者沿著「路線方向」前進時,海拔上升(或下降)的速率是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個「速率」就是方向導數。", + "newline": "false", + "runs": [ + { + "text": "這個「速率」就是" + }, + { + "text": "方向導數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "在平面上,「方向」可以用一個向量表示。但我們希望方向導數代表「每前進 1 個單位距離」的變化率,因此要把方向向量標準化成單位向量:$$\n\\mathbf{u} = \\frac{\\mathbf{v}}{|\\mathbf{v}|}, \\qquad |\\mathbf{u}| = 1\n$$", + "newline": "false", + "runs": [ + { + "text": "在平面上,「方向」可以用一個向量表示。但我們希望方向導數代表「每前進 1 個單位距離」的變化率,因此要把方向向量標準化成" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\mathbf{u} = \\frac{\\mathbf{v}}{|\\mathbf{v}|}, \\qquad |\\mathbf{u}| = 1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "跑者在點 $P$,沿著方向 $\\mathbf{u}$ 前進距離 $t$ 後,海拔改變量是 $h(P+t\\mathbf{u}) - h(P)$。因此沿著方向 $\\mathbf{u}$ 的海拔變化率定義為:$$\nD_{\\mathbf{u}}h(P) = \\lim_{t\\to 0}\\frac{h(P+t\\mathbf{u})-h(P)}{t}\n$$", + "newline": "false", + "runs": [ + { + "text": "跑者在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": ",沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進距離 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 後,海拔改變量是 " + }, + { + "latex": "$h(P+t\\mathbf{u}) - h(P)$", + "kind": "math" + }, + { + "text": "。因此沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的海拔變化率定義為:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}h(P) = \\lim_{t\\to 0}\\frac{h(P+t\\mathbf{u})-h(P)}{t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "以競賽中的第 5 跑區為例:最高點在 16.2 km 附近,之後轉成下坡。這表示沿著路線方向的方向導數 $D_{\\mathbf{u}}h$,前半段多為正(爬升),到最高點接近 0,後半段變負(下坡)。", + "newline": "false", + "runs": [ + { + "text": "以競賽中的第 5 跑區為例:最高點在 16.2 km 附近,之後轉成下坡。這表示沿著路線方向的方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}h$", + "kind": "math" + }, + { + "text": ",前半段多為正(爬升),到最高點接近 0,後半段變負(下坡)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向導數的符號,直接對應你沿著那個方向是在上坡、持平,還是下坡。", + "newline": "false", + "runs": [ + { + "text": "方向導數的符號,直接對應你沿著那個方向是在上坡、持平,還是下坡。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "mytuxtv6", + "width": "100%", + "height": "480", + "border": "0", + "caption": "方向導數:箱根驛傳路線示意", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 方向導數定義", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 方向導數定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "card", + "kind": "定義", + "headline": "方向導數 Directional Derivatives", + "body": [ + { + "type": "paragraph", + "content": "令 $\\mathbf{u} = \\langle a, b \\rangle$ 為單位向量(即 $\\|\\mathbf{u}\\| = 1$)。函數 $f$ 在點 $(x_0, y_0)$ 沿著方向 $\\mathbf{u}$ 的方向導數定義為:$$\nD_{\\mathbf{u}}f(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb)-f(x_0,y_0)}{h}\n$$若此極限存在。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 為" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": "(即 " + }, + { + "latex": "$\\|\\mathbf{u}\\| = 1$", + "kind": "math" + }, + { + "text": ")。函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的方向導數定義為:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "text": "若此極限存在。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:為什麼 $\\mathbf{u}$ 要是單位向量?", + "newline": "false", + "runs": [ + { + "text": "Q:為什麼 ", + "style": "bold" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 要是單位向量?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-15", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-15::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "不然連鎖律不能用" + }, + { + "key": "b", + "text": "不然方向導數會被向量長度影響,不再代表「每 1 單位距離」的變化率" + }, + { + "key": "c", + "text": "不然 $f_x, f_y$ 會改變" + }, + { + "key": "d", + "text": "不然極限不存在" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-15", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "如果 $\\mathbf{u}$ 不是單位向量,等於你「每次前進的距離」被放大或縮小,變化率就會跟著被放大或縮小;用單位向量才能代表「每走 1 單位距離」的瞬時變化率。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 不是單位向量,等於你「每次前進的距離」被放大或縮小,變化率就會跟著被放大或縮小;用單位向量才能代表「每走 1 單位距離」的瞬時變化率。" + } + ] + } + ], + "gate_from": "flow-15::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的公式", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 可微,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在該點沿任意單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 方向上的方向導數存在,且:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\,a + f_y(x,y)\\,b\n$$", + "kind": "math_block" + } + ], + "content": "若 $f$ 在點 $(x,y)$ 可微,則 $f$ 在該點沿任意單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 方向上的方向導數存在,且:$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\,a + f_y(x,y)\\,b\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入上式得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta\n$$", + "kind": "math_block" + } + ], + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入上式得:$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_2efc08fef2", + "label": "詳細證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。", + "newline": "false", + "runs": [ + { + "text": "我們很熟悉單變數函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 的導數。在雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,若我們沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 前進,從點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 出發走距離 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ",新位置是 " + }, + { + "latex": "$(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",其實只是沿著一條直線移動。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\\mathbf{u}$ 前進 $h$ 時的函數值。", + "newline": "false", + "runs": [ + { + "text": "因此可定義單變數函數 " + }, + { + "latex": "$g(h) = f(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",代表沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 時的函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "根據單變數導數的定義:$$\ng'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "根據單變數導數的定義:" + }, + { + "latex": "$$\ng'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "將 $g(h)$ 與 $g(0)$ 代回後可得:$$\ng'(0) = \\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$g(h)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$g(0)$", + "kind": "math" + }, + { + "text": " 代回後可得:" + }, + { + "latex": "$$\ng'(0) = \\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "而這正是 $D_{\\mathbf{u}}f(x_0,y_0)$ 的定義,因此:$$\nD_{\\mathbf{u}}f(x_0,y_0)=g'(0)\n$$", + "newline": "false", + "runs": [ + { + "text": "而這正是 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 的定義,因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0)=g'(0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著改用連鎖律計算 $g'(h)$,其中 $x = x_0 + ha$,$y = y_0 + hb$:$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh}\n$$", + "newline": "false", + "runs": [ + { + "text": "接著改用連鎖律計算 " + }, + { + "latex": "$g'(h)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x_0 + ha$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0 + hb$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為$$\n\\frac{dx}{dh}=a,\\qquad \\frac{dy}{dh}=b\n$$", + "newline": "false", + "runs": [ + { + "text": "因為" + }, + { + "latex": "$$\n\\frac{dx}{dh}=a,\\qquad \\frac{dy}{dh}=b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\ng'(h)=f_x(x,y)\\,a+f_y(x,y)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\ng'(h)=f_x(x,y)\\,a+f_y(x,y)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $h = 0$,則 $x = x_0$,$y = y_0$,得到:$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$h = 0$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$x = x_0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0$", + "kind": "math" + }, + { + "text": ",得到:" + }, + { + "latex": "$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此:$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入即得:$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "newline": "false", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/unit_vector_theta.svg" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9b69b8e81e", + "label": "引導證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-16", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。", + "newline": "false", + "runs": [ + { + "text": "我們很熟悉單變數函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 的導數。在雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,若我們沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 前進,從點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 出發走距離 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ",新位置是 " + }, + { + "latex": "$(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",其實只是沿著一條直線移動。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\\mathbf{u}$ 前進 $h$ 時的函數值。", + "newline": "false", + "runs": [ + { + "text": "因此可定義單變數函數 " + }, + { + "latex": "$g(h) = f(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",代表沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 時的函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-16::step-1::q1", + "prompt_runs": [ + { + "latex": "$g'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}$", + "kind": "math" + }, + { + "text": ",請問將 " + }, + { + "latex": "$g(h)$", + "kind": "math" + }, + { + "text": " 代回後是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0) - f(x_0, y_0)}{h}$" + }, + { + "key": "b", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+a, y_0+b) - f(x_0, y_0)}{h}$" + }, + { + "key": "c", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+h, y_0+h) - f(x_0, y_0)}{h}$" + }, + { + "key": "d", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "flow": "flow-16", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "而這也是 $D_{\\mathbf{u}}f$ 的定義。", + "newline": "false", + "runs": [ + { + "text": "而這也是 " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 的定義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-16::step-2::q2", + "prompt_runs": [ + { + "text": "改用連鎖律計算 " + }, + { + "latex": "$g'(h)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x_0 + ha$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0 + hb$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh} = \\;?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$f_x(x,y)\\,a + f_y(x,y)\\,b$" + }, + { + "key": "b", + "text": "$f_x(x,y) + f_y(x,y)$" + }, + { + "key": "c", + "text": "$f_x(x,y)\\,h + f_y(x,y)\\,h$" + }, + { + "key": "d", + "text": "$a + b$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-16", + "step": "step-2" + } + ], + "gate_from": "flow-16::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $h = 0$,則 $x = x_0$,$y = y_0$,得到:$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$h = 0$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$x = x_0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0$", + "kind": "math" + }, + { + "text": ",得到:" + }, + { + "latex": "$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此:$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入即得:$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "newline": "false", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/unit_vector_theta.svg" + } + ], + "gate_from": "flow-16::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:\n\n\n\n不會的話可以看看下面引導解法或是詳細解法喔。\n\n\n**Step 1:寫出單位向量**\n\n$$\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle$$\n\n**Step 2:計算偏導數**\n\n$$f_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y$$\n\n**Step 3:套用公式**\n\n$$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}$$\n\n**Step 4:代入 $(1,2)$**\n\n$$D_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}$$\n\n\n\n\n\n題目要求方向導數 $D_{\\mathbf{u}}f(x,y)$,若 $\\mathbf{u}$ 與 $x$ 軸夾角為 $\\theta$,正確公式是哪個?\n\na. $f_x(x,y)\\sin\\theta + f_y(x,y)\\cos\\theta$\nb. $f_x(x,y) + f_y(x,y)$\nc. $f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta$\n\n\n\n\n已知 $\\theta = \\dfrac{\\pi}{6}$,方向向量的分量 $(\\cos\\theta, \\sin\\theta)$ 為何?\n\na. $\\left(\\dfrac{1}{2}, \\dfrac{\\sqrt{3}}{2}\\right)$\nb. $\\left(\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$\nc. $\\left(-\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$\n\n\n\n\n接下來求偏導數:$f_x(x,y) = \\dfrac{\\partial}{\\partial x}(x^3-3xy+4y^2) = $ ?\n\n\n\n\n\n$f_y(x,y) = \\dfrac{\\partial}{\\partial y}(x^3-3xy+4y^2) = $ ?\n\n\n\n\n\n偏導數:$f_x = 3x^2 - 3y$,$f_y = -3x + 8y$。\n\n代入公式:\n$$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}$$\n\n最後算 $(1,2)$ 的值:\n\na. $\\dfrac{13 - 3\\sqrt{3}}{2}$\nb. $\\dfrac{13 + 3\\sqrt{3}}{2}$\nc. $13 - 3\\sqrt{3}$\n\n\n\n\n**答案:**\n$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$\n\n$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$\n\n\n\n\n---\n\n## 3️⃣ 梯度向量\n\n由方向導數公式可知:\n\n$$D_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}$$\n\n其中向量 $\\langle f_x, f_y \\rangle$ 會在很多地方反覆出現,我們給它一個特別的名字:**梯度(gradient)**,以符號 $\\nabla f$($\\nabla$ 讀作「nabla」或「del」)表示。\n\n---\n\n\n定義\n梯度向量 The Gradient Vector\n如果 $f$ 是二變數 $x$ 與 $y$ 的函數,則 $f$ 的梯度是一個向量函數 $\\nabla f$,定義為:\n$$\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}$$\n通常簡寫成 $\\nabla f = \\langle f_x, f_y \\rangle$。\n\n\n\n定理\n方向導數的向量公式\n使用梯度向量的記號後,方向導數可以寫成:\n$$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$$\n這個式子表示:沿著單位向量 $\\mathbf{u}$ 的方向導數,等於把梯度向量 $\\nabla f$ 投影到 $\\mathbf{u}$ 上的「純量投影」(也就是梯度在該方向上的分量)。\n\n\n---\n\n### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$$\n\n**Step 2:代入 $(0,1)$**\n\n$$\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle$$\n\n\n\n\n\n首先請問 $\\nabla f(x,y) = $ ?\n\na. $\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$\nb. $\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\nc. $\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$\nd. $\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$\n\n\n\n\n代入 $(0,1)$ 後可得:\n\na. $\\langle 2, 0 \\rangle$\nb. $\\langle 2, 1 \\rangle$\nc. $\\langle 1, 1 \\rangle$\n\n\n\n\n**答案:**\n$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$ \n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$\n\n\n\n\n---\n\n### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f(x,y) = x^3 - 3xy + 4y^2$", + "kind": "math" + }, + { + "text": ",且方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 是與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角 " + }, + { + "latex": "$\\theta = \\dfrac{\\pi}{6}$", + "kind": "math" + }, + { + "text": " 的單位向量。求 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y)$", + "kind": "math" + }, + { + "text": ",並計算 " + }, + { + "latex": "$D_{\\mathbf{u}}f(1,2)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_ex1.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$D_{\\mathbf{u}}f(1,2)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "(13-3*sqrt(3))/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "不會的話可以看看下面引導解法或是詳細解法喔。", + "newline": "false", + "runs": [ + { + "text": "不會的話可以看看下面引導解法或是詳細解法喔。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e1716862f9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $(1,2)$", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$(1,2)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:\n\n\n\n不會的話可以看看下面引導解法或是詳細解法喔。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7f554c800c", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-17", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-1::q1", + "prompt_runs": [ + { + "text": "題目要求方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y)$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",正確公式是哪個?" + } + ], + "options": [ + { + "key": "a", + "text": "$f_x(x,y)\\sin\\theta + f_y(x,y)\\cos\\theta$" + }, + { + "key": "b", + "text": "$f_x(x,y) + f_y(x,y)$" + }, + { + "key": "c", + "text": "$f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-17", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-2::q2", + "prompt_runs": [ + { + "text": "已知 " + }, + { + "latex": "$\\theta = \\dfrac{\\pi}{6}$", + "kind": "math" + }, + { + "text": ",方向向量的分量 " + }, + { + "latex": "$(\\cos\\theta, \\sin\\theta)$", + "kind": "math" + }, + { + "text": " 為何?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\left(\\dfrac{1}{2}, \\dfrac{\\sqrt{3}}{2}\\right)$" + }, + { + "key": "b", + "text": "$\\left(\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$" + }, + { + "key": "c", + "text": "$\\left(-\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-17", + "step": "step-2" + } + ], + "gate_from": "flow-17::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-17::step-3::q3", + "prompt_runs": [ + { + "text": "接下來求偏導數:" + }, + { + "latex": "$f_x(x,y) = \\dfrac{\\partial}{\\partial x}(x^3-3xy+4y^2) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "answers": [ + "3*x^2-3*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-17", + "step": "step-3" + } + ], + "gate_from": "flow-17::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-17::step-4::q4", + "prompt_runs": [ + { + "latex": "$f_y(x,y) = \\dfrac{\\partial}{\\partial y}(x^3-3xy+4y^2) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "answers": [ + "-3*x+8*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-17", + "step": "step-4" + } + ], + "gate_from": "flow-17::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "偏導數:$f_x = 3x^2 - 3y$,$f_y = -3x + 8y$。", + "newline": "false", + "runs": [ + { + "text": "偏導數:" + }, + { + "latex": "$f_x = 3x^2 - 3y$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = -3x + 8y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入公式:$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "newline": "false", + "runs": [ + { + "text": "代入公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-5::q5", + "prompt_runs": [ + { + "text": "最後算 " + }, + { + "latex": "$(1,2)$", + "kind": "math" + }, + { + "text": " 的值:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{13 - 3\\sqrt{3}}{2}$" + }, + { + "key": "b", + "text": "$\\dfrac{13 + 3\\sqrt{3}}{2}$" + }, + { + "key": "c", + "text": "$13 - 3\\sqrt{3}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-17", + "step": "step-5" + } + ], + "gate_from": "flow-17::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$", + "newline": "false", + "runs": [ + { + "latex": "$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-17::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 梯度向量", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 梯度向量", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "由方向導數公式可知:", + "newline": "false", + "runs": [ + { + "text": "由方向導數公式可知:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中向量 $\\langle f_x, f_y \\rangle$ 會在很多地方反覆出現,我們給它一個特別的名字:梯度(gradient),以符號 $\\nabla f$($\\nabla$ 讀作「nabla」或「del」)表示。", + "newline": "false", + "runs": [ + { + "text": "其中向量 " + }, + { + "latex": "$\\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": " 會在很多地方反覆出現,我們給它一個特別的名字:" + }, + { + "text": "梯度(gradient)", + "style": "bold" + }, + { + "text": ",以符號 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": "(" + }, + { + "latex": "$\\nabla$", + "kind": "math" + }, + { + "text": " 讀作「nabla」或「del」)表示。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定義", + "headline": "梯度向量 The Gradient Vector", + "body": [ + { + "type": "paragraph", + "content": "如果 $f$ 是二變數 $x$ 與 $y$ 的函數,則 $f$ 的梯度是一個向量函數 $\\nabla f$,定義為:$$\n\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}\n$$通常簡寫成 $\\nabla f = \\langle f_x, f_y \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是二變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的函數,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的梯度是一個向量函數 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": ",定義為:" + }, + { + "latex": "$$\n\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}\n$$", + "kind": "math_block" + }, + { + "text": "通常簡寫成 " + }, + { + "latex": "$\\nabla f = \\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的向量公式", + "body": [ + { + "type": "paragraph", + "content": "使用梯度向量的記號後,方向導數可以寫成:$$\nD_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}\n$$這個式子表示:沿著單位向量 $\\mathbf{u}$ 的方向導數,等於把梯度向量 $\\nabla f$ 投影到 $\\mathbf{u}$ 上的「純量投影」(也就是梯度在該方向上的分量)。", + "newline": "false", + "runs": [ + { + "text": "使用梯度向量的記號後,方向導數可以寫成:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}\n$$", + "kind": "math_block" + }, + { + "text": "這個式子表示:沿著單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的方向導數,等於把梯度向量 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 投影到 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 上的「純量投影」(也就是梯度在該方向上的分量)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$$\n\n**Step 2:代入 $(0,1)$**\n\n$$\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle$$\n\n\n\n\n\n首先請問 $\\nabla f(x,y) = $ ?\n\na. $\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$\nb. $\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\nc. $\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$\nd. $\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$\n\n\n\n\n代入 $(0,1)$ 後可得:\n\na. $\\langle 2, 0 \\rangle$\nb. $\\langle 2, 1 \\rangle$\nc. $\\langle 1, 1 \\rangle$\n\n\n\n\n**答案:**\n$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$ \n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$\n\n\n\n\n---\n\n### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y) = \\sin x + e^{xy}$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\nabla f(0,1) = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2,0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 a,b,中間用逗號隔開", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5e2e1e2ab8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:代入 $(0,1)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:代入 ", + "style": "bold" + }, + { + "latex": "$(0,1)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e60e9afe44", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-18", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-18::step-1::q1", + "prompt_runs": [ + { + "text": "首先請問 " + }, + { + "latex": "$\\nabla f(x,y) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$" + }, + { + "key": "b", + "text": "$\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$" + }, + { + "key": "c", + "text": "$\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$" + }, + { + "key": "d", + "text": "$\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-18", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-18::step-2::q2", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$(0,1)$", + "kind": "math" + }, + { + "text": " 後可得:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 2, 0 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle 2, 1 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle 1, 1 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-18", + "step": "step-2" + } + ], + "gate_from": "flow-18::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$", + "newline": "true", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$", + "kind": "math" + }, + { + "newline": "true" + }, + { + "latex": "$\\nabla f(0,1) = \\langle 2, 0 \\rangle$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-18::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = x^2y^3 - 4y$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": " 沿著向量 " + }, + { + "latex": "$\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$", + "kind": "math" + }, + { + "text": " 方向的方向導數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/Ch14_6_ex3.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請試著算出方向導數:" + } + ], + "answers": [ + "32/sqrt(29)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:" + }, + { + "type": "solution", + "uid": "sol_de253f12f8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入 $(2,-1)$:", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(2,-1) = \\langle -4, 8 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(2,-1) = \\langle -4, 8 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:注意!題目給的是方向向量,不是單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:注意!題目給的是方向向量,不是單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_21e7631c11", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$", + "newline": "false", + "runs": [ + { + "text": "套用方向導數的向量公式:" + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$", + "kind": "math" + } + ] + }, + { + "type": "flow", + "id": "flow-19", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-1::q1", + "prompt_runs": [ + { + "text": "若 " + }, + { + "latex": "$f(x,y) = x^2y^3 - 4y$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$f_x(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x*y^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-2::q2", + "prompt_runs": [ + { + "text": "再求另一個偏導數:" + }, + { + "latex": "$f_y(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "3*x^2*y^2-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-2" + } + ], + "gate_from": "flow-19::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "梯度向量為 " + }, + { + "latex": "$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-3::q3", + "prompt_runs": [ + { + "text": "把 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": " 代入後," + }, + { + "latex": "$\\nabla f(2,-1)$", + "kind": "math" + }, + { + "text": " 等於多少?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 4,\\; 8 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle -4,\\; -8 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle -4,\\; 8 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-19", + "step": "step-3" + } + ], + "gate_from": "flow-19::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-4::q4", + "prompt_runs": [ + { + "text": "注意!直接用 " + }, + { + "latex": "$\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$", + "kind": "math" + }, + { + "text": " 對嗎?" + } + ], + "answers": [ + "NO" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "YES or NO", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-4" + } + ], + "gate_from": "flow-19::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-5::q5", + "prompt_runs": [ + { + "text": "你答對了!方向導數要用" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": ",但題目給的 " + }, + { + "latex": "$\\mathbf{v}$", + "kind": "math" + }, + { + "text": " 不一定是單位向量,要先算長度 " + }, + { + "latex": "$\\|\\mathbf{v}\\|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\sqrt{7}$" + }, + { + "key": "b", + "text": "$\\sqrt{29}$" + }, + { + "key": "c", + "text": "$29$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-19", + "step": "step-5" + } + ], + "gate_from": "flow-19::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。", + "newline": "false", + "runs": [ + { + "text": "所以單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-6::q6", + "prompt_runs": [ + { + "text": "最後套用方向導數公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{32}{\\sqrt{29}}$" + }, + { + "key": "b", + "text": "$\\dfrac{-32}{\\sqrt{29}}$" + }, + { + "key": "c", + "text": "$\\dfrac{12}{\\sqrt{29}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-19", + "step": "step-6" + } + ], + "gate_from": "flow-19::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\nD_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-19::step-6::q6" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 三變數函數的方向導數", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 三變數函數的方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。", + "newline": "false", + "runs": [ + { + "text": "對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數的方向導數", + "body": [ + { + "type": "paragraph", + "content": "若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:$$\nD_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f = f(x,y,z)$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b, c \\rangle$", + "kind": "math" + }, + { + "text": " 的方向導數:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數的梯度(Gradient)", + "body": [ + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向導數可寫成:$$\nD_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c\n$$", + "newline": "false", + "runs": [ + { + "text": "方向導數可寫成:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "已知 $f(x,y,z) = x\\sin(yz)$。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f(x,y,z) = x\\sin(yz)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 求 " + }, + { + "latex": "$\\nabla f(x,y,z) = \\langle a, b, c \\rangle$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "sin(y*z),x*z*cos(y*z),x*y*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 a,b,c", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(b) 求 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": " 沿著向量 " + }, + { + "latex": "$\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$", + "kind": "math" + }, + { + "text": " 的方向導數:" + } + ], + "answers": [ + "-3/sqrt(6)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d9715e7412", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入 $(1,3,0)$:", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:單位化方向向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:單位化方向向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_53c5b7e1e7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-20", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-1::q1", + "prompt_runs": [ + { + "text": "先回想:方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 等於?" + } + ], + "options": [ + { + "key": "a", + "text": "$D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$" + }, + { + "key": "b", + "text": "$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$" + }, + { + "key": "c", + "text": "$D_{\\mathbf{u}}f = f_x + f_y + f_z$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-20", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-2::q2", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "sin(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-2" + } + ], + "gate_from": "flow-20::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-3::q3", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "x*z*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-3" + } + ], + "gate_from": "flow-20::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-4::q4", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "x*y*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-4" + } + ], + "gate_from": "flow-20::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-5::q5", + "prompt_runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\nabla f(1,3,0)$", + "kind": "math" + }, + { + "text": " 是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 0,\\; 3,\\; 0 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle 1,\\; 0,\\; 3 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle 0,\\; 0,\\; 3 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-20", + "step": "step-5" + } + ], + "gate_from": "flow-20::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-6::q6", + "prompt_runs": [ + { + "text": "方向向量 " + }, + { + "latex": "$\\mathbf{v} = \\langle 1, 2, -1 \\rangle$", + "kind": "math" + }, + { + "text": ",先算長度 " + }, + { + "latex": "$\\|\\mathbf{v}\\|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\sqrt{5}$" + }, + { + "key": "b", + "text": "$\\sqrt{6}$" + }, + { + "key": "c", + "text": "$6$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-20", + "step": "step-6" + } + ], + "gate_from": "flow-20::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-7::q7", + "prompt_runs": [ + { + "text": "最後套用公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\sqrt{\\dfrac{3}{2}}$" + }, + { + "key": "b", + "text": "$\\sqrt{\\dfrac{3}{2}}$" + }, + { + "key": "c", + "text": "$\\dfrac{3}{\\sqrt{6}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-20", + "step": "step-7" + } + ], + "gate_from": "flow-20::step-6::q6" + }, + { + "id": "step-8", + "title": "步驟 8", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$$$\nD_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-20::step-7::q7" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 最大方向導數", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 最大方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:應該往哪個方向走?最快的速度是多少?", + "newline": "false", + "runs": [ + { + "text": "我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": ",想用最快的速度衝上山頂:" + }, + { + "text": "應該往哪個方向走?最快的速度是多少?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由內積公式,方向導數可以寫成:", + "newline": "false", + "runs": [ + { + "text": "由內積公式,方向導數可以寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的內積形式", + "body": [ + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 與方向向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的夾角," + }, + { + "latex": "$|\\mathbf{u}| = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e43dea9d27", + "label": "推導過程", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:$$\nD_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$(因為 $|\\mathbf{u}| = 1$)", + "newline": "false", + "runs": [ + { + "text": "由方向導數公式 " + }, + { + "latex": "$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$", + "kind": "math" + }, + { + "text": " 以及向量內積的幾何定義 " + }, + { + "latex": "$\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$", + "kind": "math" + }, + { + "text": ",令 " + }, + { + "latex": "$\\mathbf{A} = \\nabla f$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{B} = \\mathbf{u}$", + "kind": "math" + }, + { + "text": ",即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$", + "kind": "math_block" + }, + { + "text": "(因為 " + }, + { + "latex": "$|\\mathbf{u}| = 1$", + "kind": "math" + }, + { + "text": ")" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "三個角色的分析:", + "newline": "false", + "runs": [ + { + "text": "三個角色的分析:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$|\\nabla f|$", + "kind": "math" + }, + { + "text": "(梯度長度):站在固定點,坡度已定,這是" + }, + { + "text": "定值", + "style": "bold" + } + ], + "content": "$|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是定值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$|\\mathbf{u}|$", + "kind": "math" + }, + { + "text": "(方向向量長度):規定是單位向量,永遠等於 " + }, + { + "text": "1", + "style": "bold" + } + ], + "content": "$|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 1" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\cos\\theta$", + "kind": "math" + }, + { + "text": "(夾角):" + }, + { + "text": "唯一可以改變的", + "style": "bold" + }, + { + "text": ",取決於我們選擇的方向" + } + ], + "content": "$\\cos\\theta$(夾角):唯一可以改變的,取決於我們選擇的方向" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "Q1:", + "style": "bold" + }, + { + "latex": "$\\cos\\theta$", + "kind": "math", + "style": "bold" + }, + { + "text": " 在 ", + "style": "bold" + }, + { + "latex": "$[0, 2\\pi]$", + "kind": "math", + "style": "bold" + }, + { + "text": " 間最大值是多少?", + "style": "bold" + } + ], + "answers": [ + "1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "此時 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是幾度?" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?", + "newline": "false", + "runs": [ + { + "text": "方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 跟梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是什麼關係?" + } + ] + }, + { + "type": "flow", + "id": "flow-21", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-21::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "兩者方向相同" + }, + { + "key": "b", + "text": "兩者方向相反" + }, + { + "key": "c", + "text": "兩者互相垂直" + }, + { + "key": "d", + "text": "兩者夾 45 度角" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-21", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。", + "newline": "false", + "runs": [ + { + "text": "跟著梯度走,上升最快。此時變化率為 " + }, + { + "latex": "$|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-21::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "Q2:", + "style": "bold" + }, + { + "latex": "$\\cos\\theta$", + "kind": "math", + "style": "bold" + }, + { + "text": " 在 ", + "style": "bold" + }, + { + "latex": "$[0, 2\\pi]$", + "kind": "math", + "style": "bold" + }, + { + "text": " 間最小值是多少?", + "style": "bold" + } + ], + "answers": [ + "-1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "此時 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是多少?" + } + ], + "answers": [ + "pi" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?", + "newline": "false", + "runs": [ + { + "text": "方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 跟梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是什麼關係?" + } + ] + }, + { + "type": "flow", + "id": "flow-22", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-22::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "兩者方向相同" + }, + { + "key": "b", + "text": "兩者方向相反" + }, + { + "key": "c", + "text": "兩者互相垂直" + }, + { + "key": "d", + "text": "兩者夾 45 度角" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-22", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。", + "newline": "false", + "runs": [ + { + "text": "往梯度的反方向走,下降最快。此時變化率為 " + }, + { + "latex": "$-|\\nabla f|$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-22::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "最大方向導數與梯度", + "body": [ + { + "type": "paragraph", + "content": "若 $f$ 是二變數或三變數的可微函數,則:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是二變數或三變數的可微函數,則:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大上升", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "同方向", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 最大,最大值為 " + }, + { + "latex": "$\\|\\nabla f\\|$", + "kind": "math" + } + ], + "content": "最大上升:$\\mathbf{u}$ 與 $\\nabla f$ 同方向時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大下降", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "反方向", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 最小,最小值為 " + }, + { + "latex": "$-\\|\\nabla f\\|$", + "kind": "math" + } + ], + "content": "最大下降:$\\mathbf{u}$ 與 $\\nabla f$ 反方向時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "無變化", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f = 0$", + "kind": "math" + }, + { + "text": "(沿著等值曲線方向)" + } + ], + "content": "無變化:$\\mathbf{u}$ 與 $\\nabla f$ 垂直時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9b86818782", + "label": "GeoGebra", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "ba8bertm", + "width": "100%", + "height": "480", + "border": "0", + "caption": "梯度與方向導數", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?", + "newline": "false", + "runs": [ + { + "text": "Q:對於一個可微函數 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": ",下列關於梯度與最大方向導數的敘述,何者正確?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-23", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-23::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$" + }, + { + "key": "b", + "text": "梯度 $\\nabla f$ 的方向與等高線的切線方向相同" + }, + { + "key": "c", + "text": "最大方向導數等於 $f_x + f_y$" + }, + { + "key": "d", + "text": "最大方向導數的方向與梯度垂直" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-23", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "梯度垂直於等高線,不是沿著等高線方向。最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。最大方向導數的方向與梯度平行,不是垂直。", + "newline": "false", + "runs": [ + { + "text": "梯度垂直於等高線,不是沿著等高線方向。最大方向導數為 " + }, + { + "latex": "$\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$", + "kind": "math" + }, + { + "text": "。最大方向導數的方向與梯度" + }, + { + "text": "平行", + "style": "bold" + }, + { + "text": ",不是垂直。" + } + ] + } + ], + "gate_from": "flow-23::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y) = xe^y$", + "kind": "math" + }, + { + "text": ",求函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P(2,0)$", + "kind": "math" + }, + { + "text": " 處:(a) 沿著從 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 到 " + }, + { + "latex": "$Q\\!\\left(\\dfrac{1}{2}, 2\\right)$", + "kind": "math" + }, + { + "text": " 方向的方向導數(b) 函數增加最快的方向 " + }, + { + "latex": "$\\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 及最大增加率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=500", + "src": "/assets/Ch14_6_ex5.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 沿 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 方向的方向導數:" + } + ], + "answers": [ + "1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(b) 最大增加率:" + } + ], + "answers": [ + "sqrt(5)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_2251191f40", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:求 $\\overrightarrow{PQ}$ 的單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:求 ", + "style": "bold" + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:沿 ", + "style": "bold" + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:最大增加方向與最大增加率", + "newline": "false", + "runs": [ + { + "text": "Step 4:最大增加方向與最大增加率", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。", + "newline": "false", + "runs": [ + { + "text": "最大增加方向為 " + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": " 的方向。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。", + "newline": "false", + "runs": [ + { + "text": "最大增加率為 " + }, + { + "latex": "$\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_26c6fbaf68", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-24", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-1::q1", + "prompt_runs": [ + { + "text": "我們知道 " + }, + { + "latex": "$\\nabla f = \\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$\\langle f_x, f_y \\rangle = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle xe^y,\\; e^y \\rangle$" + }, + { + "key": "b", + "text": "$\\langle e^y,\\; x \\rangle$" + }, + { + "key": "c", + "text": "$\\langle e^y,\\; xe^y \\rangle$" + }, + { + "key": "d", + "text": "$\\langle ye^y,\\; xe^y \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-24", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$P(2,0)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$", + "kind": "math" + }, + { + "text": ",算 " + }, + { + "latex": "$|\\overrightarrow{PQ}|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{25}{4}$" + }, + { + "key": "b", + "text": "$\\dfrac{5}{2}$" + }, + { + "key": "c", + "text": "$\\sqrt{5}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-24", + "step": "step-2" + } + ], + "gate_from": "flow-24::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-3::q3", + "prompt_runs": [ + { + "latex": "$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{11}{5}$" + }, + { + "key": "b", + "text": "$\\dfrac{3}{5}$" + }, + { + "key": "c", + "text": "$1$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-24", + "step": "step-3" + } + ], + "gate_from": "flow-24::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-4::q4", + "prompt_runs": [ + { + "text": "最大上升方向是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向" + }, + { + "key": "b", + "text": "$\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向" + }, + { + "key": "c", + "text": "$\\langle -1, -2 \\rangle$ 的方向" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-24", + "step": "step-4" + } + ], + "gate_from": "flow-24::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-5::q5", + "prompt_runs": [ + { + "text": "最大上升率應該是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\nabla f(2,0)$" + }, + { + "key": "b", + "text": "$|\\nabla f(2,0)|$" + }, + { + "key": "c", + "text": "$\\mathbf{u} \\cdot \\mathbf{u}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-24", + "step": "step-5" + } + ], + "gate_from": "flow-24::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": "沿 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 的變化率 " + }, + { + "latex": "$= 1$", + "kind": "math" + }, + { + "text": "最大上升方向:" + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": ";最大上升率:" + }, + { + "latex": "$|\\nabla f(2,0)| = \\sqrt{5}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-24::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣ 等值曲面的切平面", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 等值曲面的切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "在三維中,曲面在某一點附近的「局部描述」就是切平面。", + "newline": "false", + "runs": [ + { + "text": "在三維中,曲面在某一點附近的「局部描述」就是" + }, + { + "text": "切平面", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:在二維,梯度垂直於切線方向;在三維,梯度垂直於所有切向量,因此梯度自然成為切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":在二維,梯度垂直於" + }, + { + "text": "切線方向", + "style": "bold" + }, + { + "text": ";在三維,梯度垂直於所有" + }, + { + "text": "切向量", + "style": "bold" + }, + { + "text": ",因此梯度自然成為" + }, + { + "text": "切平面的法向量", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。", + "newline": "false", + "runs": [ + { + "text": "若曲面由 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 表示,且點 " + }, + { + "latex": "$P(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 在曲面上,切平面的法向量就是 " + }, + { + "latex": "$\\nabla F(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_05b8657d37", + "label": "等值曲面", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "bdccxafp", + "width": "100%", + "height": "480", + "border": "0", + "caption": "等值曲面與切平面", + "card": "0" + } + ] + }, + { + "type": "solution", + "uid": "sol_02e336c1cc", + "label": "從二維切線到三維切平面", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先從比較熟悉的二維圖形開始想。", + "newline": "false", + "runs": [ + { + "text": "先從比較熟悉的二維圖形開始想。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮橢圓$$\n3x^2+4y^2=16\n$$在點 $(2,1)$ 的切線。", + "newline": "false", + "runs": [ + { + "text": "考慮橢圓" + }, + { + "latex": "$$\n3x^2+4y^2=16\n$$", + "kind": "math_block" + }, + { + "text": "在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的切線。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "一、二維:切線與梯度", + "newline": "true", + "runs": [ + { + "text": "一、二維:切線與梯度", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal" + }, + { + "type": "paragraph", + "content": "如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成$$\n3x^2+4y^2(x)=16.\n$$", + "newline": "false", + "runs": [ + { + "text": "如果在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 附近,可以把橢圓看成 " + }, + { + "latex": "$y=y(x)$", + "kind": "math" + }, + { + "text": ",那麼原式可以寫成" + }, + { + "latex": "$$\n3x^2+4y^2(x)=16.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "兩邊對 $x$ 微分:$$\n6x+8y(x)y'(x)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$$\n6x+8y(x)y'(x)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把 $(2,1)$ 代入:$$\n12+8y'(2)=0,\n$$所以$$\ny'(2)=-\\frac{3}{2}.\n$$", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 代入:" + }, + { + "latex": "$$\n12+8y'(2)=0,\n$$", + "kind": "math_block" + }, + { + "text": "所以" + }, + { + "latex": "$$\ny'(2)=-\\frac{3}{2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,橢圓在點 $(2,1)$ 的切線斜率是$$\n-\\frac{3}{2}.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,橢圓在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的切線斜率是" + }, + { + "latex": "$$\n-\\frac{3}{2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著改用梯度來看。令$$\nF(x,y)=3x^2+4y^2-16.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著改用梯度來看。令" + }, + { + "latex": "$$\nF(x,y)=3x^2+4y^2-16.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "那麼橢圓可以看成等值曲線$$\nF(x,y)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "那麼橢圓可以看成等值曲線" + }, + { + "latex": "$$\nF(x,y)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "梯度為$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "梯度為" + }, + { + "latex": "$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在點 $(2,1)$,$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。", + "newline": "false", + "runs": [ + { + "text": "重點是:沿著橢圓走的時候," + }, + { + "latex": "$F(x,y)$", + "kind": "math" + }, + { + "text": " 的值一直都是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",所以沿著切線方向移動時,函數值沒有增加也沒有減少。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,切線方向向量 " + }, + { + "latex": "$\\mathbf v$", + "kind": "math" + }, + { + "text": " 必須和梯度垂直:" + }, + { + "latex": "$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "例如可以取$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "例如可以取" + }, + { + "latex": "$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因為" + }, + { + "latex": "$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個方向向量的斜率是$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$和前面用隱函數微分算出來的斜率一樣。", + "newline": "false", + "runs": [ + { + "text": "這個方向向量的斜率是" + }, + { + "latex": "$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$", + "kind": "math_block" + }, + { + "text": "和前面用隱函數微分算出來的斜率一樣。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以在二維中可以記住一句話:梯度垂直於等值曲線的切線方向。", + "newline": "false", + "runs": [ + { + "text": "所以在二維中可以記住一句話:" + }, + { + "text": "梯度垂直於等值曲線的切線方向", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "二、三維:切平面與梯度", + "newline": "true", + "runs": [ + { + "text": "二、三維:切平面與梯度", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal" + }, + { + "type": "paragraph", + "content": "現在把同樣的想法推廣到三維。", + "newline": "false", + "runs": [ + { + "text": "現在把同樣的想法推廣到三維。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮曲面$$\n3x^2+4y^2+5z^2=12\n$$以及曲面上的點 $(1,1,1)$。", + "newline": "false", + "runs": [ + { + "text": "考慮曲面" + }, + { + "latex": "$$\n3x^2+4y^2+5z^2=12\n$$", + "kind": "math_block" + }, + { + "text": "以及曲面上的點 " + }, + { + "latex": "$(1,1,1)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$", + "newline": "false", + "runs": [ + { + "text": "令" + }, + { + "latex": "$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "那麼這個曲面可以寫成等值曲面$$\nF(x,y,z)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "那麼這個曲面可以寫成等值曲面" + }, + { + "latex": "$$\nF(x,y,z)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "先求梯度:$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "先求梯度:" + }, + { + "latex": "$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在點 $(1,1,1)$,$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "在點 " + }, + { + "latex": "$(1,1,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。", + "newline": "false", + "runs": [ + { + "text": "和二維情況一樣:如果沿著曲面上的方向移動," + }, + { + "latex": "$F(x,y,z)$", + "kind": "math" + }, + { + "text": " 的值仍然保持為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",所以在切平面上的任何方向,函數值都不會瞬間改變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,切平面上的所有方向向量都會和梯度垂直。也就是說,$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$就是這個切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "因此,切平面上的所有方向向量都會和梯度垂直。也就是說," + }, + { + "latex": "$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$", + "kind": "math_block" + }, + { + "text": "就是這個切平面的法向量。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著用「點法式」寫出平面方程式。", + "newline": "false", + "runs": [ + { + "text": "接著用「點法式」寫出平面方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "已知切平面通過點$$\nP=(1,1,1),\n$$而切平面上的任意一點記為$$\nQ=(x,y,z).\n$$", + "newline": "false", + "runs": [ + { + "text": "已知切平面通過點" + }, + { + "latex": "$$\nP=(1,1,1),\n$$", + "kind": "math_block" + }, + { + "text": "而切平面上的任意一點記為" + }, + { + "latex": "$$\nQ=(x,y,z).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "則從 $P$ 指向 $Q$ 的向量是$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "則從 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 指向 " + }, + { + "latex": "$Q$", + "kind": "math" + }, + { + "text": " 的向量是" + }, + { + "latex": "$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 在切平面上,所以它必須和法向量 " + }, + { + "latex": "$\\langle 6,8,10\\rangle$", + "kind": "math" + }, + { + "text": " 垂直:" + }, + { + "latex": "$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "展開後得到切平面方程式:$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "展開後得到切平面方程式:" + }, + { + "latex": "$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以三維中可以記住:等值曲面的梯度就是切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "所以三維中可以記住:" + }, + { + "text": "等值曲面的梯度就是切平面的法向量", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定理", + "headline": "等值曲面的法向量、切平面與法線", + "body": [ + { + "type": "paragraph", + "content": "若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "法向量", + "style": "bold" + }, + { + "text": ":曲面在點 " + }, + { + "latex": "$P(x_0,y_0,z_0)$", + "kind": "math" + }, + { + "text": " 的法向量可由梯度給出 " + }, + { + "latex": "$\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$", + "kind": "math" + } + ], + "content": "法向量:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "切平面", + "style": "bold" + }, + { + "text": ":通過點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 且以 " + }, + { + "latex": "$\\overrightarrow\\mathbf{n}$", + "kind": "math" + }, + { + "text": " 為法向量的平面 " + }, + { + "latex": "$F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$", + "kind": "math" + } + ], + "content": "切平面:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "法線對稱式", + "style": "bold" + }, + { + "text": ":通過點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 且平行於法向量 " + }, + { + "latex": "$\\overrightarrow\\mathbf{n}$", + "kind": "math" + }, + { + "text": " 的直線。其對稱式為 " + }, + { + "latex": "$\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$", + "kind": "math" + }, + { + "text": "(若法向量某個分量為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",則法線不適合直接寫成完整對稱式,可改用參數式表示。)" + } + ], + "content": "法線對稱式:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。", + "newline": "false", + "runs": [ + { + "text": "求橢球面 " + }, + { + "latex": "$\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math" + }, + { + "text": " 的切平面與法線方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_ex6.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "切平面方程式:" + } + ], + "answers": [ + "3*x-6*y+2*z+18=0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "法線方程式(對稱式):" + } + ], + "answers": [ + "(x+2)/(-1)=(y-1)/2=(z+3)/(-2/3)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_31110adc4b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義 $F$ 並計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義 ", + "style": "bold" + }, + { + "latex": "$F$", + "kind": "math", + "style": "bold" + }, + { + "text": " 並計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:代入點 $(-2,1,-3)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:代入點 ", + "style": "bold" + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:切平面方程式", + "newline": "false", + "runs": [ + { + "text": "Step 3:切平面方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:法線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 4:法線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ebfe5833c9", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。", + "newline": "false", + "runs": [ + { + "text": "該橢球面是 " + }, + { + "latex": "$F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$", + "kind": "math" + }, + { + "text": " 的等值曲面(取 " + }, + { + "latex": "$k = 3$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "flow", + "id": "flow-25", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-1::q1", + "prompt_runs": [ + { + "text": "求偏導 " + }, + { + "latex": "$F_x, F_y, F_z$", + "kind": "math" + }, + { + "text": ",下列哪一組正確?" + } + ], + "options": [ + { + "key": "a", + "text": "$F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$" + }, + { + "key": "b", + "text": "$F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$" + }, + { + "key": "c", + "text": "$F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$" + }, + { + "key": "d", + "text": "$F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-25", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$F_x = -1$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_y = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_z = -\\dfrac{2}{3}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-2::q2", + "prompt_runs": [ + { + "text": "切平面方程式(化簡後)是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$3x + 6y + 2z + 18 = 0$" + }, + { + "key": "b", + "text": "$3x - 6y + 2z - 18 = 0$" + }, + { + "key": "c", + "text": "$3x - 6y + 2z + 18 = 0$" + }, + { + "key": "d", + "text": "$x - 2y + \\dfrac{2}{3}z + 6 = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-25", + "step": "step-2" + } + ], + "gate_from": "flow-25::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-3::q3", + "prompt_runs": [ + { + "text": "法線對稱方程式(方向向量與 " + }, + { + "latex": "$\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$", + "kind": "math" + }, + { + "text": " 同向):" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$" + }, + { + "key": "b", + "text": "$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$" + }, + { + "key": "c", + "text": "$\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$" + }, + { + "key": "d", + "text": "$\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-25", + "step": "step-3" + } + ], + "gate_from": "flow-25::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:切平面:$3x - 6y + 2z + 18 = 0$法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": "切平面:" + }, + { + "latex": "$3x - 6y + 2z + 18 = 0$", + "kind": "math" + }, + { + "text": "法線:" + }, + { + "latex": "$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-25::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "7️⃣ 雙變數函數曲面的切平面", + "newline": "true", + "runs": [ + { + "text": "7️⃣ 雙變數函數曲面的切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:", + "newline": "false", + "runs": [ + { + "text": "當曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 的方程式為 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 時(即 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 是雙變數函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的圖形),可改寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = f(x,y) - z = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = f(x,y) - z = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是等值曲面的特例(取 $k = 0$)。", + "newline": "false", + "runs": [ + { + "text": "這是等值曲面的特例(取 " + }, + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "計算 $F$ 的偏導數:", + "newline": "false", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$F$", + "kind": "math" + }, + { + "text": " 的偏導數:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入切平面公式,得到:", + "newline": "false", + "runs": [ + { + "text": "代入切平面公式,得到:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "兩種切平面公式的對照", + "body": [ + { + "type": "paragraph", + "content": "曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ ", + "newline": "false", + "runs": [ + { + "text": "曲面 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": ",其切平面公式為 " + }, + { + "latex": "$F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$", + "kind": "math" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ ", + "newline": "false", + "runs": [ + { + "text": "曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",其切平面公式為 " + }, + { + "latex": "$f_x(x-x_0) + f_y(y-y_0) = z - z_0$", + "kind": "math" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。", + "newline": "false", + "runs": [ + { + "text": "後者是前者的特例,令 " + }, + { + "latex": "$F = f(x,y) - z$", + "kind": "math" + }, + { + "text": " 即可推導。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。", + "newline": "false", + "runs": [ + { + "text": "求曲面 " + }, + { + "latex": "$z = 2x^2 + y^2$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": " 的切平面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "切平面方程式:" + } + ], + "answers": [ + "z=4*x+2*y-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_3f2ee97ccb", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:改寫為 $F = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 1:改寫為 ", + "style": "bold" + }, + { + "latex": "$F = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = 2x^2 + y^2 - z = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = 2x^2 + y^2 - z = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導並代入點 $(1,1,3)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導並代入點 ", + "style": "bold" + }, + { + "latex": "$(1,1,3)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:寫出切平面", + "newline": "false", + "runs": [ + { + "text": "Step 3:寫出切平面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b89c4cd456", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-26", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-26::step-1::q1", + "prompt_runs": [ + { + "text": "將 " + }, + { + "latex": "$F = 2x^2 + y^2 - z$", + "kind": "math" + }, + { + "text": " 計算偏導數:" + } + ], + "options": [ + { + "key": "a", + "text": "$F_x = 4x,\\; F_y = 2y,\\; F_z = -1$" + }, + { + "key": "b", + "text": "$F_x = 4,\\; F_y = 2,\\; F_z = -1$" + }, + { + "key": "c", + "text": "$F_x = 2x,\\; F_y = y,\\; F_z = 1$" + }, + { + "key": "d", + "text": "$F_x = 4x,\\; F_y = 2y,\\; F_z = 1$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-26", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$F_x = 4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_y = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_z = -1$", + "kind": "math" + }, + { + "text": ",法向量 " + }, + { + "latex": "$\\mathbf{n} = \\langle 4, 2, -1 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-26::step-2::q2", + "prompt_runs": [ + { + "text": "切平面方程式是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$z = 4x + 2y - 3$" + }, + { + "key": "b", + "text": "$z = 4x + 2y + 3$" + }, + { + "key": "c", + "text": "$z = 4x - 2y - 3$" + }, + { + "key": "d", + "text": "$z = -4x - 2y + 3$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-26", + "step": "step-2" + } + ], + "gate_from": "flow-26::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案: $z = 4x + 2y - 3$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$z = 4x + 2y - 3$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。", + "newline": "false", + "runs": [ + { + "text": "也可以直接套公式:" + }, + { + "latex": "$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f_x = 4x$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = 2y$", + "kind": "math" + }, + { + "text": ",代入即得。" + } + ] + } + ], + "gate_from": "flow-26::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "8️⃣ 梯度向量的幾何意義", + "newline": "true", + "runs": [ + { + "text": "8️⃣ 梯度向量的幾何意義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "現在我們把梯度的兩個核心性質放在一起理解。", + "newline": "false", + "runs": [ + { + "text": "現在我們把梯度的兩個核心性質放在一起理解。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在三維中:", + "newline": "false", + "runs": [ + { + "text": "在三維中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 指向函數在該點" + }, + { + "text": "增加最快的方向", + "style": "bold" + } + ], + "content": "$\\nabla f(x_0, y_0, z_0)$ 指向函數在該點增加最快的方向" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "於通過該點的等值曲面 " + }, + { + "latex": "$S$", + "kind": "math" + } + ], + "content": "$\\nabla f(x_0, y_0, z_0)$ 垂直於通過該點的等值曲面 $S$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往垂直方向移動,便能得到最大的增加率。", + "newline": "false", + "runs": [ + { + "text": "這兩個性質在直觀上是相容的:當我們沿著等值曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 移動時,函數值 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 不會改變。因此,往" + }, + { + "text": "垂直方向", + "style": "bold" + }, + { + "text": "移動,便能得到最大的增加率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣地,對二變數函數 $f(x,y)$:", + "newline": "false", + "runs": [ + { + "text": "同樣地,對二變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 指向函數增加最快的方向" + } + ], + "content": "$\\nabla f(x_0, y_0)$ 指向函數增加最快的方向" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "於通過 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的等值曲線 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + } + ], + "content": "$\\nabla f(x_0, y_0)$ 垂直於通過 $P$ 的等值曲線 $f(x,y) = k$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_8.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "特性", + "headline": "梯度向量的性質", + "body": [ + { + "type": "paragraph", + "content": "設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:", + "newline": "false", + "runs": [ + { + "text": "設 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 為二變數或三變數的可微函數,且 " + }, + { + "latex": "$\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "方向導數公式", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$", + "kind": "math" + } + ], + "content": "方向導數公式:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "最大上升方向", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": " 指向函數增加最快的方向,最大變化率為 " + }, + { + "latex": "$|\\nabla f(\\mathbf{x})|$", + "kind": "math" + } + ], + "content": "最大上升方向:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "垂直性質", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": " 垂直於通過該點的等值曲面(或等值曲線)" + } + ], + "content": "垂直性質:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "方向導數和梯度向量", + "newline": "true", + "runs": [ + { + "text": "方向導數和梯度向量", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 方向導數", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "在正式進入這個單元之前,我們先來回想一下偏導數。", + "newline": "false", + "runs": [ + { + "text": "在正式進入這個單元之前,我們先來回想一下偏導數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "回顧", + "headline": "偏導數(Partial Derivatives)", + "body": [ + { + "type": "paragraph", + "content": "若 $z = f(x,y)$,則在點 $(x_0, y_0)$ 的偏導數定義為:$$\nf_x(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}\n$$$$\nf_y(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0,y_0+h)-f(x_0,y_0)}{h}\n$$它們分別代表 $z$ 對 $x$ 方向與對 $y$ 方向的變化率。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",則在點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 的偏導數定義為:" + }, + { + "latex": "$$\nf_x(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0,y_0+h)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "text": "它們分別代表 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向與對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的變化率。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "偏導數只能沿著 $x$ 軸或 $y$ 軸方向測量變化率。但在現實中,我可能想往斜 30 度或斜 45 度的方向測量,這時候該怎麼計算?", + "newline": "false", + "runs": [ + { + "text": "偏導數只能沿著 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸或 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 軸方向測量變化率。但在現實中,我可能想往斜 30 度或斜 45 度的方向測量,這時候該怎麼計算?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6b7b12086b", + "label": "想想看解答", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "我們可以引入一個單位方向向量 $\\mathbf{u} = \\langle a, b \\rangle$,其中 $a$ 代表往 $x$ 方向的比例,$b$ 代表往 $y$ 方向的比例,且必須滿足 $a^2 + b^2 = 1$。", + "newline": "false", + "runs": [ + { + "text": "我們可以引入一個" + }, + { + "text": "單位方向向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 代表往 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向的比例," + }, + { + "latex": "$b$", + "kind": "math" + }, + { + "text": " 代表往 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的比例,且必須滿足 " + }, + { + "latex": "$a^2 + b^2 = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "只要找出沿著 $\\mathbf{u}$ 方向的變化率,就是我們要求的方向導數 $D_{\\mathbf{u}}f$。", + "newline": "false", + "runs": [ + { + "text": "只要找出沿著 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 方向的變化率,就是我們要求的" + }, + { + "text": "方向導數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "單位向量|w=400", + "src": "/assets/unit_vector.svg" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_93a3f52ee1", + "label": "方向導數幾何例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "xcr7r7rx", + "width": "100%", + "height": "480", + "border": "0", + "caption": "方向導數", + "card": "0" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_21fcf97b41", + "label": "生活化例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "不知道大家有沒有看過日本的箱根驛傳?這是一場總長 217.1 公里、由 10 人接力完成的長距離賽事。", + "newline": "false", + "runs": [ + { + "text": "不知道大家有沒有看過日本的" + }, + { + "text": "箱根驛傳", + "style": "bold" + }, + { + "text": "?這是一場總長 217.1 公里、由 10 人接力完成的長距離賽事。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們如果在地圖上把賽事用座標表示:", + "newline": "false", + "runs": [ + { + "text": "我們如果在地圖上把賽事用座標表示:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "跑者位置:" + }, + { + "latex": "$P = (x, y)$", + "kind": "math" + } + ], + "content": "跑者位置:$P = (x, y)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "海拔是一個函數:" + }, + { + "latex": "$h(x, y)$", + "kind": "math" + }, + { + "text": "(單位:公尺)" + } + ], + "content": "海拔是一個函數:$h(x, y)$(單位:公尺)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "問題: 跑者沿著「路線方向」前進時,海拔上升(或下降)的速率是多少?", + "newline": "false", + "runs": [ + { + "text": "問題:", + "style": "bold" + }, + { + "text": " 跑者沿著「路線方向」前進時,海拔上升(或下降)的速率是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個「速率」就是方向導數。", + "newline": "false", + "runs": [ + { + "text": "這個「速率」就是" + }, + { + "text": "方向導數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "在平面上,「方向」可以用一個向量表示。但我們希望方向導數代表「每前進 1 個單位距離」的變化率,因此要把方向向量標準化成單位向量:$$\n\\mathbf{u} = \\frac{\\mathbf{v}}{|\\mathbf{v}|}, \\qquad |\\mathbf{u}| = 1\n$$", + "newline": "false", + "runs": [ + { + "text": "在平面上,「方向」可以用一個向量表示。但我們希望方向導數代表「每前進 1 個單位距離」的變化率,因此要把方向向量標準化成" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\mathbf{u} = \\frac{\\mathbf{v}}{|\\mathbf{v}|}, \\qquad |\\mathbf{u}| = 1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "跑者在點 $P$,沿著方向 $\\mathbf{u}$ 前進距離 $t$ 後,海拔改變量是 $h(P+t\\mathbf{u}) - h(P)$。因此沿著方向 $\\mathbf{u}$ 的海拔變化率定義為:$$\nD_{\\mathbf{u}}h(P) = \\lim_{t\\to 0}\\frac{h(P+t\\mathbf{u})-h(P)}{t}\n$$", + "newline": "false", + "runs": [ + { + "text": "跑者在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": ",沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進距離 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 後,海拔改變量是 " + }, + { + "latex": "$h(P+t\\mathbf{u}) - h(P)$", + "kind": "math" + }, + { + "text": "。因此沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的海拔變化率定義為:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}h(P) = \\lim_{t\\to 0}\\frac{h(P+t\\mathbf{u})-h(P)}{t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "以競賽中的第 5 跑區為例:最高點在 16.2 km 附近,之後轉成下坡。這表示沿著路線方向的方向導數 $D_{\\mathbf{u}}h$,前半段多為正(爬升),到最高點接近 0,後半段變負(下坡)。", + "newline": "false", + "runs": [ + { + "text": "以競賽中的第 5 跑區為例:最高點在 16.2 km 附近,之後轉成下坡。這表示沿著路線方向的方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}h$", + "kind": "math" + }, + { + "text": ",前半段多為正(爬升),到最高點接近 0,後半段變負(下坡)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向導數的符號,直接對應你沿著那個方向是在上坡、持平,還是下坡。", + "newline": "false", + "runs": [ + { + "text": "方向導數的符號,直接對應你沿著那個方向是在上坡、持平,還是下坡。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "mytuxtv6", + "width": "100%", + "height": "480", + "border": "0", + "caption": "方向導數:箱根驛傳路線示意", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 方向導數定義", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 方向導數定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "card", + "kind": "定義", + "headline": "方向導數 Directional Derivatives", + "body": [ + { + "type": "paragraph", + "content": "令 $\\mathbf{u} = \\langle a, b \\rangle$ 為單位向量(即 $\\|\\mathbf{u}\\| = 1$)。函數 $f$ 在點 $(x_0, y_0)$ 沿著方向 $\\mathbf{u}$ 的方向導數定義為:$$\nD_{\\mathbf{u}}f(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb)-f(x_0,y_0)}{h}\n$$若此極限存在。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 為" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": "(即 " + }, + { + "latex": "$\\|\\mathbf{u}\\| = 1$", + "kind": "math" + }, + { + "text": ")。函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的方向導數定義為:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "text": "若此極限存在。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:為什麼 $\\mathbf{u}$ 要是單位向量?", + "newline": "false", + "runs": [ + { + "text": "Q:為什麼 ", + "style": "bold" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 要是單位向量?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-15", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-15::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "不然連鎖律不能用" + }, + { + "key": "b", + "text": "不然方向導數會被向量長度影響,不再代表「每 1 單位距離」的變化率" + }, + { + "key": "c", + "text": "不然 $f_x, f_y$ 會改變" + }, + { + "key": "d", + "text": "不然極限不存在" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-15", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "如果 $\\mathbf{u}$ 不是單位向量,等於你「每次前進的距離」被放大或縮小,變化率就會跟著被放大或縮小;用單位向量才能代表「每走 1 單位距離」的瞬時變化率。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 不是單位向量,等於你「每次前進的距離」被放大或縮小,變化率就會跟著被放大或縮小;用單位向量才能代表「每走 1 單位距離」的瞬時變化率。" + } + ] + } + ], + "gate_from": "flow-15::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的公式", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 可微,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在該點沿任意單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 方向上的方向導數存在,且:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\,a + f_y(x,y)\\,b\n$$", + "kind": "math_block" + } + ], + "content": "若 $f$ 在點 $(x,y)$ 可微,則 $f$ 在該點沿任意單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 方向上的方向導數存在,且:$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\,a + f_y(x,y)\\,b\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入上式得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta\n$$", + "kind": "math_block" + } + ], + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入上式得:$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_2efc08fef2", + "label": "詳細證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。", + "newline": "false", + "runs": [ + { + "text": "我們很熟悉單變數函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 的導數。在雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,若我們沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 前進,從點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 出發走距離 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ",新位置是 " + }, + { + "latex": "$(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",其實只是沿著一條直線移動。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\\mathbf{u}$ 前進 $h$ 時的函數值。", + "newline": "false", + "runs": [ + { + "text": "因此可定義單變數函數 " + }, + { + "latex": "$g(h) = f(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",代表沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 時的函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "根據單變數導數的定義:$$\ng'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "根據單變數導數的定義:" + }, + { + "latex": "$$\ng'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "將 $g(h)$ 與 $g(0)$ 代回後可得:$$\ng'(0) = \\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$g(h)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$g(0)$", + "kind": "math" + }, + { + "text": " 代回後可得:" + }, + { + "latex": "$$\ng'(0) = \\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "而這正是 $D_{\\mathbf{u}}f(x_0,y_0)$ 的定義,因此:$$\nD_{\\mathbf{u}}f(x_0,y_0)=g'(0)\n$$", + "newline": "false", + "runs": [ + { + "text": "而這正是 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 的定義,因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0)=g'(0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著改用連鎖律計算 $g'(h)$,其中 $x = x_0 + ha$,$y = y_0 + hb$:$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh}\n$$", + "newline": "false", + "runs": [ + { + "text": "接著改用連鎖律計算 " + }, + { + "latex": "$g'(h)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x_0 + ha$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0 + hb$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為$$\n\\frac{dx}{dh}=a,\\qquad \\frac{dy}{dh}=b\n$$", + "newline": "false", + "runs": [ + { + "text": "因為" + }, + { + "latex": "$$\n\\frac{dx}{dh}=a,\\qquad \\frac{dy}{dh}=b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\ng'(h)=f_x(x,y)\\,a+f_y(x,y)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\ng'(h)=f_x(x,y)\\,a+f_y(x,y)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $h = 0$,則 $x = x_0$,$y = y_0$,得到:$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$h = 0$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$x = x_0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0$", + "kind": "math" + }, + { + "text": ",得到:" + }, + { + "latex": "$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此:$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入即得:$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "newline": "false", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/unit_vector_theta.svg" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9b69b8e81e", + "label": "引導證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-16", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。", + "newline": "false", + "runs": [ + { + "text": "我們很熟悉單變數函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 的導數。在雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,若我們沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 前進,從點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 出發走距離 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ",新位置是 " + }, + { + "latex": "$(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",其實只是沿著一條直線移動。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\\mathbf{u}$ 前進 $h$ 時的函數值。", + "newline": "false", + "runs": [ + { + "text": "因此可定義單變數函數 " + }, + { + "latex": "$g(h) = f(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",代表沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 時的函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-16::step-1::q1", + "prompt_runs": [ + { + "latex": "$g'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}$", + "kind": "math" + }, + { + "text": ",請問將 " + }, + { + "latex": "$g(h)$", + "kind": "math" + }, + { + "text": " 代回後是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0) - f(x_0, y_0)}{h}$" + }, + { + "key": "b", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+a, y_0+b) - f(x_0, y_0)}{h}$" + }, + { + "key": "c", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+h, y_0+h) - f(x_0, y_0)}{h}$" + }, + { + "key": "d", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "flow": "flow-16", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "而這也是 $D_{\\mathbf{u}}f$ 的定義。", + "newline": "false", + "runs": [ + { + "text": "而這也是 " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 的定義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-16::step-2::q2", + "prompt_runs": [ + { + "text": "改用連鎖律計算 " + }, + { + "latex": "$g'(h)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x_0 + ha$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0 + hb$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh} = \\;?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$f_x(x,y)\\,a + f_y(x,y)\\,b$" + }, + { + "key": "b", + "text": "$f_x(x,y) + f_y(x,y)$" + }, + { + "key": "c", + "text": "$f_x(x,y)\\,h + f_y(x,y)\\,h$" + }, + { + "key": "d", + "text": "$a + b$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-16", + "step": "step-2" + } + ], + "gate_from": "flow-16::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $h = 0$,則 $x = x_0$,$y = y_0$,得到:$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$h = 0$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$x = x_0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0$", + "kind": "math" + }, + { + "text": ",得到:" + }, + { + "latex": "$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此:$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入即得:$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "newline": "false", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/unit_vector_theta.svg" + } + ], + "gate_from": "flow-16::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:\n\n\n\n不會的話可以看看下面引導解法或是詳細解法喔。\n\n\n**Step 1:寫出單位向量**\n\n$$\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle$$\n\n**Step 2:計算偏導數**\n\n$$f_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y$$\n\n**Step 3:套用公式**\n\n$$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}$$\n\n**Step 4:代入 $(1,2)$**\n\n$$D_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}$$\n\n\n\n\n\n題目要求方向導數 $D_{\\mathbf{u}}f(x,y)$,若 $\\mathbf{u}$ 與 $x$ 軸夾角為 $\\theta$,正確公式是哪個?\n\na. $f_x(x,y)\\sin\\theta + f_y(x,y)\\cos\\theta$\nb. $f_x(x,y) + f_y(x,y)$\nc. $f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta$\n\n\n\n\n已知 $\\theta = \\dfrac{\\pi}{6}$,方向向量的分量 $(\\cos\\theta, \\sin\\theta)$ 為何?\n\na. $\\left(\\dfrac{1}{2}, \\dfrac{\\sqrt{3}}{2}\\right)$\nb. $\\left(\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$\nc. $\\left(-\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$\n\n\n\n\n接下來求偏導數:$f_x(x,y) = \\dfrac{\\partial}{\\partial x}(x^3-3xy+4y^2) = $ ?\n\n\n\n\n\n$f_y(x,y) = \\dfrac{\\partial}{\\partial y}(x^3-3xy+4y^2) = $ ?\n\n\n\n\n\n偏導數:$f_x = 3x^2 - 3y$,$f_y = -3x + 8y$。\n\n代入公式:\n$$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}$$\n\n最後算 $(1,2)$ 的值:\n\na. $\\dfrac{13 - 3\\sqrt{3}}{2}$\nb. $\\dfrac{13 + 3\\sqrt{3}}{2}$\nc. $13 - 3\\sqrt{3}$\n\n\n\n\n**答案:**\n$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$\n\n$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$\n\n\n\n\n---\n\n## 3️⃣ 梯度向量\n\n由方向導數公式可知:\n\n$$D_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}$$\n\n其中向量 $\\langle f_x, f_y \\rangle$ 會在很多地方反覆出現,我們給它一個特別的名字:**梯度(gradient)**,以符號 $\\nabla f$($\\nabla$ 讀作「nabla」或「del」)表示。\n\n---\n\n\n定義\n梯度向量 The Gradient Vector\n如果 $f$ 是二變數 $x$ 與 $y$ 的函數,則 $f$ 的梯度是一個向量函數 $\\nabla f$,定義為:\n$$\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}$$\n通常簡寫成 $\\nabla f = \\langle f_x, f_y \\rangle$。\n\n\n\n定理\n方向導數的向量公式\n使用梯度向量的記號後,方向導數可以寫成:\n$$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$$\n這個式子表示:沿著單位向量 $\\mathbf{u}$ 的方向導數,等於把梯度向量 $\\nabla f$ 投影到 $\\mathbf{u}$ 上的「純量投影」(也就是梯度在該方向上的分量)。\n\n\n---\n\n### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$$\n\n**Step 2:代入 $(0,1)$**\n\n$$\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle$$\n\n\n\n\n\n首先請問 $\\nabla f(x,y) = $ ?\n\na. $\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$\nb. $\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\nc. $\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$\nd. $\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$\n\n\n\n\n代入 $(0,1)$ 後可得:\n\na. $\\langle 2, 0 \\rangle$\nb. $\\langle 2, 1 \\rangle$\nc. $\\langle 1, 1 \\rangle$\n\n\n\n\n**答案:**\n$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$ \n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$\n\n\n\n\n---\n\n### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f(x,y) = x^3 - 3xy + 4y^2$", + "kind": "math" + }, + { + "text": ",且方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 是與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角 " + }, + { + "latex": "$\\theta = \\dfrac{\\pi}{6}$", + "kind": "math" + }, + { + "text": " 的單位向量。求 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y)$", + "kind": "math" + }, + { + "text": ",並計算 " + }, + { + "latex": "$D_{\\mathbf{u}}f(1,2)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_ex1.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$D_{\\mathbf{u}}f(1,2)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "(13-3*sqrt(3))/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "不會的話可以看看下面引導解法或是詳細解法喔。", + "newline": "false", + "runs": [ + { + "text": "不會的話可以看看下面引導解法或是詳細解法喔。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e1716862f9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $(1,2)$", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$(1,2)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:\n\n\n\n不會的話可以看看下面引導解法或是詳細解法喔。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7f554c800c", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-17", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-1::q1", + "prompt_runs": [ + { + "text": "題目要求方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y)$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",正確公式是哪個?" + } + ], + "options": [ + { + "key": "a", + "text": "$f_x(x,y)\\sin\\theta + f_y(x,y)\\cos\\theta$" + }, + { + "key": "b", + "text": "$f_x(x,y) + f_y(x,y)$" + }, + { + "key": "c", + "text": "$f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-17", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-2::q2", + "prompt_runs": [ + { + "text": "已知 " + }, + { + "latex": "$\\theta = \\dfrac{\\pi}{6}$", + "kind": "math" + }, + { + "text": ",方向向量的分量 " + }, + { + "latex": "$(\\cos\\theta, \\sin\\theta)$", + "kind": "math" + }, + { + "text": " 為何?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\left(\\dfrac{1}{2}, \\dfrac{\\sqrt{3}}{2}\\right)$" + }, + { + "key": "b", + "text": "$\\left(\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$" + }, + { + "key": "c", + "text": "$\\left(-\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-17", + "step": "step-2" + } + ], + "gate_from": "flow-17::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-17::step-3::q3", + "prompt_runs": [ + { + "text": "接下來求偏導數:" + }, + { + "latex": "$f_x(x,y) = \\dfrac{\\partial}{\\partial x}(x^3-3xy+4y^2) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "answers": [ + "3*x^2-3*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-17", + "step": "step-3" + } + ], + "gate_from": "flow-17::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-17::step-4::q4", + "prompt_runs": [ + { + "latex": "$f_y(x,y) = \\dfrac{\\partial}{\\partial y}(x^3-3xy+4y^2) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "answers": [ + "-3*x+8*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-17", + "step": "step-4" + } + ], + "gate_from": "flow-17::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "偏導數:$f_x = 3x^2 - 3y$,$f_y = -3x + 8y$。", + "newline": "false", + "runs": [ + { + "text": "偏導數:" + }, + { + "latex": "$f_x = 3x^2 - 3y$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = -3x + 8y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入公式:$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "newline": "false", + "runs": [ + { + "text": "代入公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-5::q5", + "prompt_runs": [ + { + "text": "最後算 " + }, + { + "latex": "$(1,2)$", + "kind": "math" + }, + { + "text": " 的值:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{13 - 3\\sqrt{3}}{2}$" + }, + { + "key": "b", + "text": "$\\dfrac{13 + 3\\sqrt{3}}{2}$" + }, + { + "key": "c", + "text": "$13 - 3\\sqrt{3}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-17", + "step": "step-5" + } + ], + "gate_from": "flow-17::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$", + "newline": "false", + "runs": [ + { + "latex": "$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-17::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 梯度向量", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 梯度向量", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "由方向導數公式可知:", + "newline": "false", + "runs": [ + { + "text": "由方向導數公式可知:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中向量 $\\langle f_x, f_y \\rangle$ 會在很多地方反覆出現,我們給它一個特別的名字:梯度(gradient),以符號 $\\nabla f$($\\nabla$ 讀作「nabla」或「del」)表示。", + "newline": "false", + "runs": [ + { + "text": "其中向量 " + }, + { + "latex": "$\\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": " 會在很多地方反覆出現,我們給它一個特別的名字:" + }, + { + "text": "梯度(gradient)", + "style": "bold" + }, + { + "text": ",以符號 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": "(" + }, + { + "latex": "$\\nabla$", + "kind": "math" + }, + { + "text": " 讀作「nabla」或「del」)表示。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定義", + "headline": "梯度向量 The Gradient Vector", + "body": [ + { + "type": "paragraph", + "content": "如果 $f$ 是二變數 $x$ 與 $y$ 的函數,則 $f$ 的梯度是一個向量函數 $\\nabla f$,定義為:$$\n\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}\n$$通常簡寫成 $\\nabla f = \\langle f_x, f_y \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是二變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的函數,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的梯度是一個向量函數 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": ",定義為:" + }, + { + "latex": "$$\n\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}\n$$", + "kind": "math_block" + }, + { + "text": "通常簡寫成 " + }, + { + "latex": "$\\nabla f = \\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的向量公式", + "body": [ + { + "type": "paragraph", + "content": "使用梯度向量的記號後,方向導數可以寫成:$$\nD_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}\n$$這個式子表示:沿著單位向量 $\\mathbf{u}$ 的方向導數,等於把梯度向量 $\\nabla f$ 投影到 $\\mathbf{u}$ 上的「純量投影」(也就是梯度在該方向上的分量)。", + "newline": "false", + "runs": [ + { + "text": "使用梯度向量的記號後,方向導數可以寫成:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}\n$$", + "kind": "math_block" + }, + { + "text": "這個式子表示:沿著單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的方向導數,等於把梯度向量 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 投影到 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 上的「純量投影」(也就是梯度在該方向上的分量)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$$\n\n**Step 2:代入 $(0,1)$**\n\n$$\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle$$\n\n\n\n\n\n首先請問 $\\nabla f(x,y) = $ ?\n\na. $\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$\nb. $\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\nc. $\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$\nd. $\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$\n\n\n\n\n代入 $(0,1)$ 後可得:\n\na. $\\langle 2, 0 \\rangle$\nb. $\\langle 2, 1 \\rangle$\nc. $\\langle 1, 1 \\rangle$\n\n\n\n\n**答案:**\n$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$ \n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$\n\n\n\n\n---\n\n### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y) = \\sin x + e^{xy}$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\nabla f(0,1) = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2,0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 a,b,中間用逗號隔開", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5e2e1e2ab8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:代入 $(0,1)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:代入 ", + "style": "bold" + }, + { + "latex": "$(0,1)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e60e9afe44", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-18", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-18::step-1::q1", + "prompt_runs": [ + { + "text": "首先請問 " + }, + { + "latex": "$\\nabla f(x,y) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$" + }, + { + "key": "b", + "text": "$\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$" + }, + { + "key": "c", + "text": "$\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$" + }, + { + "key": "d", + "text": "$\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-18", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-18::step-2::q2", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$(0,1)$", + "kind": "math" + }, + { + "text": " 後可得:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 2, 0 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle 2, 1 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle 1, 1 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-18", + "step": "step-2" + } + ], + "gate_from": "flow-18::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$", + "newline": "true", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$", + "kind": "math" + }, + { + "newline": "true" + }, + { + "latex": "$\\nabla f(0,1) = \\langle 2, 0 \\rangle$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-18::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = x^2y^3 - 4y$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": " 沿著向量 " + }, + { + "latex": "$\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$", + "kind": "math" + }, + { + "text": " 方向的方向導數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/Ch14_6_ex3.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請試著算出方向導數:" + } + ], + "answers": [ + "32/sqrt(29)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:" + }, + { + "type": "solution", + "uid": "sol_de253f12f8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入 $(2,-1)$:", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(2,-1) = \\langle -4, 8 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(2,-1) = \\langle -4, 8 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:注意!題目給的是方向向量,不是單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:注意!題目給的是方向向量,不是單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_21e7631c11", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$", + "newline": "false", + "runs": [ + { + "text": "套用方向導數的向量公式:" + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$", + "kind": "math" + } + ] + }, + { + "type": "flow", + "id": "flow-19", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-1::q1", + "prompt_runs": [ + { + "text": "若 " + }, + { + "latex": "$f(x,y) = x^2y^3 - 4y$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$f_x(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x*y^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-2::q2", + "prompt_runs": [ + { + "text": "再求另一個偏導數:" + }, + { + "latex": "$f_y(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "3*x^2*y^2-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-2" + } + ], + "gate_from": "flow-19::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "梯度向量為 " + }, + { + "latex": "$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-3::q3", + "prompt_runs": [ + { + "text": "把 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": " 代入後," + }, + { + "latex": "$\\nabla f(2,-1)$", + "kind": "math" + }, + { + "text": " 等於多少?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 4,\\; 8 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle -4,\\; -8 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle -4,\\; 8 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-19", + "step": "step-3" + } + ], + "gate_from": "flow-19::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-4::q4", + "prompt_runs": [ + { + "text": "注意!直接用 " + }, + { + "latex": "$\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$", + "kind": "math" + }, + { + "text": " 對嗎?" + } + ], + "answers": [ + "NO" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "YES or NO", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-4" + } + ], + "gate_from": "flow-19::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-5::q5", + "prompt_runs": [ + { + "text": "你答對了!方向導數要用" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": ",但題目給的 " + }, + { + "latex": "$\\mathbf{v}$", + "kind": "math" + }, + { + "text": " 不一定是單位向量,要先算長度 " + }, + { + "latex": "$\\|\\mathbf{v}\\|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\sqrt{7}$" + }, + { + "key": "b", + "text": "$\\sqrt{29}$" + }, + { + "key": "c", + "text": "$29$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-19", + "step": "step-5" + } + ], + "gate_from": "flow-19::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。", + "newline": "false", + "runs": [ + { + "text": "所以單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-6::q6", + "prompt_runs": [ + { + "text": "最後套用方向導數公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{32}{\\sqrt{29}}$" + }, + { + "key": "b", + "text": "$\\dfrac{-32}{\\sqrt{29}}$" + }, + { + "key": "c", + "text": "$\\dfrac{12}{\\sqrt{29}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-19", + "step": "step-6" + } + ], + "gate_from": "flow-19::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\nD_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-19::step-6::q6" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 三變數函數的方向導數", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 三變數函數的方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。", + "newline": "false", + "runs": [ + { + "text": "對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數的方向導數", + "body": [ + { + "type": "paragraph", + "content": "若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:$$\nD_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f = f(x,y,z)$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b, c \\rangle$", + "kind": "math" + }, + { + "text": " 的方向導數:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數的梯度(Gradient)", + "body": [ + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向導數可寫成:$$\nD_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c\n$$", + "newline": "false", + "runs": [ + { + "text": "方向導數可寫成:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "已知 $f(x,y,z) = x\\sin(yz)$。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f(x,y,z) = x\\sin(yz)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 求 " + }, + { + "latex": "$\\nabla f(x,y,z) = \\langle a, b, c \\rangle$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "sin(y*z),x*z*cos(y*z),x*y*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 a,b,c", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(b) 求 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": " 沿著向量 " + }, + { + "latex": "$\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$", + "kind": "math" + }, + { + "text": " 的方向導數:" + } + ], + "answers": [ + "-3/sqrt(6)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d9715e7412", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入 $(1,3,0)$:", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:單位化方向向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:單位化方向向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_53c5b7e1e7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-20", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-1::q1", + "prompt_runs": [ + { + "text": "先回想:方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 等於?" + } + ], + "options": [ + { + "key": "a", + "text": "$D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$" + }, + { + "key": "b", + "text": "$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$" + }, + { + "key": "c", + "text": "$D_{\\mathbf{u}}f = f_x + f_y + f_z$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-20", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-2::q2", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "sin(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-2" + } + ], + "gate_from": "flow-20::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-3::q3", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "x*z*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-3" + } + ], + "gate_from": "flow-20::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-4::q4", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "x*y*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-4" + } + ], + "gate_from": "flow-20::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-5::q5", + "prompt_runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\nabla f(1,3,0)$", + "kind": "math" + }, + { + "text": " 是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 0,\\; 3,\\; 0 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle 1,\\; 0,\\; 3 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle 0,\\; 0,\\; 3 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-20", + "step": "step-5" + } + ], + "gate_from": "flow-20::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-6::q6", + "prompt_runs": [ + { + "text": "方向向量 " + }, + { + "latex": "$\\mathbf{v} = \\langle 1, 2, -1 \\rangle$", + "kind": "math" + }, + { + "text": ",先算長度 " + }, + { + "latex": "$\\|\\mathbf{v}\\|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\sqrt{5}$" + }, + { + "key": "b", + "text": "$\\sqrt{6}$" + }, + { + "key": "c", + "text": "$6$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-20", + "step": "step-6" + } + ], + "gate_from": "flow-20::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-7::q7", + "prompt_runs": [ + { + "text": "最後套用公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\sqrt{\\dfrac{3}{2}}$" + }, + { + "key": "b", + "text": "$\\sqrt{\\dfrac{3}{2}}$" + }, + { + "key": "c", + "text": "$\\dfrac{3}{\\sqrt{6}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-20", + "step": "step-7" + } + ], + "gate_from": "flow-20::step-6::q6" + }, + { + "id": "step-8", + "title": "步驟 8", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$$$\nD_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-20::step-7::q7" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 最大方向導數", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 最大方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:應該往哪個方向走?最快的速度是多少?", + "newline": "false", + "runs": [ + { + "text": "我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": ",想用最快的速度衝上山頂:" + }, + { + "text": "應該往哪個方向走?最快的速度是多少?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由內積公式,方向導數可以寫成:", + "newline": "false", + "runs": [ + { + "text": "由內積公式,方向導數可以寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的內積形式", + "body": [ + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 與方向向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的夾角," + }, + { + "latex": "$|\\mathbf{u}| = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e43dea9d27", + "label": "推導過程", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:$$\nD_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$(因為 $|\\mathbf{u}| = 1$)", + "newline": "false", + "runs": [ + { + "text": "由方向導數公式 " + }, + { + "latex": "$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$", + "kind": "math" + }, + { + "text": " 以及向量內積的幾何定義 " + }, + { + "latex": "$\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$", + "kind": "math" + }, + { + "text": ",令 " + }, + { + "latex": "$\\mathbf{A} = \\nabla f$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{B} = \\mathbf{u}$", + "kind": "math" + }, + { + "text": ",即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$", + "kind": "math_block" + }, + { + "text": "(因為 " + }, + { + "latex": "$|\\mathbf{u}| = 1$", + "kind": "math" + }, + { + "text": ")" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "三個角色的分析:", + "newline": "false", + "runs": [ + { + "text": "三個角色的分析:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$|\\nabla f|$", + "kind": "math" + }, + { + "text": "(梯度長度):站在固定點,坡度已定,這是" + }, + { + "text": "定值", + "style": "bold" + } + ], + "content": "$|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是定值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$|\\mathbf{u}|$", + "kind": "math" + }, + { + "text": "(方向向量長度):規定是單位向量,永遠等於 " + }, + { + "text": "1", + "style": "bold" + } + ], + "content": "$|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 1" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\cos\\theta$", + "kind": "math" + }, + { + "text": "(夾角):" + }, + { + "text": "唯一可以改變的", + "style": "bold" + }, + { + "text": ",取決於我們選擇的方向" + } + ], + "content": "$\\cos\\theta$(夾角):唯一可以改變的,取決於我們選擇的方向" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "Q1:", + "style": "bold" + }, + { + "latex": "$\\cos\\theta$", + "kind": "math", + "style": "bold" + }, + { + "text": " 在 ", + "style": "bold" + }, + { + "latex": "$[0, 2\\pi]$", + "kind": "math", + "style": "bold" + }, + { + "text": " 間最大值是多少?", + "style": "bold" + } + ], + "answers": [ + "1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "此時 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是幾度?" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?", + "newline": "false", + "runs": [ + { + "text": "方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 跟梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是什麼關係?" + } + ] + }, + { + "type": "flow", + "id": "flow-21", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-21::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "兩者方向相同" + }, + { + "key": "b", + "text": "兩者方向相反" + }, + { + "key": "c", + "text": "兩者互相垂直" + }, + { + "key": "d", + "text": "兩者夾 45 度角" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-21", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。", + "newline": "false", + "runs": [ + { + "text": "跟著梯度走,上升最快。此時變化率為 " + }, + { + "latex": "$|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-21::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "Q2:", + "style": "bold" + }, + { + "latex": "$\\cos\\theta$", + "kind": "math", + "style": "bold" + }, + { + "text": " 在 ", + "style": "bold" + }, + { + "latex": "$[0, 2\\pi]$", + "kind": "math", + "style": "bold" + }, + { + "text": " 間最小值是多少?", + "style": "bold" + } + ], + "answers": [ + "-1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "此時 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是多少?" + } + ], + "answers": [ + "pi" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?", + "newline": "false", + "runs": [ + { + "text": "方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 跟梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是什麼關係?" + } + ] + }, + { + "type": "flow", + "id": "flow-22", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-22::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "兩者方向相同" + }, + { + "key": "b", + "text": "兩者方向相反" + }, + { + "key": "c", + "text": "兩者互相垂直" + }, + { + "key": "d", + "text": "兩者夾 45 度角" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-22", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。", + "newline": "false", + "runs": [ + { + "text": "往梯度的反方向走,下降最快。此時變化率為 " + }, + { + "latex": "$-|\\nabla f|$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-22::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "最大方向導數與梯度", + "body": [ + { + "type": "paragraph", + "content": "若 $f$ 是二變數或三變數的可微函數,則:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是二變數或三變數的可微函數,則:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大上升", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "同方向", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 最大,最大值為 " + }, + { + "latex": "$\\|\\nabla f\\|$", + "kind": "math" + } + ], + "content": "最大上升:$\\mathbf{u}$ 與 $\\nabla f$ 同方向時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大下降", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "反方向", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 最小,最小值為 " + }, + { + "latex": "$-\\|\\nabla f\\|$", + "kind": "math" + } + ], + "content": "最大下降:$\\mathbf{u}$ 與 $\\nabla f$ 反方向時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "無變化", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f = 0$", + "kind": "math" + }, + { + "text": "(沿著等值曲線方向)" + } + ], + "content": "無變化:$\\mathbf{u}$ 與 $\\nabla f$ 垂直時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9b86818782", + "label": "GeoGebra", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "ba8bertm", + "width": "100%", + "height": "480", + "border": "0", + "caption": "梯度與方向導數", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?", + "newline": "false", + "runs": [ + { + "text": "Q:對於一個可微函數 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": ",下列關於梯度與最大方向導數的敘述,何者正確?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-23", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-23::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$" + }, + { + "key": "b", + "text": "梯度 $\\nabla f$ 的方向與等高線的切線方向相同" + }, + { + "key": "c", + "text": "最大方向導數等於 $f_x + f_y$" + }, + { + "key": "d", + "text": "最大方向導數的方向與梯度垂直" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-23", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "梯度垂直於等高線,不是沿著等高線方向。最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。最大方向導數的方向與梯度平行,不是垂直。", + "newline": "false", + "runs": [ + { + "text": "梯度垂直於等高線,不是沿著等高線方向。最大方向導數為 " + }, + { + "latex": "$\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$", + "kind": "math" + }, + { + "text": "。最大方向導數的方向與梯度" + }, + { + "text": "平行", + "style": "bold" + }, + { + "text": ",不是垂直。" + } + ] + } + ], + "gate_from": "flow-23::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y) = xe^y$", + "kind": "math" + }, + { + "text": ",求函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P(2,0)$", + "kind": "math" + }, + { + "text": " 處:(a) 沿著從 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 到 " + }, + { + "latex": "$Q\\!\\left(\\dfrac{1}{2}, 2\\right)$", + "kind": "math" + }, + { + "text": " 方向的方向導數(b) 函數增加最快的方向 " + }, + { + "latex": "$\\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 及最大增加率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=500", + "src": "/assets/Ch14_6_ex5.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 沿 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 方向的方向導數:" + } + ], + "answers": [ + "1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(b) 最大增加率:" + } + ], + "answers": [ + "sqrt(5)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_2251191f40", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:求 $\\overrightarrow{PQ}$ 的單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:求 ", + "style": "bold" + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:沿 ", + "style": "bold" + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:最大增加方向與最大增加率", + "newline": "false", + "runs": [ + { + "text": "Step 4:最大增加方向與最大增加率", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。", + "newline": "false", + "runs": [ + { + "text": "最大增加方向為 " + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": " 的方向。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。", + "newline": "false", + "runs": [ + { + "text": "最大增加率為 " + }, + { + "latex": "$\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_26c6fbaf68", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-24", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-1::q1", + "prompt_runs": [ + { + "text": "我們知道 " + }, + { + "latex": "$\\nabla f = \\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$\\langle f_x, f_y \\rangle = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle xe^y,\\; e^y \\rangle$" + }, + { + "key": "b", + "text": "$\\langle e^y,\\; x \\rangle$" + }, + { + "key": "c", + "text": "$\\langle e^y,\\; xe^y \\rangle$" + }, + { + "key": "d", + "text": "$\\langle ye^y,\\; xe^y \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-24", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$P(2,0)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$", + "kind": "math" + }, + { + "text": ",算 " + }, + { + "latex": "$|\\overrightarrow{PQ}|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{25}{4}$" + }, + { + "key": "b", + "text": "$\\dfrac{5}{2}$" + }, + { + "key": "c", + "text": "$\\sqrt{5}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-24", + "step": "step-2" + } + ], + "gate_from": "flow-24::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-3::q3", + "prompt_runs": [ + { + "latex": "$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{11}{5}$" + }, + { + "key": "b", + "text": "$\\dfrac{3}{5}$" + }, + { + "key": "c", + "text": "$1$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-24", + "step": "step-3" + } + ], + "gate_from": "flow-24::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-4::q4", + "prompt_runs": [ + { + "text": "最大上升方向是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向" + }, + { + "key": "b", + "text": "$\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向" + }, + { + "key": "c", + "text": "$\\langle -1, -2 \\rangle$ 的方向" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-24", + "step": "step-4" + } + ], + "gate_from": "flow-24::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-5::q5", + "prompt_runs": [ + { + "text": "最大上升率應該是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\nabla f(2,0)$" + }, + { + "key": "b", + "text": "$|\\nabla f(2,0)|$" + }, + { + "key": "c", + "text": "$\\mathbf{u} \\cdot \\mathbf{u}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-24", + "step": "step-5" + } + ], + "gate_from": "flow-24::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": "沿 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 的變化率 " + }, + { + "latex": "$= 1$", + "kind": "math" + }, + { + "text": "最大上升方向:" + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": ";最大上升率:" + }, + { + "latex": "$|\\nabla f(2,0)| = \\sqrt{5}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-24::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "6️⃣ 等值曲面的切平面", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 等值曲面的切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "在三維中,曲面在某一點附近的「局部描述」就是切平面。", + "newline": "false", + "runs": [ + { + "text": "在三維中,曲面在某一點附近的「局部描述」就是" + }, + { + "text": "切平面", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:在二維,梯度垂直於切線方向;在三維,梯度垂直於所有切向量,因此梯度自然成為切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":在二維,梯度垂直於" + }, + { + "text": "切線方向", + "style": "bold" + }, + { + "text": ";在三維,梯度垂直於所有" + }, + { + "text": "切向量", + "style": "bold" + }, + { + "text": ",因此梯度自然成為" + }, + { + "text": "切平面的法向量", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。", + "newline": "false", + "runs": [ + { + "text": "若曲面由 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 表示,且點 " + }, + { + "latex": "$P(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 在曲面上,切平面的法向量就是 " + }, + { + "latex": "$\\nabla F(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_05b8657d37", + "label": "等值曲面", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "bdccxafp", + "width": "100%", + "height": "480", + "border": "0", + "caption": "等值曲面與切平面", + "card": "0" + } + ] + }, + { + "type": "solution", + "uid": "sol_02e336c1cc", + "label": "從二維切線到三維切平面", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先從比較熟悉的二維圖形開始想。", + "newline": "false", + "runs": [ + { + "text": "先從比較熟悉的二維圖形開始想。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮橢圓$$\n3x^2+4y^2=16\n$$在點 $(2,1)$ 的切線。", + "newline": "false", + "runs": [ + { + "text": "考慮橢圓" + }, + { + "latex": "$$\n3x^2+4y^2=16\n$$", + "kind": "math_block" + }, + { + "text": "在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的切線。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "一、二維:切線與梯度", + "newline": "true", + "runs": [ + { + "text": "一、二維:切線與梯度", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal" + }, + { + "type": "paragraph", + "content": "如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成$$\n3x^2+4y^2(x)=16.\n$$", + "newline": "false", + "runs": [ + { + "text": "如果在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 附近,可以把橢圓看成 " + }, + { + "latex": "$y=y(x)$", + "kind": "math" + }, + { + "text": ",那麼原式可以寫成" + }, + { + "latex": "$$\n3x^2+4y^2(x)=16.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "兩邊對 $x$ 微分:$$\n6x+8y(x)y'(x)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$$\n6x+8y(x)y'(x)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把 $(2,1)$ 代入:$$\n12+8y'(2)=0,\n$$所以$$\ny'(2)=-\\frac{3}{2}.\n$$", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 代入:" + }, + { + "latex": "$$\n12+8y'(2)=0,\n$$", + "kind": "math_block" + }, + { + "text": "所以" + }, + { + "latex": "$$\ny'(2)=-\\frac{3}{2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,橢圓在點 $(2,1)$ 的切線斜率是$$\n-\\frac{3}{2}.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,橢圓在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的切線斜率是" + }, + { + "latex": "$$\n-\\frac{3}{2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著改用梯度來看。令$$\nF(x,y)=3x^2+4y^2-16.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著改用梯度來看。令" + }, + { + "latex": "$$\nF(x,y)=3x^2+4y^2-16.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "那麼橢圓可以看成等值曲線$$\nF(x,y)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "那麼橢圓可以看成等值曲線" + }, + { + "latex": "$$\nF(x,y)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "梯度為$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "梯度為" + }, + { + "latex": "$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在點 $(2,1)$,$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。", + "newline": "false", + "runs": [ + { + "text": "重點是:沿著橢圓走的時候," + }, + { + "latex": "$F(x,y)$", + "kind": "math" + }, + { + "text": " 的值一直都是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",所以沿著切線方向移動時,函數值沒有增加也沒有減少。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,切線方向向量 " + }, + { + "latex": "$\\mathbf v$", + "kind": "math" + }, + { + "text": " 必須和梯度垂直:" + }, + { + "latex": "$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "例如可以取$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "例如可以取" + }, + { + "latex": "$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因為" + }, + { + "latex": "$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個方向向量的斜率是$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$和前面用隱函數微分算出來的斜率一樣。", + "newline": "false", + "runs": [ + { + "text": "這個方向向量的斜率是" + }, + { + "latex": "$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$", + "kind": "math_block" + }, + { + "text": "和前面用隱函數微分算出來的斜率一樣。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以在二維中可以記住一句話:梯度垂直於等值曲線的切線方向。", + "newline": "false", + "runs": [ + { + "text": "所以在二維中可以記住一句話:" + }, + { + "text": "梯度垂直於等值曲線的切線方向", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "二、三維:切平面與梯度", + "newline": "true", + "runs": [ + { + "text": "二、三維:切平面與梯度", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal" + }, + { + "type": "paragraph", + "content": "現在把同樣的想法推廣到三維。", + "newline": "false", + "runs": [ + { + "text": "現在把同樣的想法推廣到三維。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮曲面$$\n3x^2+4y^2+5z^2=12\n$$以及曲面上的點 $(1,1,1)$。", + "newline": "false", + "runs": [ + { + "text": "考慮曲面" + }, + { + "latex": "$$\n3x^2+4y^2+5z^2=12\n$$", + "kind": "math_block" + }, + { + "text": "以及曲面上的點 " + }, + { + "latex": "$(1,1,1)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$", + "newline": "false", + "runs": [ + { + "text": "令" + }, + { + "latex": "$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "那麼這個曲面可以寫成等值曲面$$\nF(x,y,z)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "那麼這個曲面可以寫成等值曲面" + }, + { + "latex": "$$\nF(x,y,z)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "先求梯度:$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "先求梯度:" + }, + { + "latex": "$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在點 $(1,1,1)$,$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "在點 " + }, + { + "latex": "$(1,1,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。", + "newline": "false", + "runs": [ + { + "text": "和二維情況一樣:如果沿著曲面上的方向移動," + }, + { + "latex": "$F(x,y,z)$", + "kind": "math" + }, + { + "text": " 的值仍然保持為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",所以在切平面上的任何方向,函數值都不會瞬間改變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,切平面上的所有方向向量都會和梯度垂直。也就是說,$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$就是這個切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "因此,切平面上的所有方向向量都會和梯度垂直。也就是說," + }, + { + "latex": "$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$", + "kind": "math_block" + }, + { + "text": "就是這個切平面的法向量。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著用「點法式」寫出平面方程式。", + "newline": "false", + "runs": [ + { + "text": "接著用「點法式」寫出平面方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "已知切平面通過點$$\nP=(1,1,1),\n$$而切平面上的任意一點記為$$\nQ=(x,y,z).\n$$", + "newline": "false", + "runs": [ + { + "text": "已知切平面通過點" + }, + { + "latex": "$$\nP=(1,1,1),\n$$", + "kind": "math_block" + }, + { + "text": "而切平面上的任意一點記為" + }, + { + "latex": "$$\nQ=(x,y,z).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "則從 $P$ 指向 $Q$ 的向量是$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "則從 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 指向 " + }, + { + "latex": "$Q$", + "kind": "math" + }, + { + "text": " 的向量是" + }, + { + "latex": "$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 在切平面上,所以它必須和法向量 " + }, + { + "latex": "$\\langle 6,8,10\\rangle$", + "kind": "math" + }, + { + "text": " 垂直:" + }, + { + "latex": "$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "展開後得到切平面方程式:$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "展開後得到切平面方程式:" + }, + { + "latex": "$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以三維中可以記住:等值曲面的梯度就是切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "所以三維中可以記住:" + }, + { + "text": "等值曲面的梯度就是切平面的法向量", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定理", + "headline": "等值曲面的法向量、切平面與法線", + "body": [ + { + "type": "paragraph", + "content": "若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "法向量", + "style": "bold" + }, + { + "text": ":曲面在點 " + }, + { + "latex": "$P(x_0,y_0,z_0)$", + "kind": "math" + }, + { + "text": " 的法向量可由梯度給出 " + }, + { + "latex": "$\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$", + "kind": "math" + } + ], + "content": "法向量:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "切平面", + "style": "bold" + }, + { + "text": ":通過點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 且以 " + }, + { + "latex": "$\\overrightarrow\\mathbf{n}$", + "kind": "math" + }, + { + "text": " 為法向量的平面 " + }, + { + "latex": "$F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$", + "kind": "math" + } + ], + "content": "切平面:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "法線對稱式", + "style": "bold" + }, + { + "text": ":通過點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 且平行於法向量 " + }, + { + "latex": "$\\overrightarrow\\mathbf{n}$", + "kind": "math" + }, + { + "text": " 的直線。其對稱式為 " + }, + { + "latex": "$\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$", + "kind": "math" + }, + { + "text": "(若法向量某個分量為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",則法線不適合直接寫成完整對稱式,可改用參數式表示。)" + } + ], + "content": "法線對稱式:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。", + "newline": "false", + "runs": [ + { + "text": "求橢球面 " + }, + { + "latex": "$\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math" + }, + { + "text": " 的切平面與法線方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_ex6.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "切平面方程式:" + } + ], + "answers": [ + "3*x-6*y+2*z+18=0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "法線方程式(對稱式):" + } + ], + "answers": [ + "(x+2)/(-1)=(y-1)/2=(z+3)/(-2/3)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_31110adc4b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義 $F$ 並計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義 ", + "style": "bold" + }, + { + "latex": "$F$", + "kind": "math", + "style": "bold" + }, + { + "text": " 並計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:代入點 $(-2,1,-3)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:代入點 ", + "style": "bold" + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:切平面方程式", + "newline": "false", + "runs": [ + { + "text": "Step 3:切平面方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:法線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 4:法線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ebfe5833c9", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。", + "newline": "false", + "runs": [ + { + "text": "該橢球面是 " + }, + { + "latex": "$F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$", + "kind": "math" + }, + { + "text": " 的等值曲面(取 " + }, + { + "latex": "$k = 3$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "flow", + "id": "flow-25", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-1::q1", + "prompt_runs": [ + { + "text": "求偏導 " + }, + { + "latex": "$F_x, F_y, F_z$", + "kind": "math" + }, + { + "text": ",下列哪一組正確?" + } + ], + "options": [ + { + "key": "a", + "text": "$F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$" + }, + { + "key": "b", + "text": "$F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$" + }, + { + "key": "c", + "text": "$F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$" + }, + { + "key": "d", + "text": "$F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-25", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$F_x = -1$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_y = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_z = -\\dfrac{2}{3}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-2::q2", + "prompt_runs": [ + { + "text": "切平面方程式(化簡後)是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$3x + 6y + 2z + 18 = 0$" + }, + { + "key": "b", + "text": "$3x - 6y + 2z - 18 = 0$" + }, + { + "key": "c", + "text": "$3x - 6y + 2z + 18 = 0$" + }, + { + "key": "d", + "text": "$x - 2y + \\dfrac{2}{3}z + 6 = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-25", + "step": "step-2" + } + ], + "gate_from": "flow-25::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-3::q3", + "prompt_runs": [ + { + "text": "法線對稱方程式(方向向量與 " + }, + { + "latex": "$\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$", + "kind": "math" + }, + { + "text": " 同向):" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$" + }, + { + "key": "b", + "text": "$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$" + }, + { + "key": "c", + "text": "$\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$" + }, + { + "key": "d", + "text": "$\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-25", + "step": "step-3" + } + ], + "gate_from": "flow-25::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:切平面:$3x - 6y + 2z + 18 = 0$法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": "切平面:" + }, + { + "latex": "$3x - 6y + 2z + 18 = 0$", + "kind": "math" + }, + { + "text": "法線:" + }, + { + "latex": "$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-25::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "7️⃣ 雙變數函數曲面的切平面", + "newline": "true", + "runs": [ + { + "text": "7️⃣ 雙變數函數曲面的切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:", + "newline": "false", + "runs": [ + { + "text": "當曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 的方程式為 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 時(即 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 是雙變數函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的圖形),可改寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = f(x,y) - z = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = f(x,y) - z = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是等值曲面的特例(取 $k = 0$)。", + "newline": "false", + "runs": [ + { + "text": "這是等值曲面的特例(取 " + }, + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "計算 $F$ 的偏導數:", + "newline": "false", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$F$", + "kind": "math" + }, + { + "text": " 的偏導數:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入切平面公式,得到:", + "newline": "false", + "runs": [ + { + "text": "代入切平面公式,得到:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "兩種切平面公式的對照", + "body": [ + { + "type": "paragraph", + "content": "曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ ", + "newline": "false", + "runs": [ + { + "text": "曲面 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": ",其切平面公式為 " + }, + { + "latex": "$F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$", + "kind": "math" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ ", + "newline": "false", + "runs": [ + { + "text": "曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",其切平面公式為 " + }, + { + "latex": "$f_x(x-x_0) + f_y(y-y_0) = z - z_0$", + "kind": "math" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。", + "newline": "false", + "runs": [ + { + "text": "後者是前者的特例,令 " + }, + { + "latex": "$F = f(x,y) - z$", + "kind": "math" + }, + { + "text": " 即可推導。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。", + "newline": "false", + "runs": [ + { + "text": "求曲面 " + }, + { + "latex": "$z = 2x^2 + y^2$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": " 的切平面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "切平面方程式:" + } + ], + "answers": [ + "z=4*x+2*y-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_3f2ee97ccb", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:改寫為 $F = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 1:改寫為 ", + "style": "bold" + }, + { + "latex": "$F = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = 2x^2 + y^2 - z = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = 2x^2 + y^2 - z = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導並代入點 $(1,1,3)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導並代入點 ", + "style": "bold" + }, + { + "latex": "$(1,1,3)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:寫出切平面", + "newline": "false", + "runs": [ + { + "text": "Step 3:寫出切平面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b89c4cd456", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-26", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-26::step-1::q1", + "prompt_runs": [ + { + "text": "將 " + }, + { + "latex": "$F = 2x^2 + y^2 - z$", + "kind": "math" + }, + { + "text": " 計算偏導數:" + } + ], + "options": [ + { + "key": "a", + "text": "$F_x = 4x,\\; F_y = 2y,\\; F_z = -1$" + }, + { + "key": "b", + "text": "$F_x = 4,\\; F_y = 2,\\; F_z = -1$" + }, + { + "key": "c", + "text": "$F_x = 2x,\\; F_y = y,\\; F_z = 1$" + }, + { + "key": "d", + "text": "$F_x = 4x,\\; F_y = 2y,\\; F_z = 1$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-26", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$F_x = 4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_y = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_z = -1$", + "kind": "math" + }, + { + "text": ",法向量 " + }, + { + "latex": "$\\mathbf{n} = \\langle 4, 2, -1 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-26::step-2::q2", + "prompt_runs": [ + { + "text": "切平面方程式是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$z = 4x + 2y - 3$" + }, + { + "key": "b", + "text": "$z = 4x + 2y + 3$" + }, + { + "key": "c", + "text": "$z = 4x - 2y - 3$" + }, + { + "key": "d", + "text": "$z = -4x - 2y + 3$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-26", + "step": "step-2" + } + ], + "gate_from": "flow-26::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案: $z = 4x + 2y - 3$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$z = 4x + 2y - 3$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。", + "newline": "false", + "runs": [ + { + "text": "也可以直接套公式:" + }, + { + "latex": "$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f_x = 4x$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = 2y$", + "kind": "math" + }, + { + "text": ",代入即得。" + } + ] + } + ], + "gate_from": "flow-26::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "8️⃣ 梯度向量的幾何意義", + "newline": "true", + "runs": [ + { + "text": "8️⃣ 梯度向量的幾何意義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "現在我們把梯度的兩個核心性質放在一起理解。", + "newline": "false", + "runs": [ + { + "text": "現在我們把梯度的兩個核心性質放在一起理解。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在三維中:", + "newline": "false", + "runs": [ + { + "text": "在三維中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 指向函數在該點" + }, + { + "text": "增加最快的方向", + "style": "bold" + } + ], + "content": "$\\nabla f(x_0, y_0, z_0)$ 指向函數在該點增加最快的方向" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "於通過該點的等值曲面 " + }, + { + "latex": "$S$", + "kind": "math" + } + ], + "content": "$\\nabla f(x_0, y_0, z_0)$ 垂直於通過該點的等值曲面 $S$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往垂直方向移動,便能得到最大的增加率。", + "newline": "false", + "runs": [ + { + "text": "這兩個性質在直觀上是相容的:當我們沿著等值曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 移動時,函數值 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 不會改變。因此,往" + }, + { + "text": "垂直方向", + "style": "bold" + }, + { + "text": "移動,便能得到最大的增加率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣地,對二變數函數 $f(x,y)$:", + "newline": "false", + "runs": [ + { + "text": "同樣地,對二變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 指向函數增加最快的方向" + } + ], + "content": "$\\nabla f(x_0, y_0)$ 指向函數增加最快的方向" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "於通過 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的等值曲線 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + } + ], + "content": "$\\nabla f(x_0, y_0)$ 垂直於通過 $P$ 的等值曲線 $f(x,y) = k$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_8.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "特性", + "headline": "梯度向量的性質", + "body": [ + { + "type": "paragraph", + "content": "設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:", + "newline": "false", + "runs": [ + { + "text": "設 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 為二變數或三變數的可微函數,且 " + }, + { + "latex": "$\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "方向導數公式", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$", + "kind": "math" + } + ], + "content": "方向導數公式:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "最大上升方向", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": " 指向函數增加最快的方向,最大變化率為 " + }, + { + "latex": "$|\\nabla f(\\mathbf{x})|$", + "kind": "math" + } + ], + "content": "最大上升方向:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "垂直性質", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": " 垂直於通過該點的等值曲面(或等值曲線)" + } + ], + "content": "垂直性質:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣ 方向導數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣ 方向導數", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "paragraph", + "content": "在正式進入這個單元之前,我們先來回想一下偏導數。", + "newline": "false", + "runs": [ + { + "text": "在正式進入這個單元之前,我們先來回想一下偏導數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "回顧", + "headline": "偏導數(Partial Derivatives)", + "body": [ + { + "type": "paragraph", + "content": "若 $z = f(x,y)$,則在點 $(x_0, y_0)$ 的偏導數定義為:$$\nf_x(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}\n$$$$\nf_y(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0,y_0+h)-f(x_0,y_0)}{h}\n$$它們分別代表 $z$ 對 $x$ 方向與對 $y$ 方向的變化率。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",則在點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 的偏導數定義為:" + }, + { + "latex": "$$\nf_x(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+h,y_0)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf_y(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0,y_0+h)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "text": "它們分別代表 " + }, + { + "latex": "$z$", + "kind": "math" + }, + { + "text": " 對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向與對 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的變化率。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "偏導數只能沿著 $x$ 軸或 $y$ 軸方向測量變化率。但在現實中,我可能想往斜 30 度或斜 45 度的方向測量,這時候該怎麼計算?", + "newline": "false", + "runs": [ + { + "text": "偏導數只能沿著 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸或 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 軸方向測量變化率。但在現實中,我可能想往斜 30 度或斜 45 度的方向測量,這時候該怎麼計算?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_6b7b12086b", + "label": "想想看解答", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "我們可以引入一個單位方向向量 $\\mathbf{u} = \\langle a, b \\rangle$,其中 $a$ 代表往 $x$ 方向的比例,$b$ 代表往 $y$ 方向的比例,且必須滿足 $a^2 + b^2 = 1$。", + "newline": "false", + "runs": [ + { + "text": "我們可以引入一個" + }, + { + "text": "單位方向向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$a$", + "kind": "math" + }, + { + "text": " 代表往 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 方向的比例," + }, + { + "latex": "$b$", + "kind": "math" + }, + { + "text": " 代表往 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 方向的比例,且必須滿足 " + }, + { + "latex": "$a^2 + b^2 = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "只要找出沿著 $\\mathbf{u}$ 方向的變化率,就是我們要求的方向導數 $D_{\\mathbf{u}}f$。", + "newline": "false", + "runs": [ + { + "text": "只要找出沿著 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 方向的變化率,就是我們要求的" + }, + { + "text": "方向導數", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "單位向量|w=400", + "src": "/assets/unit_vector.svg" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_93a3f52ee1", + "label": "方向導數幾何例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "xcr7r7rx", + "width": "100%", + "height": "480", + "border": "0", + "caption": "方向導數", + "card": "0" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_21fcf97b41", + "label": "生活化例子", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "不知道大家有沒有看過日本的箱根驛傳?這是一場總長 217.1 公里、由 10 人接力完成的長距離賽事。", + "newline": "false", + "runs": [ + { + "text": "不知道大家有沒有看過日本的" + }, + { + "text": "箱根驛傳", + "style": "bold" + }, + { + "text": "?這是一場總長 217.1 公里、由 10 人接力完成的長距離賽事。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們如果在地圖上把賽事用座標表示:", + "newline": "false", + "runs": [ + { + "text": "我們如果在地圖上把賽事用座標表示:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "跑者位置:" + }, + { + "latex": "$P = (x, y)$", + "kind": "math" + } + ], + "content": "跑者位置:$P = (x, y)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "海拔是一個函數:" + }, + { + "latex": "$h(x, y)$", + "kind": "math" + }, + { + "text": "(單位:公尺)" + } + ], + "content": "海拔是一個函數:$h(x, y)$(單位:公尺)" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "問題: 跑者沿著「路線方向」前進時,海拔上升(或下降)的速率是多少?", + "newline": "false", + "runs": [ + { + "text": "問題:", + "style": "bold" + }, + { + "text": " 跑者沿著「路線方向」前進時,海拔上升(或下降)的速率是多少?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個「速率」就是方向導數。", + "newline": "false", + "runs": [ + { + "text": "這個「速率」就是" + }, + { + "text": "方向導數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "在平面上,「方向」可以用一個向量表示。但我們希望方向導數代表「每前進 1 個單位距離」的變化率,因此要把方向向量標準化成單位向量:$$\n\\mathbf{u} = \\frac{\\mathbf{v}}{|\\mathbf{v}|}, \\qquad |\\mathbf{u}| = 1\n$$", + "newline": "false", + "runs": [ + { + "text": "在平面上,「方向」可以用一個向量表示。但我們希望方向導數代表「每前進 1 個單位距離」的變化率,因此要把方向向量標準化成" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\mathbf{u} = \\frac{\\mathbf{v}}{|\\mathbf{v}|}, \\qquad |\\mathbf{u}| = 1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "跑者在點 $P$,沿著方向 $\\mathbf{u}$ 前進距離 $t$ 後,海拔改變量是 $h(P+t\\mathbf{u}) - h(P)$。因此沿著方向 $\\mathbf{u}$ 的海拔變化率定義為:$$\nD_{\\mathbf{u}}h(P) = \\lim_{t\\to 0}\\frac{h(P+t\\mathbf{u})-h(P)}{t}\n$$", + "newline": "false", + "runs": [ + { + "text": "跑者在點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": ",沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進距離 " + }, + { + "latex": "$t$", + "kind": "math" + }, + { + "text": " 後,海拔改變量是 " + }, + { + "latex": "$h(P+t\\mathbf{u}) - h(P)$", + "kind": "math" + }, + { + "text": "。因此沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的海拔變化率定義為:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}h(P) = \\lim_{t\\to 0}\\frac{h(P+t\\mathbf{u})-h(P)}{t}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "以競賽中的第 5 跑區為例:最高點在 16.2 km 附近,之後轉成下坡。這表示沿著路線方向的方向導數 $D_{\\mathbf{u}}h$,前半段多為正(爬升),到最高點接近 0,後半段變負(下坡)。", + "newline": "false", + "runs": [ + { + "text": "以競賽中的第 5 跑區為例:最高點在 16.2 km 附近,之後轉成下坡。這表示沿著路線方向的方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}h$", + "kind": "math" + }, + { + "text": ",前半段多為正(爬升),到最高點接近 0,後半段變負(下坡)。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向導數的符號,直接對應你沿著那個方向是在上坡、持平,還是下坡。", + "newline": "false", + "runs": [ + { + "text": "方向導數的符號,直接對應你沿著那個方向是在上坡、持平,還是下坡。", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "geogebra", + "id": "mytuxtv6", + "width": "100%", + "height": "480", + "border": "0", + "caption": "方向導數:箱根驛傳路線示意", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣ 方向導數定義", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣ 方向導數定義", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 方向導數定義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "card", + "kind": "定義", + "headline": "方向導數 Directional Derivatives", + "body": [ + { + "type": "paragraph", + "content": "令 $\\mathbf{u} = \\langle a, b \\rangle$ 為單位向量(即 $\\|\\mathbf{u}\\| = 1$)。函數 $f$ 在點 $(x_0, y_0)$ 沿著方向 $\\mathbf{u}$ 的方向導數定義為:$$\nD_{\\mathbf{u}}f(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb)-f(x_0,y_0)}{h}\n$$若此極限存在。", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 為" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": "(即 " + }, + { + "latex": "$\\|\\mathbf{u}\\| = 1$", + "kind": "math" + }, + { + "text": ")。函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的方向導數定義為:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb)-f(x_0,y_0)}{h}\n$$", + "kind": "math_block" + }, + { + "text": "若此極限存在。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:為什麼 $\\mathbf{u}$ 要是單位向量?", + "newline": "false", + "runs": [ + { + "text": "Q:為什麼 ", + "style": "bold" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 要是單位向量?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-15", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-15::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "不然連鎖律不能用" + }, + { + "key": "b", + "text": "不然方向導數會被向量長度影響,不再代表「每 1 單位距離」的變化率" + }, + { + "key": "c", + "text": "不然 $f_x, f_y$ 會改變" + }, + { + "key": "d", + "text": "不然極限不存在" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-15", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "如果 $\\mathbf{u}$ 不是單位向量,等於你「每次前進的距離」被放大或縮小,變化率就會跟著被放大或縮小;用單位向量才能代表「每走 1 單位距離」的瞬時變化率。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 不是單位向量,等於你「每次前進的距離」被放大或縮小,變化率就會跟著被放大或縮小;用單位向量才能代表「每走 1 單位距離」的瞬時變化率。" + } + ] + } + ], + "gate_from": "flow-15::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的公式", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 可微,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在該點沿任意單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 方向上的方向導數存在,且:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\,a + f_y(x,y)\\,b\n$$", + "kind": "math_block" + } + ], + "content": "若 $f$ 在點 $(x,y)$ 可微,則 $f$ 在該點沿任意單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 方向上的方向導數存在,且:$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\,a + f_y(x,y)\\,b\n$$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入上式得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta\n$$", + "kind": "math_block" + } + ], + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入上式得:$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta\n$$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_2efc08fef2", + "label": "詳細證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。", + "newline": "false", + "runs": [ + { + "text": "我們很熟悉單變數函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 的導數。在雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,若我們沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 前進,從點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 出發走距離 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ",新位置是 " + }, + { + "latex": "$(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",其實只是沿著一條直線移動。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\\mathbf{u}$ 前進 $h$ 時的函數值。", + "newline": "false", + "runs": [ + { + "text": "因此可定義單變數函數 " + }, + { + "latex": "$g(h) = f(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",代表沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 時的函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "根據單變數導數的定義:$$\ng'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "根據單變數導數的定義:" + }, + { + "latex": "$$\ng'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "將 $g(h)$ 與 $g(0)$ 代回後可得:$$\ng'(0) = \\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$g(h)$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$g(0)$", + "kind": "math" + }, + { + "text": " 代回後可得:" + }, + { + "latex": "$$\ng'(0) = \\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "而這正是 $D_{\\mathbf{u}}f(x_0,y_0)$ 的定義,因此:$$\nD_{\\mathbf{u}}f(x_0,y_0)=g'(0)\n$$", + "newline": "false", + "runs": [ + { + "text": "而這正是 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 的定義,因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0)=g'(0)\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著改用連鎖律計算 $g'(h)$,其中 $x = x_0 + ha$,$y = y_0 + hb$:$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh}\n$$", + "newline": "false", + "runs": [ + { + "text": "接著改用連鎖律計算 " + }, + { + "latex": "$g'(h)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x_0 + ha$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0 + hb$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為$$\n\\frac{dx}{dh}=a,\\qquad \\frac{dy}{dh}=b\n$$", + "newline": "false", + "runs": [ + { + "text": "因為" + }, + { + "latex": "$$\n\\frac{dx}{dh}=a,\\qquad \\frac{dy}{dh}=b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以$$\ng'(h)=f_x(x,y)\\,a+f_y(x,y)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "所以" + }, + { + "latex": "$$\ng'(h)=f_x(x,y)\\,a+f_y(x,y)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令 $h = 0$,則 $x = x_0$,$y = y_0$,得到:$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$h = 0$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$x = x_0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0$", + "kind": "math" + }, + { + "text": ",得到:" + }, + { + "latex": "$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此:$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入即得:$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "newline": "false", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/unit_vector_theta.svg" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9b69b8e81e", + "label": "引導證明", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-16", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "我們很熟悉單變數函數 $y = f(x)$ 的導數。在雙變數函數 $f(x,y)$ 中,若我們沿著單位向量 $\\mathbf{u} = \\langle a, b \\rangle$ 前進,從點 $(x_0, y_0)$ 出發走距離 $h$,新位置是 $(x_0 + ha, y_0 + hb)$,其實只是沿著一條直線移動。", + "newline": "false", + "runs": [ + { + "text": "我們很熟悉單變數函數 " + }, + { + "latex": "$y = f(x)$", + "kind": "math" + }, + { + "text": " 的導數。在雙變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 中,若我們沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 前進,從點 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 出發走距離 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": ",新位置是 " + }, + { + "latex": "$(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",其實只是沿著一條直線移動。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此可定義單變數函數 $g(h) = f(x_0 + ha, y_0 + hb)$,代表沿著方向 $\\mathbf{u}$ 前進 $h$ 時的函數值。", + "newline": "false", + "runs": [ + { + "text": "因此可定義單變數函數 " + }, + { + "latex": "$g(h) = f(x_0 + ha, y_0 + hb)$", + "kind": "math" + }, + { + "text": ",代表沿著方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 前進 " + }, + { + "latex": "$h$", + "kind": "math" + }, + { + "text": " 時的函數值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-16::step-1::q1", + "prompt_runs": [ + { + "latex": "$g'(0) = \\lim\\limits_{h \\to 0} \\dfrac{g(h) - g(0)}{h}$", + "kind": "math" + }, + { + "text": ",請問將 " + }, + { + "latex": "$g(h)$", + "kind": "math" + }, + { + "text": " 代回後是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0) - f(x_0, y_0)}{h}$" + }, + { + "key": "b", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+a, y_0+b) - f(x_0, y_0)}{h}$" + }, + { + "key": "c", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+h, y_0+h) - f(x_0, y_0)}{h}$" + }, + { + "key": "d", + "text": "$\\lim\\limits_{h\\to 0}\\dfrac{f(x_0+ha, y_0+hb) - f(x_0, y_0)}{h}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "d", + "flow": "flow-16", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "而這也是 $D_{\\mathbf{u}}f$ 的定義。", + "newline": "false", + "runs": [ + { + "text": "而這也是 " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 的定義。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-16::step-2::q2", + "prompt_runs": [ + { + "text": "改用連鎖律計算 " + }, + { + "latex": "$g'(h)$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$x = x_0 + ha$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0 + hb$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$$\ng'(h) = \\frac{\\partial f}{\\partial x}\\frac{dx}{dh} + \\frac{\\partial f}{\\partial y}\\frac{dy}{dh} = \\;?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$f_x(x,y)\\,a + f_y(x,y)\\,b$" + }, + { + "key": "b", + "text": "$f_x(x,y) + f_y(x,y)$" + }, + { + "key": "c", + "text": "$f_x(x,y)\\,h + f_y(x,y)\\,h$" + }, + { + "key": "d", + "text": "$a + b$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-16", + "step": "step-2" + } + ], + "gate_from": "flow-16::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "令 $h = 0$,則 $x = x_0$,$y = y_0$,得到:$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "newline": "false", + "runs": [ + { + "text": "令 " + }, + { + "latex": "$h = 0$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$x = x_0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = y_0$", + "kind": "math" + }, + { + "text": ",得到:" + }, + { + "latex": "$$\ng'(0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此:$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "newline": "false", + "runs": [ + { + "text": "因此:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0, y_0) = f_x(x_0, y_0)\\,a + f_y(x_0, y_0)\\,b \\quad \\blacksquare\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若單位向量 $\\mathbf{u}$ 與正 $x$ 軸夾角為 $\\theta$,則 $\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$,代入即得:$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "newline": "false", + "runs": [ + { + "text": "若單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$\\mathbf{u} = \\langle \\cos\\theta, \\sin\\theta \\rangle$", + "kind": "math" + }, + { + "text": ",代入即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x\\cos\\theta + f_y\\sin\\theta\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/unit_vector_theta.svg" + } + ], + "gate_from": "flow-16::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:\n\n\n\n不會的話可以看看下面引導解法或是詳細解法喔。\n\n\n**Step 1:寫出單位向量**\n\n$$\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle$$\n\n**Step 2:計算偏導數**\n\n$$f_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y$$\n\n**Step 3:套用公式**\n\n$$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}$$\n\n**Step 4:代入 $(1,2)$**\n\n$$D_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}$$\n\n\n\n\n\n題目要求方向導數 $D_{\\mathbf{u}}f(x,y)$,若 $\\mathbf{u}$ 與 $x$ 軸夾角為 $\\theta$,正確公式是哪個?\n\na. $f_x(x,y)\\sin\\theta + f_y(x,y)\\cos\\theta$\nb. $f_x(x,y) + f_y(x,y)$\nc. $f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta$\n\n\n\n\n已知 $\\theta = \\dfrac{\\pi}{6}$,方向向量的分量 $(\\cos\\theta, \\sin\\theta)$ 為何?\n\na. $\\left(\\dfrac{1}{2}, \\dfrac{\\sqrt{3}}{2}\\right)$\nb. $\\left(\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$\nc. $\\left(-\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$\n\n\n\n\n接下來求偏導數:$f_x(x,y) = \\dfrac{\\partial}{\\partial x}(x^3-3xy+4y^2) = $ ?\n\n\n\n\n\n$f_y(x,y) = \\dfrac{\\partial}{\\partial y}(x^3-3xy+4y^2) = $ ?\n\n\n\n\n\n偏導數:$f_x = 3x^2 - 3y$,$f_y = -3x + 8y$。\n\n代入公式:\n$$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}$$\n\n最後算 $(1,2)$ 的值:\n\na. $\\dfrac{13 - 3\\sqrt{3}}{2}$\nb. $\\dfrac{13 + 3\\sqrt{3}}{2}$\nc. $13 - 3\\sqrt{3}$\n\n\n\n\n**答案:**\n$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$\n\n$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$\n\n\n\n\n---\n\n## 3️⃣ 梯度向量\n\n由方向導數公式可知:\n\n$$D_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}$$\n\n其中向量 $\\langle f_x, f_y \\rangle$ 會在很多地方反覆出現,我們給它一個特別的名字:**梯度(gradient)**,以符號 $\\nabla f$($\\nabla$ 讀作「nabla」或「del」)表示。\n\n---\n\n\n定義\n梯度向量 The Gradient Vector\n如果 $f$ 是二變數 $x$ 與 $y$ 的函數,則 $f$ 的梯度是一個向量函數 $\\nabla f$,定義為:\n$$\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}$$\n通常簡寫成 $\\nabla f = \\langle f_x, f_y \\rangle$。\n\n\n\n定理\n方向導數的向量公式\n使用梯度向量的記號後,方向導數可以寫成:\n$$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$$\n這個式子表示:沿著單位向量 $\\mathbf{u}$ 的方向導數,等於把梯度向量 $\\nabla f$ 投影到 $\\mathbf{u}$ 上的「純量投影」(也就是梯度在該方向上的分量)。\n\n\n---\n\n### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$$\n\n**Step 2:代入 $(0,1)$**\n\n$$\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle$$\n\n\n\n\n\n首先請問 $\\nabla f(x,y) = $ ?\n\na. $\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$\nb. $\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\nc. $\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$\nd. $\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$\n\n\n\n\n代入 $(0,1)$ 後可得:\n\na. $\\langle 2, 0 \\rangle$\nb. $\\langle 2, 1 \\rangle$\nc. $\\langle 1, 1 \\rangle$\n\n\n\n\n**答案:**\n$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$ \n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$\n\n\n\n\n---\n\n### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f(x,y) = x^3 - 3xy + 4y^2$", + "kind": "math" + }, + { + "text": ",且方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 是與正 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角 " + }, + { + "latex": "$\\theta = \\dfrac{\\pi}{6}$", + "kind": "math" + }, + { + "text": " 的單位向量。求 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y)$", + "kind": "math" + }, + { + "text": ",並計算 " + }, + { + "latex": "$D_{\\mathbf{u}}f(1,2)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_ex1.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請先試著算出 " + }, + { + "latex": "$D_{\\mathbf{u}}f(1,2)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "(13-3*sqrt(3))/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "不會的話可以看看下面引導解法或是詳細解法喔。", + "newline": "false", + "runs": [ + { + "text": "不會的話可以看看下面引導解法或是詳細解法喔。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e1716862f9", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:寫出單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 1:寫出單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\mathbf{u} = \\left\\langle \\cos\\frac{\\pi}{6}, \\sin\\frac{\\pi}{6} \\right\\rangle = \\left\\langle \\frac{\\sqrt{3}}{2}, \\frac{1}{2} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x(x,y) = 3x^2 - 3y, \\qquad f_y(x,y) = -3x + 8y\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:套用公式", + "newline": "false", + "runs": [ + { + "text": "Step 3:套用公式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入 $(1,2)$", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入 ", + "style": "bold" + }, + { + "latex": "$(1,2)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(1,2) = \\frac{\\sqrt{3}(3-6)}{2} + \\frac{-3+16}{2} = \\frac{-3\\sqrt{3}}{2} + \\frac{13}{2} = \\frac{13 - 3\\sqrt{3}}{2}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n已知 $f(x,y) = x^3 - 3xy + 4y^2$,且方向 $\\mathbf{u}$ 是與正 $x$ 軸夾角 $\\theta = \\dfrac{\\pi}{6}$ 的單位向量。求 $D_{\\mathbf{u}}f(x,y)$,並計算 $D_{\\mathbf{u}}f(1,2)$。\n\n![](/assets/Ch14_6_ex1.svg)\n\n請先試著算出 $D_{\\mathbf{u}}f(1,2)$:\n\n\n\n不會的話可以看看下面引導解法或是詳細解法喔。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7f554c800c", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-17", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-1::q1", + "prompt_runs": [ + { + "text": "題目要求方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y)$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 軸夾角為 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": ",正確公式是哪個?" + } + ], + "options": [ + { + "key": "a", + "text": "$f_x(x,y)\\sin\\theta + f_y(x,y)\\cos\\theta$" + }, + { + "key": "b", + "text": "$f_x(x,y) + f_y(x,y)$" + }, + { + "key": "c", + "text": "$f_x(x,y)\\cos\\theta + f_y(x,y)\\sin\\theta$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-17", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-2::q2", + "prompt_runs": [ + { + "text": "已知 " + }, + { + "latex": "$\\theta = \\dfrac{\\pi}{6}$", + "kind": "math" + }, + { + "text": ",方向向量的分量 " + }, + { + "latex": "$(\\cos\\theta, \\sin\\theta)$", + "kind": "math" + }, + { + "text": " 為何?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\left(\\dfrac{1}{2}, \\dfrac{\\sqrt{3}}{2}\\right)$" + }, + { + "key": "b", + "text": "$\\left(\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$" + }, + { + "key": "c", + "text": "$\\left(-\\dfrac{\\sqrt{3}}{2}, \\dfrac{1}{2}\\right)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-17", + "step": "step-2" + } + ], + "gate_from": "flow-17::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-17::step-3::q3", + "prompt_runs": [ + { + "text": "接下來求偏導數:" + }, + { + "latex": "$f_x(x,y) = \\dfrac{\\partial}{\\partial x}(x^3-3xy+4y^2) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "answers": [ + "3*x^2-3*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-17", + "step": "step-3" + } + ], + "gate_from": "flow-17::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-17::step-4::q4", + "prompt_runs": [ + { + "latex": "$f_y(x,y) = \\dfrac{\\partial}{\\partial y}(x^3-3xy+4y^2) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "answers": [ + "-3*x+8*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-17", + "step": "step-4" + } + ], + "gate_from": "flow-17::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "偏導數:$f_x = 3x^2 - 3y$,$f_y = -3x + 8y$。", + "newline": "false", + "runs": [ + { + "text": "偏導數:" + }, + { + "latex": "$f_x = 3x^2 - 3y$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = -3x + 8y$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入公式:$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "newline": "false", + "runs": [ + { + "text": "代入公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\frac{\\sqrt{3}}{2} + (-3x+8y)\\frac{1}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-17::step-5::q5", + "prompt_runs": [ + { + "text": "最後算 " + }, + { + "latex": "$(1,2)$", + "kind": "math" + }, + { + "text": " 的值:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{13 - 3\\sqrt{3}}{2}$" + }, + { + "key": "b", + "text": "$\\dfrac{13 + 3\\sqrt{3}}{2}$" + }, + { + "key": "c", + "text": "$13 - 3\\sqrt{3}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-17", + "step": "step-5" + } + ], + "gate_from": "flow-17::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y) = (3x^2-3y)\\dfrac{\\sqrt{3}}{2} + (-3x+8y)\\dfrac{1}{2}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$", + "newline": "false", + "runs": [ + { + "latex": "$D_{\\mathbf{u}}f(1,2) = \\dfrac{13-3\\sqrt{3}}{2}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-17::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣ 梯度向量", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣ 梯度向量", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 梯度向量", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "由方向導數公式可知:", + "newline": "false", + "runs": [ + { + "text": "由方向導數公式可知:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = f_x(x,y) a + f_y(x,y) b = \\langle f_x(x,y), f_y(x,y) \\rangle \\cdot \\langle a, b \\rangle = \\langle f_x, f_y \\rangle \\cdot \\mathbf{u}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "其中向量 $\\langle f_x, f_y \\rangle$ 會在很多地方反覆出現,我們給它一個特別的名字:梯度(gradient),以符號 $\\nabla f$($\\nabla$ 讀作「nabla」或「del」)表示。", + "newline": "false", + "runs": [ + { + "text": "其中向量 " + }, + { + "latex": "$\\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": " 會在很多地方反覆出現,我們給它一個特別的名字:" + }, + { + "text": "梯度(gradient)", + "style": "bold" + }, + { + "text": ",以符號 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": "(" + }, + { + "latex": "$\\nabla$", + "kind": "math" + }, + { + "text": " 讀作「nabla」或「del」)表示。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定義", + "headline": "梯度向量 The Gradient Vector", + "body": [ + { + "type": "paragraph", + "content": "如果 $f$ 是二變數 $x$ 與 $y$ 的函數,則 $f$ 的梯度是一個向量函數 $\\nabla f$,定義為:$$\n\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}\n$$通常簡寫成 $\\nabla f = \\langle f_x, f_y \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是二變數 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的函數,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的梯度是一個向量函數 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": ",定義為:" + }, + { + "latex": "$$\n\\nabla f(x,y) = \\langle f_x(x,y),\\, f_y(x,y) \\rangle = \\frac{\\partial f}{\\partial x}\\,\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\,\\mathbf{j}\n$$", + "kind": "math_block" + }, + { + "text": "通常簡寫成 " + }, + { + "latex": "$\\nabla f = \\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的向量公式", + "body": [ + { + "type": "paragraph", + "content": "使用梯度向量的記號後,方向導數可以寫成:$$\nD_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}\n$$這個式子表示:沿著單位向量 $\\mathbf{u}$ 的方向導數,等於把梯度向量 $\\nabla f$ 投影到 $\\mathbf{u}$ 上的「純量投影」(也就是梯度在該方向上的分量)。", + "newline": "false", + "runs": [ + { + "text": "使用梯度向量的記號後,方向導數可以寫成:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}\n$$", + "kind": "math_block" + }, + { + "text": "這個式子表示:沿著單位向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的方向導數,等於把梯度向量 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 投影到 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 上的「純量投影」(也就是梯度在該方向上的分量)。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$$\n\n**Step 2:代入 $(0,1)$**\n\n$$\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle$$\n\n\n\n\n\n首先請問 $\\nabla f(x,y) = $ ?\n\na. $\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$\nb. $\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\nc. $\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$\nd. $\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$\n\n\n\n\n代入 $(0,1)$ 後可得:\n\na. $\\langle 2, 0 \\rangle$\nb. $\\langle 2, 1 \\rangle$\nc. $\\langle 1, 1 \\rangle$\n\n\n\n\n**答案:**\n$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$ \n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$\n\n\n\n\n---\n\n### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y) = \\sin x + e^{xy}$", + "kind": "math" + }, + { + "text": ",求 " + }, + { + "latex": "$\\nabla f(0,1) = \\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "2,0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 a,b,中間用逗號隔開", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5e2e1e2ab8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle f_x, f_y \\rangle = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:代入 $(0,1)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:代入 ", + "style": "bold" + }, + { + "latex": "$(0,1)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(0,1) = \\langle \\cos 0 + 1\\cdot e^0,\\; 0\\cdot e^0 \\rangle = \\langle 2, 0 \\rangle\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n如果 $f(x,y) = \\sin x + e^{xy}$,求 $\\nabla f(0,1) = \\langle a, b \\rangle$。\n\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e60e9afe44", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-18", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-18::step-1::q1", + "prompt_runs": [ + { + "text": "首先請問 " + }, + { + "latex": "$\\nabla f(x,y) =$", + "kind": "math" + }, + { + "text": " ?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle \\cos x + e^{xy},\\; e^{xy} \\rangle$" + }, + { + "key": "b", + "text": "$\\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$" + }, + { + "key": "c", + "text": "$\\langle \\cos x + xe^{xy},\\; ye^{xy} \\rangle$" + }, + { + "key": "d", + "text": "$\\langle \\cos x + ye^{xy},\\; \\cos x + xe^{xy} \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-18", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-18::step-2::q2", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$(0,1)$", + "kind": "math" + }, + { + "text": " 後可得:" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 2, 0 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle 2, 1 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle 1, 1 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-18", + "step": "step-2" + } + ], + "gate_from": "flow-18::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$\n$\\nabla f(0,1) = \\langle 2, 0 \\rangle$", + "newline": "true", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$\\nabla f(x,y) = \\langle \\cos x + ye^{xy},\\; xe^{xy} \\rangle$", + "kind": "math" + }, + { + "newline": "true" + }, + { + "latex": "$\\nabla f(0,1) = \\langle 2, 0 \\rangle$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-18::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$$\n\n代入 $(2,-1)$:\n\n$$\\nabla f(2,-1) = \\langle -4, 8 \\rangle$$\n\n**Step 2:注意!題目給的是方向向量,不是單位向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$\n\n\n若 $f(x,y) = x^2y^3 - 4y$,則 $f_x(x,y) = ?$\n\n\n\n\n\n再求另一個偏導數:$f_y(x,y) = ?$\n\n\n\n\n\n梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。\n\n把 $(2,-1)$ 代入後,$\\nabla f(2,-1)$ 等於多少?\n\na. $\\langle 4,\\; 8 \\rangle$\nb. $\\langle -4,\\; -8 \\rangle$\nc. $\\langle -4,\\; 8 \\rangle$\n\n\n\n\n注意!直接用 $\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$ 對嗎?\n\n\n\n\n\n你答對了!方向導數要用**單位向量** $\\mathbf{u}$,但題目給的 $\\mathbf{v}$ 不一定是單位向量,要先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{7}$\nb. $\\sqrt{29}$\nc. $29$\n\n\n\n\n所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。\n\n最後套用方向導數公式:\n$$D_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?$$\n\na. $\\dfrac{32}{\\sqrt{29}}$\nb. $\\dfrac{-32}{\\sqrt{29}}$\nc. $\\dfrac{12}{\\sqrt{29}}$\n\n\n\n\n**答案:**\n$$D_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}$$\n\n\n\n\n---\n\n## 4️⃣ 三變數函數的方向導數\n\n對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。\n\n\n定義\n三變數的方向導數\n若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:\n$$D_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}$$\n\n\n\n定義\n三變數的梯度(Gradient)\n$$\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}$$\n\n方向導數可寫成:\n$$D_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c$$\n\n\n---\n\n### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = x^2y^3 - 4y$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": " 沿著向量 " + }, + { + "latex": "$\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$", + "kind": "math" + }, + { + "text": " 方向的方向導數。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=400", + "src": "/assets/Ch14_6_ex3.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請試著算出方向導數:" + } + ], + "answers": [ + "32/sqrt(29)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:" + }, + { + "type": "solution", + "uid": "sol_de253f12f8", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入 $(2,-1)$:", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(2,-1) = \\langle -4, 8 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(2,-1) = \\langle -4, 8 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:注意!題目給的是方向向量,不是單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:注意!題目給的是方向向量,不是單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\|\\mathbf{v}\\| = \\sqrt{4+25} = \\sqrt{29}, \\qquad \\mathbf{u} = \\frac{\\mathbf{v}}{\\|\\mathbf{v}\\|} = \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\nabla f(2,-1) \\cdot \\mathbf{u} = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = \\frac{-8+40}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n求函數 $f(x,y) = x^2y^3 - 4y$ 在點 $(2,-1)$ 沿著向量 $\\mathbf{v} = 2\\mathbf{i} + 5\\mathbf{j}$ 方向的方向導數。\n\n![|w=400](/assets/Ch14_6_ex3.svg)\n\n請試著算出方向導數:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_21e7631c11", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "套用方向導數的向量公式:$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$", + "newline": "false", + "runs": [ + { + "text": "套用方向導數的向量公式:" + }, + { + "latex": "$D_{\\mathbf{u}}f(x,y) = \\nabla f(x,y) \\cdot \\mathbf{u}$", + "kind": "math" + } + ] + }, + { + "type": "flow", + "id": "flow-19", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-1::q1", + "prompt_runs": [ + { + "text": "若 " + }, + { + "latex": "$f(x,y) = x^2y^3 - 4y$", + "kind": "math" + }, + { + "text": ",則 " + }, + { + "latex": "$f_x(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x*y^3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-2::q2", + "prompt_runs": [ + { + "text": "再求另一個偏導數:" + }, + { + "latex": "$f_y(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "3*x^2*y^2-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-2" + } + ], + "gate_from": "flow-19::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "梯度向量為 $\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "梯度向量為 " + }, + { + "latex": "$\\nabla f(x,y) = \\langle 2xy^3,\\; 3x^2y^2-4 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-3::q3", + "prompt_runs": [ + { + "text": "把 " + }, + { + "latex": "$(2,-1)$", + "kind": "math" + }, + { + "text": " 代入後," + }, + { + "latex": "$\\nabla f(2,-1)$", + "kind": "math" + }, + { + "text": " 等於多少?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 4,\\; 8 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle -4,\\; -8 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle -4,\\; 8 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-19", + "step": "step-3" + } + ], + "gate_from": "flow-19::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-19::step-4::q4", + "prompt_runs": [ + { + "text": "注意!直接用 " + }, + { + "latex": "$\\langle -4, 8 \\rangle \\cdot \\langle 2, 5 \\rangle$", + "kind": "math" + }, + { + "text": " 對嗎?" + } + ], + "answers": [ + "NO" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "YES or NO", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-19", + "step": "step-4" + } + ], + "gate_from": "flow-19::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-5::q5", + "prompt_runs": [ + { + "text": "你答對了!方向導數要用" + }, + { + "text": "單位向量", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": ",但題目給的 " + }, + { + "latex": "$\\mathbf{v}$", + "kind": "math" + }, + { + "text": " 不一定是單位向量,要先算長度 " + }, + { + "latex": "$\\|\\mathbf{v}\\|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\sqrt{7}$" + }, + { + "key": "b", + "text": "$\\sqrt{29}$" + }, + { + "key": "c", + "text": "$29$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-19", + "step": "step-5" + } + ], + "gate_from": "flow-19::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "所以單位向量 $\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$。", + "newline": "false", + "runs": [ + { + "text": "所以單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\left\\langle \\dfrac{2}{\\sqrt{29}}, \\dfrac{5}{\\sqrt{29}} \\right\\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-19::step-6::q6", + "prompt_runs": [ + { + "text": "最後套用方向導數公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\langle -4, 8 \\rangle \\cdot \\left\\langle \\frac{2}{\\sqrt{29}}, \\frac{5}{\\sqrt{29}} \\right\\rangle = ?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{32}{\\sqrt{29}}$" + }, + { + "key": "b", + "text": "$\\dfrac{-32}{\\sqrt{29}}$" + }, + { + "key": "c", + "text": "$\\dfrac{12}{\\sqrt{29}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-19", + "step": "step-6" + } + ], + "gate_from": "flow-19::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\nD_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(2,-1) = \\frac{-4\\cdot 2 + 8\\cdot 5}{\\sqrt{29}} = \\frac{32}{\\sqrt{29}}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-19::step-6::q6" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-4", + "title": "4️⃣ 三變數函數的方向導數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "4️⃣ 三變數函數的方向導數", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 三變數函數的方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "paragraph", + "content": "對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。", + "newline": "false", + "runs": [ + { + "text": "對三變數函數也可以用相同想法定義方向導數:沿著單位向量方向前進時,函數值的變化率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數的方向導數", + "body": [ + { + "type": "paragraph", + "content": "若 $f = f(x,y,z)$,在點 $(x_0, y_0, z_0)$ 沿著單位向量 $\\mathbf{u} = \\langle a, b, c \\rangle$ 的方向導數:$$\nD_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}\n$$", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f = f(x,y,z)$", + "kind": "math" + }, + { + "text": ",在點 " + }, + { + "latex": "$(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 沿著單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle a, b, c \\rangle$", + "kind": "math" + }, + { + "text": " 的方向導數:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x_0,y_0,z_0) = \\lim_{h\\to 0}\\frac{f(x_0+ha,\\;y_0+hb,\\;z_0+hc)-f(x_0,y_0,z_0)}{h}\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "三變數的梯度(Gradient)", + "body": [ + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle f_x,\\, f_y,\\, f_z \\rangle = \\frac{\\partial f}{\\partial x}\\mathbf{i} + \\frac{\\partial f}{\\partial y}\\mathbf{j} + \\frac{\\partial f}{\\partial z}\\mathbf{k}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向導數可寫成:$$\nD_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c\n$$", + "newline": "false", + "runs": [ + { + "text": "方向導數可寫成:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(x,y,z) = \\nabla f(x,y,z) \\cdot \\mathbf{u} = f_x a + f_y b + f_z c\n$$", + "kind": "math_block" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n\n代入 $(1,3,0)$:\n\n$$\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle$$\n\n**Step 2:單位化方向向量**\n\n$$\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle$$\n\n**Step 3:計算方向導數**\n\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n\n先回想:方向導數 $D_{\\mathbf{u}}f$ 等於?\n\na. $D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$\nb. $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$\nc. $D_{\\mathbf{u}}f = f_x + f_y + f_z$\n\n\n\n\n求 $f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n求 $f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$\n\n\n\n\n\n代入點 $(1,3,0)$,$\\nabla f(1,3,0)$ 是哪一個?\n\na. $\\langle 0,\\; 3,\\; 0 \\rangle$\nb. $\\langle 1,\\; 0,\\; 3 \\rangle$\nc. $\\langle 0,\\; 0,\\; 3 \\rangle$\n\n\n\n\n方向向量 $\\mathbf{v} = \\langle 1, 2, -1 \\rangle$,先算長度 $\\|\\mathbf{v}\\|$:\n\na. $\\sqrt{5}$\nb. $\\sqrt{6}$\nc. $6$\n\n\n\n\n最後套用公式:\n$$D_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?$$\n\na. $-\\sqrt{\\dfrac{3}{2}}$\nb. $\\sqrt{\\dfrac{3}{2}}$\nc. $\\dfrac{3}{\\sqrt{6}}$\n\n\n\n\n**答案:**\n$$\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle$$\n$$D_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}$$\n\n\n\n\n---\n\n## 5️⃣ 最大方向導數\n\n我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:**應該往哪個方向走?最快的速度是多少?**\n\n由內積公式,方向導數可以寫成:\n\n\n定理\n方向導數的內積形式\n$$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。\n\n\n\n由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:\n$$D_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta$$\n(因為 $|\\mathbf{u}| = 1$)\n\n\n---\n\n三個角色的分析:\n- $|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是**定值**\n- $|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 **1**\n- $\\cos\\theta$(夾角):**唯一可以改變的**,取決於我們選擇的方向\n\n**Q1:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最大值是多少?**\n\n\n\n此時 $\\theta$ 是幾度?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。\n\n\n\n**Q2:$\\cos\\theta$ 在 $[0, 2\\pi]$ 間最小值是多少?**\n\n\n\n此時 $\\theta$ 是多少?\n\n\n\n方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?\n\n\n\na. 兩者方向相同\nb. 兩者方向相反\nc. 兩者互相垂直\nd. 兩者夾 45 度角\n\n\n\n往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。\n\n\n\n\n定理\n最大方向導數與梯度\n若 $f$ 是二變數或三變數的可微函數,則:\n- **最大上升**:$\\mathbf{u}$ 與 $\\nabla f$ **同方向**時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$\n- **最大下降**:$\\mathbf{u}$ 與 $\\nabla f$ **反方向**時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$\n- **無變化**:$\\mathbf{u}$ 與 $\\nabla f$ **垂直**時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)\n\n\n\n\n\n\n\n**Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?**\n\n\n\na. 梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$\nb. 梯度 $\\nabla f$ 的方向與等高線的切線方向相同\nc. 最大方向導數等於 $f_x + f_y$\nd. 最大方向導數的方向與梯度垂直\n\n\n\n梯度垂直於等高線,不是沿著等高線方向。\n最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。\n最大方向導數的方向與梯度**平行**,不是垂直。\n\n\n\n---\n\n### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "已知 $f(x,y,z) = x\\sin(yz)$。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f(x,y,z) = x\\sin(yz)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 求 " + }, + { + "latex": "$\\nabla f(x,y,z) = \\langle a, b, c \\rangle$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "sin(y*z),x*z*cos(y*z),x*y*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 a,b,c", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(b) 求 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": " 沿著向量 " + }, + { + "latex": "$\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$", + "kind": "math" + }, + { + "text": " 的方向導數:" + } + ], + "answers": [ + "-3/sqrt(6)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_d9715e7412", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入 $(1,3,0)$:", + "newline": "false", + "runs": [ + { + "text": "代入 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(1,3,0) = \\langle \\sin 0,\\; 0,\\; 3\\cos 0 \\rangle = \\langle 0, 0, 3 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:單位化方向向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:單位化方向向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\|\\mathbf{v}\\| = \\sqrt{1+4+1} = \\sqrt{6}, \\qquad \\mathbf{u} = \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\mathbf{u} = 3\\cdot\\left(-\\frac{1}{\\sqrt{6}}\\right) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n已知 $f(x,y,z) = x\\sin(yz)$。\n\n(a) 求 $\\nabla f(x,y,z) = \\langle a, b, c \\rangle$:\n\n\n\n(b) 求 $f$ 在點 $(1,3,0)$ 沿著向量 $\\mathbf{v} = \\mathbf{i} + 2\\mathbf{j} - \\mathbf{k}$ 的方向導數:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_53c5b7e1e7", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-20", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-1::q1", + "prompt_runs": [ + { + "text": "先回想:方向導數 " + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 等於?" + } + ], + "options": [ + { + "key": "a", + "text": "$D_{\\mathbf{u}}f = \\nabla f \\times \\mathbf{u}$" + }, + { + "key": "b", + "text": "$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$" + }, + { + "key": "c", + "text": "$D_{\\mathbf{u}}f = f_x + f_y + f_z$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-20", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-2::q2", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_x = \\dfrac{\\partial}{\\partial x}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "sin(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-2" + } + ], + "gate_from": "flow-20::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-3::q3", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_y = \\dfrac{\\partial}{\\partial y}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "x*z*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-3" + } + ], + "gate_from": "flow-20::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-20::step-4::q4", + "prompt_runs": [ + { + "text": "求 " + }, + { + "latex": "$f_z = \\dfrac{\\partial}{\\partial z}\\big(x\\sin(yz)\\big) = ?$", + "kind": "math" + } + ], + "answers": [ + "x*y*cos(y*z)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-20", + "step": "step-4" + } + ], + "gate_from": "flow-20::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-5::q5", + "prompt_runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(1,3,0)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\nabla f(1,3,0)$", + "kind": "math" + }, + { + "text": " 是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle 0,\\; 3,\\; 0 \\rangle$" + }, + { + "key": "b", + "text": "$\\langle 1,\\; 0,\\; 3 \\rangle$" + }, + { + "key": "c", + "text": "$\\langle 0,\\; 0,\\; 3 \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-20", + "step": "step-5" + } + ], + "gate_from": "flow-20::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-6::q6", + "prompt_runs": [ + { + "text": "方向向量 " + }, + { + "latex": "$\\mathbf{v} = \\langle 1, 2, -1 \\rangle$", + "kind": "math" + }, + { + "text": ",先算長度 " + }, + { + "latex": "$\\|\\mathbf{v}\\|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\sqrt{5}$" + }, + { + "key": "b", + "text": "$\\sqrt{6}$" + }, + { + "key": "c", + "text": "$6$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-20", + "step": "step-6" + } + ], + "gate_from": "flow-20::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-20::step-7::q7", + "prompt_runs": [ + { + "text": "最後套用公式:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = \\langle 0,0,3 \\rangle \\cdot \\left\\langle \\frac{1}{\\sqrt{6}}, \\frac{2}{\\sqrt{6}}, -\\frac{1}{\\sqrt{6}} \\right\\rangle = ?\n$$", + "kind": "math_block" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\sqrt{\\dfrac{3}{2}}$" + }, + { + "key": "b", + "text": "$\\sqrt{\\dfrac{3}{2}}$" + }, + { + "key": "c", + "text": "$\\dfrac{3}{\\sqrt{6}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-20", + "step": "step-7" + } + ], + "gate_from": "flow-20::step-6::q6" + }, + { + "id": "step-8", + "title": "步驟 8", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$$$\nD_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "latex": "$$\n\\nabla f(x,y,z) = \\langle \\sin(yz),\\; xz\\cos(yz),\\; xy\\cos(yz) \\rangle\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f(1,3,0) = -\\frac{3}{\\sqrt{6}} = -\\sqrt{\\frac{3}{2}}\n$$", + "kind": "math_block" + } + ] + } + ], + "gate_from": "flow-20::step-7::q7" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-5", + "title": "5️⃣ 最大方向導數", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "5️⃣ 最大方向導數", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 最大方向導數", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 $(x_0, y_0)$,想用最快的速度衝上山頂:應該往哪個方向走?最快的速度是多少?", + "newline": "false", + "runs": [ + { + "text": "我們剛剛學會了算任意方向的變化率。現在,假設你是一個尋寶獵人,站在 " + }, + { + "latex": "$(x_0, y_0)$", + "kind": "math" + }, + { + "text": ",想用最快的速度衝上山頂:" + }, + { + "text": "應該往哪個方向走?最快的速度是多少?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由內積公式,方向導數可以寫成:", + "newline": "false", + "runs": [ + { + "text": "由內積公式,方向導數可以寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "方向導數的內積形式", + "body": [ + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$其中 $\\theta$ 是梯度 $\\nabla f$ 與方向向量 $\\mathbf{u}$ 的夾角,$|\\mathbf{u}| = 1$。", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u} = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 與方向向量 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 的夾角," + }, + { + "latex": "$|\\mathbf{u}| = 1$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e43dea9d27", + "label": "推導過程", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由方向導數公式 $D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$ 以及向量內積的幾何定義 $\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$,令 $\\mathbf{A} = \\nabla f$,$\\mathbf{B} = \\mathbf{u}$,即得:$$\nD_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$(因為 $|\\mathbf{u}| = 1$)", + "newline": "false", + "runs": [ + { + "text": "由方向導數公式 " + }, + { + "latex": "$D_{\\mathbf{u}}f = \\nabla f \\cdot \\mathbf{u}$", + "kind": "math" + }, + { + "text": " 以及向量內積的幾何定義 " + }, + { + "latex": "$\\mathbf{A} \\cdot \\mathbf{B} = |\\mathbf{A}||\\mathbf{B}|\\cos\\theta$", + "kind": "math" + }, + { + "text": ",令 " + }, + { + "latex": "$\\mathbf{A} = \\nabla f$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\mathbf{B} = \\mathbf{u}$", + "kind": "math" + }, + { + "text": ",即得:" + }, + { + "latex": "$$\nD_{\\mathbf{u}}f = |\\nabla f|\\,|\\mathbf{u}|\\cos\\theta = |\\nabla f|\\cos\\theta\n$$", + "kind": "math_block" + }, + { + "text": "(因為 " + }, + { + "latex": "$|\\mathbf{u}| = 1$", + "kind": "math" + }, + { + "text": ")" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "paragraph", + "content": "三個角色的分析:", + "newline": "false", + "runs": [ + { + "text": "三個角色的分析:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$|\\nabla f|$", + "kind": "math" + }, + { + "text": "(梯度長度):站在固定點,坡度已定,這是" + }, + { + "text": "定值", + "style": "bold" + } + ], + "content": "$|\\nabla f|$(梯度長度):站在固定點,坡度已定,這是定值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$|\\mathbf{u}|$", + "kind": "math" + }, + { + "text": "(方向向量長度):規定是單位向量,永遠等於 " + }, + { + "text": "1", + "style": "bold" + } + ], + "content": "$|\\mathbf{u}|$(方向向量長度):規定是單位向量,永遠等於 1" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\cos\\theta$", + "kind": "math" + }, + { + "text": "(夾角):" + }, + { + "text": "唯一可以改變的", + "style": "bold" + }, + { + "text": ",取決於我們選擇的方向" + } + ], + "content": "$\\cos\\theta$(夾角):唯一可以改變的,取決於我們選擇的方向" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "Q1:", + "style": "bold" + }, + { + "latex": "$\\cos\\theta$", + "kind": "math", + "style": "bold" + }, + { + "text": " 在 ", + "style": "bold" + }, + { + "latex": "$[0, 2\\pi]$", + "kind": "math", + "style": "bold" + }, + { + "text": " 間最大值是多少?", + "style": "bold" + } + ], + "answers": [ + "1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "此時 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是幾度?" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?", + "newline": "false", + "runs": [ + { + "text": "方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 跟梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是什麼關係?" + } + ] + }, + { + "type": "flow", + "id": "flow-21", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-21::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "兩者方向相同" + }, + { + "key": "b", + "text": "兩者方向相反" + }, + { + "key": "c", + "text": "兩者互相垂直" + }, + { + "key": "d", + "text": "兩者夾 45 度角" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-21", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "跟著梯度走,上升最快。此時變化率為 $|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$。", + "newline": "false", + "runs": [ + { + "text": "跟著梯度走,上升最快。此時變化率為 " + }, + { + "latex": "$|\\nabla f| \\cdot 1 \\cdot 1 = |\\nabla f|$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-21::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "Q2:", + "style": "bold" + }, + { + "latex": "$\\cos\\theta$", + "kind": "math", + "style": "bold" + }, + { + "text": " 在 ", + "style": "bold" + }, + { + "latex": "$[0, 2\\pi]$", + "kind": "math", + "style": "bold" + }, + { + "text": " 間最小值是多少?", + "style": "bold" + } + ], + "answers": [ + "-1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "此時 " + }, + { + "latex": "$\\theta$", + "kind": "math" + }, + { + "text": " 是多少?" + } + ], + "answers": [ + "pi" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": " ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "方向 $\\mathbf{u}$ 跟梯度 $\\nabla f$ 是什麼關係?", + "newline": "false", + "runs": [ + { + "text": "方向 " + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 跟梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是什麼關係?" + } + ] + }, + { + "type": "flow", + "id": "flow-22", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-22::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "兩者方向相同" + }, + { + "key": "b", + "text": "兩者方向相反" + }, + { + "key": "c", + "text": "兩者互相垂直" + }, + { + "key": "d", + "text": "兩者夾 45 度角" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-22", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "往梯度的反方向走,下降最快。此時變化率為 $-|\\nabla f|$。", + "newline": "false", + "runs": [ + { + "text": "往梯度的反方向走,下降最快。此時變化率為 " + }, + { + "latex": "$-|\\nabla f|$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-22::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "最大方向導數與梯度", + "body": [ + { + "type": "paragraph", + "content": "若 $f$ 是二變數或三變數的可微函數,則:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 是二變數或三變數的可微函數,則:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大上升", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "同方向", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 最大,最大值為 " + }, + { + "latex": "$\\|\\nabla f\\|$", + "kind": "math" + } + ], + "content": "最大上升:$\\mathbf{u}$ 與 $\\nabla f$ 同方向時,$D_{\\mathbf{u}}f$ 最大,最大值為 $\\|\\nabla f\\|$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大下降", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "反方向", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f$", + "kind": "math" + }, + { + "text": " 最小,最小值為 " + }, + { + "latex": "$-\\|\\nabla f\\|$", + "kind": "math" + } + ], + "content": "最大下降:$\\mathbf{u}$ 與 $\\nabla f$ 反方向時,$D_{\\mathbf{u}}f$ 最小,最小值為 $-\\|\\nabla f\\|$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "無變化", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\mathbf{u}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "時," + }, + { + "latex": "$D_{\\mathbf{u}}f = 0$", + "kind": "math" + }, + { + "text": "(沿著等值曲線方向)" + } + ], + "content": "無變化:$\\mathbf{u}$ 與 $\\nabla f$ 垂直時,$D_{\\mathbf{u}}f = 0$(沿著等值曲線方向)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9b86818782", + "label": "GeoGebra", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "ba8bertm", + "width": "100%", + "height": "480", + "border": "0", + "caption": "梯度與方向導數", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:對於一個可微函數 $f(x,y)$,下列關於梯度與最大方向導數的敘述,何者正確?", + "newline": "false", + "runs": [ + { + "text": "Q:對於一個可微函數 ", + "style": "bold" + }, + { + "latex": "$f(x,y)$", + "kind": "math", + "style": "bold" + }, + { + "text": ",下列關於梯度與最大方向導數的敘述,何者正確?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-23", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-23::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "梯度 $\\nabla f$ 是一個向量,其方向為函數上升最快的方向,最大方向導數的值為 $\\|\\nabla f\\|$" + }, + { + "key": "b", + "text": "梯度 $\\nabla f$ 的方向與等高線的切線方向相同" + }, + { + "key": "c", + "text": "最大方向導數等於 $f_x + f_y$" + }, + { + "key": "d", + "text": "最大方向導數的方向與梯度垂直" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-23", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "梯度垂直於等高線,不是沿著等高線方向。最大方向導數為 $\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$。最大方向導數的方向與梯度平行,不是垂直。", + "newline": "false", + "runs": [ + { + "text": "梯度垂直於等高線,不是沿著等高線方向。最大方向導數為 " + }, + { + "latex": "$\\|\\nabla f\\| = \\sqrt{f_x^2 + f_y^2}$", + "kind": "math" + }, + { + "text": "。最大方向導數的方向與梯度" + }, + { + "text": "平行", + "style": "bold" + }, + { + "text": ",不是垂直。" + } + ] + } + ], + "gate_from": "flow-23::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle$$\n\n**Step 2:求 $\\overrightarrow{PQ}$ 的單位向量**\n\n$$\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}$$\n\n$$\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle$$\n\n**Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數**\n\n$$D_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1$$\n\n**Step 4:最大增加方向與最大增加率**\n\n最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。\n\n最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。\n\n\n\n\n\n我們知道 $\\nabla f = \\langle f_x, f_y \\rangle$,請問 $\\langle f_x, f_y \\rangle = ?$\n\na. $\\langle xe^y,\\; e^y \\rangle$\nb. $\\langle e^y,\\; x \\rangle$\nc. $\\langle e^y,\\; xe^y \\rangle$\nd. $\\langle ye^y,\\; xe^y \\rangle$\n\n\n\n\n代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。\n\n$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$,算 $|\\overrightarrow{PQ}|$:\n\na. $\\dfrac{25}{4}$\nb. $\\dfrac{5}{2}$\nc. $\\sqrt{5}$\n\n\n\n\n單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。\n\n$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$\n\na. $-\\dfrac{11}{5}$\nb. $\\dfrac{3}{5}$\nc. $1$\n\n\n\n\n最大上升方向是哪一個?\n\na. $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向\nb. $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向\nc. $\\langle -1, -2 \\rangle$ 的方向\n\n\n\n\n最大上升率應該是?\n\na. $\\nabla f(2,0)$\nb. $|\\nabla f(2,0)|$\nc. $\\mathbf{u} \\cdot \\mathbf{u}$\n\n\n\n\n**答案:**\n沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$\n最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$\n\n\n\n\n---\n\n## 6️⃣ 等值曲面的切平面\n\n在三維中,曲面在某一點附近的「局部描述」就是**切平面**。\n\n**關鍵想法**:在二維,梯度垂直於**切線方向**;在三維,梯度垂直於所有**切向量**,因此梯度自然成為**切平面的法向量**。\n\n若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。\n\n\n\n\n\n先從比較熟悉的二維圖形開始想。\n\n考慮橢圓\n$$\n3x^2+4y^2=16\n$$\n在點 $(2,1)$ 的切線。\n\n### 一、二維:切線與梯度\n\n如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成\n$$\n3x^2+4y^2(x)=16.\n$$\n\n兩邊對 $x$ 微分:\n$$\n6x+8y(x)y'(x)=0.\n$$\n\n把 $(2,1)$ 代入:\n$$\n12+8y'(2)=0,\n$$\n所以\n$$\ny'(2)=-\\frac{3}{2}.\n$$\n\n因此,橢圓在點 $(2,1)$ 的切線斜率是\n$$\n-\\frac{3}{2}.\n$$\n\n接著改用梯度來看。令\n$$\nF(x,y)=3x^2+4y^2-16.\n$$\n\n那麼橢圓可以看成等值曲線\n$$\nF(x,y)=0.\n$$\n\n梯度為\n$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$\n\n在點 $(2,1)$,\n$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$\n\n重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。\n\n因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:\n$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$\n\n例如可以取\n$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$\n\n因為\n$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$\n\n這個方向向量的斜率是\n$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$\n和前面用隱函數微分算出來的斜率一樣。\n\n所以在二維中可以記住一句話:**梯度垂直於等值曲線的切線方向**。\n\n---\n\n### 二、三維:切平面與梯度\n\n現在把同樣的想法推廣到三維。\n\n考慮曲面\n$$\n3x^2+4y^2+5z^2=12\n$$\n以及曲面上的點 $(1,1,1)$。\n\n令\n$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$\n\n那麼這個曲面可以寫成等值曲面\n$$\nF(x,y,z)=0.\n$$\n\n先求梯度:\n$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$\n\n在點 $(1,1,1)$,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$\n\n和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。\n\n因此,切平面上的所有方向向量都會和梯度垂直。也就是說,\n$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$\n就是這個切平面的法向量。\n\n接著用「點法式」寫出平面方程式。\n\n已知切平面通過點\n$$\nP=(1,1,1),\n$$\n而切平面上的任意一點記為\n$$\nQ=(x,y,z).\n$$\n\n則從 $P$ 指向 $Q$ 的向量是\n$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$\n\n因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:\n$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$\n\n展開後得到切平面方程式:\n$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$\n\n所以三維中可以記住:**等值曲面的梯度就是切平面的法向量**。\n\n\n---\n\n\n定理\n等值曲面的法向量、切平面與法線\n若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:\n\n- **法向量**:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$\n- **切平面**:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$\n- **法線對稱式**:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$ \n(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)\n\n\n---\n\n### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率", + "newline": "false", + "runs": [ + { + "text": "如果 " + }, + { + "latex": "$f(x,y) = xe^y$", + "kind": "math" + }, + { + "text": ",求函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$P(2,0)$", + "kind": "math" + }, + { + "text": " 處:(a) 沿著從 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 到 " + }, + { + "latex": "$Q\\!\\left(\\dfrac{1}{2}, 2\\right)$", + "kind": "math" + }, + { + "text": " 方向的方向導數(b) 函數增加最快的方向 " + }, + { + "latex": "$\\langle a, b \\rangle$", + "kind": "math" + }, + { + "text": " 及最大增加率" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "|w=500", + "src": "/assets/Ch14_6_ex5.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(a) 沿 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 方向的方向導數:" + } + ], + "answers": [ + "1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "(b) 最大增加率:" + } + ], + "answers": [ + "sqrt(5)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_2251191f40", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f(x,y) = \\langle e^y,\\; xe^y \\rangle, \\qquad \\nabla f(2,0) = \\langle 1, 2 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:求 $\\overrightarrow{PQ}$ 的單位向量", + "newline": "false", + "runs": [ + { + "text": "Step 2:求 ", + "style": "bold" + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的單位向量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\overrightarrow{PQ} = \\left\\langle \\frac{1}{2}-2,\\; 2-0 \\right\\rangle = \\left\\langle -\\frac{3}{2},\\; 2 \\right\\rangle, \\qquad \\|\\overrightarrow{PQ}\\| = \\sqrt{\\frac{9}{4}+4} = \\frac{5}{2}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\mathbf{u} = \\frac{\\overrightarrow{PQ}}{\\|\\overrightarrow{PQ}\\|} = \\left\\langle -\\frac{3}{5},\\; \\frac{4}{5} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:沿 $\\overrightarrow{PQ}$ 的方向導數", + "newline": "false", + "runs": [ + { + "text": "Step 3:沿 ", + "style": "bold" + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的方向導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD_{\\mathbf{u}}f(2,0) = \\langle 1,2 \\rangle \\cdot \\left\\langle -\\frac{3}{5}, \\frac{4}{5} \\right\\rangle = -\\frac{3}{5} + \\frac{8}{5} = 1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:最大增加方向與最大增加率", + "newline": "false", + "runs": [ + { + "text": "Step 4:最大增加方向與最大增加率", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最大增加方向為 $\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向。", + "newline": "false", + "runs": [ + { + "text": "最大增加方向為 " + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": " 的方向。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "最大增加率為 $\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$。", + "newline": "false", + "runs": [ + { + "text": "最大增加率為 " + }, + { + "latex": "$\\|\\nabla f(2,0)\\| = \\sqrt{1+4} = \\sqrt{5}$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n如果 $f(x,y) = xe^y$,求函數 $f$ 在點 $P(2,0)$ 處:\n(a) 沿著從 $P$ 到 $Q\\!\\left(\\dfrac{1}{2}, 2\\right)$ 方向的方向導數\n(b) 函數增加最快的方向 $\\langle a, b \\rangle$ 及最大增加率\n\n![|w=500](/assets/Ch14_6_ex5.svg)\n\n(a) 沿 $\\overrightarrow{PQ}$ 方向的方向導數:\n\n\n\n(b) 最大增加率:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_26c6fbaf68", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-24", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-1::q1", + "prompt_runs": [ + { + "text": "我們知道 " + }, + { + "latex": "$\\nabla f = \\langle f_x, f_y \\rangle$", + "kind": "math" + }, + { + "text": ",請問 " + }, + { + "latex": "$\\langle f_x, f_y \\rangle = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$\\langle xe^y,\\; e^y \\rangle$" + }, + { + "key": "b", + "text": "$\\langle e^y,\\; x \\rangle$" + }, + { + "key": "c", + "text": "$\\langle e^y,\\; xe^y \\rangle$" + }, + { + "key": "d", + "text": "$\\langle ye^y,\\; xe^y \\rangle$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-24", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $P(2,0)$:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$P(2,0)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-2::q2", + "prompt_runs": [ + { + "latex": "$\\overrightarrow{PQ} = \\langle -\\dfrac{3}{2}, 2 \\rangle$", + "kind": "math" + }, + { + "text": ",算 " + }, + { + "latex": "$|\\overrightarrow{PQ}|$", + "kind": "math" + }, + { + "text": ":" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{25}{4}$" + }, + { + "key": "b", + "text": "$\\dfrac{5}{2}$" + }, + { + "key": "c", + "text": "$\\sqrt{5}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-24", + "step": "step-2" + } + ], + "gate_from": "flow-24::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "單位向量 $\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "單位向量 " + }, + { + "latex": "$\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-3::q3", + "prompt_runs": [ + { + "latex": "$D_{\\mathbf{u}}f(2,0) = \\langle 1, 2 \\rangle \\cdot \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle = ?$", + "kind": "math" + } + ], + "options": [ + { + "key": "a", + "text": "$-\\dfrac{11}{5}$" + }, + { + "key": "b", + "text": "$\\dfrac{3}{5}$" + }, + { + "key": "c", + "text": "$1$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-24", + "step": "step-3" + } + ], + "gate_from": "flow-24::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-4::q4", + "prompt_runs": [ + { + "text": "最大上升方向是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$ 的方向" + }, + { + "key": "b", + "text": "$\\mathbf{u} = \\langle -\\dfrac{3}{5}, \\dfrac{4}{5} \\rangle$ 的方向" + }, + { + "key": "c", + "text": "$\\langle -1, -2 \\rangle$ 的方向" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-24", + "step": "step-4" + } + ], + "gate_from": "flow-24::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-24::step-5::q5", + "prompt_runs": [ + { + "text": "最大上升率應該是?" + } + ], + "options": [ + { + "key": "a", + "text": "$\\nabla f(2,0)$" + }, + { + "key": "b", + "text": "$|\\nabla f(2,0)|$" + }, + { + "key": "c", + "text": "$\\mathbf{u} \\cdot \\mathbf{u}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-24", + "step": "step-5" + } + ], + "gate_from": "flow-24::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:沿 $\\overrightarrow{PQ}$ 的變化率 $= 1$最大上升方向:$\\nabla f(2,0) = \\langle 1, 2 \\rangle$;最大上升率:$|\\nabla f(2,0)| = \\sqrt{5}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": "沿 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 的變化率 " + }, + { + "latex": "$= 1$", + "kind": "math" + }, + { + "text": "最大上升方向:" + }, + { + "latex": "$\\nabla f(2,0) = \\langle 1, 2 \\rangle$", + "kind": "math" + }, + { + "text": ";最大上升率:" + }, + { + "latex": "$|\\nabla f(2,0)| = \\sqrt{5}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-24::step-5::q5" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-6", + "title": "6️⃣ 等值曲面的切平面", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "6️⃣ 等值曲面的切平面", + "newline": "true", + "runs": [ + { + "text": "6️⃣ 等值曲面的切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "6" + }, + { + "type": "paragraph", + "content": "在三維中,曲面在某一點附近的「局部描述」就是切平面。", + "newline": "false", + "runs": [ + { + "text": "在三維中,曲面在某一點附近的「局部描述」就是" + }, + { + "text": "切平面", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "關鍵想法:在二維,梯度垂直於切線方向;在三維,梯度垂直於所有切向量,因此梯度自然成為切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "關鍵想法", + "style": "bold" + }, + { + "text": ":在二維,梯度垂直於" + }, + { + "text": "切線方向", + "style": "bold" + }, + { + "text": ";在三維,梯度垂直於所有" + }, + { + "text": "切向量", + "style": "bold" + }, + { + "text": ",因此梯度自然成為" + }, + { + "text": "切平面的法向量", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "若曲面由 $F(x,y,z) = 0$ 表示,且點 $P(x_0, y_0, z_0)$ 在曲面上,切平面的法向量就是 $\\nabla F(x_0, y_0, z_0)$。", + "newline": "false", + "runs": [ + { + "text": "若曲面由 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": " 表示,且點 " + }, + { + "latex": "$P(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 在曲面上,切平面的法向量就是 " + }, + { + "latex": "$\\nabla F(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_05b8657d37", + "label": "等值曲面", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "bdccxafp", + "width": "100%", + "height": "480", + "border": "0", + "caption": "等值曲面與切平面", + "card": "0" + } + ] + }, + { + "type": "solution", + "uid": "sol_02e336c1cc", + "label": "從二維切線到三維切平面", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "先從比較熟悉的二維圖形開始想。", + "newline": "false", + "runs": [ + { + "text": "先從比較熟悉的二維圖形開始想。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮橢圓$$\n3x^2+4y^2=16\n$$在點 $(2,1)$ 的切線。", + "newline": "false", + "runs": [ + { + "text": "考慮橢圓" + }, + { + "latex": "$$\n3x^2+4y^2=16\n$$", + "kind": "math_block" + }, + { + "text": "在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的切線。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "heading", + "level": 3, + "content": "一、二維:切線與梯度", + "newline": "true", + "runs": [ + { + "text": "一、二維:切線與梯度", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal" + }, + { + "type": "paragraph", + "content": "如果在點 $(2,1)$ 附近,可以把橢圓看成 $y=y(x)$,那麼原式可以寫成$$\n3x^2+4y^2(x)=16.\n$$", + "newline": "false", + "runs": [ + { + "text": "如果在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 附近,可以把橢圓看成 " + }, + { + "latex": "$y=y(x)$", + "kind": "math" + }, + { + "text": ",那麼原式可以寫成" + }, + { + "latex": "$$\n3x^2+4y^2(x)=16.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "兩邊對 $x$ 微分:$$\n6x+8y(x)y'(x)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "兩邊對 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 微分:" + }, + { + "latex": "$$\n6x+8y(x)y'(x)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "把 $(2,1)$ 代入:$$\n12+8y'(2)=0,\n$$所以$$\ny'(2)=-\\frac{3}{2}.\n$$", + "newline": "false", + "runs": [ + { + "text": "把 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 代入:" + }, + { + "latex": "$$\n12+8y'(2)=0,\n$$", + "kind": "math_block" + }, + { + "text": "所以" + }, + { + "latex": "$$\ny'(2)=-\\frac{3}{2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,橢圓在點 $(2,1)$ 的切線斜率是$$\n-\\frac{3}{2}.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,橢圓在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": " 的切線斜率是" + }, + { + "latex": "$$\n-\\frac{3}{2}.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著改用梯度來看。令$$\nF(x,y)=3x^2+4y^2-16.\n$$", + "newline": "false", + "runs": [ + { + "text": "接著改用梯度來看。令" + }, + { + "latex": "$$\nF(x,y)=3x^2+4y^2-16.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "那麼橢圓可以看成等值曲線$$\nF(x,y)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "那麼橢圓可以看成等值曲線" + }, + { + "latex": "$$\nF(x,y)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "梯度為$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "梯度為" + }, + { + "latex": "$$\n\\nabla F(x,y)=\\langle 6x,8y\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在點 $(2,1)$,$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "在點 " + }, + { + "latex": "$(2,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\n\\nabla F(2,1)=\\langle 12,8\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "重點是:沿著橢圓走的時候,$F(x,y)$ 的值一直都是 $0$,所以沿著切線方向移動時,函數值沒有增加也沒有減少。", + "newline": "false", + "runs": [ + { + "text": "重點是:沿著橢圓走的時候," + }, + { + "latex": "$F(x,y)$", + "kind": "math" + }, + { + "text": " 的值一直都是 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",所以沿著切線方向移動時,函數值沒有增加也沒有減少。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,切線方向向量 $\\mathbf v$ 必須和梯度垂直:$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因此,切線方向向量 " + }, + { + "latex": "$\\mathbf v$", + "kind": "math" + }, + { + "text": " 必須和梯度垂直:" + }, + { + "latex": "$$\n\\nabla F(2,1)\\cdot \\mathbf v=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "例如可以取$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "例如可以取" + }, + { + "latex": "$$\n\\mathbf v=\\langle -8,12\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因為" + }, + { + "latex": "$$\n\\langle 12,8\\rangle\\cdot \\langle -8,12\\rangle=-96+96=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這個方向向量的斜率是$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$和前面用隱函數微分算出來的斜率一樣。", + "newline": "false", + "runs": [ + { + "text": "這個方向向量的斜率是" + }, + { + "latex": "$$\n\\frac{12}{-8}=-\\frac{3}{2},\n$$", + "kind": "math_block" + }, + { + "text": "和前面用隱函數微分算出來的斜率一樣。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以在二維中可以記住一句話:梯度垂直於等值曲線的切線方向。", + "newline": "false", + "runs": [ + { + "text": "所以在二維中可以記住一句話:" + }, + { + "text": "梯度垂直於等值曲線的切線方向", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "二、三維:切平面與梯度", + "newline": "true", + "runs": [ + { + "text": "二、三維:切平面與梯度", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal" + }, + { + "type": "paragraph", + "content": "現在把同樣的想法推廣到三維。", + "newline": "false", + "runs": [ + { + "text": "現在把同樣的想法推廣到三維。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "考慮曲面$$\n3x^2+4y^2+5z^2=12\n$$以及曲面上的點 $(1,1,1)$。", + "newline": "false", + "runs": [ + { + "text": "考慮曲面" + }, + { + "latex": "$$\n3x^2+4y^2+5z^2=12\n$$", + "kind": "math_block" + }, + { + "text": "以及曲面上的點 " + }, + { + "latex": "$(1,1,1)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "令$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$", + "newline": "false", + "runs": [ + { + "text": "令" + }, + { + "latex": "$$\nF(x,y,z)=3x^2+4y^2+5z^2-12.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "那麼這個曲面可以寫成等值曲面$$\nF(x,y,z)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "那麼這個曲面可以寫成等值曲面" + }, + { + "latex": "$$\nF(x,y,z)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "先求梯度:$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "先求梯度:" + }, + { + "latex": "$$\n\\nabla F(x,y,z)=\\langle 6x,8y,10z\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在點 $(1,1,1)$,$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "在點 " + }, + { + "latex": "$(1,1,1)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "和二維情況一樣:如果沿著曲面上的方向移動,$F(x,y,z)$ 的值仍然保持為 $0$,所以在切平面上的任何方向,函數值都不會瞬間改變。", + "newline": "false", + "runs": [ + { + "text": "和二維情況一樣:如果沿著曲面上的方向移動," + }, + { + "latex": "$F(x,y,z)$", + "kind": "math" + }, + { + "text": " 的值仍然保持為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",所以在切平面上的任何方向,函數值都不會瞬間改變。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因此,切平面上的所有方向向量都會和梯度垂直。也就是說,$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$就是這個切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "因此,切平面上的所有方向向量都會和梯度垂直。也就是說," + }, + { + "latex": "$$\n\\nabla F(1,1,1)=\\langle 6,8,10\\rangle\n$$", + "kind": "math_block" + }, + { + "text": "就是這個切平面的法向量。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "接著用「點法式」寫出平面方程式。", + "newline": "false", + "runs": [ + { + "text": "接著用「點法式」寫出平面方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "已知切平面通過點$$\nP=(1,1,1),\n$$而切平面上的任意一點記為$$\nQ=(x,y,z).\n$$", + "newline": "false", + "runs": [ + { + "text": "已知切平面通過點" + }, + { + "latex": "$$\nP=(1,1,1),\n$$", + "kind": "math_block" + }, + { + "text": "而切平面上的任意一點記為" + }, + { + "latex": "$$\nQ=(x,y,z).\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "則從 $P$ 指向 $Q$ 的向量是$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$", + "newline": "false", + "runs": [ + { + "text": "則從 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 指向 " + }, + { + "latex": "$Q$", + "kind": "math" + }, + { + "text": " 的向量是" + }, + { + "latex": "$$\n\\overrightarrow{PQ}=\\langle x-1,y-1,z-1\\rangle.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為 $\\overrightarrow{PQ}$ 在切平面上,所以它必須和法向量 $\\langle 6,8,10\\rangle$ 垂直:$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "因為 " + }, + { + "latex": "$\\overrightarrow{PQ}$", + "kind": "math" + }, + { + "text": " 在切平面上,所以它必須和法向量 " + }, + { + "latex": "$\\langle 6,8,10\\rangle$", + "kind": "math" + }, + { + "text": " 垂直:" + }, + { + "latex": "$$\n\\langle 6,8,10\\rangle\\cdot \\langle x-1,y-1,z-1\\rangle=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "展開後得到切平面方程式:$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "展開後得到切平面方程式:" + }, + { + "latex": "$$\n6(x-1)+8(y-1)+10(z-1)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以三維中可以記住:等值曲面的梯度就是切平面的法向量。", + "newline": "false", + "runs": [ + { + "text": "所以三維中可以記住:" + }, + { + "text": "等值曲面的梯度就是切平面的法向量", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "定理", + "headline": "等值曲面的法向量、切平面與法線", + "body": [ + { + "type": "paragraph", + "content": "若 $\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$,則:", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$\\nabla F(x_0, y_0, z_0) \\neq \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "法向量", + "style": "bold" + }, + { + "text": ":曲面在點 " + }, + { + "latex": "$P(x_0,y_0,z_0)$", + "kind": "math" + }, + { + "text": " 的法向量可由梯度給出 " + }, + { + "latex": "$\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$", + "kind": "math" + } + ], + "content": "法向量:曲面在點 $P(x_0,y_0,z_0)$ 的法向量可由梯度給出 $\\mathbf{n} = \\nabla F(x_0, y_0, z_0) = \\langle F_x, F_y, F_z \\rangle$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "切平面", + "style": "bold" + }, + { + "text": ":通過點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 且以 " + }, + { + "latex": "$\\overrightarrow\\mathbf{n}$", + "kind": "math" + }, + { + "text": " 為法向量的平面 " + }, + { + "latex": "$F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$", + "kind": "math" + } + ], + "content": "切平面:通過點 $P$ 且以 $\\overrightarrow\\mathbf{n}$ 為法向量的平面 $F_x(x_0,y_0,z_0)(x-x_0) + F_y(x_0,y_0,z_0)(y-y_0) + F_z(x_0,y_0,z_0)(z-z_0) = 0$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "法線對稱式", + "style": "bold" + }, + { + "text": ":通過點 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 且平行於法向量 " + }, + { + "latex": "$\\overrightarrow\\mathbf{n}$", + "kind": "math" + }, + { + "text": " 的直線。其對稱式為 " + }, + { + "latex": "$\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$", + "kind": "math" + }, + { + "text": "(若法向量某個分量為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",則法線不適合直接寫成完整對稱式,可改用參數式表示。)" + } + ], + "content": "法線對稱式:通過點 $P$ 且平行於法向量 $\\overrightarrow\\mathbf{n}$ 的直線。其對稱式為 $\\dfrac{x-x_0}{F_x(x_0,y_0,z_0)} = \\dfrac{y-y_0}{F_y(x_0,y_0,z_0)} = \\dfrac{z-z_0}{F_z(x_0,y_0,z_0)}$(若法向量某個分量為 $0$,則法線不適合直接寫成完整對稱式,可改用參數式表示。)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 6", + "newline": "true", + "runs": [ + { + "text": "Example 6", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 6, + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n\n\n\n**Step 1:定義 $F$ 並計算偏導數**\n\n$$F(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}$$\n\n$$F_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}$$\n\n**Step 2:代入點 $(-2,1,-3)$**\n\n$$F_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}$$\n\n$$\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle$$\n\n**Step 3:切平面方程式**\n\n$$-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0$$\n\n**Step 4:法線方程式**\n\n$$\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}$$\n\n\n\n該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。\n\n\n\n求偏導 $F_x, F_y, F_z$,下列哪一組正確?\n\na. $F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$\nb. $F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$\nc. $F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$\nd. $F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$\n\n\n\n\n代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。\n\n切平面方程式(化簡後)是哪一個?\n\na. $3x + 6y + 2z + 18 = 0$\nb. $3x - 6y + 2z - 18 = 0$\nc. $3x - 6y + 2z + 18 = 0$\nd. $x - 2y + \\dfrac{2}{3}z + 6 = 0$\n\n\n\n\n法線對稱方程式(方向向量與 $\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$ 同向):\n\na. $\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$\nb. $\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\nc. $\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$\nd. $\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n**答案:**\n切平面:$3x - 6y + 2z + 18 = 0$\n法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$\n\n\n\n\n---\n\n## 7️⃣ 雙變數函數曲面的切平面\n\n當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:\n\n$$F(x,y,z) = f(x,y) - z = 0$$\n\n這是等值曲面的特例(取 $k = 0$)。\n\n計算 $F$ 的偏導數:\n\n$$F_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1$$\n\n代入切平面公式,得到:\n\n$$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0$$\n\n\n註解\n兩種切平面公式的對照\n曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ \n\n曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ \n\n後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。\n\n\n---\n\n### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-6" + }, + { + "type": "paragraph", + "content": "求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。", + "newline": "false", + "runs": [ + { + "text": "求橢球面 " + }, + { + "latex": "$\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math" + }, + { + "text": " 的切平面與法線方程式。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_ex6.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "切平面方程式:" + } + ], + "answers": [ + "3*x-6*y+2*z+18=0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "法線方程式(對稱式):" + } + ], + "answers": [ + "(x+2)/(-1)=(y-1)/2=(z+3)/(-2/3)" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_31110adc4b", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:定義 $F$ 並計算偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 1:定義 ", + "style": "bold" + }, + { + "latex": "$F$", + "kind": "math", + "style": "bold" + }, + { + "text": " 並計算偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = \\frac{x^2}{4} + y^2 + \\frac{z^2}{9}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = \\frac{x}{2}, \\qquad F_y = 2y, \\qquad F_z = \\frac{2z}{9}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:代入點 $(-2,1,-3)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:代入點 ", + "style": "bold" + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = -1, \\qquad F_y = 2, \\qquad F_z = -\\frac{2}{3}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla F(-2,1,-3) = \\left\\langle -1, 2, -\\frac{2}{3} \\right\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:切平面方程式", + "newline": "false", + "runs": [ + { + "text": "Step 3:切平面方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n-1(x+2) + 2(y-1) - \\frac{2}{3}(z+3) = 0 \\implies 3x - 6y + 2z + 18 = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:法線方程式", + "newline": "false", + "runs": [ + { + "text": "Step 4:法線方程式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\frac{x+2}{-1} = \\frac{y-1}{2} = \\frac{z+3}{-\\frac{2}{3}}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 6\n\n求橢球面 $\\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9} = 3$ 在點 $(-2,1,-3)$ 的切平面與法線方程式。\n\n![](/assets/Ch14_6_ex6.svg)\n\n切平面方程式:\n\n\n\n法線方程式(對稱式):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_ebfe5833c9", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "該橢球面是 $F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$ 的等值曲面(取 $k = 3$)。", + "newline": "false", + "runs": [ + { + "text": "該橢球面是 " + }, + { + "latex": "$F(x,y,z) = \\dfrac{x^2}{4} + y^2 + \\dfrac{z^2}{9}$", + "kind": "math" + }, + { + "text": " 的等值曲面(取 " + }, + { + "latex": "$k = 3$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "flow", + "id": "flow-25", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-1::q1", + "prompt_runs": [ + { + "text": "求偏導 " + }, + { + "latex": "$F_x, F_y, F_z$", + "kind": "math" + }, + { + "text": ",下列哪一組正確?" + } + ], + "options": [ + { + "key": "a", + "text": "$F_x = \\dfrac{x}{2},\\; F_y = 2y,\\; F_z = \\dfrac{2z}{9}$" + }, + { + "key": "b", + "text": "$F_x = \\dfrac{x^2}{4},\\; F_y = y,\\; F_z = \\dfrac{z^2}{9}$" + }, + { + "key": "c", + "text": "$F_x = \\dfrac{2}{x},\\; F_y = 2,\\; F_z = \\dfrac{9}{2z}$" + }, + { + "key": "d", + "text": "$F_x = \\dfrac{x}{4},\\; F_y = y^2,\\; F_z = \\dfrac{z}{9}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-25", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $(-2,1,-3)$:$F_x = -1$,$F_y = 2$,$F_z = -\\dfrac{2}{3}$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(-2,1,-3)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$F_x = -1$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_y = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_z = -\\dfrac{2}{3}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-2::q2", + "prompt_runs": [ + { + "text": "切平面方程式(化簡後)是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$3x + 6y + 2z + 18 = 0$" + }, + { + "key": "b", + "text": "$3x - 6y + 2z - 18 = 0$" + }, + { + "key": "c", + "text": "$3x - 6y + 2z + 18 = 0$" + }, + { + "key": "d", + "text": "$x - 2y + \\dfrac{2}{3}z + 6 = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-25", + "step": "step-2" + } + ], + "gate_from": "flow-25::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-25::step-3::q3", + "prompt_runs": [ + { + "text": "法線對稱方程式(方向向量與 " + }, + { + "latex": "$\\nabla F = \\langle -1, 2, -\\dfrac{2}{3} \\rangle$", + "kind": "math" + }, + { + "text": " 同向):" + } + ], + "options": [ + { + "key": "a", + "text": "$\\dfrac{x+2}{1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{\\frac{2}{3}}$" + }, + { + "key": "b", + "text": "$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$" + }, + { + "key": "c", + "text": "$\\dfrac{x-2}{-1} = \\dfrac{y+1}{2} = \\dfrac{z-3}{-\\frac{2}{3}}$" + }, + { + "key": "d", + "text": "$\\dfrac{x+2}{-2} = \\dfrac{y-1}{1} = \\dfrac{z+3}{-\\frac{2}{3}}$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-25", + "step": "step-3" + } + ], + "gate_from": "flow-25::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:切平面:$3x - 6y + 2z + 18 = 0$法線:$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": "切平面:" + }, + { + "latex": "$3x - 6y + 2z + 18 = 0$", + "kind": "math" + }, + { + "text": "法線:" + }, + { + "latex": "$\\dfrac{x+2}{-1} = \\dfrac{y-1}{2} = \\dfrac{z+3}{-\\frac{2}{3}}$", + "kind": "math" + } + ] + } + ], + "gate_from": "flow-25::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-7", + "title": "7️⃣ 雙變數函數曲面的切平面", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "7️⃣ 雙變數函數曲面的切平面", + "newline": "true", + "runs": [ + { + "text": "7️⃣ 雙變數函數曲面的切平面", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "7" + }, + { + "type": "paragraph", + "content": "當曲面 $S$ 的方程式為 $z = f(x,y)$ 時(即 $S$ 是雙變數函數 $f$ 的圖形),可改寫成:", + "newline": "false", + "runs": [ + { + "text": "當曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 的方程式為 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": " 時(即 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 是雙變數函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的圖形),可改寫成:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = f(x,y) - z = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = f(x,y) - z = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這是等值曲面的特例(取 $k = 0$)。", + "newline": "false", + "runs": [ + { + "text": "這是等值曲面的特例(取 " + }, + { + "latex": "$k = 0$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "計算 $F$ 的偏導數:", + "newline": "false", + "runs": [ + { + "text": "計算 " + }, + { + "latex": "$F$", + "kind": "math" + }, + { + "text": " 的偏導數:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = f_x(x_0, y_0), \\qquad F_y = f_y(x_0, y_0), \\qquad F_z = -1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入切平面公式,得到:", + "newline": "false", + "runs": [ + { + "text": "代入切平面公式,得到:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) - (z-z_0) = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "註解", + "headline": "兩種切平面公式的對照", + "body": [ + { + "type": "paragraph", + "content": "曲面 $F(x,y,z) = 0$,其切平面公式為 $F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$ ", + "newline": "false", + "runs": [ + { + "text": "曲面 " + }, + { + "latex": "$F(x,y,z) = 0$", + "kind": "math" + }, + { + "text": ",其切平面公式為 " + }, + { + "latex": "$F_x(x-x_0) + F_y(y-y_0) + F_z(z-z_0) = 0$", + "kind": "math" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "曲面 $z = f(x,y)$,其切平面公式為 $f_x(x-x_0) + f_y(y-y_0) = z - z_0$ ", + "newline": "false", + "runs": [ + { + "text": "曲面 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ",其切平面公式為 " + }, + { + "latex": "$f_x(x-x_0) + f_y(y-y_0) = z - z_0$", + "kind": "math" + }, + { + "text": " " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "後者是前者的特例,令 $F = f(x,y) - z$ 即可推導。", + "newline": "false", + "runs": [ + { + "text": "後者是前者的特例,令 " + }, + { + "latex": "$F = f(x,y) - z$", + "kind": "math" + }, + { + "text": " 即可推導。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 7", + "newline": "true", + "runs": [ + { + "text": "Example 7", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 7, + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n\n\n\n**Step 1:改寫為 $F = 0$**\n\n$$F(x,y,z) = 2x^2 + y^2 - z = 0$$\n\n**Step 2:計算偏導並代入點 $(1,1,3)$**\n\n$$F_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1$$\n\n**Step 3:寫出切平面**\n\n$$4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3$$\n\n\n\n\n\n將 $F = 2x^2 + y^2 - z$ 計算偏導數:\n\na. $F_x = 4x,\\; F_y = 2y,\\; F_z = -1$\nb. $F_x = 4,\\; F_y = 2,\\; F_z = -1$\nc. $F_x = 2x,\\; F_y = y,\\; F_z = 1$\nd. $F_x = 4x,\\; F_y = 2y,\\; F_z = 1$\n\n\n\n\n代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。\n\n切平面方程式是哪一個?\n\na. $z = 4x + 2y - 3$\nb. $z = 4x + 2y + 3$\nc. $z = 4x - 2y - 3$\nd. $z = -4x - 2y + 3$\n\n\n\n\n**答案:** $z = 4x + 2y - 3$\n\n也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。\n\n\n\n\n---\n\n## 8️⃣ 梯度向量的幾何意義\n\n現在我們把梯度的兩個核心性質放在一起理解。\n\n在三維中:\n- $\\nabla f(x_0, y_0, z_0)$ 指向函數在該點**增加最快的方向**\n- $\\nabla f(x_0, y_0, z_0)$ **垂直**於通過該點的等值曲面 $S$\n\n這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往**垂直方向**移動,便能得到最大的增加率。\n\n同樣地,對二變數函數 $f(x,y)$:\n- $\\nabla f(x_0, y_0)$ 指向函數增加最快的方向\n- $\\nabla f(x_0, y_0)$ **垂直**於通過 $P$ 的等值曲線 $f(x,y) = k$\n\n![](/assets/Ch14_6_8.svg)\n\n---\n\n\n特性\n梯度向量的性質\n設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:\n\n1. **方向導數公式**:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$\n2. **最大上升方向**:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$\n3. **垂直性質**:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)\n\n\n---", + "id": "Example-7" + }, + { + "type": "paragraph", + "content": "求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。", + "newline": "false", + "runs": [ + { + "text": "求曲面 " + }, + { + "latex": "$z = 2x^2 + y^2$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": " 的切平面。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "切平面方程式:" + } + ], + "answers": [ + "z=4*x+2*y-3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_3f2ee97ccb", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:改寫為 $F = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 1:改寫為 ", + "style": "bold" + }, + { + "latex": "$F = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF(x,y,z) = 2x^2 + y^2 - z = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF(x,y,z) = 2x^2 + y^2 - z = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算偏導並代入點 $(1,1,3)$", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算偏導並代入點 ", + "style": "bold" + }, + { + "latex": "$(1,1,3)$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nF_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nF_x = 4x \\to 4, \\qquad F_y = 2y \\to 2, \\qquad F_z = -1\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:寫出切平面", + "newline": "false", + "runs": [ + { + "text": "Step 3:寫出切平面", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n4(x-1) + 2(y-1) - (z-3) = 0 \\implies z = 4x + 2y - 3\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 7\n\n求曲面 $z = 2x^2 + y^2$ 在點 $(1,1,3)$ 的切平面。\n\n切平面方程式:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b89c4cd456", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-26", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-26::step-1::q1", + "prompt_runs": [ + { + "text": "將 " + }, + { + "latex": "$F = 2x^2 + y^2 - z$", + "kind": "math" + }, + { + "text": " 計算偏導數:" + } + ], + "options": [ + { + "key": "a", + "text": "$F_x = 4x,\\; F_y = 2y,\\; F_z = -1$" + }, + { + "key": "b", + "text": "$F_x = 4,\\; F_y = 2,\\; F_z = -1$" + }, + { + "key": "c", + "text": "$F_x = 2x,\\; F_y = y,\\; F_z = 1$" + }, + { + "key": "d", + "text": "$F_x = 4x,\\; F_y = 2y,\\; F_z = 1$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-26", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "代入點 $(1,1,3)$:$F_x = 4$,$F_y = 2$,$F_z = -1$,法向量 $\\mathbf{n} = \\langle 4, 2, -1 \\rangle$。", + "newline": "false", + "runs": [ + { + "text": "代入點 " + }, + { + "latex": "$(1,1,3)$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$F_x = 4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_y = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$F_z = -1$", + "kind": "math" + }, + { + "text": ",法向量 " + }, + { + "latex": "$\\mathbf{n} = \\langle 4, 2, -1 \\rangle$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-26::step-2::q2", + "prompt_runs": [ + { + "text": "切平面方程式是哪一個?" + } + ], + "options": [ + { + "key": "a", + "text": "$z = 4x + 2y - 3$" + }, + { + "key": "b", + "text": "$z = 4x + 2y + 3$" + }, + { + "key": "c", + "text": "$z = 4x - 2y - 3$" + }, + { + "key": "d", + "text": "$z = -4x - 2y + 3$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-26", + "step": "step-2" + } + ], + "gate_from": "flow-26::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案: $z = 4x + 2y - 3$", + "newline": "false", + "runs": [ + { + "text": "答案:", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$z = 4x + 2y - 3$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "也可以直接套公式:$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$,其中 $f_x = 4x$,$f_y = 2y$,代入即得。", + "newline": "false", + "runs": [ + { + "text": "也可以直接套公式:" + }, + { + "latex": "$f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0) = z - z_0$", + "kind": "math" + }, + { + "text": ",其中 " + }, + { + "latex": "$f_x = 4x$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = 2y$", + "kind": "math" + }, + { + "text": ",代入即得。" + } + ] + } + ], + "gate_from": "flow-26::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-8", + "title": "8️⃣ 梯度向量的幾何意義", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "8️⃣ 梯度向量的幾何意義", + "newline": "true", + "runs": [ + { + "text": "8️⃣ 梯度向量的幾何意義", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "8" + }, + { + "type": "paragraph", + "content": "現在我們把梯度的兩個核心性質放在一起理解。", + "newline": "false", + "runs": [ + { + "text": "現在我們把梯度的兩個核心性質放在一起理解。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在三維中:", + "newline": "false", + "runs": [ + { + "text": "在三維中:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " 指向函數在該點" + }, + { + "text": "增加最快的方向", + "style": "bold" + } + ], + "content": "$\\nabla f(x_0, y_0, z_0)$ 指向函數在該點增加最快的方向" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0, z_0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "於通過該點的等值曲面 " + }, + { + "latex": "$S$", + "kind": "math" + } + ], + "content": "$\\nabla f(x_0, y_0, z_0)$ 垂直於通過該點的等值曲面 $S$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這兩個性質在直觀上是相容的:當我們沿著等值曲面 $S$ 移動時,函數值 $f$ 不會改變。因此,往垂直方向移動,便能得到最大的增加率。", + "newline": "false", + "runs": [ + { + "text": "這兩個性質在直觀上是相容的:當我們沿著等值曲面 " + }, + { + "latex": "$S$", + "kind": "math" + }, + { + "text": " 移動時,函數值 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 不會改變。因此,往" + }, + { + "text": "垂直方向", + "style": "bold" + }, + { + "text": "移動,便能得到最大的增加率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "同樣地,對二變數函數 $f(x,y)$:", + "newline": "false", + "runs": [ + { + "text": "同樣地,對二變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0)$", + "kind": "math" + }, + { + "text": " 指向函數增加最快的方向" + } + ], + "content": "$\\nabla f(x_0, y_0)$ 指向函數增加最快的方向" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\nabla f(x_0, y_0)$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "垂直", + "style": "bold" + }, + { + "text": "於通過 " + }, + { + "latex": "$P$", + "kind": "math" + }, + { + "text": " 的等值曲線 " + }, + { + "latex": "$f(x,y) = k$", + "kind": "math" + } + ], + "content": "$\\nabla f(x_0, y_0)$ 垂直於通過 $P$ 的等值曲線 $f(x,y) = k$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/Ch14_6_8.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "特性", + "headline": "梯度向量的性質", + "body": [ + { + "type": "paragraph", + "content": "設 $f$ 為二變數或三變數的可微函數,且 $\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$,則:", + "newline": "false", + "runs": [ + { + "text": "設 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 為二變數或三變數的可微函數,且 " + }, + { + "latex": "$\\nabla f(\\mathbf{x}) \\neq \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",則:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "方向導數公式", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$", + "kind": "math" + } + ], + "content": "方向導數公式:$D_{\\mathbf{u}}f(\\mathbf{x}) = \\nabla f(\\mathbf{x}) \\cdot \\mathbf{u}$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "最大上升方向", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": " 指向函數增加最快的方向,最大變化率為 " + }, + { + "latex": "$|\\nabla f(\\mathbf{x})|$", + "kind": "math" + } + ], + "content": "最大上升方向:$\\nabla f(\\mathbf{x})$ 指向函數增加最快的方向,最大變化率為 $|\\nabla f(\\mathbf{x})|$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "垂直性質", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$\\nabla f(\\mathbf{x})$", + "kind": "math" + }, + { + "text": " 垂直於通過該點的等值曲面(或等值曲線)" + } + ], + "content": "垂直性質:$\\nabla f(\\mathbf{x})$ 垂直於通過該點的等值曲面(或等值曲線)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/C14_7/Dash_Ch14_7.py b/pages/Ch14/C14_7/Dash_Ch14_7.py new file mode 100644 index 0000000000000000000000000000000000000000..0853265ee200609be967befd1ca9c008e39f17b6 --- /dev/null +++ b/pages/Ch14/C14_7/Dash_Ch14_7.py @@ -0,0 +1,11 @@ +import dash +from layout.page_builder import make_test_page +from pathlib import Path + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_7.json" + +dash.register_page(__name__, path="/Ch14_7", title="Ch14_7") + +def layout(): + return make_test_page(str(JSON_PATH), top_offset=90) diff --git a/pages/Ch14/C14_7/Md_14_7.md b/pages/Ch14/C14_7/Md_14_7.md new file mode 100644 index 0000000000000000000000000000000000000000..63422a6348e6108f4018aa85e70000da709924eb --- /dev/null +++ b/pages/Ch14/C14_7/Md_14_7.md @@ -0,0 +1,503 @@ +# 極值 +在上一節我們一直在問一個「局部」的問題:**如果我站在某一點上,往哪個方向走會上升最快?此時的最大上升率是多少?** + +a. 沿著梯度 $\nabla f(x_0,y_0)$ 的方向走上升最快;最大上升率為 $\|\nabla f(x_0,y_0)\|$。 +b. 沿著負梯度 $-\nabla f(x_0,y_0)$ 的方向走上升最快;最大上升率為 $\|\nabla f(x_0,y_0)\|$。 +c. 沿著等高線($f(x,y)=c$)在該點的切線方向走上升最快;最大上升率為 $0$。 +d. 沿著偏導數較大的軸向走($f_x$ 大就往 $x$ 軸正向、$f_y$ 大就往 $y$ 軸正向);最大上升率為 $\max\{|f_x|,|f_y|\}$。 + + +這一節要看:**哪裡是最高點?哪裡是最低點?** + +--- + +## 1️⃣ 局部最大值和局部最小值 + + +定義 +局部最大值和局部最小值 +對一個雙變數函數 $z = f(x,y)$: +- **局部最大值(local maximum)**發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \leq f(a,b)$ +- **局部最小值(local minimum)**發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \geq f(a,b)$ + + +![](/assets/maximum.svg) + +--- + +## 2️⃣ 臨界點 +那要如何找到這些極值呢? + +我們不會漫無目的地找,而是先找出可能出現極值的「候選點」,也就是\textbf{臨界點}。 + +對二變數函數 $f(x,y)$ 來說,梯度 $\nabla f(x,y)$ 表示函數上升最快的方向,而它的長度 $\|\nabla f(x,y)\|$ 表示最快上升率。 + +如果在某一點 $(x_0,y_0)$,最快上升率為 $0$,也就是 $\|\nabla f(x_0,y_0)\|=0$,等價於 $\nabla f(x_0,y_0)=0$,也就是 $f_x(x_0,y_0)=0,\ f_y(x_0,y_0)=0$。 + +這種點稱為**臨界點**。 + +此外,如果某點的偏導數不存在,或函數在該點不可微,也可能出現極值,因此也需要列入候選點。 + +所以,尋找極值時,我們通常先找 $\nabla f(x,y)=0$ 或 $\nabla f(x,y)$ 不存在的點,作為極值的候選點。 + +定義 +臨界點 +對 $f(x,y)$,若 $(x_0,y_0)$ 是內部點,且滿足下面任一條,就叫做**臨界點(critical point)**: +1. $\nabla f(x_0,y_0) = \mathbf{0}$(可微且梯度為零) +2. $\nabla f(x_0,y_0)$ 不存在(不可微或偏導數不存在) + + + + +「函數 $f(x,y)$ 的臨界點 $(a,b)$ 必須滿足 $f_x(a,b) = 0$ 或 $f_y(a,b) = 0$ 至少一項」,這個說法對嗎? + +a. Yes +b. No + + + +要注意:$f_x(a,b) = 0$ **和** $f_y(a,b) = 0$ 兩者都需要同時滿足! + + + +--- + +## 3️⃣ 鞍點 + +臨界點雖然是極值的候選人,但它不一定就是極值喔!也可能是**鞍點(Saddle Point)**——在一個方向是谷底,另一個方向卻是山頂,就像馬鞍形狀。 + + +定義 +鞍點 +假如點 $(a,b)$ 滿足 $\nabla f(a,b) = \mathbf{0}$,且不是局部最大或最小值,則點 $(a,b)$ 是**鞍點**。 + + +![](/assets/SaddlePoint.svg) + + + + + +--- + +## 4️⃣ 二階導數判別法 + + +定理 +二階導數判別法 +假設 $\nabla f(a,b) = \mathbf{0}$,令判別式: +$$D(a,b) = f_{xx}(a,b)\,f_{yy}(a,b) - [f_{xy}(a,b)]^2$$ + +1. **局部最小值**:$D > 0$ 且 $f_{xx} > 0$(凹向上,像碗狀谷底) +2. **局部最大值**:$D > 0$ 且 $f_{xx} < 0$(凹向下,像倒碗山頂) +3. **鞍點**:$D < 0$(曲率方向不一) +4. **無法判斷**:$D = 0$(需其他方法) + + + +$D > 0$ 時,$f_{xx} \cdot f_{yy} > (f_{xy})^2 \geq 0$,因此 $f_{xx}$ 與 $f_{yy}$ 同號,只看 $f_{xx}$ 就夠了。 + + +Q:為什麼 $D > 0$ 時只需要看 $f_{xx}$ 的正負? + +由 $D > 0$ 得 $f_{xx} \cdot f_{yy} > (f_{xy})^2 \geq 0$,所以 $f_{xx} \cdot f_{yy} > 0$,兩者同號,看其中一個就能判斷。 + + +--- + +### Example 1 + +請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。 + +臨界點為? + + + + +**Step 1:計算一階偏導數** + +$$f_x = 2x-4, \qquad f_y = 2y-6$$ + +**Step 2:令 $f_x = f_y = 0$** + +$$2x-4=0 \implies x=2, \qquad 2y-6=0 \implies y=3$$ + +臨界點為 $(2,3)$。 + + + + + +找臨界點的第一步是? + +a. 直接代入 $x=0$ 與 $y=0$ 求函數值 +b. 計算二階偏導數,檢查正負號 +c. 計算一階偏導數 $f_x$ 與 $f_y$,並令它們等於 $0$ +d. 計算判別式 $D$ + + + + +$f_x = ?$ + + + + + +$f_y = ?$ + + + + + +令 $f_x = f_y = 0$,臨界點為? + +a. $(2,3)$ +b. $(3,2)$ +c. $(3,4)$ +d. $(4,3)$ + + + + + +--- + +### Example 2 + +已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值? + +請輸入類型(local max/min 或 saddle): + + + + +$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為**局部最大值(Local Maximum)**。 + + + + + +$D(1,2) = 16$,與 $0$ 的關係: + +a. $D < 0$ +b. $D > 0$ +c. $D = 0$ + + + + +$f_{xx}(1,2) = -3$,與 $0$ 的關係: + +a. $f_{xx} < 0$ +b. $f_{xx} > 0$ +c. $f_{xx} = 0$ + + + + +根據二階導數判別法,結果是? + +a. Local Maximum(局部最大值) +b. Local Minimum(局部最小值) +c. Saddle Point(鞍點) +d. 無法判斷 + + + + + +--- + +### Example 3 + +已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。 + +$D = ?$ + + + + +$$D = f_{xx}f_{yy} - f_{xy}^2 = 4\cdot5 - 3^2 = 20 - 9 = 11$$ + + +--- + +### Example 4 + +判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。 + +$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)? + + + + +**Step 1:確認臨界點** + +$f_x = 2x = 0$,$f_y = -2y = 0$,代入 $(0,0)$:均為 $0$,是臨界點。 + +**Step 2:計算二階偏導** + +$$f_{xx} = 2, \qquad f_{yy} = -2, \qquad f_{xy} = 0$$ + +**Step 3:計算判別式** + +$$D(0,0) = 2\cdot(-2) - 0^2 = -4 < 0$$ + +$D < 0$,因此 $(0,0)$ 是**鞍點(Saddle Point)**。 + + + + + +先計算一階偏導數($f(x, y) = x^2 - y^2$)。請問 +$$ +f_x=? +$$ + + + + +再請問 +$$ +f_y=? +$$ + + + + + +將 $(0,0)$ 代入後,可得 +$$ +f_x(0,0)=0,\qquad f_y(0,0)=0. +$$ + +所以 $(0,0)$ 是否為臨界點? + +a. Yes +b. No + + + + +接著計算二階偏導數($f(x, y) = x^2 - y^2$)。 + +$$ +f_{xx}=\frac{\partial}{\partial x}(2x)=? +$$ + + + + +$$ +f_{yy}=\frac{\partial}{\partial y}(-2y)=? +$$ + + + + +$$ +f_{xy}=\frac{\partial}{\partial y}(2x)=? +$$ + + + + + +現在來計算判別式: +$$ +D(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2 +$$ + +因此 +$$ +D(0,0)=2\cdot(-2)-0^2=? +$$ + + + + + +因為 +$$ +D(0,0)=-4<0, +$$ +所以 $(0,0)$ 的類型為何? + +a. Local Maximum(局部最大值) +b. Local Minimum(局部最小值) +c. Saddle Point(鞍點) +d. 無法判斷 + + + + +答案:因為 +$$ +D(0,0)<0, +$$ +所以 $(0,0)$ 是 **Saddle Point(鞍點)**。 + + + + +--- + + +註解 +§1-4 小結 +**找局部極值的流程:** +1. 求 $f_x = 0$ 且 $f_y = 0$(或 $\nabla f$ 不存在),找出所有臨界點 +2. 對每個臨界點計算 $D = f_{xx}f_{yy} - f_{xy}^2$ +3. 根據 $D$ 的正負和 $f_{xx}$ 的正負判斷類型 +4. $D = 0$ 時無法用此法判斷,需其他技巧 + + +--- + +## 5️⃣ 絕對極值 +這一次,我們要解決的問題是:如何在一個**封閉且有界**的區域 $D$ 上,找到函數 $f(x, y)$ 的**絕對最大值**(Absolute Maximum)和**絕對最小值**(Absolute Minimum)。 + +工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是**絕對極值**(Absolute Maximum and Minimum Values)吧! + + +定義 +絕對最大值和絕對最小值 +$f$ 在點 $(a,b)$ 有**絕對最大值** $f(a,b)$:對所有 $(x,y) \in D$,$$f(x,y) \leq f(a,b)$$。 + +$f$ 在點 $(a,b)$ 有**絕對最小值** $f(a,b)$:對所有 $(x,y) \in D$,$$f(x,y) \geq f(a,b)$$。 + +最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。 + +定理 +極值定理(Extreme Value Theorem) +若 $f(x,y)$ 在封閉(closed)且有界(bounded)的區域 $D$ 上連續,則 $f$ 一定會取得絕對最大值和絕對最小值。 + + + +方法 +找封閉有界區域上的絕對極值 +令多變數函數 $z = f(x, y),\quad [x,y]\in D = [a,b]×[c,d]$: +**步驟 0:先確認區域與函數** +- 區域 $D$ 是封閉且有界(包含邊界)。 +- 如果$f$ 在$D$上連續,則一定存在絕對最大/最小值。 + +**步驟 1:找內部臨界點** +- 解 $\nabla f = \mathbf{0}$,找出落在 $D$ 內部的解 +- 找 $\nabla f$ 不存在的點 +- 計算這些點的函數值 + +**步驟 2:找邊界上的候選點** +- 把邊界降維成單變數函數,用單變數微積分找極值 +- 計算端點和極值點的函數值 + +**步驟 3:比較所有候選點的函數值** +- 最大的值 = 絕對最大值 +- 最小的值 = 絕對最小值 + + + + + + +--- + +### Example 5 + +找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。 + +絕對最大值為: + + + +絕對最小值為: + + + + +**Step 1:找內部臨界點** + +$$f_x = 2x-4 = 0 \implies x = 2, \qquad f_y = 4y = 0 \implies y = 0$$ + +臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。 + +**Step 2:找邊界** + +**邊界 $L_1: x=0$,$0 \leq y \leq 4$** + +$$f(0,y) = 2y^2$$ +- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$ + +**邊界 $L_2: y=0$,$0 \leq x \leq 4$** + +$$f(x,0) = x^2-4x = (x-2)^2-4$$ +- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$ + +**邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \leq x \leq 4$** + +$$f(x,4-x) = 3x^2-20x+32$$ +$$\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \implies x = \frac{10}{3}$$ +$$f\!\left(\frac{10}{3},\frac{2}{3}\right) = -\frac{4}{3}$$ + +端點:$f(0,4) = 32$,$f(4,0) = 0$ + +**Step 3:比較所有候選值** + +候選值:$0, 32, -4, 0, -\dfrac{4}{3}$ + +- **絕對最大值**:$32$,在 $(0,4)$ +- **絕對最小值**:$-4$,在 $(2,0)$ + + + + + +先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。 + +此點是否在 $D$ 的**內部**? + +a. 是,座標為 $(2,0)$ +b. 是,座標為 $(2,1)$ +c. 否,$(2,0)$ 在邊界 $y=0$ 上 +d. 否,$(2,1)$ 不在區域內 + + + + +邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \leq y \leq 4$。 + +此邊界上的最大值: + + + + + +邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。 + +此邊界上的最小值: + + + + + +邊界 $L_3: x+y=4$,代入後得 $f = 3x^2-20x+32$,臨界點在 $x = \dfrac{10}{3}$ 時,函數值: + + + + + +比較所有候選值 $\{0, 32, -4, 0, -\frac{4}{3}\}$。 + +絕對最大值: + + + +絕對最小值: + + + +- **絕對最大值** $32$,發生在 $(0,4)$ +- **絕對最小值** $-4$,發生在 $(2,0)$ + + + diff --git a/pages/Ch14/C14_7/exported_result_14_7.json b/pages/Ch14/C14_7/exported_result_14_7.json new file mode 100644 index 0000000000000000000000000000000000000000..35a5a4d5b149a44a953ee88e96f8cd7b25abc79f --- /dev/null +++ b/pages/Ch14/C14_7/exported_result_14_7.json @@ -0,0 +1,12722 @@ +{ + "toc": [ + { + "label": "極值", + "id": "sec", + "level": 1 + }, + { + "label": "1️⃣ 局部最大值和局部最小值", + "id": "1", + "level": 2 + }, + { + "label": "2️⃣ 臨界點", + "id": "2", + "level": 2 + }, + { + "label": "3️⃣ 鞍點", + "id": "3", + "level": 2 + }, + { + "label": "4️⃣ 二階導數判別法", + "id": "4", + "level": 2 + }, + { + "label": "Example 1", + "id": "Example-1", + "level": 3 + }, + { + "label": "Example 2", + "id": "Example-2", + "level": 3 + }, + { + "label": "Example 3", + "id": "Example-3", + "level": 3 + }, + { + "label": "Example 4", + "id": "Example-4", + "level": 3 + }, + { + "label": "5️⃣ 絕對極值", + "id": "5", + "level": 2 + }, + { + "label": "Example 5", + "id": "Example-5", + "level": 3 + } + ], + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "極值", + "newline": "true", + "runs": [ + { + "text": "極值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在上一節我們一直在問一個「局部」的問題:" + }, + { + "text": "如果我站在某一點上,往哪個方向走會上升最快?此時的最大上升率是多少?", + "style": "bold" + }, + { + "newline": "true" + } + ], + "options": [ + { + "key": "a", + "text": "沿著梯度 $\\nabla f(x_0,y_0)$ 的方向走上升最快;最大上升率為 $\\|\\nabla f(x_0,y_0)\\|$。" + }, + { + "key": "b", + "text": "沿著負梯度 $-\\nabla f(x_0,y_0)$ 的方向走上升最快;最大上升率為 $\\|\\nabla f(x_0,y_0)\\|$。" + }, + { + "key": "c", + "text": "沿著等高線($f(x,y)=c$)在該點的切線方向走上升最快;最大上升率為 $0$。" + }, + { + "key": "d", + "text": "沿著偏導數較大的軸向走($f_x$ 大就往 $x$ 軸正向、$f_y$ 大就往 $y$ 軸正向);最大上升率為 $\\max\\{|f_x|,|f_y|\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這一節要看:哪裡是最高點?哪裡是最低點?", + "newline": "false", + "runs": [ + { + "text": "這一節要看:" + }, + { + "text": "哪裡是最高點?哪裡是最低點?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 局部最大值和局部最小值", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 局部最大值和局部最小值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "card", + "kind": "定義", + "headline": "局部最大值和局部最小值", + "body": [ + { + "type": "paragraph", + "content": "對一個雙變數函數 $z = f(x,y)$:", + "newline": "false", + "runs": [ + { + "text": "對一個雙變數函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "局部最大值(local maximum)", + "style": "bold" + }, + { + "text": "發生在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ":當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y) \\leq f(a,b)$", + "kind": "math" + } + ], + "content": "局部最大值(local maximum)發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \\leq f(a,b)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "局部最小值(local minimum)", + "style": "bold" + }, + { + "text": "發生在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ":當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y) \\geq f(a,b)$", + "kind": "math" + } + ], + "content": "局部最小值(local minimum)發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \\geq f(a,b)$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/maximum.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 臨界點", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 臨界點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "那要如何找到這些極值呢?", + "newline": "false", + "runs": [ + { + "text": "那要如何找到這些極值呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們不會漫無目的地找,而是先找出可能出現極值的「候選點」,也就是\\textbf{臨界點}。", + "newline": "false", + "runs": [ + { + "text": "我們不會漫無目的地找,而是先找出可能出現極值的「候選點」,也就是\\textbf{臨界點}。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對二變數函數 $f(x,y)$ 來說,梯度 $\\nabla f(x,y)$ 表示函數上升最快的方向,而它的長度 $\\|\\nabla f(x,y)\\|$ 表示最快上升率。", + "newline": "false", + "runs": [ + { + "text": "對二變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 來說,梯度 " + }, + { + "latex": "$\\nabla f(x,y)$", + "kind": "math" + }, + { + "text": " 表示函數上升最快的方向,而它的長度 " + }, + { + "latex": "$\\|\\nabla f(x,y)\\|$", + "kind": "math" + }, + { + "text": " 表示最快上升率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果在某一點 $(x_0,y_0)$,最快上升率為 $0$,也就是 $\\|\\nabla f(x_0,y_0)\\|=0$,等價於 $\\nabla f(x_0,y_0)=0$,也就是 $f_x(x_0,y_0)=0,\\ f_y(x_0,y_0)=0$。", + "newline": "false", + "runs": [ + { + "text": "如果在某一點 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": ",最快上升率為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",也就是 " + }, + { + "latex": "$\\|\\nabla f(x_0,y_0)\\|=0$", + "kind": "math" + }, + { + "text": ",等價於 " + }, + { + "latex": "$\\nabla f(x_0,y_0)=0$", + "kind": "math" + }, + { + "text": ",也就是 " + }, + { + "latex": "$f_x(x_0,y_0)=0,\\ f_y(x_0,y_0)=0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這種點稱為臨界點。", + "newline": "false", + "runs": [ + { + "text": "這種點稱為" + }, + { + "text": "臨界點", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此外,如果某點的偏導數不存在,或函數在該點不可微,也可能出現極值,因此也需要列入候選點。", + "newline": "false", + "runs": [ + { + "text": "此外,如果某點的偏導數不存在,或函數在該點不可微,也可能出現極值,因此也需要列入候選點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以,尋找極值時,我們通常先找 $\\nabla f(x,y)=0$ 或 $\\nabla f(x,y)$ 不存在的點,作為極值的候選點。", + "newline": "false", + "runs": [ + { + "text": "所以,尋找極值時,我們通常先找 " + }, + { + "latex": "$\\nabla f(x,y)=0$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$\\nabla f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在的點,作為極值的候選點。" + } + ] + }, + { + "type": "card", + "kind": "定義", + "headline": "臨界點", + "body": [ + { + "type": "paragraph", + "content": "對 $f(x,y)$,若 $(x_0,y_0)$ 是內部點,且滿足下面任一條,就叫做臨界點(critical point):", + "newline": "false", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 是內部點,且滿足下面任一條,就叫做" + }, + { + "text": "臨界點(critical point)", + "style": "bold" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\nabla f(x_0,y_0) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": "(可微且梯度為零)" + } + ], + "content": "$\\nabla f(x_0,y_0) = \\mathbf{0}$(可微且梯度為零)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\nabla f(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 不存在(不可微或偏導數不存在)" + } + ], + "content": "$\\nabla f(x_0,y_0)$ 不存在(不可微或偏導數不存在)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "flow", + "id": "flow-27", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-27::step-1::q1", + "prompt_runs": [ + { + "text": "「函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的臨界點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須滿足 " + }, + { + "latex": "$f_x(a,b) = 0$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$f_y(a,b) = 0$", + "kind": "math" + }, + { + "text": " 至少一項」,這個說法對嗎?" + } + ], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-27", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "要注意:$f_x(a,b) = 0$ 和 $f_y(a,b) = 0$ 兩者都需要同時滿足!", + "newline": "false", + "runs": [ + { + "text": "要注意:" + }, + { + "latex": "$f_x(a,b) = 0$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "和", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_y(a,b) = 0$", + "kind": "math" + }, + { + "text": " 兩者都需要同時滿足!" + } + ] + } + ], + "gate_from": "flow-27::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 鞍點", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 鞍點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "臨界點雖然是極值的候選人,但它不一定就是極值喔!也可能是鞍點(Saddle Point)——在一個方向是谷底,另一個方向卻是山頂,就像馬鞍形狀。", + "newline": "false", + "runs": [ + { + "text": "臨界點雖然是極值的候選人,但它不一定就是極值喔!也可能是" + }, + { + "text": "鞍點(Saddle Point)", + "style": "bold" + }, + { + "text": "——在一個方向是谷底,另一個方向卻是山頂,就像馬鞍形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "鞍點", + "body": [ + { + "type": "paragraph", + "content": "假如點 $(a,b)$ 滿足 $\\nabla f(a,b) = \\mathbf{0}$,且不是局部最大或最小值,則點 $(a,b)$ 是鞍點。", + "newline": "false", + "runs": [ + { + "text": "假如點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 滿足 " + }, + { + "latex": "$\\nabla f(a,b) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",且不是局部最大或最小值,則點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "鞍點", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/SaddlePoint.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c9c1c78205", + "label": "鞍點", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "kc4jmxey", + "width": "100%", + "height": "480", + "border": "0", + "caption": "鞍點", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 二階導數判別法", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 二階導數判別法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "card", + "kind": "定理", + "headline": "二階導數判別法", + "body": [ + { + "type": "paragraph", + "content": "假設 $\\nabla f(a,b) = \\mathbf{0}$,令判別式:$$\nD(a,b) = f_{xx}(a,b)\\,f_{yy}(a,b) - [f_{xy}(a,b)]^2\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$\\nabla f(a,b) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",令判別式:" + }, + { + "latex": "$$\nD(a,b) = f_{xx}(a,b)\\,f_{yy}(a,b) - [f_{xy}(a,b)]^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "局部最小值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx} > 0$", + "kind": "math" + }, + { + "text": "(凹向上,像碗狀谷底)" + } + ], + "content": "局部最小值:$D > 0$ 且 $f_{xx} > 0$(凹向上,像碗狀谷底)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "局部最大值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx} < 0$", + "kind": "math" + }, + { + "text": "(凹向下,像倒碗山頂)" + } + ], + "content": "局部最大值:$D > 0$ 且 $f_{xx} < 0$(凹向下,像倒碗山頂)" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "鞍點", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D < 0$", + "kind": "math" + }, + { + "text": "(曲率方向不一)" + } + ], + "content": "鞍點:$D < 0$(曲率方向不一)" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "無法判斷", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D = 0$", + "kind": "math" + }, + { + "text": "(需其他方法)" + } + ], + "content": "無法判斷:$D = 0$(需其他方法)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9baee64551", + "label": "關於判別式", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$D > 0$ 時,$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$,因此 $f_{xx}$ 與 $f_{yy}$ 同號,只看 $f_{xx}$ 就夠了。", + "newline": "false", + "runs": [ + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{yy}$", + "kind": "math" + }, + { + "text": " 同號,只看 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 就夠了。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:為什麼 $D > 0$ 時只需要看 $f_{xx}$ 的正負?", + "newline": "false", + "runs": [ + { + "text": "Q:為什麼 " + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 時只需要看 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 的正負?" + } + ] + }, + { + "type": "solution", + "uid": "sol_92fb551f3a", + "label": "看答案", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由 $D > 0$ 得 $f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$,所以 $f_{xx} \\cdot f_{yy} > 0$,兩者同號,看其中一個就能判斷。", + "newline": "false", + "runs": [ + { + "text": "由 " + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 得 " + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > 0$", + "kind": "math" + }, + { + "text": ",兩者同號,看其中一個就能判斷。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?\n\n\n\n\n**Step 1:計算一階偏導數**\n\n$$f_x = 2x-4, \\qquad f_y = 2y-6$$\n\n**Step 2:令 $f_x = f_y = 0$**\n\n$$2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3$$\n\n臨界點為 $(2,3)$。\n\n\n\n\n\n找臨界點的第一步是?\n\na. 直接代入 $x=0$ 與 $y=0$ 求函數值\nb. 計算二階偏導數,檢查正負號\nc. 計算一階偏導數 $f_x$ 與 $f_y$,並令它們等於 $0$\nd. 計算判別式 $D$\n\n\n\n\n$f_x = ?$\n\n\n\n\n\n$f_y = ?$\n\n\n\n\n\n令 $f_x = f_y = 0$,臨界點為?\n\na. $(2,3)$\nb. $(3,2)$\nc. $(3,4)$\nd. $(4,3)$\n\n\n\n\n\n---\n\n### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n\n\n\n$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為**局部最大值(Local Maximum)**。\n\n\n\n\n\n$D(1,2) = 16$,與 $0$ 的關係:\n\na. $D < 0$\nb. $D > 0$\nc. $D = 0$\n\n\n\n\n$f_{xx}(1,2) = -3$,與 $0$ 的關係:\n\na. $f_{xx} < 0$\nb. $f_{xx} > 0$\nc. $f_{xx} = 0$\n\n\n\n\n根據二階導數判別法,結果是?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n\n---\n\n### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。", + "newline": "false", + "runs": [ + { + "text": "請找出函數 " + }, + { + "latex": "$f(x,y) = x^2 + y^2 - 4x - 6y + 10$", + "kind": "math" + }, + { + "text": " 的所有臨界點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "臨界點為?" + } + ], + "answers": [ + "2,3" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入臨界點 x,y,用逗號隔開", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_686d63bf8f", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算一階偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算一階偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x = 2x-4, \\qquad f_y = 2y-6\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x = 2x-4, \\qquad f_y = 2y-6\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:令 $f_x = f_y = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 2:令 ", + "style": "bold" + }, + { + "latex": "$f_x = f_y = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "臨界點為 $(2,3)$。", + "newline": "false", + "runs": [ + { + "text": "臨界點為 " + }, + { + "latex": "$(2,3)$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9e0b103eb4", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-28", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-28::step-1::q1", + "prompt_runs": [ + { + "text": "找臨界點的第一步是?" + } + ], + "options": [ + { + "key": "a", + "text": "直接代入 $x=0$ 與 $y=0$ 求函數值" + }, + { + "key": "b", + "text": "計算二階偏導數,檢查正負號" + }, + { + "key": "c", + "text": "計算一階偏導數 $f_x$ 與 $f_y$,並令它們等於 $0$" + }, + { + "key": "d", + "text": "計算判別式 $D$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-28", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-28::step-2::q2", + "prompt_runs": [ + { + "latex": "$f_x = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-28", + "step": "step-2" + } + ], + "gate_from": "flow-28::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-28::step-3::q3", + "prompt_runs": [ + { + "latex": "$f_y = ?$", + "kind": "math" + } + ], + "answers": [ + "2*y-6" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-28", + "step": "step-3" + } + ], + "gate_from": "flow-28::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-28::step-4::q4", + "prompt_runs": [ + { + "text": "令 " + }, + { + "latex": "$f_x = f_y = 0$", + "kind": "math" + }, + { + "text": ",臨界點為?" + } + ], + "options": [ + { + "key": "a", + "text": "$(2,3)$" + }, + { + "key": "b", + "text": "$(3,2)$" + }, + { + "key": "c", + "text": "$(3,4)$" + }, + { + "key": "d", + "text": "$(4,3)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-28", + "step": "step-4" + } + ], + "gate_from": "flow-28::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n\n\n\n$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為**局部最大值(Local Maximum)**。\n\n\n\n\n\n$D(1,2) = 16$,與 $0$ 的關係:\n\na. $D < 0$\nb. $D > 0$\nc. $D = 0$\n\n\n\n\n$f_{xx}(1,2) = -3$,與 $0$ 的關係:\n\na. $f_{xx} < 0$\nb. $f_{xx} > 0$\nc. $f_{xx} = 0$\n\n\n\n\n根據二階導數判別法,結果是?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n\n---\n\n### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?", + "newline": "false", + "runs": [ + { + "text": "已知函數在臨界點 " + }, + { + "latex": "$(1,2)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$D(1,2) = 16$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{xx}(1,2) = -3$", + "kind": "math" + }, + { + "text": "。" + }, + { + "latex": "$f(1,2)$", + "kind": "math" + }, + { + "text": " 是什麼類型的極值?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請輸入類型(local max/min 或 saddle):" + } + ], + "answers": [ + "local maximum" + ], + "normalize": [ + "nospace" + ], + "placeholder": "local max/min 或 saddle", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_af2a979bd1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為局部最大值(Local Maximum)。", + "newline": "false", + "runs": [ + { + "latex": "$D(1,2) = 16 > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx}(1,2) = -3 < 0$", + "kind": "math" + }, + { + "text": ",因此為" + }, + { + "text": "局部最大值(Local Maximum)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_309cbea728", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-29", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-1::q1", + "prompt_runs": [ + { + "latex": "$D(1,2) = 16$", + "kind": "math" + }, + { + "text": ",與 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$D < 0$" + }, + { + "key": "b", + "text": "$D > 0$" + }, + { + "key": "c", + "text": "$D = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-29", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-2::q2", + "prompt_runs": [ + { + "latex": "$f_{xx}(1,2) = -3$", + "kind": "math" + }, + { + "text": ",與 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$f_{xx} < 0$" + }, + { + "key": "b", + "text": "$f_{xx} > 0$" + }, + { + "key": "c", + "text": "$f_{xx} = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-29", + "step": "step-2" + } + ], + "gate_from": "flow-29::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-3::q3", + "prompt_runs": [ + { + "text": "根據二階導數判別法,結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "Local Maximum(局部最大值)" + }, + { + "key": "b", + "text": "Local Minimum(局部最小值)" + }, + { + "key": "c", + "text": "Saddle Point(鞍點)" + }, + { + "key": "d", + "text": "無法判斷" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-29", + "step": "step-3" + } + ], + "gate_from": "flow-29::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f_{xx} = 4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{yy} = 5$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{xy} = 3$", + "kind": "math" + }, + { + "text": ",該函數的判別式 " + }, + { + "latex": "$D(x,y)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$D = ?$", + "kind": "math" + } + ], + "answers": [ + "11" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_14bfabbf60", + "label": "看解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$$\nD = f_{xx}f_{yy} - f_{xy}^2 = 4\\cdot5 - 3^2 = 20 - 9 = 11\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD = f_{xx}f_{yy} - f_{xy}^2 = 4\\cdot5 - 3^2 = 20 - 9 = 11\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?\n\n\n\n\n**Step 1:確認臨界點**\n\n$f_x = 2x = 0$,$f_y = -2y = 0$,代入 $(0,0)$:均為 $0$,是臨界點。\n\n**Step 2:計算二階偏導**\n\n$$f_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0$$\n\n**Step 3:計算判別式**\n\n$$D(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0$$\n\n$D < 0$,因此 $(0,0)$ 是**鞍點(Saddle Point)**。\n\n\n\n\n\n先計算一階偏導數($f(x, y) = x^2 - y^2$)。請問\n$$\nf_x=?\n$$\n\n\n\n\n再請問\n$$\nf_y=?\n$$\n\n\n\n\n\n將 $(0,0)$ 代入後,可得\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n所以 $(0,0)$ 是否為臨界點?\n\na. Yes\nb. No\n\n\n\n\n接著計算二階偏導數($f(x, y) = x^2 - y^2$)。\n\n$$\nf_{xx}=\\frac{\\partial}{\\partial x}(2x)=?\n$$\n\n\n\n\n$$\nf_{yy}=\\frac{\\partial}{\\partial y}(-2y)=?\n$$\n\n\n\n\n$$\nf_{xy}=\\frac{\\partial}{\\partial y}(2x)=?\n$$\n\n\n\n\n\n現在來計算判別式:\n$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$\n\n因此\n$$\nD(0,0)=2\\cdot(-2)-0^2=?\n$$\n\n\n\n\n\n因為\n$$\nD(0,0)=-4<0,\n$$\n所以 $(0,0)$ 的類型為何?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n答案:因為\n$$\nD(0,0)<0,\n$$\n所以 $(0,0)$ 是 **Saddle Point(鞍點)**。\n\n\n\n\n---\n\n\n註解\n§1-4 小結\n**找局部極值的流程:**\n1. 求 $f_x = 0$ 且 $f_y = 0$(或 $\\nabla f$ 不存在),找出所有臨界點\n2. 對每個臨界點計算 $D = f_{xx}f_{yy} - f_{xy}^2$\n3. 根據 $D$ 的正負和 $f_{xx}$ 的正負判斷類型\n4. $D = 0$ 時無法用此法判斷,需其他技巧\n\n\n---\n\n## 5️⃣ 絕對極值\n這一次,我們要解決的問題是:如何在一個**封閉且有界**的區域 $D$ 上,找到函數 $f(x, y)$ 的**絕對最大值**(Absolute Maximum)和**絕對最小值**(Absolute Minimum)。 \n\n工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是**絕對極值**(Absolute Maximum and Minimum Values)吧!\n\n\n定義\n絕對最大值和絕對最小值\n$f$ 在點 $(a,b)$ 有**絕對最大值** $f(a,b)$:對所有 $(x,y) \\in D$,$$f(x,y) \\leq f(a,b)$$。\n\n$f$ 在點 $(a,b)$ 有**絕對最小值** $f(a,b)$:對所有 $(x,y) \\in D$,$$f(x,y) \\geq f(a,b)$$。\n\n最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。\n\n定理\n極值定理(Extreme Value Theorem)\n若 $f(x,y)$ 在封閉(closed)且有界(bounded)的區域 $D$ 上連續,則 $f$ 一定會取得絕對最大值和絕對最小值。\n\n\n\n方法\n找封閉有界區域上的絕對極值\n令多變數函數 $z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$: \n**步驟 0:先確認區域與函數**\n- 區域 $D$ 是封閉且有界(包含邊界)。\n- 如果$f$ 在$D$上連續,則一定存在絕對最大/最小值。\n\n**步驟 1:找內部臨界點**\n- 解 $\\nabla f = \\mathbf{0}$,找出落在 $D$ 內部的解\n- 找 $\\nabla f$ 不存在的點\n- 計算這些點的函數值\n\n**步驟 2:找邊界上的候選點**\n- 把邊界降維成單變數函數,用單變數微積分找極值\n- 計算端點和極值點的函數值\n\n**步驟 3:比較所有候選點的函數值**\n- 最大的值 = 絕對最大值\n- 最小的值 = 絕對最小值\n\n\n\n\n\n\n---\n\n### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n\n\n\n**Step 1:找內部臨界點**\n\n$$f_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0$$\n\n臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。\n\n**Step 2:找邊界**\n\n**邊界 $L_1: x=0$,$0 \\leq y \\leq 4$**\n\n$$f(0,y) = 2y^2$$\n- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$\n\n**邊界 $L_2: y=0$,$0 \\leq x \\leq 4$**\n\n$$f(x,0) = x^2-4x = (x-2)^2-4$$\n- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$\n\n**邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$**\n\n$$f(x,4-x) = 3x^2-20x+32$$\n$$\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}$$\n$$f\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}$$\n\n端點:$f(0,4) = 32$,$f(4,0) = 0$\n\n**Step 3:比較所有候選值**\n\n候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$\n\n- **絕對最大值**:$32$,在 $(0,4)$\n- **絕對最小值**:$-4$,在 $(2,0)$\n\n\n\n\n\n先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。\n\n此點是否在 $D$ 的**內部**?\n\na. 是,座標為 $(2,0)$\nb. 是,座標為 $(2,1)$\nc. 否,$(2,0)$ 在邊界 $y=0$ 上\nd. 否,$(2,1)$ 不在區域內\n\n\n\n\n邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。\n\n此邊界上的最大值:\n\n\n\n\n\n邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。\n\n此邊界上的最小值:\n\n\n\n\n\n邊界 $L_3: x+y=4$,代入後得 $f = 3x^2-20x+32$,臨界點在 $x = \\dfrac{10}{3}$ 時,函數值:\n\n\n\n\n\n比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。\n\n絕對最大值:\n\n\n\n絕對最小值:\n\n\n\n- **絕對最大值** $32$,發生在 $(0,4)$\n- **絕對最小值** $-4$,發生在 $(2,0)$\n\n\n", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。", + "newline": "false", + "runs": [ + { + "text": "判斷函數 " + }, + { + "latex": "$f(x,y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": " 在臨界點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的類型。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是什麼類型的點,請輸入類型(local max/min 或 saddle)?" + } + ], + "answers": [ + "saddle point" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入類型", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e6d490cd65", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:確認臨界點", + "newline": "false", + "runs": [ + { + "text": "Step 1:確認臨界點", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$f_x = 2x = 0$,$f_y = -2y = 0$,代入 $(0,0)$:均為 $0$,是臨界點。", + "newline": "false", + "runs": [ + { + "latex": "$f_x = 2x = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = -2y = 0$", + "kind": "math" + }, + { + "text": ",代入 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ":均為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",是臨界點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算二階偏導", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算二階偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算判別式", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算判別式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$D < 0$,因此 $(0,0)$ 是鞍點(Saddle Point)。", + "newline": "false", + "runs": [ + { + "latex": "$D < 0$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "鞍點(Saddle Point)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dc6fa6643e", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-30", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-1::q1", + "prompt_runs": [ + { + "text": "先計算一階偏導數(" + }, + { + "latex": "$f(x, y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": ")。請問" + }, + { + "latex": "$$\nf_x=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "2*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-2::q2", + "prompt_runs": [ + { + "text": "再請問" + }, + { + "latex": "$$\nf_y=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-2*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-2" + } + ], + "gate_from": "flow-30::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "將 $(0,0)$ 代入後,可得$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 代入後,可得" + }, + { + "latex": "$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-30::step-3::q3", + "prompt_runs": [ + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是否為臨界點?" + } + ], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-30", + "step": "step-3" + } + ], + "gate_from": "flow-30::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "接著計算二階偏導數($f(x, y) = x^2 - y^2$)。", + "newline": "false", + "runs": [ + { + "text": "接著計算二階偏導數(" + }, + { + "latex": "$f(x, y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-4::q4", + "prompt_runs": [ + { + "latex": "$$\nf_{xx}=\\frac{\\partial}{\\partial x}(2x)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-4" + } + ], + "gate_from": "flow-30::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-5::q5", + "prompt_runs": [ + { + "latex": "$$\nf_{yy}=\\frac{\\partial}{\\partial y}(-2y)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-5" + } + ], + "gate_from": "flow-30::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-6::q6", + "prompt_runs": [ + { + "latex": "$$\nf_{xy}=\\frac{\\partial}{\\partial y}(2x)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-6" + } + ], + "gate_from": "flow-30::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "現在來計算判別式:$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$", + "newline": "false", + "runs": [ + { + "text": "現在來計算判別式:" + }, + { + "latex": "$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-7::q7", + "prompt_runs": [ + { + "text": "因此" + }, + { + "latex": "$$\nD(0,0)=2\\cdot(-2)-0^2=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-7" + } + ], + "gate_from": "flow-30::step-6::q6" + }, + { + "id": "step-8", + "title": "步驟 8", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-30::step-8::q8", + "prompt_runs": [ + { + "text": "因為" + }, + { + "latex": "$$\nD(0,0)=-4<0,\n$$", + "kind": "math_block" + }, + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的類型為何?" + } + ], + "options": [ + { + "key": "a", + "text": "Local Maximum(局部最大值)" + }, + { + "key": "b", + "text": "Local Minimum(局部最小值)" + }, + { + "key": "c", + "text": "Saddle Point(鞍點)" + }, + { + "key": "d", + "text": "無法判斷" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-30", + "step": "step-8" + } + ], + "gate_from": "flow-30::step-7::q7" + }, + { + "id": "step-9", + "title": "步驟 9", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:因為$$\nD(0,0)<0,\n$$所以 $(0,0)$ 是 Saddle Point(鞍點)。", + "newline": "false", + "runs": [ + { + "text": "答案:因為" + }, + { + "latex": "$$\nD(0,0)<0,\n$$", + "kind": "math_block" + }, + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "text": "Saddle Point(鞍點)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-30::step-8::q8" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1-4 小結", + "body": [ + { + "type": "paragraph", + "content": "找局部極值的流程:", + "newline": "false", + "runs": [ + { + "text": "找局部極值的流程:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$f_x = 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_y = 0$", + "kind": "math" + }, + { + "text": "(或 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 不存在),找出所有臨界點" + } + ], + "content": "求 $f_x = 0$ 且 $f_y = 0$(或 $\\nabla f$ 不存在),找出所有臨界點" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對每個臨界點計算 " + }, + { + "latex": "$D = f_{xx}f_{yy} - f_{xy}^2$", + "kind": "math" + } + ], + "content": "對每個臨界點計算 $D = f_{xx}f_{yy} - f_{xy}^2$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "根據 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 的正負和 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 的正負判斷類型" + } + ], + "content": "根據 $D$ 的正負和 $f_{xx}$ 的正負判斷類型" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "latex": "$D = 0$", + "kind": "math" + }, + { + "text": " 時無法用此法判斷,需其他技巧" + } + ], + "content": "$D = 0$ 時無法用此法判斷,需其他技巧" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 絕對極值", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 絕對極值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "這一次,我們要解決的問題是:如何在一個封閉且有界的區域 $D$ 上,找到函數 $f(x, y)$ 的絕對最大值(Absolute Maximum)和絕對最小值(Absolute Minimum)。 ", + "newline": "false", + "runs": [ + { + "text": "這一次,我們要解決的問題是:如何在一個" + }, + { + "text": "封閉且有界", + "style": "bold" + }, + { + "text": "的區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上,找到函數 " + }, + { + "latex": "$f(x, y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": "(Absolute Maximum)和" + }, + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": "(Absolute Minimum)。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是絕對極值(Absolute Maximum and Minimum Values)吧!", + "newline": "false", + "runs": [ + { + "text": "工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是" + }, + { + "text": "絕對極值", + "style": "bold" + }, + { + "text": "(Absolute Maximum and Minimum Values)吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "絕對最大值和絕對最小值", + "body": [ + { + "type": "paragraph", + "content": "$f$ 在點 $(a,b)$ 有絕對最大值 $f(a,b)$:對所有 $(x,y) \\in D$,$$\nf(x,y) \\leq f(a,b)\n$$。", + "newline": "false", + "runs": [ + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 有" + }, + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": ":對所有 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\nf(x,y) \\leq f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$f$ 在點 $(a,b)$ 有絕對最小值 $f(a,b)$:對所有 $(x,y) \\in D$,$$\nf(x,y) \\geq f(a,b)\n$$。", + "newline": "false", + "runs": [ + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 有" + }, + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": ":對所有 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\nf(x,y) \\geq f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。", + "newline": "false", + "runs": [ + { + "text": "最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。" + } + ] + }, + { + "type": "card", + "kind": "定理", + "headline": "極值定理(Extreme Value Theorem)", + "body": [ + { + "type": "paragraph", + "content": "若 $f(x,y)$ 在封閉(closed)且有界(bounded)的區域 $D$ 上連續,則 $f$ 一定會取得絕對最大值和絕對最小值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在封閉(closed)且有界(bounded)的區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 一定會取得絕對最大值和絕對最小值。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "方法", + "headline": "找封閉有界區域上的絕對極值", + "body": [ + { + "type": "paragraph", + "content": "令多變數函數 $z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$:\n步驟 0:先確認區域與函數", + "newline": "true", + "runs": [ + { + "text": "令多變數函數 " + }, + { + "latex": "$z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$", + "kind": "math" + }, + { + "text": ":" + }, + { + "newline": "true" + }, + { + "text": "步驟 0:先確認區域與函數", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 是封閉且有界(包含邊界)。" + } + ], + "content": "區域 $D$ 是封閉且有界(包含邊界)。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "如果" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在" + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": "上連續,則一定存在絕對最大/最小值。" + } + ], + "content": "如果$f$ 在$D$上連續,則一定存在絕對最大/最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 1:找內部臨界點", + "newline": "false", + "runs": [ + { + "text": "步驟 1:找內部臨界點", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "解 " + }, + { + "latex": "$\\nabla f = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",找出落在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 內部的解" + } + ], + "content": "解 $\\nabla f = \\mathbf{0}$,找出落在 $D$ 內部的解" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "找 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 不存在的點" + } + ], + "content": "找 $\\nabla f$ 不存在的點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算這些點的函數值" + } + ], + "content": "計算這些點的函數值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 2:找邊界上的候選點", + "newline": "false", + "runs": [ + { + "text": "步驟 2:找邊界上的候選點", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "把邊界降維成單變數函數,用單變數微積分找極值" + } + ], + "content": "把邊界降維成單變數函數,用單變數微積分找極值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算端點和極值點的函數值" + } + ], + "content": "計算端點和極值點的函數值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 3:比較所有候選點的函數值", + "newline": "false", + "runs": [ + { + "text": "步驟 3:比較所有候選點的函數值", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大的值 = 絕對最大值" + } + ], + "content": "最大的值 = 絕對最大值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最小的值 = 絕對最小值" + } + ], + "content": "最小的值 = 絕對最小值" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5435326067", + "label": "Geogebra", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "rp5abnpd", + "width": "100%", + "height": "480", + "border": "0", + "caption": "找絕對極值", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n\n\n\n**Step 1:找內部臨界點**\n\n$$f_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0$$\n\n臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。\n\n**Step 2:找邊界**\n\n**邊界 $L_1: x=0$,$0 \\leq y \\leq 4$**\n\n$$f(0,y) = 2y^2$$\n- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$\n\n**邊界 $L_2: y=0$,$0 \\leq x \\leq 4$**\n\n$$f(x,0) = x^2-4x = (x-2)^2-4$$\n- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$\n\n**邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$**\n\n$$f(x,4-x) = 3x^2-20x+32$$\n$$\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}$$\n$$f\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}$$\n\n端點:$f(0,4) = 32$,$f(4,0) = 0$\n\n**Step 3:比較所有候選值**\n\n候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$\n\n- **絕對最大值**:$32$,在 $(0,4)$\n- **絕對最小值**:$-4$,在 $(2,0)$\n\n\n\n\n\n先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。\n\n此點是否在 $D$ 的**內部**?\n\na. 是,座標為 $(2,0)$\nb. 是,座標為 $(2,1)$\nc. 否,$(2,0)$ 在邊界 $y=0$ 上\nd. 否,$(2,1)$ 不在區域內\n\n\n\n\n邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。\n\n此邊界上的最大值:\n\n\n\n\n\n邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。\n\n此邊界上的最小值:\n\n\n\n\n\n邊界 $L_3: x+y=4$,代入後得 $f = 3x^2-20x+32$,臨界點在 $x = \\dfrac{10}{3}$ 時,函數值:\n\n\n\n\n\n比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。\n\n絕對最大值:\n\n\n\n絕對最小值:\n\n\n\n- **絕對最大值** $32$,發生在 $(0,4)$\n- **絕對最小值** $-4$,發生在 $(2,0)$\n\n\n", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。", + "newline": "false", + "runs": [ + { + "text": "找函數 " + }, + { + "latex": "$f(x,y) = x^2 + 2y^2 - 4x$", + "kind": "math" + }, + { + "text": " 在封閉三角區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": "(由 " + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$x+y=4$", + "kind": "math" + }, + { + "text": " 圍成)的絕對最大值和最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "絕對最大值為:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "絕對最小值為:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_339a5b6b39", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:找內部臨界點", + "newline": "false", + "runs": [ + { + "text": "Step 1:找內部臨界點", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。", + "newline": "false", + "runs": [ + { + "text": "臨界點 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + }, + { + "text": " 在邊界 " + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": " 上,不在內部,跳過。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:找邊界", + "newline": "false", + "runs": [ + { + "text": "Step 2:找邊界", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_1: x=0$,$0 \\leq y \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_1: x=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq y \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(0,y) = 2y^2\n$$- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(0,y) = 2y^2\n$$", + "kind": "math_block" + }, + { + "text": "- 最小:" + }, + { + "latex": "$f(0,0) = 0$", + "kind": "math" + }, + { + "text": ";最大:" + }, + { + "latex": "$f(0,4) = 32$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_2: y=0$,$0 \\leq x \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_2: y=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq x \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,0) = x^2-4x = (x-2)^2-4\n$$- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,0) = x^2-4x = (x-2)^2-4\n$$", + "kind": "math_block" + }, + { + "text": "- 最小:" + }, + { + "latex": "$f(2,0) = -4$", + "kind": "math" + }, + { + "text": ";端點:" + }, + { + "latex": "$f(0,0) = f(4,0) = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_3: x+y=4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",令 ", + "style": "bold" + }, + { + "latex": "$y=4-x$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq x \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,4-x) = 3x^2-20x+32\n$$$$\n\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}\n$$$$\nf\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,4-x) = 3x^2-20x+32\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "端點:$f(0,4) = 32$,$f(4,0) = 0$", + "newline": "false", + "runs": [ + { + "text": "端點:" + }, + { + "latex": "$f(0,4) = 32$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(4,0) = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:比較所有候選值", + "newline": "false", + "runs": [ + { + "text": "Step 3:比較所有候選值", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$", + "newline": "false", + "runs": [ + { + "text": "候選值:" + }, + { + "latex": "$0, 32, -4, 0, -\\dfrac{4}{3}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$32$", + "kind": "math" + }, + { + "text": ",在 " + }, + { + "latex": "$(0,4)$", + "kind": "math" + } + ], + "content": "絕對最大值:$32$,在 $(0,4)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$-4$", + "kind": "math" + }, + { + "text": ",在 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + } + ], + "content": "絕對最小值:$-4$,在 $(2,0)$" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_db148c4569", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-31", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。", + "newline": "false", + "runs": [ + { + "text": "先求內部臨界點:" + }, + { + "latex": "$f_x = 2x-4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = 4y$", + "kind": "math" + }, + { + "text": ",令兩者為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",得 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-31::step-1::q1", + "prompt_runs": [ + { + "text": "此點是否在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "內部", + "style": "bold" + }, + { + "text": "?" + } + ], + "options": [ + { + "key": "a", + "text": "是,座標為 $(2,0)$" + }, + { + "key": "b", + "text": "是,座標為 $(2,1)$" + }, + { + "key": "c", + "text": "否,$(2,0)$ 在邊界 $y=0$ 上" + }, + { + "key": "d", + "text": "否,$(2,1)$ 不在區域內" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-31", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。", + "newline": "false", + "runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_1: x=0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(0,y) = 2y^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$0 \\leq y \\leq 4$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-2::q2", + "prompt_runs": [ + { + "text": "此邊界上的最大值:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-2" + } + ], + "gate_from": "flow-31::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。", + "newline": "false", + "runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_2: y=0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,0) = (x-2)^2-4$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-3::q3", + "prompt_runs": [ + { + "text": "此邊界上的最小值:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-3" + } + ], + "gate_from": "flow-31::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-4::q4", + "prompt_runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_3: x+y=4$", + "kind": "math" + }, + { + "text": ",代入後得 " + }, + { + "latex": "$f = 3x^2-20x+32$", + "kind": "math" + }, + { + "text": ",臨界點在 " + }, + { + "latex": "$x = \\dfrac{10}{3}$", + "kind": "math" + }, + { + "text": " 時,函數值:" + } + ], + "answers": [ + "-4/3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-4" + } + ], + "gate_from": "flow-31::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。", + "newline": "false", + "runs": [ + { + "text": "比較所有候選值 " + }, + { + "latex": "$\\{0, 32, -4, 0, -\\frac{4}{3}\\}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-5::q5", + "prompt_runs": [ + { + "text": "絕對最大值:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-5" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-5::q6", + "prompt_runs": [ + { + "text": "絕對最小值:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-5" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$32$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(0,4)$", + "kind": "math" + } + ], + "content": "絕對最大值 $32$,發生在 $(0,4)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$-4$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + } + ], + "content": "絕對最小值 $-4$,發生在 $(2,0)$" + } + ] + } + ], + "gate_from": "flow-31::step-4::q4" + } + ] + } + ] + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "極值", + "newline": "true", + "runs": [ + { + "text": "極值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "在上一節我們一直在問一個「局部」的問題:" + }, + { + "text": "如果我站在某一點上,往哪個方向走會上升最快?此時的最大上升率是多少?", + "style": "bold" + }, + { + "newline": "true" + } + ], + "options": [ + { + "key": "a", + "text": "沿著梯度 $\\nabla f(x_0,y_0)$ 的方向走上升最快;最大上升率為 $\\|\\nabla f(x_0,y_0)\\|$。" + }, + { + "key": "b", + "text": "沿著負梯度 $-\\nabla f(x_0,y_0)$ 的方向走上升最快;最大上升率為 $\\|\\nabla f(x_0,y_0)\\|$。" + }, + { + "key": "c", + "text": "沿著等高線($f(x,y)=c$)在該點的切線方向走上升最快;最大上升率為 $0$。" + }, + { + "key": "d", + "text": "沿著偏導數較大的軸向走($f_x$ 大就往 $x$ 軸正向、$f_y$ 大就往 $y$ 軸正向);最大上升率為 $\\max\\{|f_x|,|f_y|\\}$。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這一節要看:哪裡是最高點?哪裡是最低點?", + "newline": "false", + "runs": [ + { + "text": "這一節要看:" + }, + { + "text": "哪裡是最高點?哪裡是最低點?", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 局部最大值和局部最小值", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 局部最大值和局部最小值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "card", + "kind": "定義", + "headline": "局部最大值和局部最小值", + "body": [ + { + "type": "paragraph", + "content": "對一個雙變數函數 $z = f(x,y)$:", + "newline": "false", + "runs": [ + { + "text": "對一個雙變數函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "局部最大值(local maximum)", + "style": "bold" + }, + { + "text": "發生在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ":當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y) \\leq f(a,b)$", + "kind": "math" + } + ], + "content": "局部最大值(local maximum)發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \\leq f(a,b)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "局部最小值(local minimum)", + "style": "bold" + }, + { + "text": "發生在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ":當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y) \\geq f(a,b)$", + "kind": "math" + } + ], + "content": "局部最小值(local minimum)發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \\geq f(a,b)$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/maximum.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 臨界點", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 臨界點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "那要如何找到這些極值呢?", + "newline": "false", + "runs": [ + { + "text": "那要如何找到這些極值呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們不會漫無目的地找,而是先找出可能出現極值的「候選點」,也就是\\textbf{臨界點}。", + "newline": "false", + "runs": [ + { + "text": "我們不會漫無目的地找,而是先找出可能出現極值的「候選點」,也就是\\textbf{臨界點}。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對二變數函數 $f(x,y)$ 來說,梯度 $\\nabla f(x,y)$ 表示函數上升最快的方向,而它的長度 $\\|\\nabla f(x,y)\\|$ 表示最快上升率。", + "newline": "false", + "runs": [ + { + "text": "對二變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 來說,梯度 " + }, + { + "latex": "$\\nabla f(x,y)$", + "kind": "math" + }, + { + "text": " 表示函數上升最快的方向,而它的長度 " + }, + { + "latex": "$\\|\\nabla f(x,y)\\|$", + "kind": "math" + }, + { + "text": " 表示最快上升率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果在某一點 $(x_0,y_0)$,最快上升率為 $0$,也就是 $\\|\\nabla f(x_0,y_0)\\|=0$,等價於 $\\nabla f(x_0,y_0)=0$,也就是 $f_x(x_0,y_0)=0,\\ f_y(x_0,y_0)=0$。", + "newline": "false", + "runs": [ + { + "text": "如果在某一點 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": ",最快上升率為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",也就是 " + }, + { + "latex": "$\\|\\nabla f(x_0,y_0)\\|=0$", + "kind": "math" + }, + { + "text": ",等價於 " + }, + { + "latex": "$\\nabla f(x_0,y_0)=0$", + "kind": "math" + }, + { + "text": ",也就是 " + }, + { + "latex": "$f_x(x_0,y_0)=0,\\ f_y(x_0,y_0)=0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這種點稱為臨界點。", + "newline": "false", + "runs": [ + { + "text": "這種點稱為" + }, + { + "text": "臨界點", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此外,如果某點的偏導數不存在,或函數在該點不可微,也可能出現極值,因此也需要列入候選點。", + "newline": "false", + "runs": [ + { + "text": "此外,如果某點的偏導數不存在,或函數在該點不可微,也可能出現極值,因此也需要列入候選點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以,尋找極值時,我們通常先找 $\\nabla f(x,y)=0$ 或 $\\nabla f(x,y)$ 不存在的點,作為極值的候選點。", + "newline": "false", + "runs": [ + { + "text": "所以,尋找極值時,我們通常先找 " + }, + { + "latex": "$\\nabla f(x,y)=0$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$\\nabla f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在的點,作為極值的候選點。" + } + ] + }, + { + "type": "card", + "kind": "定義", + "headline": "臨界點", + "body": [ + { + "type": "paragraph", + "content": "對 $f(x,y)$,若 $(x_0,y_0)$ 是內部點,且滿足下面任一條,就叫做臨界點(critical point):", + "newline": "false", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 是內部點,且滿足下面任一條,就叫做" + }, + { + "text": "臨界點(critical point)", + "style": "bold" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\nabla f(x_0,y_0) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": "(可微且梯度為零)" + } + ], + "content": "$\\nabla f(x_0,y_0) = \\mathbf{0}$(可微且梯度為零)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\nabla f(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 不存在(不可微或偏導數不存在)" + } + ], + "content": "$\\nabla f(x_0,y_0)$ 不存在(不可微或偏導數不存在)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "flow", + "id": "flow-27", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-27::step-1::q1", + "prompt_runs": [ + { + "text": "「函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的臨界點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須滿足 " + }, + { + "latex": "$f_x(a,b) = 0$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$f_y(a,b) = 0$", + "kind": "math" + }, + { + "text": " 至少一項」,這個說法對嗎?" + } + ], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-27", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "要注意:$f_x(a,b) = 0$ 和 $f_y(a,b) = 0$ 兩者都需要同時滿足!", + "newline": "false", + "runs": [ + { + "text": "要注意:" + }, + { + "latex": "$f_x(a,b) = 0$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "和", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_y(a,b) = 0$", + "kind": "math" + }, + { + "text": " 兩者都需要同時滿足!" + } + ] + } + ], + "gate_from": "flow-27::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 鞍點", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 鞍點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "臨界點雖然是極值的候選人,但它不一定就是極值喔!也可能是鞍點(Saddle Point)——在一個方向是谷底,另一個方向卻是山頂,就像馬鞍形狀。", + "newline": "false", + "runs": [ + { + "text": "臨界點雖然是極值的候選人,但它不一定就是極值喔!也可能是" + }, + { + "text": "鞍點(Saddle Point)", + "style": "bold" + }, + { + "text": "——在一個方向是谷底,另一個方向卻是山頂,就像馬鞍形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "鞍點", + "body": [ + { + "type": "paragraph", + "content": "假如點 $(a,b)$ 滿足 $\\nabla f(a,b) = \\mathbf{0}$,且不是局部最大或最小值,則點 $(a,b)$ 是鞍點。", + "newline": "false", + "runs": [ + { + "text": "假如點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 滿足 " + }, + { + "latex": "$\\nabla f(a,b) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",且不是局部最大或最小值,則點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "鞍點", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/SaddlePoint.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c9c1c78205", + "label": "鞍點", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "kc4jmxey", + "width": "100%", + "height": "480", + "border": "0", + "caption": "鞍點", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "4️⃣ 二階導數判別法", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 二階導數判別法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "card", + "kind": "定理", + "headline": "二階導數判別法", + "body": [ + { + "type": "paragraph", + "content": "假設 $\\nabla f(a,b) = \\mathbf{0}$,令判別式:$$\nD(a,b) = f_{xx}(a,b)\\,f_{yy}(a,b) - [f_{xy}(a,b)]^2\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$\\nabla f(a,b) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",令判別式:" + }, + { + "latex": "$$\nD(a,b) = f_{xx}(a,b)\\,f_{yy}(a,b) - [f_{xy}(a,b)]^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "局部最小值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx} > 0$", + "kind": "math" + }, + { + "text": "(凹向上,像碗狀谷底)" + } + ], + "content": "局部最小值:$D > 0$ 且 $f_{xx} > 0$(凹向上,像碗狀谷底)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "局部最大值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx} < 0$", + "kind": "math" + }, + { + "text": "(凹向下,像倒碗山頂)" + } + ], + "content": "局部最大值:$D > 0$ 且 $f_{xx} < 0$(凹向下,像倒碗山頂)" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "鞍點", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D < 0$", + "kind": "math" + }, + { + "text": "(曲率方向不一)" + } + ], + "content": "鞍點:$D < 0$(曲率方向不一)" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "無法判斷", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D = 0$", + "kind": "math" + }, + { + "text": "(需其他方法)" + } + ], + "content": "無法判斷:$D = 0$(需其他方法)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9baee64551", + "label": "關於判別式", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$D > 0$ 時,$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$,因此 $f_{xx}$ 與 $f_{yy}$ 同號,只看 $f_{xx}$ 就夠了。", + "newline": "false", + "runs": [ + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{yy}$", + "kind": "math" + }, + { + "text": " 同號,只看 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 就夠了。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:為什麼 $D > 0$ 時只需要看 $f_{xx}$ 的正負?", + "newline": "false", + "runs": [ + { + "text": "Q:為什麼 " + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 時只需要看 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 的正負?" + } + ] + }, + { + "type": "solution", + "uid": "sol_92fb551f3a", + "label": "看答案", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由 $D > 0$ 得 $f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$,所以 $f_{xx} \\cdot f_{yy} > 0$,兩者同號,看其中一個就能判斷。", + "newline": "false", + "runs": [ + { + "text": "由 " + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 得 " + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > 0$", + "kind": "math" + }, + { + "text": ",兩者同號,看其中一個就能判斷。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?\n\n\n\n\n**Step 1:計算一階偏導數**\n\n$$f_x = 2x-4, \\qquad f_y = 2y-6$$\n\n**Step 2:令 $f_x = f_y = 0$**\n\n$$2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3$$\n\n臨界點為 $(2,3)$。\n\n\n\n\n\n找臨界點的第一步是?\n\na. 直接代入 $x=0$ 與 $y=0$ 求函數值\nb. 計算二階偏導數,檢查正負號\nc. 計算一階偏導數 $f_x$ 與 $f_y$,並令它們等於 $0$\nd. 計算判別式 $D$\n\n\n\n\n$f_x = ?$\n\n\n\n\n\n$f_y = ?$\n\n\n\n\n\n令 $f_x = f_y = 0$,臨界點為?\n\na. $(2,3)$\nb. $(3,2)$\nc. $(3,4)$\nd. $(4,3)$\n\n\n\n\n\n---\n\n### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n\n\n\n$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為**局部最大值(Local Maximum)**。\n\n\n\n\n\n$D(1,2) = 16$,與 $0$ 的關係:\n\na. $D < 0$\nb. $D > 0$\nc. $D = 0$\n\n\n\n\n$f_{xx}(1,2) = -3$,與 $0$ 的關係:\n\na. $f_{xx} < 0$\nb. $f_{xx} > 0$\nc. $f_{xx} = 0$\n\n\n\n\n根據二階導數判別法,結果是?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n\n---\n\n### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。", + "newline": "false", + "runs": [ + { + "text": "請找出函數 " + }, + { + "latex": "$f(x,y) = x^2 + y^2 - 4x - 6y + 10$", + "kind": "math" + }, + { + "text": " 的所有臨界點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "臨界點為?" + } + ], + "answers": [ + "2,3" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入臨界點 x,y,用逗號隔開", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_686d63bf8f", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算一階偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算一階偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x = 2x-4, \\qquad f_y = 2y-6\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x = 2x-4, \\qquad f_y = 2y-6\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:令 $f_x = f_y = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 2:令 ", + "style": "bold" + }, + { + "latex": "$f_x = f_y = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "臨界點為 $(2,3)$。", + "newline": "false", + "runs": [ + { + "text": "臨界點為 " + }, + { + "latex": "$(2,3)$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9e0b103eb4", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-28", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-28::step-1::q1", + "prompt_runs": [ + { + "text": "找臨界點的第一步是?" + } + ], + "options": [ + { + "key": "a", + "text": "直接代入 $x=0$ 與 $y=0$ 求函數值" + }, + { + "key": "b", + "text": "計算二階偏導數,檢查正負號" + }, + { + "key": "c", + "text": "計算一階偏導數 $f_x$ 與 $f_y$,並令它們等於 $0$" + }, + { + "key": "d", + "text": "計算判別式 $D$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-28", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-28::step-2::q2", + "prompt_runs": [ + { + "latex": "$f_x = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-28", + "step": "step-2" + } + ], + "gate_from": "flow-28::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-28::step-3::q3", + "prompt_runs": [ + { + "latex": "$f_y = ?$", + "kind": "math" + } + ], + "answers": [ + "2*y-6" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-28", + "step": "step-3" + } + ], + "gate_from": "flow-28::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-28::step-4::q4", + "prompt_runs": [ + { + "text": "令 " + }, + { + "latex": "$f_x = f_y = 0$", + "kind": "math" + }, + { + "text": ",臨界點為?" + } + ], + "options": [ + { + "key": "a", + "text": "$(2,3)$" + }, + { + "key": "b", + "text": "$(3,2)$" + }, + { + "key": "c", + "text": "$(3,4)$" + }, + { + "key": "d", + "text": "$(4,3)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-28", + "step": "step-4" + } + ], + "gate_from": "flow-28::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n\n\n\n$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為**局部最大值(Local Maximum)**。\n\n\n\n\n\n$D(1,2) = 16$,與 $0$ 的關係:\n\na. $D < 0$\nb. $D > 0$\nc. $D = 0$\n\n\n\n\n$f_{xx}(1,2) = -3$,與 $0$ 的關係:\n\na. $f_{xx} < 0$\nb. $f_{xx} > 0$\nc. $f_{xx} = 0$\n\n\n\n\n根據二階導數判別法,結果是?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n\n---\n\n### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?", + "newline": "false", + "runs": [ + { + "text": "已知函數在臨界點 " + }, + { + "latex": "$(1,2)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$D(1,2) = 16$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{xx}(1,2) = -3$", + "kind": "math" + }, + { + "text": "。" + }, + { + "latex": "$f(1,2)$", + "kind": "math" + }, + { + "text": " 是什麼類型的極值?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請輸入類型(local max/min 或 saddle):" + } + ], + "answers": [ + "local maximum" + ], + "normalize": [ + "nospace" + ], + "placeholder": "local max/min 或 saddle", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_af2a979bd1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為局部最大值(Local Maximum)。", + "newline": "false", + "runs": [ + { + "latex": "$D(1,2) = 16 > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx}(1,2) = -3 < 0$", + "kind": "math" + }, + { + "text": ",因此為" + }, + { + "text": "局部最大值(Local Maximum)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_309cbea728", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-29", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-1::q1", + "prompt_runs": [ + { + "latex": "$D(1,2) = 16$", + "kind": "math" + }, + { + "text": ",與 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$D < 0$" + }, + { + "key": "b", + "text": "$D > 0$" + }, + { + "key": "c", + "text": "$D = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-29", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-2::q2", + "prompt_runs": [ + { + "latex": "$f_{xx}(1,2) = -3$", + "kind": "math" + }, + { + "text": ",與 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$f_{xx} < 0$" + }, + { + "key": "b", + "text": "$f_{xx} > 0$" + }, + { + "key": "c", + "text": "$f_{xx} = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-29", + "step": "step-2" + } + ], + "gate_from": "flow-29::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-3::q3", + "prompt_runs": [ + { + "text": "根據二階導數判別法,結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "Local Maximum(局部最大值)" + }, + { + "key": "b", + "text": "Local Minimum(局部最小值)" + }, + { + "key": "c", + "text": "Saddle Point(鞍點)" + }, + { + "key": "d", + "text": "無法判斷" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-29", + "step": "step-3" + } + ], + "gate_from": "flow-29::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f_{xx} = 4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{yy} = 5$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{xy} = 3$", + "kind": "math" + }, + { + "text": ",該函數的判別式 " + }, + { + "latex": "$D(x,y)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$D = ?$", + "kind": "math" + } + ], + "answers": [ + "11" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_14bfabbf60", + "label": "看解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$$\nD = f_{xx}f_{yy} - f_{xy}^2 = 4\\cdot5 - 3^2 = 20 - 9 = 11\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD = f_{xx}f_{yy} - f_{xy}^2 = 4\\cdot5 - 3^2 = 20 - 9 = 11\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?\n\n\n\n\n**Step 1:確認臨界點**\n\n$f_x = 2x = 0$,$f_y = -2y = 0$,代入 $(0,0)$:均為 $0$,是臨界點。\n\n**Step 2:計算二階偏導**\n\n$$f_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0$$\n\n**Step 3:計算判別式**\n\n$$D(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0$$\n\n$D < 0$,因此 $(0,0)$ 是**鞍點(Saddle Point)**。\n\n\n\n\n\n先計算一階偏導數($f(x, y) = x^2 - y^2$)。請問\n$$\nf_x=?\n$$\n\n\n\n\n再請問\n$$\nf_y=?\n$$\n\n\n\n\n\n將 $(0,0)$ 代入後,可得\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n所以 $(0,0)$ 是否為臨界點?\n\na. Yes\nb. No\n\n\n\n\n接著計算二階偏導數($f(x, y) = x^2 - y^2$)。\n\n$$\nf_{xx}=\\frac{\\partial}{\\partial x}(2x)=?\n$$\n\n\n\n\n$$\nf_{yy}=\\frac{\\partial}{\\partial y}(-2y)=?\n$$\n\n\n\n\n$$\nf_{xy}=\\frac{\\partial}{\\partial y}(2x)=?\n$$\n\n\n\n\n\n現在來計算判別式:\n$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$\n\n因此\n$$\nD(0,0)=2\\cdot(-2)-0^2=?\n$$\n\n\n\n\n\n因為\n$$\nD(0,0)=-4<0,\n$$\n所以 $(0,0)$ 的類型為何?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n答案:因為\n$$\nD(0,0)<0,\n$$\n所以 $(0,0)$ 是 **Saddle Point(鞍點)**。\n\n\n\n\n---\n\n\n註解\n§1-4 小結\n**找局部極值的流程:**\n1. 求 $f_x = 0$ 且 $f_y = 0$(或 $\\nabla f$ 不存在),找出所有臨界點\n2. 對每個臨界點計算 $D = f_{xx}f_{yy} - f_{xy}^2$\n3. 根據 $D$ 的正負和 $f_{xx}$ 的正負判斷類型\n4. $D = 0$ 時無法用此法判斷,需其他技巧\n\n\n---\n\n## 5️⃣ 絕對極值\n這一次,我們要解決的問題是:如何在一個**封閉且有界**的區域 $D$ 上,找到函數 $f(x, y)$ 的**絕對最大值**(Absolute Maximum)和**絕對最小值**(Absolute Minimum)。 \n\n工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是**絕對極值**(Absolute Maximum and Minimum Values)吧!\n\n\n定義\n絕對最大值和絕對最小值\n$f$ 在點 $(a,b)$ 有**絕對最大值** $f(a,b)$:對所有 $(x,y) \\in D$,$$f(x,y) \\leq f(a,b)$$。\n\n$f$ 在點 $(a,b)$ 有**絕對最小值** $f(a,b)$:對所有 $(x,y) \\in D$,$$f(x,y) \\geq f(a,b)$$。\n\n最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。\n\n定理\n極值定理(Extreme Value Theorem)\n若 $f(x,y)$ 在封閉(closed)且有界(bounded)的區域 $D$ 上連續,則 $f$ 一定會取得絕對最大值和絕對最小值。\n\n\n\n方法\n找封閉有界區域上的絕對極值\n令多變數函數 $z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$: \n**步驟 0:先確認區域與函數**\n- 區域 $D$ 是封閉且有界(包含邊界)。\n- 如果$f$ 在$D$上連續,則一定存在絕對最大/最小值。\n\n**步驟 1:找內部臨界點**\n- 解 $\\nabla f = \\mathbf{0}$,找出落在 $D$ 內部的解\n- 找 $\\nabla f$ 不存在的點\n- 計算這些點的函數值\n\n**步驟 2:找邊界上的候選點**\n- 把邊界降維成單變數函數,用單變數微積分找極值\n- 計算端點和極值點的函數值\n\n**步驟 3:比較所有候選點的函數值**\n- 最大的值 = 絕對最大值\n- 最小的值 = 絕對最小值\n\n\n\n\n\n\n---\n\n### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n\n\n\n**Step 1:找內部臨界點**\n\n$$f_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0$$\n\n臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。\n\n**Step 2:找邊界**\n\n**邊界 $L_1: x=0$,$0 \\leq y \\leq 4$**\n\n$$f(0,y) = 2y^2$$\n- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$\n\n**邊界 $L_2: y=0$,$0 \\leq x \\leq 4$**\n\n$$f(x,0) = x^2-4x = (x-2)^2-4$$\n- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$\n\n**邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$**\n\n$$f(x,4-x) = 3x^2-20x+32$$\n$$\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}$$\n$$f\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}$$\n\n端點:$f(0,4) = 32$,$f(4,0) = 0$\n\n**Step 3:比較所有候選值**\n\n候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$\n\n- **絕對最大值**:$32$,在 $(0,4)$\n- **絕對最小值**:$-4$,在 $(2,0)$\n\n\n\n\n\n先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。\n\n此點是否在 $D$ 的**內部**?\n\na. 是,座標為 $(2,0)$\nb. 是,座標為 $(2,1)$\nc. 否,$(2,0)$ 在邊界 $y=0$ 上\nd. 否,$(2,1)$ 不在區域內\n\n\n\n\n邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。\n\n此邊界上的最大值:\n\n\n\n\n\n邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。\n\n此邊界上的最小值:\n\n\n\n\n\n邊界 $L_3: x+y=4$,代入後得 $f = 3x^2-20x+32$,臨界點在 $x = \\dfrac{10}{3}$ 時,函數值:\n\n\n\n\n\n比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。\n\n絕對最大值:\n\n\n\n絕對最小值:\n\n\n\n- **絕對最大值** $32$,發生在 $(0,4)$\n- **絕對最小值** $-4$,發生在 $(2,0)$\n\n\n", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。", + "newline": "false", + "runs": [ + { + "text": "判斷函數 " + }, + { + "latex": "$f(x,y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": " 在臨界點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的類型。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是什麼類型的點,請輸入類型(local max/min 或 saddle)?" + } + ], + "answers": [ + "saddle point" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入類型", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e6d490cd65", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:確認臨界點", + "newline": "false", + "runs": [ + { + "text": "Step 1:確認臨界點", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$f_x = 2x = 0$,$f_y = -2y = 0$,代入 $(0,0)$:均為 $0$,是臨界點。", + "newline": "false", + "runs": [ + { + "latex": "$f_x = 2x = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = -2y = 0$", + "kind": "math" + }, + { + "text": ",代入 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ":均為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",是臨界點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算二階偏導", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算二階偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算判別式", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算判別式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$D < 0$,因此 $(0,0)$ 是鞍點(Saddle Point)。", + "newline": "false", + "runs": [ + { + "latex": "$D < 0$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "鞍點(Saddle Point)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dc6fa6643e", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-30", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-1::q1", + "prompt_runs": [ + { + "text": "先計算一階偏導數(" + }, + { + "latex": "$f(x, y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": ")。請問" + }, + { + "latex": "$$\nf_x=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "2*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-2::q2", + "prompt_runs": [ + { + "text": "再請問" + }, + { + "latex": "$$\nf_y=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-2*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-2" + } + ], + "gate_from": "flow-30::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "將 $(0,0)$ 代入後,可得$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 代入後,可得" + }, + { + "latex": "$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-30::step-3::q3", + "prompt_runs": [ + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是否為臨界點?" + } + ], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-30", + "step": "step-3" + } + ], + "gate_from": "flow-30::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "接著計算二階偏導數($f(x, y) = x^2 - y^2$)。", + "newline": "false", + "runs": [ + { + "text": "接著計算二階偏導數(" + }, + { + "latex": "$f(x, y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-4::q4", + "prompt_runs": [ + { + "latex": "$$\nf_{xx}=\\frac{\\partial}{\\partial x}(2x)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-4" + } + ], + "gate_from": "flow-30::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-5::q5", + "prompt_runs": [ + { + "latex": "$$\nf_{yy}=\\frac{\\partial}{\\partial y}(-2y)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-5" + } + ], + "gate_from": "flow-30::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-6::q6", + "prompt_runs": [ + { + "latex": "$$\nf_{xy}=\\frac{\\partial}{\\partial y}(2x)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-6" + } + ], + "gate_from": "flow-30::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "現在來計算判別式:$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$", + "newline": "false", + "runs": [ + { + "text": "現在來計算判別式:" + }, + { + "latex": "$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-7::q7", + "prompt_runs": [ + { + "text": "因此" + }, + { + "latex": "$$\nD(0,0)=2\\cdot(-2)-0^2=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-7" + } + ], + "gate_from": "flow-30::step-6::q6" + }, + { + "id": "step-8", + "title": "步驟 8", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-30::step-8::q8", + "prompt_runs": [ + { + "text": "因為" + }, + { + "latex": "$$\nD(0,0)=-4<0,\n$$", + "kind": "math_block" + }, + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的類型為何?" + } + ], + "options": [ + { + "key": "a", + "text": "Local Maximum(局部最大值)" + }, + { + "key": "b", + "text": "Local Minimum(局部最小值)" + }, + { + "key": "c", + "text": "Saddle Point(鞍點)" + }, + { + "key": "d", + "text": "無法判斷" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-30", + "step": "step-8" + } + ], + "gate_from": "flow-30::step-7::q7" + }, + { + "id": "step-9", + "title": "步驟 9", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:因為$$\nD(0,0)<0,\n$$所以 $(0,0)$ 是 Saddle Point(鞍點)。", + "newline": "false", + "runs": [ + { + "text": "答案:因為" + }, + { + "latex": "$$\nD(0,0)<0,\n$$", + "kind": "math_block" + }, + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "text": "Saddle Point(鞍點)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-30::step-8::q8" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1-4 小結", + "body": [ + { + "type": "paragraph", + "content": "找局部極值的流程:", + "newline": "false", + "runs": [ + { + "text": "找局部極值的流程:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$f_x = 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_y = 0$", + "kind": "math" + }, + { + "text": "(或 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 不存在),找出所有臨界點" + } + ], + "content": "求 $f_x = 0$ 且 $f_y = 0$(或 $\\nabla f$ 不存在),找出所有臨界點" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對每個臨界點計算 " + }, + { + "latex": "$D = f_{xx}f_{yy} - f_{xy}^2$", + "kind": "math" + } + ], + "content": "對每個臨界點計算 $D = f_{xx}f_{yy} - f_{xy}^2$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "根據 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 的正負和 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 的正負判斷類型" + } + ], + "content": "根據 $D$ 的正負和 $f_{xx}$ 的正負判斷類型" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "latex": "$D = 0$", + "kind": "math" + }, + { + "text": " 時無法用此法判斷,需其他技巧" + } + ], + "content": "$D = 0$ 時無法用此法判斷,需其他技巧" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "5️⃣ 絕對極值", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 絕對極值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "這一次,我們要解決的問題是:如何在一個封閉且有界的區域 $D$ 上,找到函數 $f(x, y)$ 的絕對最大值(Absolute Maximum)和絕對最小值(Absolute Minimum)。 ", + "newline": "false", + "runs": [ + { + "text": "這一次,我們要解決的問題是:如何在一個" + }, + { + "text": "封閉且有界", + "style": "bold" + }, + { + "text": "的區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上,找到函數 " + }, + { + "latex": "$f(x, y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": "(Absolute Maximum)和" + }, + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": "(Absolute Minimum)。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是絕對極值(Absolute Maximum and Minimum Values)吧!", + "newline": "false", + "runs": [ + { + "text": "工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是" + }, + { + "text": "絕對極值", + "style": "bold" + }, + { + "text": "(Absolute Maximum and Minimum Values)吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "絕對最大值和絕對最小值", + "body": [ + { + "type": "paragraph", + "content": "$f$ 在點 $(a,b)$ 有絕對最大值 $f(a,b)$:對所有 $(x,y) \\in D$,$$\nf(x,y) \\leq f(a,b)\n$$。", + "newline": "false", + "runs": [ + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 有" + }, + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": ":對所有 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\nf(x,y) \\leq f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$f$ 在點 $(a,b)$ 有絕對最小值 $f(a,b)$:對所有 $(x,y) \\in D$,$$\nf(x,y) \\geq f(a,b)\n$$。", + "newline": "false", + "runs": [ + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 有" + }, + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": ":對所有 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\nf(x,y) \\geq f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。", + "newline": "false", + "runs": [ + { + "text": "最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。" + } + ] + }, + { + "type": "card", + "kind": "定理", + "headline": "極值定理(Extreme Value Theorem)", + "body": [ + { + "type": "paragraph", + "content": "若 $f(x,y)$ 在封閉(closed)且有界(bounded)的區域 $D$ 上連續,則 $f$ 一定會取得絕對最大值和絕對最小值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在封閉(closed)且有界(bounded)的區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 一定會取得絕對最大值和絕對最小值。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "方法", + "headline": "找封閉有界區域上的絕對極值", + "body": [ + { + "type": "paragraph", + "content": "令多變數函數 $z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$:\n步驟 0:先確認區域與函數", + "newline": "true", + "runs": [ + { + "text": "令多變數函數 " + }, + { + "latex": "$z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$", + "kind": "math" + }, + { + "text": ":" + }, + { + "newline": "true" + }, + { + "text": "步驟 0:先確認區域與函數", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 是封閉且有界(包含邊界)。" + } + ], + "content": "區域 $D$ 是封閉且有界(包含邊界)。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "如果" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在" + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": "上連續,則一定存在絕對最大/最小值。" + } + ], + "content": "如果$f$ 在$D$上連續,則一定存在絕對最大/最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 1:找內部臨界點", + "newline": "false", + "runs": [ + { + "text": "步驟 1:找內部臨界點", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "解 " + }, + { + "latex": "$\\nabla f = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",找出落在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 內部的解" + } + ], + "content": "解 $\\nabla f = \\mathbf{0}$,找出落在 $D$ 內部的解" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "找 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 不存在的點" + } + ], + "content": "找 $\\nabla f$ 不存在的點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算這些點的函數值" + } + ], + "content": "計算這些點的函數值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 2:找邊界上的候選點", + "newline": "false", + "runs": [ + { + "text": "步驟 2:找邊界上的候選點", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "把邊界降維成單變數函數,用單變數微積分找極值" + } + ], + "content": "把邊界降維成單變數函數,用單變數微積分找極值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算端點和極值點的函數值" + } + ], + "content": "計算端點和極值點的函數值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 3:比較所有候選點的函數值", + "newline": "false", + "runs": [ + { + "text": "步驟 3:比較所有候選點的函數值", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大的值 = 絕對最大值" + } + ], + "content": "最大的值 = 絕對最大值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最小的值 = 絕對最小值" + } + ], + "content": "最小的值 = 絕對最小值" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5435326067", + "label": "Geogebra", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "rp5abnpd", + "width": "100%", + "height": "480", + "border": "0", + "caption": "找絕對極值", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n\n\n\n**Step 1:找內部臨界點**\n\n$$f_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0$$\n\n臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。\n\n**Step 2:找邊界**\n\n**邊界 $L_1: x=0$,$0 \\leq y \\leq 4$**\n\n$$f(0,y) = 2y^2$$\n- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$\n\n**邊界 $L_2: y=0$,$0 \\leq x \\leq 4$**\n\n$$f(x,0) = x^2-4x = (x-2)^2-4$$\n- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$\n\n**邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$**\n\n$$f(x,4-x) = 3x^2-20x+32$$\n$$\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}$$\n$$f\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}$$\n\n端點:$f(0,4) = 32$,$f(4,0) = 0$\n\n**Step 3:比較所有候選值**\n\n候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$\n\n- **絕對最大值**:$32$,在 $(0,4)$\n- **絕對最小值**:$-4$,在 $(2,0)$\n\n\n\n\n\n先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。\n\n此點是否在 $D$ 的**內部**?\n\na. 是,座標為 $(2,0)$\nb. 是,座標為 $(2,1)$\nc. 否,$(2,0)$ 在邊界 $y=0$ 上\nd. 否,$(2,1)$ 不在區域內\n\n\n\n\n邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。\n\n此邊界上的最大值:\n\n\n\n\n\n邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。\n\n此邊界上的最小值:\n\n\n\n\n\n邊界 $L_3: x+y=4$,代入後得 $f = 3x^2-20x+32$,臨界點在 $x = \\dfrac{10}{3}$ 時,函數值:\n\n\n\n\n\n比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。\n\n絕對最大值:\n\n\n\n絕對最小值:\n\n\n\n- **絕對最大值** $32$,發生在 $(0,4)$\n- **絕對最小值** $-4$,發生在 $(2,0)$\n\n\n", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。", + "newline": "false", + "runs": [ + { + "text": "找函數 " + }, + { + "latex": "$f(x,y) = x^2 + 2y^2 - 4x$", + "kind": "math" + }, + { + "text": " 在封閉三角區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": "(由 " + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$x+y=4$", + "kind": "math" + }, + { + "text": " 圍成)的絕對最大值和最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "絕對最大值為:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "絕對最小值為:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_339a5b6b39", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:找內部臨界點", + "newline": "false", + "runs": [ + { + "text": "Step 1:找內部臨界點", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。", + "newline": "false", + "runs": [ + { + "text": "臨界點 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + }, + { + "text": " 在邊界 " + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": " 上,不在內部,跳過。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:找邊界", + "newline": "false", + "runs": [ + { + "text": "Step 2:找邊界", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_1: x=0$,$0 \\leq y \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_1: x=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq y \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(0,y) = 2y^2\n$$- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(0,y) = 2y^2\n$$", + "kind": "math_block" + }, + { + "text": "- 最小:" + }, + { + "latex": "$f(0,0) = 0$", + "kind": "math" + }, + { + "text": ";最大:" + }, + { + "latex": "$f(0,4) = 32$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_2: y=0$,$0 \\leq x \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_2: y=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq x \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,0) = x^2-4x = (x-2)^2-4\n$$- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,0) = x^2-4x = (x-2)^2-4\n$$", + "kind": "math_block" + }, + { + "text": "- 最小:" + }, + { + "latex": "$f(2,0) = -4$", + "kind": "math" + }, + { + "text": ";端點:" + }, + { + "latex": "$f(0,0) = f(4,0) = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_3: x+y=4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",令 ", + "style": "bold" + }, + { + "latex": "$y=4-x$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq x \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,4-x) = 3x^2-20x+32\n$$$$\n\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}\n$$$$\nf\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,4-x) = 3x^2-20x+32\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "端點:$f(0,4) = 32$,$f(4,0) = 0$", + "newline": "false", + "runs": [ + { + "text": "端點:" + }, + { + "latex": "$f(0,4) = 32$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(4,0) = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:比較所有候選值", + "newline": "false", + "runs": [ + { + "text": "Step 3:比較所有候選值", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$", + "newline": "false", + "runs": [ + { + "text": "候選值:" + }, + { + "latex": "$0, 32, -4, 0, -\\dfrac{4}{3}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$32$", + "kind": "math" + }, + { + "text": ",在 " + }, + { + "latex": "$(0,4)$", + "kind": "math" + } + ], + "content": "絕對最大值:$32$,在 $(0,4)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$-4$", + "kind": "math" + }, + { + "text": ",在 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + } + ], + "content": "絕對最小值:$-4$,在 $(2,0)$" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_db148c4569", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-31", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。", + "newline": "false", + "runs": [ + { + "text": "先求內部臨界點:" + }, + { + "latex": "$f_x = 2x-4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = 4y$", + "kind": "math" + }, + { + "text": ",令兩者為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",得 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-31::step-1::q1", + "prompt_runs": [ + { + "text": "此點是否在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "內部", + "style": "bold" + }, + { + "text": "?" + } + ], + "options": [ + { + "key": "a", + "text": "是,座標為 $(2,0)$" + }, + { + "key": "b", + "text": "是,座標為 $(2,1)$" + }, + { + "key": "c", + "text": "否,$(2,0)$ 在邊界 $y=0$ 上" + }, + { + "key": "d", + "text": "否,$(2,1)$ 不在區域內" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-31", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。", + "newline": "false", + "runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_1: x=0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(0,y) = 2y^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$0 \\leq y \\leq 4$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-2::q2", + "prompt_runs": [ + { + "text": "此邊界上的最大值:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-2" + } + ], + "gate_from": "flow-31::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。", + "newline": "false", + "runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_2: y=0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,0) = (x-2)^2-4$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-3::q3", + "prompt_runs": [ + { + "text": "此邊界上的最小值:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-3" + } + ], + "gate_from": "flow-31::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-4::q4", + "prompt_runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_3: x+y=4$", + "kind": "math" + }, + { + "text": ",代入後得 " + }, + { + "latex": "$f = 3x^2-20x+32$", + "kind": "math" + }, + { + "text": ",臨界點在 " + }, + { + "latex": "$x = \\dfrac{10}{3}$", + "kind": "math" + }, + { + "text": " 時,函數值:" + } + ], + "answers": [ + "-4/3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-4" + } + ], + "gate_from": "flow-31::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。", + "newline": "false", + "runs": [ + { + "text": "比較所有候選值 " + }, + { + "latex": "$\\{0, 32, -4, 0, -\\frac{4}{3}\\}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-5::q5", + "prompt_runs": [ + { + "text": "絕對最大值:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-5" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-5::q6", + "prompt_runs": [ + { + "text": "絕對最小值:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-5" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$32$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(0,4)$", + "kind": "math" + } + ], + "content": "絕對最大值 $32$,發生在 $(0,4)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$-4$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + } + ], + "content": "絕對最小值 $-4$,發生在 $(2,0)$" + } + ] + } + ], + "gate_from": "flow-31::step-4::q4" + } + ] + } + ] + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣ 局部最大值和局部最小值", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣ 局部最大值和局部最小值", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 局部最大值和局部最小值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "card", + "kind": "定義", + "headline": "局部最大值和局部最小值", + "body": [ + { + "type": "paragraph", + "content": "對一個雙變數函數 $z = f(x,y)$:", + "newline": "false", + "runs": [ + { + "text": "對一個雙變數函數 " + }, + { + "latex": "$z = f(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "局部最大值(local maximum)", + "style": "bold" + }, + { + "text": "發生在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ":當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y) \\leq f(a,b)$", + "kind": "math" + } + ], + "content": "局部最大值(local maximum)發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \\leq f(a,b)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "局部最小值(local minimum)", + "style": "bold" + }, + { + "text": "發生在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": ":當 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": " 靠近 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f(x,y) \\geq f(a,b)$", + "kind": "math" + } + ], + "content": "局部最小值(local minimum)發生在點 $(a,b)$:當 $(x,y)$ 靠近 $(a,b)$ 時,$f(x,y) \\geq f(a,b)$" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/maximum.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣ 臨界點", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣ 臨界點", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 臨界點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "那要如何找到這些極值呢?", + "newline": "false", + "runs": [ + { + "text": "那要如何找到這些極值呢?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "我們不會漫無目的地找,而是先找出可能出現極值的「候選點」,也就是\\textbf{臨界點}。", + "newline": "false", + "runs": [ + { + "text": "我們不會漫無目的地找,而是先找出可能出現極值的「候選點」,也就是\\textbf{臨界點}。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "對二變數函數 $f(x,y)$ 來說,梯度 $\\nabla f(x,y)$ 表示函數上升最快的方向,而它的長度 $\\|\\nabla f(x,y)\\|$ 表示最快上升率。", + "newline": "false", + "runs": [ + { + "text": "對二變數函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 來說,梯度 " + }, + { + "latex": "$\\nabla f(x,y)$", + "kind": "math" + }, + { + "text": " 表示函數上升最快的方向,而它的長度 " + }, + { + "latex": "$\\|\\nabla f(x,y)\\|$", + "kind": "math" + }, + { + "text": " 表示最快上升率。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "如果在某一點 $(x_0,y_0)$,最快上升率為 $0$,也就是 $\\|\\nabla f(x_0,y_0)\\|=0$,等價於 $\\nabla f(x_0,y_0)=0$,也就是 $f_x(x_0,y_0)=0,\\ f_y(x_0,y_0)=0$。", + "newline": "false", + "runs": [ + { + "text": "如果在某一點 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": ",最快上升率為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",也就是 " + }, + { + "latex": "$\\|\\nabla f(x_0,y_0)\\|=0$", + "kind": "math" + }, + { + "text": ",等價於 " + }, + { + "latex": "$\\nabla f(x_0,y_0)=0$", + "kind": "math" + }, + { + "text": ",也就是 " + }, + { + "latex": "$f_x(x_0,y_0)=0,\\ f_y(x_0,y_0)=0$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "這種點稱為臨界點。", + "newline": "false", + "runs": [ + { + "text": "這種點稱為" + }, + { + "text": "臨界點", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "此外,如果某點的偏導數不存在,或函數在該點不可微,也可能出現極值,因此也需要列入候選點。", + "newline": "false", + "runs": [ + { + "text": "此外,如果某點的偏導數不存在,或函數在該點不可微,也可能出現極值,因此也需要列入候選點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以,尋找極值時,我們通常先找 $\\nabla f(x,y)=0$ 或 $\\nabla f(x,y)$ 不存在的點,作為極值的候選點。", + "newline": "false", + "runs": [ + { + "text": "所以,尋找極值時,我們通常先找 " + }, + { + "latex": "$\\nabla f(x,y)=0$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$\\nabla f(x,y)$", + "kind": "math" + }, + { + "text": " 不存在的點,作為極值的候選點。" + } + ] + }, + { + "type": "card", + "kind": "定義", + "headline": "臨界點", + "body": [ + { + "type": "paragraph", + "content": "對 $f(x,y)$,若 $(x_0,y_0)$ 是內部點,且滿足下面任一條,就叫做臨界點(critical point):", + "newline": "false", + "runs": [ + { + "text": "對 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": ",若 " + }, + { + "latex": "$(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 是內部點,且滿足下面任一條,就叫做" + }, + { + "text": "臨界點(critical point)", + "style": "bold" + }, + { + "text": ":" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$\\nabla f(x_0,y_0) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": "(可微且梯度為零)" + } + ], + "content": "$\\nabla f(x_0,y_0) = \\mathbf{0}$(可微且梯度為零)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$\\nabla f(x_0,y_0)$", + "kind": "math" + }, + { + "text": " 不存在(不可微或偏導數不存在)" + } + ], + "content": "$\\nabla f(x_0,y_0)$ 不存在(不可微或偏導數不存在)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "flow", + "id": "flow-27", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-27::step-1::q1", + "prompt_runs": [ + { + "text": "「函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的臨界點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 必須滿足 " + }, + { + "latex": "$f_x(a,b) = 0$", + "kind": "math" + }, + { + "text": " 或 " + }, + { + "latex": "$f_y(a,b) = 0$", + "kind": "math" + }, + { + "text": " 至少一項」,這個說法對嗎?" + } + ], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-27", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "要注意:$f_x(a,b) = 0$ 和 $f_y(a,b) = 0$ 兩者都需要同時滿足!", + "newline": "false", + "runs": [ + { + "text": "要注意:" + }, + { + "latex": "$f_x(a,b) = 0$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "和", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f_y(a,b) = 0$", + "kind": "math" + }, + { + "text": " 兩者都需要同時滿足!" + } + ] + } + ], + "gate_from": "flow-27::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣ 鞍點", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣ 鞍點", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 鞍點", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "臨界點雖然是極值的候選人,但它不一定就是極值喔!也可能是鞍點(Saddle Point)——在一個方向是谷底,另一個方向卻是山頂,就像馬鞍形狀。", + "newline": "false", + "runs": [ + { + "text": "臨界點雖然是極值的候選人,但它不一定就是極值喔!也可能是" + }, + { + "text": "鞍點(Saddle Point)", + "style": "bold" + }, + { + "text": "——在一個方向是谷底,另一個方向卻是山頂,就像馬鞍形狀。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "鞍點", + "body": [ + { + "type": "paragraph", + "content": "假如點 $(a,b)$ 滿足 $\\nabla f(a,b) = \\mathbf{0}$,且不是局部最大或最小值,則點 $(a,b)$ 是鞍點。", + "newline": "false", + "runs": [ + { + "text": "假如點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 滿足 " + }, + { + "latex": "$\\nabla f(a,b) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",且不是局部最大或最小值,則點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "鞍點", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "picture", + "alt": "", + "src": "/assets/SaddlePoint.svg" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_c9c1c78205", + "label": "鞍點", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "kc4jmxey", + "width": "100%", + "height": "480", + "border": "0", + "caption": "鞍點", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-4", + "title": "4️⃣ 二階導數判別法", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "4️⃣ 二階導數判別法", + "newline": "true", + "runs": [ + { + "text": "4️⃣ 二階導數判別法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "4" + }, + { + "type": "card", + "kind": "定理", + "headline": "二階導數判別法", + "body": [ + { + "type": "paragraph", + "content": "假設 $\\nabla f(a,b) = \\mathbf{0}$,令判別式:$$\nD(a,b) = f_{xx}(a,b)\\,f_{yy}(a,b) - [f_{xy}(a,b)]^2\n$$", + "newline": "false", + "runs": [ + { + "text": "假設 " + }, + { + "latex": "$\\nabla f(a,b) = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",令判別式:" + }, + { + "latex": "$$\nD(a,b) = f_{xx}(a,b)\\,f_{yy}(a,b) - [f_{xy}(a,b)]^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "局部最小值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx} > 0$", + "kind": "math" + }, + { + "text": "(凹向上,像碗狀谷底)" + } + ], + "content": "局部最小值:$D > 0$ 且 $f_{xx} > 0$(凹向上,像碗狀谷底)" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "局部最大值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx} < 0$", + "kind": "math" + }, + { + "text": "(凹向下,像倒碗山頂)" + } + ], + "content": "局部最大值:$D > 0$ 且 $f_{xx} < 0$(凹向下,像倒碗山頂)" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "鞍點", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D < 0$", + "kind": "math" + }, + { + "text": "(曲率方向不一)" + } + ], + "content": "鞍點:$D < 0$(曲率方向不一)" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "text": "無法判斷", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$D = 0$", + "kind": "math" + }, + { + "text": "(需其他方法)" + } + ], + "content": "無法判斷:$D = 0$(需其他方法)" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9baee64551", + "label": "關於判別式", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$D > 0$ 時,$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$,因此 $f_{xx}$ 與 $f_{yy}$ 同號,只看 $f_{xx}$ 就夠了。", + "newline": "false", + "runs": [ + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 時," + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$f_{yy}$", + "kind": "math" + }, + { + "text": " 同號,只看 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 就夠了。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:為什麼 $D > 0$ 時只需要看 $f_{xx}$ 的正負?", + "newline": "false", + "runs": [ + { + "text": "Q:為什麼 " + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 時只需要看 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 的正負?" + } + ] + }, + { + "type": "solution", + "uid": "sol_92fb551f3a", + "label": "看答案", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "由 $D > 0$ 得 $f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$,所以 $f_{xx} \\cdot f_{yy} > 0$,兩者同號,看其中一個就能判斷。", + "newline": "false", + "runs": [ + { + "text": "由 " + }, + { + "latex": "$D > 0$", + "kind": "math" + }, + { + "text": " 得 " + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > (f_{xy})^2 \\geq 0$", + "kind": "math" + }, + { + "text": ",所以 " + }, + { + "latex": "$f_{xx} \\cdot f_{yy} > 0$", + "kind": "math" + }, + { + "text": ",兩者同號,看其中一個就能判斷。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?\n\n\n\n\n**Step 1:計算一階偏導數**\n\n$$f_x = 2x-4, \\qquad f_y = 2y-6$$\n\n**Step 2:令 $f_x = f_y = 0$**\n\n$$2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3$$\n\n臨界點為 $(2,3)$。\n\n\n\n\n\n找臨界點的第一步是?\n\na. 直接代入 $x=0$ 與 $y=0$ 求函數值\nb. 計算二階偏導數,檢查正負號\nc. 計算一階偏導數 $f_x$ 與 $f_y$,並令它們等於 $0$\nd. 計算判別式 $D$\n\n\n\n\n$f_x = ?$\n\n\n\n\n\n$f_y = ?$\n\n\n\n\n\n令 $f_x = f_y = 0$,臨界點為?\n\na. $(2,3)$\nb. $(3,2)$\nc. $(3,4)$\nd. $(4,3)$\n\n\n\n\n\n---\n\n### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n\n\n\n$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為**局部最大值(Local Maximum)**。\n\n\n\n\n\n$D(1,2) = 16$,與 $0$ 的關係:\n\na. $D < 0$\nb. $D > 0$\nc. $D = 0$\n\n\n\n\n$f_{xx}(1,2) = -3$,與 $0$ 的關係:\n\na. $f_{xx} < 0$\nb. $f_{xx} > 0$\nc. $f_{xx} = 0$\n\n\n\n\n根據二階導數判別法,結果是?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n\n---\n\n### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-1" + }, + { + "type": "paragraph", + "content": "請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。", + "newline": "false", + "runs": [ + { + "text": "請找出函數 " + }, + { + "latex": "$f(x,y) = x^2 + y^2 - 4x - 6y + 10$", + "kind": "math" + }, + { + "text": " 的所有臨界點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "臨界點為?" + } + ], + "answers": [ + "2,3" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入臨界點 x,y,用逗號隔開", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_686d63bf8f", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算一階偏導數", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算一階偏導數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x = 2x-4, \\qquad f_y = 2y-6\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x = 2x-4, \\qquad f_y = 2y-6\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:令 $f_x = f_y = 0$", + "newline": "false", + "runs": [ + { + "text": "Step 2:令 ", + "style": "bold" + }, + { + "latex": "$f_x = f_y = 0$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n2x-4=0 \\implies x=2, \\qquad 2y-6=0 \\implies y=3\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "臨界點為 $(2,3)$。", + "newline": "false", + "runs": [ + { + "text": "臨界點為 " + }, + { + "latex": "$(2,3)$", + "kind": "math" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 1\n\n請找出函數 $f(x,y) = x^2 + y^2 - 4x - 6y + 10$ 的所有臨界點。\n\n臨界點為?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_9e0b103eb4", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-28", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-28::step-1::q1", + "prompt_runs": [ + { + "text": "找臨界點的第一步是?" + } + ], + "options": [ + { + "key": "a", + "text": "直接代入 $x=0$ 與 $y=0$ 求函數值" + }, + { + "key": "b", + "text": "計算二階偏導數,檢查正負號" + }, + { + "key": "c", + "text": "計算一階偏導數 $f_x$ 與 $f_y$,並令它們等於 $0$" + }, + { + "key": "d", + "text": "計算判別式 $D$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-28", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-28::step-2::q2", + "prompt_runs": [ + { + "latex": "$f_x = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-28", + "step": "step-2" + } + ], + "gate_from": "flow-28::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-28::step-3::q3", + "prompt_runs": [ + { + "latex": "$f_y = ?$", + "kind": "math" + } + ], + "answers": [ + "2*y-6" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-28", + "step": "step-3" + } + ], + "gate_from": "flow-28::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-28::step-4::q4", + "prompt_runs": [ + { + "text": "令 " + }, + { + "latex": "$f_x = f_y = 0$", + "kind": "math" + }, + { + "text": ",臨界點為?" + } + ], + "options": [ + { + "key": "a", + "text": "$(2,3)$" + }, + { + "key": "b", + "text": "$(3,2)$" + }, + { + "key": "c", + "text": "$(3,4)$" + }, + { + "key": "d", + "text": "$(4,3)$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-28", + "step": "step-4" + } + ], + "gate_from": "flow-28::step-3::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n\n\n\n$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為**局部最大值(Local Maximum)**。\n\n\n\n\n\n$D(1,2) = 16$,與 $0$ 的關係:\n\na. $D < 0$\nb. $D > 0$\nc. $D = 0$\n\n\n\n\n$f_{xx}(1,2) = -3$,與 $0$ 的關係:\n\na. $f_{xx} < 0$\nb. $f_{xx} > 0$\nc. $f_{xx} = 0$\n\n\n\n\n根據二階導數判別法,結果是?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n\n---\n\n### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?", + "newline": "false", + "runs": [ + { + "text": "已知函數在臨界點 " + }, + { + "latex": "$(1,2)$", + "kind": "math" + }, + { + "text": " 處," + }, + { + "latex": "$D(1,2) = 16$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{xx}(1,2) = -3$", + "kind": "math" + }, + { + "text": "。" + }, + { + "latex": "$f(1,2)$", + "kind": "math" + }, + { + "text": " 是什麼類型的極值?" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "請輸入類型(local max/min 或 saddle):" + } + ], + "answers": [ + "local maximum" + ], + "normalize": [ + "nospace" + ], + "placeholder": "local max/min 或 saddle", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_af2a979bd1", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$D(1,2) = 16 > 0$ 且 $f_{xx}(1,2) = -3 < 0$,因此為局部最大值(Local Maximum)。", + "newline": "false", + "runs": [ + { + "latex": "$D(1,2) = 16 > 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_{xx}(1,2) = -3 < 0$", + "kind": "math" + }, + { + "text": ",因此為" + }, + { + "text": "局部最大值(Local Maximum)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n已知函數在臨界點 $(1,2)$ 處,$D(1,2) = 16$,$f_{xx}(1,2) = -3$。$f(1,2)$ 是什麼類型的極值?\n\n請輸入類型(local max/min 或 saddle):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_309cbea728", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-29", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-1::q1", + "prompt_runs": [ + { + "latex": "$D(1,2) = 16$", + "kind": "math" + }, + { + "text": ",與 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$D < 0$" + }, + { + "key": "b", + "text": "$D > 0$" + }, + { + "key": "c", + "text": "$D = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-29", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-2::q2", + "prompt_runs": [ + { + "latex": "$f_{xx}(1,2) = -3$", + "kind": "math" + }, + { + "text": ",與 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$f_{xx} < 0$" + }, + { + "key": "b", + "text": "$f_{xx} > 0$" + }, + { + "key": "c", + "text": "$f_{xx} = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-29", + "step": "step-2" + } + ], + "gate_from": "flow-29::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-29::step-3::q3", + "prompt_runs": [ + { + "text": "根據二階導數判別法,結果是?" + } + ], + "options": [ + { + "key": "a", + "text": "Local Maximum(局部最大值)" + }, + { + "key": "b", + "text": "Local Minimum(局部最小值)" + }, + { + "key": "c", + "text": "Saddle Point(鞍點)" + }, + { + "key": "d", + "text": "無法判斷" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-29", + "step": "step-3" + } + ], + "gate_from": "flow-29::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。", + "newline": "false", + "runs": [ + { + "text": "已知 " + }, + { + "latex": "$f_{xx} = 4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{yy} = 5$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_{xy} = 3$", + "kind": "math" + }, + { + "text": ",該函數的判別式 " + }, + { + "latex": "$D(x,y)$", + "kind": "math" + }, + { + "text": " 的值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$D = ?$", + "kind": "math" + } + ], + "answers": [ + "11" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_14bfabbf60", + "label": "看解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "$$\nD = f_{xx}f_{yy} - f_{xy}^2 = 4\\cdot5 - 3^2 = 20 - 9 = 11\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD = f_{xx}f_{yy} - f_{xy}^2 = 4\\cdot5 - 3^2 = 20 - 9 = 11\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n已知 $f_{xx} = 4$,$f_{yy} = 5$,$f_{xy} = 3$,該函數的判別式 $D(x,y)$ 的值。\n\n$D = ?$\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?\n\n\n\n\n**Step 1:確認臨界點**\n\n$f_x = 2x = 0$,$f_y = -2y = 0$,代入 $(0,0)$:均為 $0$,是臨界點。\n\n**Step 2:計算二階偏導**\n\n$$f_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0$$\n\n**Step 3:計算判別式**\n\n$$D(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0$$\n\n$D < 0$,因此 $(0,0)$ 是**鞍點(Saddle Point)**。\n\n\n\n\n\n先計算一階偏導數($f(x, y) = x^2 - y^2$)。請問\n$$\nf_x=?\n$$\n\n\n\n\n再請問\n$$\nf_y=?\n$$\n\n\n\n\n\n將 $(0,0)$ 代入後,可得\n$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$\n\n所以 $(0,0)$ 是否為臨界點?\n\na. Yes\nb. No\n\n\n\n\n接著計算二階偏導數($f(x, y) = x^2 - y^2$)。\n\n$$\nf_{xx}=\\frac{\\partial}{\\partial x}(2x)=?\n$$\n\n\n\n\n$$\nf_{yy}=\\frac{\\partial}{\\partial y}(-2y)=?\n$$\n\n\n\n\n$$\nf_{xy}=\\frac{\\partial}{\\partial y}(2x)=?\n$$\n\n\n\n\n\n現在來計算判別式:\n$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$\n\n因此\n$$\nD(0,0)=2\\cdot(-2)-0^2=?\n$$\n\n\n\n\n\n因為\n$$\nD(0,0)=-4<0,\n$$\n所以 $(0,0)$ 的類型為何?\n\na. Local Maximum(局部最大值)\nb. Local Minimum(局部最小值)\nc. Saddle Point(鞍點)\nd. 無法判斷\n\n\n\n\n答案:因為\n$$\nD(0,0)<0,\n$$\n所以 $(0,0)$ 是 **Saddle Point(鞍點)**。\n\n\n\n\n---\n\n\n註解\n§1-4 小結\n**找局部極值的流程:**\n1. 求 $f_x = 0$ 且 $f_y = 0$(或 $\\nabla f$ 不存在),找出所有臨界點\n2. 對每個臨界點計算 $D = f_{xx}f_{yy} - f_{xy}^2$\n3. 根據 $D$ 的正負和 $f_{xx}$ 的正負判斷類型\n4. $D = 0$ 時無法用此法判斷,需其他技巧\n\n\n---\n\n## 5️⃣ 絕對極值\n這一次,我們要解決的問題是:如何在一個**封閉且有界**的區域 $D$ 上,找到函數 $f(x, y)$ 的**絕對最大值**(Absolute Maximum)和**絕對最小值**(Absolute Minimum)。 \n\n工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是**絕對極值**(Absolute Maximum and Minimum Values)吧!\n\n\n定義\n絕對最大值和絕對最小值\n$f$ 在點 $(a,b)$ 有**絕對最大值** $f(a,b)$:對所有 $(x,y) \\in D$,$$f(x,y) \\leq f(a,b)$$。\n\n$f$ 在點 $(a,b)$ 有**絕對最小值** $f(a,b)$:對所有 $(x,y) \\in D$,$$f(x,y) \\geq f(a,b)$$。\n\n最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。\n\n定理\n極值定理(Extreme Value Theorem)\n若 $f(x,y)$ 在封閉(closed)且有界(bounded)的區域 $D$ 上連續,則 $f$ 一定會取得絕對最大值和絕對最小值。\n\n\n\n方法\n找封閉有界區域上的絕對極值\n令多變數函數 $z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$: \n**步驟 0:先確認區域與函數**\n- 區域 $D$ 是封閉且有界(包含邊界)。\n- 如果$f$ 在$D$上連續,則一定存在絕對最大/最小值。\n\n**步驟 1:找內部臨界點**\n- 解 $\\nabla f = \\mathbf{0}$,找出落在 $D$ 內部的解\n- 找 $\\nabla f$ 不存在的點\n- 計算這些點的函數值\n\n**步驟 2:找邊界上的候選點**\n- 把邊界降維成單變數函數,用單變數微積分找極值\n- 計算端點和極值點的函數值\n\n**步驟 3:比較所有候選點的函數值**\n- 最大的值 = 絕對最大值\n- 最小的值 = 絕對最小值\n\n\n\n\n\n\n---\n\n### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n\n\n\n**Step 1:找內部臨界點**\n\n$$f_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0$$\n\n臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。\n\n**Step 2:找邊界**\n\n**邊界 $L_1: x=0$,$0 \\leq y \\leq 4$**\n\n$$f(0,y) = 2y^2$$\n- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$\n\n**邊界 $L_2: y=0$,$0 \\leq x \\leq 4$**\n\n$$f(x,0) = x^2-4x = (x-2)^2-4$$\n- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$\n\n**邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$**\n\n$$f(x,4-x) = 3x^2-20x+32$$\n$$\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}$$\n$$f\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}$$\n\n端點:$f(0,4) = 32$,$f(4,0) = 0$\n\n**Step 3:比較所有候選值**\n\n候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$\n\n- **絕對最大值**:$32$,在 $(0,4)$\n- **絕對最小值**:$-4$,在 $(2,0)$\n\n\n\n\n\n先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。\n\n此點是否在 $D$ 的**內部**?\n\na. 是,座標為 $(2,0)$\nb. 是,座標為 $(2,1)$\nc. 否,$(2,0)$ 在邊界 $y=0$ 上\nd. 否,$(2,1)$ 不在區域內\n\n\n\n\n邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。\n\n此邊界上的最大值:\n\n\n\n\n\n邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。\n\n此邊界上的最小值:\n\n\n\n\n\n邊界 $L_3: x+y=4$,代入後得 $f = 3x^2-20x+32$,臨界點在 $x = \\dfrac{10}{3}$ 時,函數值:\n\n\n\n\n\n比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。\n\n絕對最大值:\n\n\n\n絕對最小值:\n\n\n\n- **絕對最大值** $32$,發生在 $(0,4)$\n- **絕對最小值** $-4$,發生在 $(2,0)$\n\n\n", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。", + "newline": "false", + "runs": [ + { + "text": "判斷函數 " + }, + { + "latex": "$f(x,y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": " 在臨界點 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的類型。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是什麼類型的點,請輸入類型(local max/min 或 saddle)?" + } + ], + "answers": [ + "saddle point" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入類型", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_e6d490cd65", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:確認臨界點", + "newline": "false", + "runs": [ + { + "text": "Step 1:確認臨界點", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$f_x = 2x = 0$,$f_y = -2y = 0$,代入 $(0,0)$:均為 $0$,是臨界點。", + "newline": "false", + "runs": [ + { + "latex": "$f_x = 2x = 0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = -2y = 0$", + "kind": "math" + }, + { + "text": ",代入 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": ":均為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",是臨界點。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算二階偏導", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算二階偏導", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_{xx} = 2, \\qquad f_{yy} = -2, \\qquad f_{xy} = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:計算判別式", + "newline": "false", + "runs": [ + { + "text": "Step 3:計算判別式", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nD(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nD(0,0) = 2\\cdot(-2) - 0^2 = -4 < 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$D < 0$,因此 $(0,0)$ 是鞍點(Saddle Point)。", + "newline": "false", + "runs": [ + { + "latex": "$D < 0$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是" + }, + { + "text": "鞍點(Saddle Point)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n判斷函數 $f(x,y) = x^2 - y^2$ 在臨界點 $(0,0)$ 的類型。\n\n$(0,0)$ 是什麼類型的點,請輸入類型(local max/min 或 saddle)?\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_dc6fa6643e", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-30", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-1::q1", + "prompt_runs": [ + { + "text": "先計算一階偏導數(" + }, + { + "latex": "$f(x, y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": ")。請問" + }, + { + "latex": "$$\nf_x=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "2*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-2::q2", + "prompt_runs": [ + { + "text": "再請問" + }, + { + "latex": "$$\nf_y=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-2*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-2" + } + ], + "gate_from": "flow-30::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "將 $(0,0)$ 代入後,可得$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "newline": "false", + "runs": [ + { + "text": "將 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 代入後,可得" + }, + { + "latex": "$$\nf_x(0,0)=0,\\qquad f_y(0,0)=0.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-30::step-3::q3", + "prompt_runs": [ + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是否為臨界點?" + } + ], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-30", + "step": "step-3" + } + ], + "gate_from": "flow-30::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "接著計算二階偏導數($f(x, y) = x^2 - y^2$)。", + "newline": "false", + "runs": [ + { + "text": "接著計算二階偏導數(" + }, + { + "latex": "$f(x, y) = x^2 - y^2$", + "kind": "math" + }, + { + "text": ")。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-4::q4", + "prompt_runs": [ + { + "latex": "$$\nf_{xx}=\\frac{\\partial}{\\partial x}(2x)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-4" + } + ], + "gate_from": "flow-30::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-5::q5", + "prompt_runs": [ + { + "latex": "$$\nf_{yy}=\\frac{\\partial}{\\partial y}(-2y)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-5" + } + ], + "gate_from": "flow-30::step-4::q4" + }, + { + "id": "step-6", + "title": "步驟 6", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-6::q6", + "prompt_runs": [ + { + "latex": "$$\nf_{xy}=\\frac{\\partial}{\\partial y}(2x)=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "0" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-6" + } + ], + "gate_from": "flow-30::step-5::q5" + }, + { + "id": "step-7", + "title": "步驟 7", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "現在來計算判別式:$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$", + "newline": "false", + "runs": [ + { + "text": "現在來計算判別式:" + }, + { + "latex": "$$\nD(x,y)=f_{xx}(x,y)f_{yy}(x,y)-[f_{xy}(x,y)]^2\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-30::step-7::q7", + "prompt_runs": [ + { + "text": "因此" + }, + { + "latex": "$$\nD(0,0)=2\\cdot(-2)-0^2=?\n$$", + "kind": "math_block" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "請輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-30", + "step": "step-7" + } + ], + "gate_from": "flow-30::step-6::q6" + }, + { + "id": "step-8", + "title": "步驟 8", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-30::step-8::q8", + "prompt_runs": [ + { + "text": "因為" + }, + { + "latex": "$$\nD(0,0)=-4<0,\n$$", + "kind": "math_block" + }, + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 的類型為何?" + } + ], + "options": [ + { + "key": "a", + "text": "Local Maximum(局部最大值)" + }, + { + "key": "b", + "text": "Local Minimum(局部最小值)" + }, + { + "key": "c", + "text": "Saddle Point(鞍點)" + }, + { + "key": "d", + "text": "無法判斷" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-30", + "step": "step-8" + } + ], + "gate_from": "flow-30::step-7::q7" + }, + { + "id": "step-9", + "title": "步驟 9", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "答案:因為$$\nD(0,0)<0,\n$$所以 $(0,0)$ 是 Saddle Point(鞍點)。", + "newline": "false", + "runs": [ + { + "text": "答案:因為" + }, + { + "latex": "$$\nD(0,0)<0,\n$$", + "kind": "math_block" + }, + { + "text": "所以 " + }, + { + "latex": "$(0,0)$", + "kind": "math" + }, + { + "text": " 是 " + }, + { + "text": "Saddle Point(鞍點)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ], + "gate_from": "flow-30::step-8::q8" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1-4 小結", + "body": [ + { + "type": "paragraph", + "content": "找局部極值的流程:", + "newline": "false", + "runs": [ + { + "text": "找局部極值的流程:", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "求 " + }, + { + "latex": "$f_x = 0$", + "kind": "math" + }, + { + "text": " 且 " + }, + { + "latex": "$f_y = 0$", + "kind": "math" + }, + { + "text": "(或 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 不存在),找出所有臨界點" + } + ], + "content": "求 $f_x = 0$ 且 $f_y = 0$(或 $\\nabla f$ 不存在),找出所有臨界點" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "對每個臨界點計算 " + }, + { + "latex": "$D = f_{xx}f_{yy} - f_{xy}^2$", + "kind": "math" + } + ], + "content": "對每個臨界點計算 $D = f_{xx}f_{yy} - f_{xy}^2$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "根據 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 的正負和 " + }, + { + "latex": "$f_{xx}$", + "kind": "math" + }, + { + "text": " 的正負判斷類型" + } + ], + "content": "根據 $D$ 的正負和 $f_{xx}$ 的正負判斷類型" + }, + { + "indent": 0, + "marker": "4.", + "runs": [ + { + "latex": "$D = 0$", + "kind": "math" + }, + { + "text": " 時無法用此法判斷,需其他技巧" + } + ], + "content": "$D = 0$ 時無法用此法判斷,需其他技巧" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-5", + "title": "5️⃣ 絕對極值", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "5️⃣ 絕對極值", + "newline": "true", + "runs": [ + { + "text": "5️⃣ 絕對極值", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "5" + }, + { + "type": "paragraph", + "content": "這一次,我們要解決的問題是:如何在一個封閉且有界的區域 $D$ 上,找到函數 $f(x, y)$ 的絕對最大值(Absolute Maximum)和絕對最小值(Absolute Minimum)。 ", + "newline": "false", + "runs": [ + { + "text": "這一次,我們要解決的問題是:如何在一個" + }, + { + "text": "封閉且有界", + "style": "bold" + }, + { + "text": "的區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上,找到函數 " + }, + { + "latex": "$f(x, y)$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": "(Absolute Maximum)和" + }, + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": "(Absolute Minimum)。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是絕對極值(Absolute Maximum and Minimum Values)吧!", + "newline": "false", + "runs": [ + { + "text": "工欲善其事,必先利其器,所以廢話不多說,我們馬上來看看什麼是" + }, + { + "text": "絕對極值", + "style": "bold" + }, + { + "text": "(Absolute Maximum and Minimum Values)吧!" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定義", + "headline": "絕對最大值和絕對最小值", + "body": [ + { + "type": "paragraph", + "content": "$f$ 在點 $(a,b)$ 有絕對最大值 $f(a,b)$:對所有 $(x,y) \\in D$,$$\nf(x,y) \\leq f(a,b)\n$$。", + "newline": "false", + "runs": [ + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 有" + }, + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": ":對所有 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\nf(x,y) \\leq f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$f$ 在點 $(a,b)$ 有絕對最小值 $f(a,b)$:對所有 $(x,y) \\in D$,$$\nf(x,y) \\geq f(a,b)\n$$。", + "newline": "false", + "runs": [ + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在點 " + }, + { + "latex": "$(a,b)$", + "kind": "math" + }, + { + "text": " 有" + }, + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$f(a,b)$", + "kind": "math" + }, + { + "text": ":對所有 " + }, + { + "latex": "$(x,y) \\in D$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$$\nf(x,y) \\geq f(a,b)\n$$", + "kind": "math_block" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。", + "newline": "false", + "runs": [ + { + "text": "最後萬事具備,只欠東風,在尋找絕對極值前,我們再來了解一個非常重要的定理,這個定理就是尋找絕對極值的核心,它告訴我們在什麼樣的條件下,一個函數一定會達到它的最高點和最低點。" + } + ] + }, + { + "type": "card", + "kind": "定理", + "headline": "極值定理(Extreme Value Theorem)", + "body": [ + { + "type": "paragraph", + "content": "若 $f(x,y)$ 在封閉(closed)且有界(bounded)的區域 $D$ 上連續,則 $f$ 一定會取得絕對最大值和絕對最小值。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在封閉(closed)且有界(bounded)的區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 上連續,則 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 一定會取得絕對最大值和絕對最小值。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "方法", + "headline": "找封閉有界區域上的絕對極值", + "body": [ + { + "type": "paragraph", + "content": "令多變數函數 $z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$:\n步驟 0:先確認區域與函數", + "newline": "true", + "runs": [ + { + "text": "令多變數函數 " + }, + { + "latex": "$z = f(x, y),\\quad [x,y]\\in D = [a,b]×[c,d]$", + "kind": "math" + }, + { + "text": ":" + }, + { + "newline": "true" + }, + { + "text": "步驟 0:先確認區域與函數", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 是封閉且有界(包含邊界)。" + } + ], + "content": "區域 $D$ 是封閉且有界(包含邊界)。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "如果" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 在" + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": "上連續,則一定存在絕對最大/最小值。" + } + ], + "content": "如果$f$ 在$D$上連續,則一定存在絕對最大/最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 1:找內部臨界點", + "newline": "false", + "runs": [ + { + "text": "步驟 1:找內部臨界點", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "解 " + }, + { + "latex": "$\\nabla f = \\mathbf{0}$", + "kind": "math" + }, + { + "text": ",找出落在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 內部的解" + } + ], + "content": "解 $\\nabla f = \\mathbf{0}$,找出落在 $D$ 內部的解" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "找 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 不存在的點" + } + ], + "content": "找 $\\nabla f$ 不存在的點" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算這些點的函數值" + } + ], + "content": "計算這些點的函數值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 2:找邊界上的候選點", + "newline": "false", + "runs": [ + { + "text": "步驟 2:找邊界上的候選點", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "把邊界降維成單變數函數,用單變數微積分找極值" + } + ], + "content": "把邊界降維成單變數函數,用單變數微積分找極值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "計算端點和極值點的函數值" + } + ], + "content": "計算端點和極值點的函數值" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟 3:比較所有候選點的函數值", + "newline": "false", + "runs": [ + { + "text": "步驟 3:比較所有候選點的函數值", + "style": "bold" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大的值 = 絕對最大值" + } + ], + "content": "最大的值 = 絕對最大值" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最小的值 = 絕對最小值" + } + ], + "content": "最小的值 = 絕對最小值" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_5435326067", + "label": "Geogebra", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "rp5abnpd", + "width": "100%", + "height": "480", + "border": "0", + "caption": "找絕對極值", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n\n\n\n**Step 1:找內部臨界點**\n\n$$f_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0$$\n\n臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。\n\n**Step 2:找邊界**\n\n**邊界 $L_1: x=0$,$0 \\leq y \\leq 4$**\n\n$$f(0,y) = 2y^2$$\n- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$\n\n**邊界 $L_2: y=0$,$0 \\leq x \\leq 4$**\n\n$$f(x,0) = x^2-4x = (x-2)^2-4$$\n- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$\n\n**邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$**\n\n$$f(x,4-x) = 3x^2-20x+32$$\n$$\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}$$\n$$f\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}$$\n\n端點:$f(0,4) = 32$,$f(4,0) = 0$\n\n**Step 3:比較所有候選值**\n\n候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$\n\n- **絕對最大值**:$32$,在 $(0,4)$\n- **絕對最小值**:$-4$,在 $(2,0)$\n\n\n\n\n\n先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。\n\n此點是否在 $D$ 的**內部**?\n\na. 是,座標為 $(2,0)$\nb. 是,座標為 $(2,1)$\nc. 否,$(2,0)$ 在邊界 $y=0$ 上\nd. 否,$(2,1)$ 不在區域內\n\n\n\n\n邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。\n\n此邊界上的最大值:\n\n\n\n\n\n邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。\n\n此邊界上的最小值:\n\n\n\n\n\n邊界 $L_3: x+y=4$,代入後得 $f = 3x^2-20x+32$,臨界點在 $x = \\dfrac{10}{3}$ 時,函數值:\n\n\n\n\n\n比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。\n\n絕對最大值:\n\n\n\n絕對最小值:\n\n\n\n- **絕對最大值** $32$,發生在 $(0,4)$\n- **絕對最小值** $-4$,發生在 $(2,0)$\n\n\n", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。", + "newline": "false", + "runs": [ + { + "text": "找函數 " + }, + { + "latex": "$f(x,y) = x^2 + 2y^2 - 4x$", + "kind": "math" + }, + { + "text": " 在封閉三角區域 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": "(由 " + }, + { + "latex": "$x=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$x+y=4$", + "kind": "math" + }, + { + "text": " 圍成)的絕對最大值和最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "絕對最大值為:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "絕對最小值為:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_339a5b6b39", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:找內部臨界點", + "newline": "false", + "runs": [ + { + "text": "Step 1:找內部臨界點", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf_x = 2x-4 = 0 \\implies x = 2, \\qquad f_y = 4y = 0 \\implies y = 0\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "臨界點 $(2,0)$ 在邊界 $y=0$ 上,不在內部,跳過。", + "newline": "false", + "runs": [ + { + "text": "臨界點 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + }, + { + "text": " 在邊界 " + }, + { + "latex": "$y=0$", + "kind": "math" + }, + { + "text": " 上,不在內部,跳過。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:找邊界", + "newline": "false", + "runs": [ + { + "text": "Step 2:找邊界", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_1: x=0$,$0 \\leq y \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_1: x=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq y \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(0,y) = 2y^2\n$$- 最小:$f(0,0) = 0$;最大:$f(0,4) = 32$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(0,y) = 2y^2\n$$", + "kind": "math_block" + }, + { + "text": "- 最小:" + }, + { + "latex": "$f(0,0) = 0$", + "kind": "math" + }, + { + "text": ";最大:" + }, + { + "latex": "$f(0,4) = 32$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_2: y=0$,$0 \\leq x \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_2: y=0$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq x \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,0) = x^2-4x = (x-2)^2-4\n$$- 最小:$f(2,0) = -4$;端點:$f(0,0) = f(4,0) = 0$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,0) = x^2-4x = (x-2)^2-4\n$$", + "kind": "math_block" + }, + { + "text": "- 最小:" + }, + { + "latex": "$f(2,0) = -4$", + "kind": "math" + }, + { + "text": ";端點:" + }, + { + "latex": "$f(0,0) = f(4,0) = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "邊界 $L_3: x+y=4$,令 $y=4-x$,$0 \\leq x \\leq 4$", + "newline": "false", + "runs": [ + { + "text": "邊界 ", + "style": "bold" + }, + { + "latex": "$L_3: x+y=4$", + "kind": "math", + "style": "bold" + }, + { + "text": ",令 ", + "style": "bold" + }, + { + "latex": "$y=4-x$", + "kind": "math", + "style": "bold" + }, + { + "text": ",", + "style": "bold" + }, + { + "latex": "$0 \\leq x \\leq 4$", + "kind": "math", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(x,4-x) = 3x^2-20x+32\n$$$$\n\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}\n$$$$\nf\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(x,4-x) = 3x^2-20x+32\n$$", + "kind": "math_block" + }, + { + "latex": "$$\n\\frac{d}{dx}(3x^2-20x+32) = 6x-20 = 0 \\implies x = \\frac{10}{3}\n$$", + "kind": "math_block" + }, + { + "latex": "$$\nf\\!\\left(\\frac{10}{3},\\frac{2}{3}\\right) = -\\frac{4}{3}\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "端點:$f(0,4) = 32$,$f(4,0) = 0$", + "newline": "false", + "runs": [ + { + "text": "端點:" + }, + { + "latex": "$f(0,4) = 32$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(4,0) = 0$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:比較所有候選值", + "newline": "false", + "runs": [ + { + "text": "Step 3:比較所有候選值", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "候選值:$0, 32, -4, 0, -\\dfrac{4}{3}$", + "newline": "false", + "runs": [ + { + "text": "候選值:" + }, + { + "latex": "$0, 32, -4, 0, -\\dfrac{4}{3}$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$32$", + "kind": "math" + }, + { + "text": ",在 " + }, + { + "latex": "$(0,4)$", + "kind": "math" + } + ], + "content": "絕對最大值:$32$,在 $(0,4)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$-4$", + "kind": "math" + }, + { + "text": ",在 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + } + ], + "content": "絕對最小值:$-4$,在 $(2,0)$" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n找函數 $f(x,y) = x^2 + 2y^2 - 4x$ 在封閉三角區域 $D$(由 $x=0$、$y=0$、$x+y=4$ 圍成)的絕對最大值和最小值。\n\n絕對最大值為:\n\n\n\n絕對最小值為:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_db148c4569", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-31", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "先求內部臨界點:$f_x = 2x-4$,$f_y = 4y$,令兩者為 $0$,得 $(2,0)$。", + "newline": "false", + "runs": [ + { + "text": "先求內部臨界點:" + }, + { + "latex": "$f_x = 2x-4$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f_y = 4y$", + "kind": "math" + }, + { + "text": ",令兩者為 " + }, + { + "latex": "$0$", + "kind": "math" + }, + { + "text": ",得 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-31::step-1::q1", + "prompt_runs": [ + { + "text": "此點是否在 " + }, + { + "latex": "$D$", + "kind": "math" + }, + { + "text": " 的" + }, + { + "text": "內部", + "style": "bold" + }, + { + "text": "?" + } + ], + "options": [ + { + "key": "a", + "text": "是,座標為 $(2,0)$" + }, + { + "key": "b", + "text": "是,座標為 $(2,1)$" + }, + { + "key": "c", + "text": "否,$(2,0)$ 在邊界 $y=0$ 上" + }, + { + "key": "d", + "text": "否,$(2,1)$ 不在區域內" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "flow": "flow-31", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "邊界 $L_1: x=0$,$f(0,y) = 2y^2$,$0 \\leq y \\leq 4$。", + "newline": "false", + "runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_1: x=0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(0,y) = 2y^2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$0 \\leq y \\leq 4$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-2::q2", + "prompt_runs": [ + { + "text": "此邊界上的最大值:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-2" + } + ], + "gate_from": "flow-31::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "邊界 $L_2: y=0$,$f(x,0) = (x-2)^2-4$。", + "newline": "false", + "runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_2: y=0$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$f(x,0) = (x-2)^2-4$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-3::q3", + "prompt_runs": [ + { + "text": "此邊界上的最小值:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-3" + } + ], + "gate_from": "flow-31::step-2::q2" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-4::q4", + "prompt_runs": [ + { + "text": "邊界 " + }, + { + "latex": "$L_3: x+y=4$", + "kind": "math" + }, + { + "text": ",代入後得 " + }, + { + "latex": "$f = 3x^2-20x+32$", + "kind": "math" + }, + { + "text": ",臨界點在 " + }, + { + "latex": "$x = \\dfrac{10}{3}$", + "kind": "math" + }, + { + "text": " 時,函數值:" + } + ], + "answers": [ + "-4/3" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-4" + } + ], + "gate_from": "flow-31::step-3::q3" + }, + { + "id": "step-5", + "title": "步驟 5", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "比較所有候選值 $\\{0, 32, -4, 0, -\\frac{4}{3}\\}$。", + "newline": "false", + "runs": [ + { + "text": "比較所有候選值 " + }, + { + "latex": "$\\{0, 32, -4, 0, -\\frac{4}{3}\\}$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-5::q5", + "prompt_runs": [ + { + "text": "絕對最大值:" + } + ], + "answers": [ + "32" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-5" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-31::step-5::q6", + "prompt_runs": [ + { + "text": "絕對最小值:" + } + ], + "answers": [ + "-4" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-31", + "step": "step-5" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最大值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$32$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(0,4)$", + "kind": "math" + } + ], + "content": "絕對最大值 $32$,發生在 $(0,4)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "絕對最小值", + "style": "bold" + }, + { + "text": " " + }, + { + "latex": "$-4$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(2,0)$", + "kind": "math" + } + ], + "content": "絕對最小值 $-4$,發生在 $(2,0)$" + } + ] + } + ], + "gate_from": "flow-31::step-4::q4" + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/C14_8/Dash_Ch14_8.py b/pages/Ch14/C14_8/Dash_Ch14_8.py new file mode 100644 index 0000000000000000000000000000000000000000..fe100da5d2ff22ce1a8b43d0e4a24505cb27690b --- /dev/null +++ b/pages/Ch14/C14_8/Dash_Ch14_8.py @@ -0,0 +1,11 @@ +import dash +from layout.page_builder import make_test_page +from pathlib import Path + +HERE = Path(__file__).resolve().parent +JSON_PATH = HERE / "exported_result_14_8.json" + +dash.register_page(__name__, path="/Ch14_8", title="Ch14_8") + +def layout(): + return make_test_page(str(JSON_PATH), top_offset=90) diff --git a/pages/Ch14/C14_8/Md_14_8.md b/pages/Ch14/C14_8/Md_14_8.md new file mode 100644 index 0000000000000000000000000000000000000000..e7444983be876d38c32252add2dc95a60cfc191c --- /dev/null +++ b/pages/Ch14/C14_8/Md_14_8.md @@ -0,0 +1,374 @@ +# 拉格朗日乘數法 +前一節(14-7)講了找極值與在限定區域裡找極值。這一節介紹**拉格朗日乘數法**——專門用來在**限制條件**下尋找函數的最大值或最小值。 + +--- + +## 1️⃣ 拉格朗日乘數法的概念 + + +定理 +拉格朗日乘數法 +若 $(x_0,y_0,z_0)$ 是在限制條件 $g(x,y,z)=C$ 下,使 $f(x,y,z)$ 取得極值的點,則存在常數 $\lambda$ 使得: +$$\nabla f(x_0,y_0,z_0) = \lambda\,\nabla g(x_0,y_0,z_0)$$ +其中 $\lambda$ 稱為**拉格朗日乘數(Lagrange multiplier)**。 + + + + + + +**登山比喻:** +想像你是一位登山家,目標是找到山,也就是函數 $f(x,y)$ 的最高點或最低點。 +不過現在你不能自由移動,而是只能沿著一條繩索走。這條繩索就是約束條件 $g(x,y)=c$。 +因此,拉格朗日乘數法要解決的問題是: +在約束條件 $g(x,y)=c$ 上,找出函數 $f(x,y)$ 的最大值或最小值。 + +在微積分中,梯度 $\nabla f$ 表示函數 $f$ 上升最快的方向;而 $\nabla g$ 則垂直於約束曲線 $g(x,y)=c$。 +拉格朗日乘數法的核心想法是:當 $f(x,y)$ 在約束條件上達到極值時,$\nabla f$ 會與 $\nabla g$ 平行。 +也就是說,存在一個數 $\lambda$,使得 +$$ +\nabla f(x,y)=\lambda \nabla g(x,y). +$$ +其中,$\lambda$ 稱為**拉格朗日乘數**。 + +所以,要在約束條件 $g(x,y)=c$ 下找極值,我們需要解下面這組方程式: +$$ +\nabla f(x,y)=\lambda \nabla g(x,y), \qquad g(x,y)=c. +$$ + +**Q:「在極值點 $\nabla f$ 與約束曲線相切」這個說法對嗎?** + + + +a. Yes +b. No + + + +正確說法:極值點發生在**$f$ 的等高線與約束曲線相切**的地方,等價地,$\nabla f$ 與 $\nabla g$ **平行**: +$$\nabla f(x,y) = \lambda\,\nabla g(x,y)$$ +$\nabla f$ 是等高線的**法向量**,不是切向量,所以不會「跟約束曲線相切」。 + + + +--- + +### Example 1 +拉格朗日乘數法中,方程式 $\nabla f = \lambda \nabla g$ 成立的幾何意義是什麼? + +a. 目標函數 $f$ 的梯度方向與約束條件 $g$ 的等高線方向一致。 +b. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量互相垂直。 +c. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量平行。 +d. $\lambda$ 的值代表極值點的大小。 + + +--- + + +註解 +§1 小結 +- 拉格朗日乘數法處理「在約束條件下的最佳化」問題 +- 極值點條件:$\nabla f = \lambda \nabla g$(梯度平行) +- 幾何解釋:$f$ 的等高線與約束曲線 $g=c$ 相切 + + +--- + +## 2️⃣ 拉格朗日乘數法計算 +在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題: +尋找函數 $f(x_1, x_2, \dots, x_n)$ 在約束條件 $g(x_1, x_2, \dots, x_n) = c$ 下的極值。 +我們知道,關鍵在於解出 $\nabla f = \lambda \nabla g$ 這個向量方程式,以及原來的約束條件。 + +在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧! + +方法 +拉格朗日乘數法計算步驟 +**步驟一**:設定目標函數 $f(x,y)$ 與約束條件 $g(x,y) = c$ + +**步驟二**:展開 $\nabla f = \lambda\nabla g$ 和約束條件,建立聯立方程組: +1. $f_x = \lambda g_x$ +2. $f_y = \lambda g_y$ + +**步驟三**:解聯立方程組 + +**步驟四**:代回 $f$ 比較函數值,找最大/最小值 + + +--- + +### Example 2 + +求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。 + +最小值發生在 $(x,y) = ?$ + + +最小值為: + + + + +**Step 1:計算梯度** + +$$\nabla f = \langle 2x, 2y \rangle, \qquad \nabla g = \langle 1, 1 \rangle$$ + +**Step 2:建立聯立方程組** + +$$2x = \lambda, \qquad 2y = \lambda, \qquad x+y=4$$ + +**Step 3:求解** + +由前兩式:$2x = 2y \implies x = y$ + +代入約束條件:$2x = 4 \implies x = 2$,$y = 2$ + +候選點:$(2,2)$,$\lambda = 4$ + +**Step 4:代回計算** + +$$f(2,2) = 4 + 4 = 8$$ + +因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。 + + + + + +建立聯立方程組,$\nabla f = \langle 2x,2y\rangle$,$\nabla g = \langle 1,1\rangle$,由 $\nabla f = \lambda\nabla g$ 得: +$$2x = \lambda, \qquad 2y = \lambda, \qquad x+y=4$$ + +$x$ 和 $y$ 的關係: + +a. $x = y$ +b. $x = 2y$ +c. $y = 2x$ +d. $x + y = 0$ + + + + +代入 $x = y$ 到約束條件 $x+y=4$,候選極值點 $(x,y)$: + + + + + +$f(2,2) = 2^2 + 2^2 = 8$ + +因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\infty$,所以: + +- 最小值:$8$,發生在 $(2,2)$ +- 最大值:不存在 + + + + +--- + +### Example 3 + +尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程? + + + + + +未知數:$x, y, z, w$(4 個)和 $\lambda$(1 個),共 5 個。因此需要 5 個方程組:4 個梯度分量方程 + 1 個約束條件。 + + +--- + +### Example 4 + +求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\lambda$。 + +極值點 $(x,y)$: + + +$\lambda$ 的值: + + + + +**Step 1:計算梯度** + +$$\nabla f = \langle y, x\rangle, \qquad \nabla g = \langle 2, 1\rangle$$ + +**Step 2:建立聯立方程組** + +$$y = 2\lambda, \qquad x = \lambda, \qquad 2x+y=10$$ + +**Step 3:求解** + +由 $x = \lambda$,代入 $y = 2\lambda$:$y = 2x$ + +代入約束條件:$2x+2x=10 \implies x = \dfrac{5}{2}$,$y = 5$ + +**Step 4:拉格朗日乘數** + +$$\lambda = x = \frac{5}{2}$$ + + + + + +$\nabla f = \langle f_x,f_y\rangle = $: + + + +$\nabla g = \langle g_x,g_y\rangle = $: + + + + + +由 $\nabla f = \lambda\nabla g$:$y = 2\lambda$,$x = \lambda$,因此 $y = ?$ + + + + + +代入約束條件 $2x+y=10$,求極值點: + + + +$\lambda = ?$ + + + + + + +--- + +### Example 5 + +某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。 + +最佳原料組合 $(x,y)$(取到小數第二位): + + + +最大產量(取到小數第二位): + + + + +**Step 1:設定** + +目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$ + +**Step 2:計算梯度** + +$$\nabla f = \langle 20xy, 10x^2\rangle, \qquad \nabla g = \langle 4, 1\rangle$$ + +**Step 3:聯立方程組** + +$$20xy = 4\lambda, \qquad 10x^2 = \lambda, \qquad 4x+y=200$$ + +$$\lambda = 5xy, \qquad \lambda = 10x^2 \implies y = 2x$$ + +**Step 4:代入約束條件** + +$$4x+2x=200 \implies x=\frac{100}{3}\approx33.33, \qquad y=\frac{200}{3}\approx66.67$$ + +**Step 5:計算最大產量** + +$$f\!\left(\frac{100}{3},\frac{200}{3}\right) = 10\cdot\frac{10000}{9}\cdot\frac{200}{3} = \frac{20000000}{27}\approx740740.74$$ + + + + + +設定目標函數和約束條件: +- 目標函數:$f(x,y) = ?$ + + + +- 約束條件:$g(x,y) = ?$ + + + + + +由梯度方程得 $\lambda = 5xy = 10x^2$,因此 $x$ 和 $y$ 的關係: + +a. $x = y$ +b. $y = 2x$ +c. $x = 2y$ +d. $x + y = 0$ + + + + +代入約束條件,求最佳組合: + + + + + +代入目標函數,最大產量: + + + + + + +--- + +## 3️⃣ 雙重約束條件與應用 +在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。 + + +定理 +雙重約束條件 +在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\nabla f$ 位於兩個約束條件的梯度 $\nabla g_1$ 和 $\nabla g_2$ 所形成的平面上。 +數學上,這表示 $\nabla f$ 可以寫成 $\nabla g_1$ 和 $\nabla g_2$ 的線性組合: +$$\nabla f(x, y, z) = \lambda \nabla g_1(x, y, z) + \mu \nabla g_2(x, y, z)$$ +這裡我們引入了兩個拉格朗日乘數: +- $\lambda$ (Lambda):對應約束條件 $g_1$。 +- $\mu$ (Mu):對應約束條件 $g_2$。 + + +**Q:「$\nabla f$ 必須同時平行於 $\nabla g_1$ 和 $\nabla g_2$」這個說法對嗎?** + + + +a. Yes +b. No + + + +$\nabla f$ 只要**落在 $\nabla g_1$ 與 $\nabla g_2$ 構成的平面內**(線性組合)即可,不必同時平行於兩者。 + + + + +方法 +雙重約束找極值 +1. 設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。 +2. 建立聯立方程: 我們會有**五個未知數 ($x, y, z, \lambda, \mu$) 和五個方程**: + - $f_x = \lambda (g_1)_x + \mu (g_2)_x$ + - $f_y = \lambda (g_1)_y + \mu (g_2)_y$ + - $f_z = \lambda (g_1)_z + \mu (g_2)_z$ + - $g_1(x, y, z) = c_1$ + - $g_2(x, y, z) = c_2$ +3. 解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。 + +💡解題策略 : +當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「**幾個未知數,就要有幾個方程組**。」 引入幾個約束條件,就引入幾個 $\lambda$ 和 $\mu$ 等乘數來平衡梯度。 +--- + +其實 $\lambda$ 的數值是有實際意義的: +$$\lambda = \frac{\partial f}{\partial c}$$ +這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\lambda$ 這麼多。 +- 舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\lambda = 5$。 +- 這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。 +- 因此,$\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用! + + +--- + + + + diff --git a/pages/Ch14/C14_8/exported_result_14_8.json b/pages/Ch14/C14_8/exported_result_14_8.json new file mode 100644 index 0000000000000000000000000000000000000000..7a225f567b76a497f42193a0cc4ffb3652644d71 --- /dev/null +++ b/pages/Ch14/C14_8/exported_result_14_8.json @@ -0,0 +1,10197 @@ +{ + "toc": [ + { + "label": "拉格朗日乘數法", + "id": "sec", + "level": 1 + }, + { + "label": "1️⃣ 拉格朗日乘數法的概念", + "id": "1", + "level": 2 + }, + { + "label": "Example 1", + "id": "Example-1", + "level": 3 + }, + { + "label": "2️⃣ 拉格朗日乘數法計算", + "id": "2", + "level": 2 + }, + { + "label": "Example 2", + "id": "Example-2", + "level": 3 + }, + { + "label": "Example 3", + "id": "Example-3", + "level": 3 + }, + { + "label": "Example 4", + "id": "Example-4", + "level": 3 + }, + { + "label": "Example 5", + "id": "Example-5", + "level": 3 + }, + { + "label": "3️⃣ 雙重約束條件與應用", + "id": "3", + "level": 2 + } + ], + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "拉格朗日乘數法", + "newline": "true", + "runs": [ + { + "text": "拉格朗日乘數法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "paragraph", + "content": "前一節(14-7)講了找極值與在限定區域裡找極值。這一節介紹拉格朗日乘數法——專門用來在限制條件下尋找函數的最大值或最小值。", + "newline": "false", + "runs": [ + { + "text": "前一節(14-7)講了找極值與在限定區域裡找極值。這一節介紹" + }, + { + "text": "拉格朗日乘數法", + "style": "bold" + }, + { + "text": "——專門用來在" + }, + { + "text": "限制條件", + "style": "bold" + }, + { + "text": "下尋找函數的最大值或最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 拉格朗日乘數法的概念", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 拉格朗日乘數法的概念", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "card", + "kind": "定理", + "headline": "拉格朗日乘數法", + "body": [ + { + "type": "paragraph", + "content": "若 $(x_0,y_0,z_0)$ 是在限制條件 $g(x,y,z)=C$ 下,使 $f(x,y,z)$ 取得極值的點,則存在常數 $\\lambda$ 使得:$$\n\\nabla f(x_0,y_0,z_0) = \\lambda\\,\\nabla g(x_0,y_0,z_0)\n$$其中 $\\lambda$ 稱為拉格朗日乘數(Lagrange multiplier)。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$(x_0,y_0,z_0)$", + "kind": "math" + }, + { + "text": " 是在限制條件 " + }, + { + "latex": "$g(x,y,z)=C$", + "kind": "math" + }, + { + "text": " 下,使 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 取得極值的點,則存在常數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 使得:" + }, + { + "latex": "$$\n\\nabla f(x_0,y_0,z_0) = \\lambda\\,\\nabla g(x_0,y_0,z_0)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 稱為" + }, + { + "text": "拉格朗日乘數(Lagrange multiplier)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b17a534b64", + "label": "拉格朗日乘數法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "sjtsw3sx", + "width": "100%", + "height": "480", + "border": "0", + "caption": "拉格朗日乘數法", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "登山比喻:想像你是一位登山家,目標是找到山,也就是函數 $f(x,y)$ 的最高點或最低點。不過現在你不能自由移動,而是只能沿著一條繩索走。這條繩索就是約束條件 $g(x,y)=c$。\n因此,拉格朗日乘數法要解決的問題是:在約束條件 $g(x,y)=c$ 上,找出函數 $f(x,y)$ 的最大值或最小值。", + "newline": "true", + "runs": [ + { + "text": "登山比喻:", + "style": "bold" + }, + { + "text": "想像你是一位登山家,目標是找到山,也就是函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的最高點或最低點。不過現在你不能自由移動,而是只能沿著一條繩索走。這條繩索就是約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": "。" + }, + { + "newline": "true" + }, + { + "text": "因此,拉格朗日乘數法要解決的問題是:在約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": " 上,找出函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的最大值或最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在微積分中,梯度 $\\nabla f$ 表示函數 $f$ 上升最快的方向;而 $\\nabla g$ 則垂直於約束曲線 $g(x,y)=c$。\n拉格朗日乘數法的核心想法是:當 $f(x,y)$ 在約束條件上達到極值時,$\\nabla f$ 會與 $\\nabla g$ 平行。\n也就是說,存在一個數 $\\lambda$,使得$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y).\n$$其中,$\\lambda$ 稱為拉格朗日乘數。", + "newline": "true", + "runs": [ + { + "text": "在微積分中,梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 表示函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 上升最快的方向;而 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " 則垂直於約束曲線 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": "。" + }, + { + "newline": "true" + }, + { + "text": "拉格朗日乘數法的核心想法是:當 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在約束條件上達到極值時," + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 會與 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " 平行。" + }, + { + "newline": "true" + }, + { + "text": "也就是說,存在一個數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": ",使得" + }, + { + "latex": "$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y).\n$$", + "kind": "math_block" + }, + { + "text": "其中," + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 稱為" + }, + { + "text": "拉格朗日乘數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以,要在約束條件 $g(x,y)=c$ 下找極值,我們需要解下面這組方程式:$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y), \\qquad g(x,y)=c.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以,要在約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": " 下找極值,我們需要解下面這組方程式:" + }, + { + "latex": "$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y), \\qquad g(x,y)=c.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:「在極值點 $\\nabla f$ 與約束曲線相切」這個說法對嗎?", + "newline": "false", + "runs": [ + { + "text": "Q:「在極值點 ", + "style": "bold" + }, + { + "latex": "$\\nabla f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與約束曲線相切」這個說法對嗎?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-32", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-32::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-32", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "正確說法:極值點發生在$f$ 的等高線與約束曲線相切的地方,等價地,$\\nabla f$ 與 $\\nabla g$ 平行:$$\n\\nabla f(x,y) = \\lambda\\,\\nabla g(x,y)\n$$$\\nabla f$ 是等高線的法向量,不是切向量,所以不會「跟約束曲線相切」。", + "newline": "false", + "runs": [ + { + "text": "正確說法:極值點發生在" + }, + { + "latex": "$f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的等高線與約束曲線相切", + "style": "bold" + }, + { + "text": "的地方,等價地," + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "平行", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\nabla f(x,y) = \\lambda\\,\\nabla g(x,y)\n$$", + "kind": "math_block" + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是等高線的" + }, + { + "text": "法向量", + "style": "bold" + }, + { + "text": ",不是切向量,所以不會「跟約束曲線相切」。" + } + ] + } + ], + "gate_from": "flow-32::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n拉格朗日乘數法中,方程式 $\\nabla f = \\lambda \\nabla g$ 成立的幾何意義是什麼?\n\na. 目標函數 $f$ 的梯度方向與約束條件 $g$ 的等高線方向一致。\nb. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量互相垂直。\nc. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量平行。\nd. $\\lambda$ 的值代表極值點的大小。\n\n\n---\n\n\n註解\n§1 小結\n- 拉格朗日乘數法處理「在約束條件下的最佳化」問題\n- 極值點條件:$\\nabla f = \\lambda \\nabla g$(梯度平行)\n- 幾何解釋:$f$ 的等高線與約束曲線 $g=c$ 相切\n\n\n---\n\n## 2️⃣ 拉格朗日乘數法計算\n在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題: \n尋找函數 $f(x_1, x_2, \\dots, x_n)$ 在約束條件 $g(x_1, x_2, \\dots, x_n) = c$ 下的極值。 \n我們知道,關鍵在於解出 $\\nabla f = \\lambda \\nabla g$ 這個向量方程式,以及原來的約束條件。 \n\n在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧! \n\n方法\n拉格朗日乘數法計算步驟\n**步驟一**:設定目標函數 $f(x,y)$ 與約束條件 $g(x,y) = c$\n\n**步驟二**:展開 $\\nabla f = \\lambda\\nabla g$ 和約束條件,建立聯立方程組:\n1. $f_x = \\lambda g_x$\n2. $f_y = \\lambda g_y$\n\n**步驟三**:解聯立方程組\n\n**步驟四**:代回 $f$ 比較函數值,找最大/最小值\n\n\n---\n\n### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n**Step 3:求解**\n\n由前兩式:$2x = 2y \\implies x = y$\n\n代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$\n\n候選點:$(2,2)$,$\\lambda = 4$\n\n**Step 4:代回計算**\n\n$$f(2,2) = 4 + 4 = 8$$\n\n因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。\n\n\n\n\n\n建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n$x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $x = 2y$\nc. $y = 2x$\nd. $x + y = 0$\n\n\n\n\n代入 $x = y$ 到約束條件 $x+y=4$,候選極值點 $(x,y)$:\n\n\n\n\n\n$f(2,2) = 2^2 + 2^2 = 8$\n\n因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:\n\n- 最小值:$8$,發生在 $(2,2)$\n- 最大值:不存在\n\n\n\n\n---\n\n### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-1" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "拉格朗日乘數法中,方程式 " + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": " 成立的幾何意義是什麼?" + } + ], + "options": [ + { + "key": "a", + "text": "目標函數 $f$ 的梯度方向與約束條件 $g$ 的等高線方向一致。" + }, + { + "key": "b", + "text": "目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量互相垂直。" + }, + { + "key": "c", + "text": "目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量平行。" + }, + { + "key": "d", + "text": "$\\lambda$ 的值代表極值點的大小。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n拉格朗日乘數法中,方程式 $\\nabla f = \\lambda \\nabla g$ 成立的幾何意義是什麼?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "拉格朗日乘數法處理「在約束條件下的最佳化」問題" + } + ], + "content": "拉格朗日乘數法處理「在約束條件下的最佳化」問題" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "極值點條件:" + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": "(梯度平行)" + } + ], + "content": "極值點條件:$\\nabla f = \\lambda \\nabla g$(梯度平行)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "幾何解釋:" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的等高線與約束曲線 " + }, + { + "latex": "$g=c$", + "kind": "math" + }, + { + "text": " 相切" + } + ], + "content": "幾何解釋:$f$ 的等高線與約束曲線 $g=c$ 相切" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 拉格朗日乘數法計算", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 拉格朗日乘數法計算", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題:\n尋找函數 $f(x_1, x_2, \\dots, x_n)$ 在約束條件 $g(x_1, x_2, \\dots, x_n) = c$ 下的極值。\n我們知道,關鍵在於解出 $\\nabla f = \\lambda \\nabla g$ 這個向量方程式,以及原來的約束條件。 ", + "newline": "true", + "runs": [ + { + "text": "在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題:" + }, + { + "newline": "true" + }, + { + "text": "尋找函數 " + }, + { + "latex": "$f(x_1, x_2, \\dots, x_n)$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$g(x_1, x_2, \\dots, x_n) = c$", + "kind": "math" + }, + { + "text": " 下的極值。" + }, + { + "newline": "true" + }, + { + "text": "我們知道,關鍵在於解出 " + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": " 這個向量方程式,以及原來的約束條件。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧!\n", + "newline": "true", + "runs": [ + { + "text": "在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧!" + }, + { + "newline": "true" + } + ] + }, + { + "type": "card", + "kind": "方法", + "headline": "拉格朗日乘數法計算步驟", + "body": [ + { + "type": "paragraph", + "content": "步驟一:設定目標函數 $f(x,y)$ 與約束條件 $g(x,y) = c$", + "newline": "false", + "runs": [ + { + "text": "步驟一", + "style": "bold" + }, + { + "text": ":設定目標函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 與約束條件 " + }, + { + "latex": "$g(x,y) = c$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟二:展開 $\\nabla f = \\lambda\\nabla g$ 和約束條件,建立聯立方程組:", + "newline": "false", + "runs": [ + { + "text": "步驟二", + "style": "bold" + }, + { + "text": ":展開 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": " 和約束條件,建立聯立方程組:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$f_x = \\lambda g_x$", + "kind": "math" + } + ], + "content": "$f_x = \\lambda g_x$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$f_y = \\lambda g_y$", + "kind": "math" + } + ], + "content": "$f_y = \\lambda g_y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟三:解聯立方程組", + "newline": "false", + "runs": [ + { + "text": "步驟三", + "style": "bold" + }, + { + "text": ":解聯立方程組" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟四:代回 $f$ 比較函數值,找最大/最小值", + "newline": "false", + "runs": [ + { + "text": "步驟四", + "style": "bold" + }, + { + "text": ":代回 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 比較函數值,找最大/最小值" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n**Step 3:求解**\n\n由前兩式:$2x = 2y \\implies x = y$\n\n代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$\n\n候選點:$(2,2)$,$\\lambda = 4$\n\n**Step 4:代回計算**\n\n$$f(2,2) = 4 + 4 = 8$$\n\n因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。\n\n\n\n\n\n建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n$x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $x = 2y$\nc. $y = 2x$\nd. $x + y = 0$\n\n\n\n\n代入 $x = y$ 到約束條件 $x+y=4$,候選極值點 $(x,y)$:\n\n\n\n\n\n$f(2,2) = 2^2 + 2^2 = 8$\n\n因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:\n\n- 最小值:$8$,發生在 $(2,2)$\n- 最大值:不存在\n\n\n\n\n---\n\n### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = x^2 + y^2$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$g(x,y) = x + y = 4$", + "kind": "math" + }, + { + "text": " 下的最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最小值發生在 " + }, + { + "latex": "$(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "2,2" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最小值為:" + } + ], + "answers": [ + "8" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_879055cd4c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:建立聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 2:建立聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:求解", + "newline": "false", + "runs": [ + { + "text": "Step 3:求解", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由前兩式:$2x = 2y \\implies x = y$", + "newline": "false", + "runs": [ + { + "text": "由前兩式:" + }, + { + "latex": "$2x = 2y \\implies x = y$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$", + "newline": "false", + "runs": [ + { + "text": "代入約束條件:" + }, + { + "latex": "$2x = 4 \\implies x = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "候選點:$(2,2)$,$\\lambda = 4$", + "newline": "false", + "runs": [ + { + "text": "候選點:" + }, + { + "latex": "$(2,2)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\lambda = 4$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代回計算", + "newline": "false", + "runs": [ + { + "text": "Step 4:代回計算", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(2,2) = 4 + 4 = 8\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(2,2) = 4 + 4 = 8\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。", + "newline": "false", + "runs": [ + { + "text": "因約束條件是無界直線," + }, + { + "latex": "$x^2+y^2$", + "kind": "math" + }, + { + "text": " 可以任意大,所以只有最小值 " + }, + { + "latex": "$8$", + "kind": "math" + }, + { + "text": ",沒有最大值。" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7ac6e078d6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-33", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "newline": "false", + "runs": [ + { + "text": "建立聯立方程組," + }, + { + "latex": "$\\nabla f = \\langle 2x,2y\\rangle$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\nabla g = \\langle 1,1\\rangle$", + "kind": "math" + }, + { + "text": ",由 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": " 得:" + }, + { + "latex": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-33::step-1::q1", + "prompt_runs": [ + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$x = y$" + }, + { + "key": "b", + "text": "$x = 2y$" + }, + { + "key": "c", + "text": "$y = 2x$" + }, + { + "key": "d", + "text": "$x + y = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-33", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-33::step-2::q2", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$x = y$", + "kind": "math" + }, + { + "text": " 到約束條件 " + }, + { + "latex": "$x+y=4$", + "kind": "math" + }, + { + "text": ",候選極值點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "2,2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-33", + "step": "step-2" + } + ], + "gate_from": "flow-33::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "$f(2,2) = 2^2 + 2^2 = 8$", + "newline": "false", + "runs": [ + { + "latex": "$f(2,2) = 2^2 + 2^2 = 8$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:", + "newline": "false", + "runs": [ + { + "text": "因為約束條件是無界直線,沿著直線走遠時 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 可以趨向 " + }, + { + "latex": "$+\\infty$", + "kind": "math" + }, + { + "text": ",所以:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最小值:" + }, + { + "latex": "$8$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(2,2)$", + "kind": "math" + } + ], + "content": "最小值:$8$,發生在 $(2,2)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大值:不存在" + } + ], + "content": "最大值:不存在" + } + ] + } + ], + "gate_from": "flow-33::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?", + "newline": "false", + "runs": [ + { + "text": "尋找函數 " + }, + { + "latex": "$f(x,y,z,w)$", + "kind": "math" + }, + { + "text": "(四個變數)在單一約束條件 " + }, + { + "latex": "$g(x,y,z,w)=c$", + "kind": "math" + }, + { + "text": " 下的極值,共需解出幾個聯立方程?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "5" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入方程個數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_440adbc418", + "label": "看解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "未知數:$x, y, z, w$(4 個)和 $\\lambda$(1 個),共 5 個。因此需要 5 個方程組:4 個梯度分量方程 + 1 個約束條件。", + "newline": "false", + "runs": [ + { + "text": "未知數:" + }, + { + "latex": "$x, y, z, w$", + "kind": "math" + }, + { + "text": "(4 個)和 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": "(1 個),共 5 個。因此需要 5 個方程組:4 個梯度分量方程 + 1 個約束條件。" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$y = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10$$\n\n**Step 3:求解**\n\n由 $x = \\lambda$,代入 $y = 2\\lambda$:$y = 2x$\n\n代入約束條件:$2x+2x=10 \\implies x = \\dfrac{5}{2}$,$y = 5$\n\n**Step 4:拉格朗日乘數**\n\n$$\\lambda = x = \\frac{5}{2}$$\n\n\n\n\n\n$\\nabla f = \\langle f_x,f_y\\rangle = $:\n\n\n\n$\\nabla g = \\langle g_x,g_y\\rangle = $:\n\n\n\n\n\n由 $\\nabla f = \\lambda\\nabla g$:$y = 2\\lambda$,$x = \\lambda$,因此 $y = ?$\n\n\n\n\n\n代入約束條件 $2x+y=10$,求極值點:\n\n\n\n$\\lambda = ?$\n\n\n\n\n\n\n---\n\n### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n\n\n\n**Step 1:設定**\n\n目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$\n\n**Step 2:計算梯度**\n\n$$\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle$$\n\n**Step 3:聯立方程組**\n\n$$20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200$$\n\n$$\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x$$\n\n**Step 4:代入約束條件**\n\n$$4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67$$\n\n**Step 5:計算最大產量**\n\n$$f\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74$$\n\n\n\n\n\n設定目標函數和約束條件:\n- 目標函數:$f(x,y) = ?$\n\n\n\n- 約束條件:$g(x,y) = ?$\n\n\n\n\n\n由梯度方程得 $\\lambda = 5xy = 10x^2$,因此 $x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $y = 2x$\nc. $x = 2y$\nd. $x + y = 0$\n\n\n\n\n代入約束條件,求最佳組合:\n\n\n\n\n\n代入目標函數,最大產量:\n\n\n\n\n\n\n---\n\n## 3️⃣ 雙重約束條件與應用\n在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。\n\n\n定理\n雙重約束條件\n在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。 \n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合: \n$$\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)$$ \n這裡我們引入了兩個拉格朗日乘數: \n- $\\lambda$ (Lambda):對應約束條件 $g_1$。 \n- $\\mu$ (Mu):對應約束條件 $g_2$。 \n\n\n**Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?**\n\n\n\na. Yes\nb. No\n\n\n\n$\\nabla f$ 只要**落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內**(線性組合)即可,不必同時平行於兩者。\n\n\n\n\n方法\n雙重約束找極值 \n1. 設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。 \n2. 建立聯立方程: 我們會有**五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程**: \n - $f_x = \\lambda (g_1)_x + \\mu (g_2)_x$ \n - $f_y = \\lambda (g_1)_y + \\mu (g_2)_y$ \n - $f_z = \\lambda (g_1)_z + \\mu (g_2)_z$ \n - $g_1(x, y, z) = c_1$ \n - $g_2(x, y, z) = c_2$ \n3. 解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。 \n\n💡解題策略 : \n當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「**幾個未知數,就要有幾個方程組**。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。 \n---\n\n其實 $\\lambda$ 的數值是有實際意義的: \n$$\\lambda = \\frac{\\partial f}{\\partial c}$$ \n這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。 \n- 舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。 \n- 這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。 \n- 因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = xy$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$2x+y=10$", + "kind": "math" + }, + { + "text": " 下的極值,並求拉格朗日乘數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "極值點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "5/2,5" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 的值:" + } + ], + "answers": [ + "5/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 λ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_676d2eb9ab", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:建立聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 2:建立聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\ny = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\ny = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:求解", + "newline": "false", + "runs": [ + { + "text": "Step 3:求解", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由 $x = \\lambda$,代入 $y = 2\\lambda$:$y = 2x$", + "newline": "false", + "runs": [ + { + "text": "由 " + }, + { + "latex": "$x = \\lambda$", + "kind": "math" + }, + { + "text": ",代入 " + }, + { + "latex": "$y = 2\\lambda$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$y = 2x$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入約束條件:$2x+2x=10 \\implies x = \\dfrac{5}{2}$,$y = 5$", + "newline": "false", + "runs": [ + { + "text": "代入約束條件:" + }, + { + "latex": "$2x+2x=10 \\implies x = \\dfrac{5}{2}$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 5$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:拉格朗日乘數", + "newline": "false", + "runs": [ + { + "text": "Step 4:拉格朗日乘數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\lambda = x = \\frac{5}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\lambda = x = \\frac{5}{2}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_60e6a033f0", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-34", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-1::q1", + "prompt_runs": [ + { + "latex": "$\\nabla f = \\langle f_x,f_y\\rangle =$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "y,x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 f_x, f_y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-1" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-1::q2", + "prompt_runs": [ + { + "latex": "$\\nabla g = \\langle g_x,g_y\\rangle =$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "2,1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 g_x, g_y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-2::q3", + "prompt_runs": [ + { + "text": "由 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$y = 2\\lambda$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x = \\lambda$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$y = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 y 和 x 的關係", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-2" + } + ], + "gate_from": "flow-34::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-3::q4", + "prompt_runs": [ + { + "text": "代入約束條件 " + }, + { + "latex": "$2x+y=10$", + "kind": "math" + }, + { + "text": ",求極值點:" + } + ], + "answers": [ + "5/2,5" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-3" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-3::q5", + "prompt_runs": [ + { + "latex": "$\\lambda = ?$", + "kind": "math" + } + ], + "answers": [ + "5/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 λ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-3" + } + ], + "gate_from": "flow-34::step-2::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n\n\n\n**Step 1:設定**\n\n目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$\n\n**Step 2:計算梯度**\n\n$$\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle$$\n\n**Step 3:聯立方程組**\n\n$$20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200$$\n\n$$\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x$$\n\n**Step 4:代入約束條件**\n\n$$4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67$$\n\n**Step 5:計算最大產量**\n\n$$f\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74$$\n\n\n\n\n\n設定目標函數和約束條件:\n- 目標函數:$f(x,y) = ?$\n\n\n\n- 約束條件:$g(x,y) = ?$\n\n\n\n\n\n由梯度方程得 $\\lambda = 5xy = 10x^2$,因此 $x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $y = 2x$\nc. $x = 2y$\nd. $x + y = 0$\n\n\n\n\n代入約束條件,求最佳組合:\n\n\n\n\n\n代入目標函數,最大產量:\n\n\n\n\n\n\n---\n\n## 3️⃣ 雙重約束條件與應用\n在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。\n\n\n定理\n雙重約束條件\n在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。 \n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合: \n$$\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)$$ \n這裡我們引入了兩個拉格朗日乘數: \n- $\\lambda$ (Lambda):對應約束條件 $g_1$。 \n- $\\mu$ (Mu):對應約束條件 $g_2$。 \n\n\n**Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?**\n\n\n\na. Yes\nb. No\n\n\n\n$\\nabla f$ 只要**落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內**(線性組合)即可,不必同時平行於兩者。\n\n\n\n\n方法\n雙重約束找極值 \n1. 設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。 \n2. 建立聯立方程: 我們會有**五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程**: \n - $f_x = \\lambda (g_1)_x + \\mu (g_2)_x$ \n - $f_y = \\lambda (g_1)_y + \\mu (g_2)_y$ \n - $f_z = \\lambda (g_1)_z + \\mu (g_2)_z$ \n - $g_1(x, y, z) = c_1$ \n - $g_2(x, y, z) = c_2$ \n3. 解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。 \n\n💡解題策略 : \n當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「**幾個未知數,就要有幾個方程組**。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。 \n---\n\n其實 $\\lambda$ 的數值是有實際意義的: \n$$\\lambda = \\frac{\\partial f}{\\partial c}$$ \n這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。 \n- 舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。 \n- 這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。 \n- 因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。", + "newline": "false", + "runs": [ + { + "text": "某公司預算 " + }, + { + "latex": "$200$", + "kind": "math" + }, + { + "text": " 萬,原料 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 每單位 " + }, + { + "latex": "$4$", + "kind": "math" + }, + { + "text": " 萬元,原料 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 每單位 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 萬元,總產量 " + }, + { + "latex": "$f(x,y) = 10x^2y$", + "kind": "math" + }, + { + "text": "。在預算限制下找最大產量。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最佳原料組合 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "(取到小數第二位):" + } + ], + "answers": [ + "33.33,66.67" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最大產量(取到小數第二位):" + } + ], + "answers": [ + "740740.74" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入最大產量", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a884607695", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設定", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$", + "newline": "false", + "runs": [ + { + "text": "目標函數:" + }, + { + "latex": "$f(x,y) = 10x^2y$", + "kind": "math" + }, + { + "text": ";約束條件:" + }, + { + "latex": "$4x+y = 200$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 3:聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入約束條件", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入約束條件", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 5:計算最大產量", + "newline": "false", + "runs": [ + { + "text": "Step 5:計算最大產量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_aeda61ff89", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-35", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-1::q1", + "prompt_runs": [ + { + "text": "設定目標函數和約束條件:- 目標函數:" + }, + { + "latex": "$f(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "10*x^2*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入目標函數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-1" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "約束條件:" + }, + { + "latex": "$g(x,y) = ?$", + "kind": "math" + } + ], + "content": "約束條件:$g(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-1::q2", + "prompt_runs": [], + "answers": [ + "4*x+y=200" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入約束條件", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-35::step-2::q3", + "prompt_runs": [ + { + "text": "由梯度方程得 " + }, + { + "latex": "$\\lambda = 5xy = 10x^2$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$x = y$" + }, + { + "key": "b", + "text": "$y = 2x$" + }, + { + "key": "c", + "text": "$x = 2y$" + }, + { + "key": "d", + "text": "$x + y = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-35", + "step": "step-2" + } + ], + "gate_from": "flow-35::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-3::q4", + "prompt_runs": [ + { + "text": "代入約束條件,求最佳組合:" + } + ], + "answers": [ + "33.33,66.67" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y(小數第二位)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-3" + } + ], + "gate_from": "flow-35::step-2::q3" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-4::q5", + "prompt_runs": [ + { + "text": "代入目標函數,最大產量:" + } + ], + "answers": [ + "740740.74" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入最大產量", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-4" + } + ], + "gate_from": "flow-35::step-3::q4" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 雙重約束條件與應用", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 雙重約束條件與應用", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。", + "newline": "false", + "runs": [ + { + "text": "在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:" + }, + { + "latex": "$g_1(x,y,z) = c_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$g_2(x,y,z) = c_2$", + "kind": "math" + }, + { + "text": "的話要怎麼辦。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "雙重約束條件", + "body": [ + { + "type": "paragraph", + "content": "在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。\n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合:\n$$\n\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)\n$$這裡我們引入了兩個拉格朗日乘數:\n", + "newline": "true", + "runs": [ + { + "text": "在兩個約束條件下,極值點發生在目標函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 位於兩個約束條件的梯度 " + }, + { + "latex": "$\\nabla g_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\nabla g_2$", + "kind": "math" + }, + { + "text": " 所形成的平面上。" + }, + { + "newline": "true" + }, + { + "text": "數學上,這表示 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 可以寫成 " + }, + { + "latex": "$\\nabla g_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\nabla g_2$", + "kind": "math" + }, + { + "text": " 的線性組合:" + }, + { + "newline": "true" + }, + { + "latex": "$$\n\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)\n$$", + "kind": "math_block" + }, + { + "text": "這裡我們引入了兩個拉格朗日乘數:" + }, + { + "newline": "true" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " (Lambda):對應約束條件 " + }, + { + "latex": "$g_1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lambda$ (Lambda):對應約束條件 $g_1$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\mu$", + "kind": "math" + }, + { + "text": " (Mu):對應約束條件 " + }, + { + "latex": "$g_2$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\mu$ (Mu):對應約束條件 $g_2$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?", + "newline": "false", + "runs": [ + { + "text": "Q:「", + "style": "bold" + }, + { + "latex": "$\\nabla f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 必須同時平行於 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_1$", + "kind": "math", + "style": "bold" + }, + { + "text": " 和 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_2$", + "kind": "math", + "style": "bold" + }, + { + "text": "」這個說法對嗎?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-36", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-36::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-36", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "$\\nabla f$ 只要落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內(線性組合)即可,不必同時平行於兩者。", + "newline": "false", + "runs": [ + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 只要" + }, + { + "text": "落在 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_1$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_2$", + "kind": "math", + "style": "bold" + }, + { + "text": " 構成的平面內", + "style": "bold" + }, + { + "text": "(線性組合)即可,不必同時平行於兩者。" + } + ] + } + ], + "gate_from": "flow-36::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "方法", + "headline": "雙重約束找極值", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "設定函數: " + }, + { + "latex": "$f(x, y, z)$", + "kind": "math" + }, + { + "text": "、 " + }, + { + "latex": "$g_1(x, y, z) = c_1$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$g_2(x, y, z) = c_2$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "建立聯立方程: 我們會有" + }, + { + "text": "五個未知數 (", + "style": "bold" + }, + { + "latex": "$x, y, z, \\lambda, \\mu$", + "kind": "math", + "style": "bold" + }, + { + "text": ") 和五個方程", + "style": "bold" + }, + { + "text": ":" + } + ], + "content": "建立聯立方程: 我們會有五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_x = \\lambda (g_1)_x + \\mu (g_2)_x$", + "kind": "math" + } + ], + "content": "$f_x = \\lambda (g_1)_x + \\mu (g_2)_x$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_y = \\lambda (g_1)_y + \\mu (g_2)_y$", + "kind": "math" + } + ], + "content": "$f_y = \\lambda (g_1)_y + \\mu (g_2)_y$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_z = \\lambda (g_1)_z + \\mu (g_2)_z$", + "kind": "math" + } + ], + "content": "$f_z = \\lambda (g_1)_z + \\mu (g_2)_z$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$g_1(x, y, z) = c_1$", + "kind": "math" + } + ], + "content": "$g_1(x, y, z) = c_1$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$g_2(x, y, z) = c_2$", + "kind": "math" + } + ], + "content": "$g_2(x, y, z) = c_2$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "解出這五個方程組中的 " + }, + { + "latex": "$(x, y, z)$", + "kind": "math" + }, + { + "text": " 點,然後代入 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 進行比較,即可找到極值。" + } + ], + "content": "解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "💡解題策略 : 當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「幾個未知數,就要有幾個方程組。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。\n", + "newline": "true", + "runs": [ + { + "text": "💡解題策略 : 當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「" + }, + { + "text": "幾個未知數,就要有幾個方程組", + "style": "bold" + }, + { + "text": "。」 引入幾個約束條件,就引入幾個 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\mu$", + "kind": "math" + }, + { + "text": " 等乘數來平衡梯度。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_021d00b75a", + "label": "看更多", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "其實 $\\lambda$ 的數值是有實際意義的:\n$$\n\\lambda = \\frac{\\partial f}{\\partial c}\n$$這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。\n", + "newline": "true", + "runs": [ + { + "text": "其實 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 的數值是有實際意義的:" + }, + { + "newline": "true" + }, + { + "latex": "$$\n\\lambda = \\frac{\\partial f}{\\partial c}\n$$", + "kind": "math_block" + }, + { + "text": "這表示:如果我們將約束條件 " + }, + { + "latex": "$g(x, y) = c$", + "kind": "math" + }, + { + "text": " 中的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 稍微改變一單位,目標函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的極值會改變大約 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 這麼多。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "舉例: 假設你找到最大產量 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 時,對應的成本約束為 " + }, + { + "latex": "$g=100$", + "kind": "math" + }, + { + "text": ",此時 " + }, + { + "latex": "$\\lambda = 5$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "這表示,如果你願意多花一塊錢 (將成本約束增加到 " + }, + { + "latex": "$g=101$", + "kind": "math" + }, + { + "text": "),你的最大產量 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 大約可以增加 5 個單位。" + } + ], + "content": "這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!" + } + ], + "content": "因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ], + "sections": [ + { + "id": "sec-all", + "title": "全部", + "blocks": [ + { + "type": "heading", + "level": 1, + "content": "拉格朗日乘數法", + "newline": "true", + "runs": [ + { + "text": "拉格朗日乘數法", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "sec" + }, + { + "type": "paragraph", + "content": "前一節(14-7)講了找極值與在限定區域裡找極值。這一節介紹拉格朗日乘數法——專門用來在限制條件下尋找函數的最大值或最小值。", + "newline": "false", + "runs": [ + { + "text": "前一節(14-7)講了找極值與在限定區域裡找極值。這一節介紹" + }, + { + "text": "拉格朗日乘數法", + "style": "bold" + }, + { + "text": "——專門用來在" + }, + { + "text": "限制條件", + "style": "bold" + }, + { + "text": "下尋找函數的最大值或最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "1️⃣ 拉格朗日乘數法的概念", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 拉格朗日乘數法的概念", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "card", + "kind": "定理", + "headline": "拉格朗日乘數法", + "body": [ + { + "type": "paragraph", + "content": "若 $(x_0,y_0,z_0)$ 是在限制條件 $g(x,y,z)=C$ 下,使 $f(x,y,z)$ 取得極值的點,則存在常數 $\\lambda$ 使得:$$\n\\nabla f(x_0,y_0,z_0) = \\lambda\\,\\nabla g(x_0,y_0,z_0)\n$$其中 $\\lambda$ 稱為拉格朗日乘數(Lagrange multiplier)。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$(x_0,y_0,z_0)$", + "kind": "math" + }, + { + "text": " 是在限制條件 " + }, + { + "latex": "$g(x,y,z)=C$", + "kind": "math" + }, + { + "text": " 下,使 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 取得極值的點,則存在常數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 使得:" + }, + { + "latex": "$$\n\\nabla f(x_0,y_0,z_0) = \\lambda\\,\\nabla g(x_0,y_0,z_0)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 稱為" + }, + { + "text": "拉格朗日乘數(Lagrange multiplier)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b17a534b64", + "label": "拉格朗日乘數法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "sjtsw3sx", + "width": "100%", + "height": "480", + "border": "0", + "caption": "拉格朗日乘數法", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "登山比喻:想像你是一位登山家,目標是找到山,也就是函數 $f(x,y)$ 的最高點或最低點。不過現在你不能自由移動,而是只能沿著一條繩索走。這條繩索就是約束條件 $g(x,y)=c$。\n因此,拉格朗日乘數法要解決的問題是:在約束條件 $g(x,y)=c$ 上,找出函數 $f(x,y)$ 的最大值或最小值。", + "newline": "true", + "runs": [ + { + "text": "登山比喻:", + "style": "bold" + }, + { + "text": "想像你是一位登山家,目標是找到山,也就是函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的最高點或最低點。不過現在你不能自由移動,而是只能沿著一條繩索走。這條繩索就是約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": "。" + }, + { + "newline": "true" + }, + { + "text": "因此,拉格朗日乘數法要解決的問題是:在約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": " 上,找出函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的最大值或最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在微積分中,梯度 $\\nabla f$ 表示函數 $f$ 上升最快的方向;而 $\\nabla g$ 則垂直於約束曲線 $g(x,y)=c$。\n拉格朗日乘數法的核心想法是:當 $f(x,y)$ 在約束條件上達到極值時,$\\nabla f$ 會與 $\\nabla g$ 平行。\n也就是說,存在一個數 $\\lambda$,使得$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y).\n$$其中,$\\lambda$ 稱為拉格朗日乘數。", + "newline": "true", + "runs": [ + { + "text": "在微積分中,梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 表示函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 上升最快的方向;而 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " 則垂直於約束曲線 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": "。" + }, + { + "newline": "true" + }, + { + "text": "拉格朗日乘數法的核心想法是:當 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在約束條件上達到極值時," + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 會與 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " 平行。" + }, + { + "newline": "true" + }, + { + "text": "也就是說,存在一個數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": ",使得" + }, + { + "latex": "$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y).\n$$", + "kind": "math_block" + }, + { + "text": "其中," + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 稱為" + }, + { + "text": "拉格朗日乘數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以,要在約束條件 $g(x,y)=c$ 下找極值,我們需要解下面這組方程式:$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y), \\qquad g(x,y)=c.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以,要在約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": " 下找極值,我們需要解下面這組方程式:" + }, + { + "latex": "$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y), \\qquad g(x,y)=c.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:「在極值點 $\\nabla f$ 與約束曲線相切」這個說法對嗎?", + "newline": "false", + "runs": [ + { + "text": "Q:「在極值點 ", + "style": "bold" + }, + { + "latex": "$\\nabla f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與約束曲線相切」這個說法對嗎?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-32", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-32::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-32", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "正確說法:極值點發生在$f$ 的等高線與約束曲線相切的地方,等價地,$\\nabla f$ 與 $\\nabla g$ 平行:$$\n\\nabla f(x,y) = \\lambda\\,\\nabla g(x,y)\n$$$\\nabla f$ 是等高線的法向量,不是切向量,所以不會「跟約束曲線相切」。", + "newline": "false", + "runs": [ + { + "text": "正確說法:極值點發生在" + }, + { + "latex": "$f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的等高線與約束曲線相切", + "style": "bold" + }, + { + "text": "的地方,等價地," + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "平行", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\nabla f(x,y) = \\lambda\\,\\nabla g(x,y)\n$$", + "kind": "math_block" + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是等高線的" + }, + { + "text": "法向量", + "style": "bold" + }, + { + "text": ",不是切向量,所以不會「跟約束曲線相切」。" + } + ] + } + ], + "gate_from": "flow-32::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n拉格朗日乘數法中,方程式 $\\nabla f = \\lambda \\nabla g$ 成立的幾何意義是什麼?\n\na. 目標函數 $f$ 的梯度方向與約束條件 $g$ 的等高線方向一致。\nb. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量互相垂直。\nc. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量平行。\nd. $\\lambda$ 的值代表極值點的大小。\n\n\n---\n\n\n註解\n§1 小結\n- 拉格朗日乘數法處理「在約束條件下的最佳化」問題\n- 極值點條件:$\\nabla f = \\lambda \\nabla g$(梯度平行)\n- 幾何解釋:$f$ 的等高線與約束曲線 $g=c$ 相切\n\n\n---\n\n## 2️⃣ 拉格朗日乘數法計算\n在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題: \n尋找函數 $f(x_1, x_2, \\dots, x_n)$ 在約束條件 $g(x_1, x_2, \\dots, x_n) = c$ 下的極值。 \n我們知道,關鍵在於解出 $\\nabla f = \\lambda \\nabla g$ 這個向量方程式,以及原來的約束條件。 \n\n在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧! \n\n方法\n拉格朗日乘數法計算步驟\n**步驟一**:設定目標函數 $f(x,y)$ 與約束條件 $g(x,y) = c$\n\n**步驟二**:展開 $\\nabla f = \\lambda\\nabla g$ 和約束條件,建立聯立方程組:\n1. $f_x = \\lambda g_x$\n2. $f_y = \\lambda g_y$\n\n**步驟三**:解聯立方程組\n\n**步驟四**:代回 $f$ 比較函數值,找最大/最小值\n\n\n---\n\n### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n**Step 3:求解**\n\n由前兩式:$2x = 2y \\implies x = y$\n\n代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$\n\n候選點:$(2,2)$,$\\lambda = 4$\n\n**Step 4:代回計算**\n\n$$f(2,2) = 4 + 4 = 8$$\n\n因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。\n\n\n\n\n\n建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n$x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $x = 2y$\nc. $y = 2x$\nd. $x + y = 0$\n\n\n\n\n代入 $x = y$ 到約束條件 $x+y=4$,候選極值點 $(x,y)$:\n\n\n\n\n\n$f(2,2) = 2^2 + 2^2 = 8$\n\n因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:\n\n- 最小值:$8$,發生在 $(2,2)$\n- 最大值:不存在\n\n\n\n\n---\n\n### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-1" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "拉格朗日乘數法中,方程式 " + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": " 成立的幾何意義是什麼?" + } + ], + "options": [ + { + "key": "a", + "text": "目標函數 $f$ 的梯度方向與約束條件 $g$ 的等高線方向一致。" + }, + { + "key": "b", + "text": "目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量互相垂直。" + }, + { + "key": "c", + "text": "目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量平行。" + }, + { + "key": "d", + "text": "$\\lambda$ 的值代表極值點的大小。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n拉格朗日乘數法中,方程式 $\\nabla f = \\lambda \\nabla g$ 成立的幾何意義是什麼?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "拉格朗日乘數法處理「在約束條件下的最佳化」問題" + } + ], + "content": "拉格朗日乘數法處理「在約束條件下的最佳化」問題" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "極值點條件:" + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": "(梯度平行)" + } + ], + "content": "極值點條件:$\\nabla f = \\lambda \\nabla g$(梯度平行)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "幾何解釋:" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的等高線與約束曲線 " + }, + { + "latex": "$g=c$", + "kind": "math" + }, + { + "text": " 相切" + } + ], + "content": "幾何解釋:$f$ 的等高線與約束曲線 $g=c$ 相切" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "2️⃣ 拉格朗日乘數法計算", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 拉格朗日乘數法計算", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題:\n尋找函數 $f(x_1, x_2, \\dots, x_n)$ 在約束條件 $g(x_1, x_2, \\dots, x_n) = c$ 下的極值。\n我們知道,關鍵在於解出 $\\nabla f = \\lambda \\nabla g$ 這個向量方程式,以及原來的約束條件。 ", + "newline": "true", + "runs": [ + { + "text": "在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題:" + }, + { + "newline": "true" + }, + { + "text": "尋找函數 " + }, + { + "latex": "$f(x_1, x_2, \\dots, x_n)$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$g(x_1, x_2, \\dots, x_n) = c$", + "kind": "math" + }, + { + "text": " 下的極值。" + }, + { + "newline": "true" + }, + { + "text": "我們知道,關鍵在於解出 " + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": " 這個向量方程式,以及原來的約束條件。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧!\n", + "newline": "true", + "runs": [ + { + "text": "在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧!" + }, + { + "newline": "true" + } + ] + }, + { + "type": "card", + "kind": "方法", + "headline": "拉格朗日乘數法計算步驟", + "body": [ + { + "type": "paragraph", + "content": "步驟一:設定目標函數 $f(x,y)$ 與約束條件 $g(x,y) = c$", + "newline": "false", + "runs": [ + { + "text": "步驟一", + "style": "bold" + }, + { + "text": ":設定目標函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 與約束條件 " + }, + { + "latex": "$g(x,y) = c$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟二:展開 $\\nabla f = \\lambda\\nabla g$ 和約束條件,建立聯立方程組:", + "newline": "false", + "runs": [ + { + "text": "步驟二", + "style": "bold" + }, + { + "text": ":展開 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": " 和約束條件,建立聯立方程組:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$f_x = \\lambda g_x$", + "kind": "math" + } + ], + "content": "$f_x = \\lambda g_x$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$f_y = \\lambda g_y$", + "kind": "math" + } + ], + "content": "$f_y = \\lambda g_y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟三:解聯立方程組", + "newline": "false", + "runs": [ + { + "text": "步驟三", + "style": "bold" + }, + { + "text": ":解聯立方程組" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟四:代回 $f$ 比較函數值,找最大/最小值", + "newline": "false", + "runs": [ + { + "text": "步驟四", + "style": "bold" + }, + { + "text": ":代回 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 比較函數值,找最大/最小值" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n**Step 3:求解**\n\n由前兩式:$2x = 2y \\implies x = y$\n\n代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$\n\n候選點:$(2,2)$,$\\lambda = 4$\n\n**Step 4:代回計算**\n\n$$f(2,2) = 4 + 4 = 8$$\n\n因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。\n\n\n\n\n\n建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n$x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $x = 2y$\nc. $y = 2x$\nd. $x + y = 0$\n\n\n\n\n代入 $x = y$ 到約束條件 $x+y=4$,候選極值點 $(x,y)$:\n\n\n\n\n\n$f(2,2) = 2^2 + 2^2 = 8$\n\n因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:\n\n- 最小值:$8$,發生在 $(2,2)$\n- 最大值:不存在\n\n\n\n\n---\n\n### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = x^2 + y^2$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$g(x,y) = x + y = 4$", + "kind": "math" + }, + { + "text": " 下的最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最小值發生在 " + }, + { + "latex": "$(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "2,2" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最小值為:" + } + ], + "answers": [ + "8" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_879055cd4c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:建立聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 2:建立聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:求解", + "newline": "false", + "runs": [ + { + "text": "Step 3:求解", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由前兩式:$2x = 2y \\implies x = y$", + "newline": "false", + "runs": [ + { + "text": "由前兩式:" + }, + { + "latex": "$2x = 2y \\implies x = y$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$", + "newline": "false", + "runs": [ + { + "text": "代入約束條件:" + }, + { + "latex": "$2x = 4 \\implies x = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "候選點:$(2,2)$,$\\lambda = 4$", + "newline": "false", + "runs": [ + { + "text": "候選點:" + }, + { + "latex": "$(2,2)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\lambda = 4$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代回計算", + "newline": "false", + "runs": [ + { + "text": "Step 4:代回計算", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(2,2) = 4 + 4 = 8\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(2,2) = 4 + 4 = 8\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。", + "newline": "false", + "runs": [ + { + "text": "因約束條件是無界直線," + }, + { + "latex": "$x^2+y^2$", + "kind": "math" + }, + { + "text": " 可以任意大,所以只有最小值 " + }, + { + "latex": "$8$", + "kind": "math" + }, + { + "text": ",沒有最大值。" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7ac6e078d6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-33", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "newline": "false", + "runs": [ + { + "text": "建立聯立方程組," + }, + { + "latex": "$\\nabla f = \\langle 2x,2y\\rangle$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\nabla g = \\langle 1,1\\rangle$", + "kind": "math" + }, + { + "text": ",由 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": " 得:" + }, + { + "latex": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-33::step-1::q1", + "prompt_runs": [ + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$x = y$" + }, + { + "key": "b", + "text": "$x = 2y$" + }, + { + "key": "c", + "text": "$y = 2x$" + }, + { + "key": "d", + "text": "$x + y = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-33", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-33::step-2::q2", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$x = y$", + "kind": "math" + }, + { + "text": " 到約束條件 " + }, + { + "latex": "$x+y=4$", + "kind": "math" + }, + { + "text": ",候選極值點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "2,2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-33", + "step": "step-2" + } + ], + "gate_from": "flow-33::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "$f(2,2) = 2^2 + 2^2 = 8$", + "newline": "false", + "runs": [ + { + "latex": "$f(2,2) = 2^2 + 2^2 = 8$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:", + "newline": "false", + "runs": [ + { + "text": "因為約束條件是無界直線,沿著直線走遠時 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 可以趨向 " + }, + { + "latex": "$+\\infty$", + "kind": "math" + }, + { + "text": ",所以:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最小值:" + }, + { + "latex": "$8$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(2,2)$", + "kind": "math" + } + ], + "content": "最小值:$8$,發生在 $(2,2)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大值:不存在" + } + ], + "content": "最大值:不存在" + } + ] + } + ], + "gate_from": "flow-33::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?", + "newline": "false", + "runs": [ + { + "text": "尋找函數 " + }, + { + "latex": "$f(x,y,z,w)$", + "kind": "math" + }, + { + "text": "(四個變數)在單一約束條件 " + }, + { + "latex": "$g(x,y,z,w)=c$", + "kind": "math" + }, + { + "text": " 下的極值,共需解出幾個聯立方程?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "5" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入方程個數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_440adbc418", + "label": "看解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "未知數:$x, y, z, w$(4 個)和 $\\lambda$(1 個),共 5 個。因此需要 5 個方程組:4 個梯度分量方程 + 1 個約束條件。", + "newline": "false", + "runs": [ + { + "text": "未知數:" + }, + { + "latex": "$x, y, z, w$", + "kind": "math" + }, + { + "text": "(4 個)和 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": "(1 個),共 5 個。因此需要 5 個方程組:4 個梯度分量方程 + 1 個約束條件。" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$y = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10$$\n\n**Step 3:求解**\n\n由 $x = \\lambda$,代入 $y = 2\\lambda$:$y = 2x$\n\n代入約束條件:$2x+2x=10 \\implies x = \\dfrac{5}{2}$,$y = 5$\n\n**Step 4:拉格朗日乘數**\n\n$$\\lambda = x = \\frac{5}{2}$$\n\n\n\n\n\n$\\nabla f = \\langle f_x,f_y\\rangle = $:\n\n\n\n$\\nabla g = \\langle g_x,g_y\\rangle = $:\n\n\n\n\n\n由 $\\nabla f = \\lambda\\nabla g$:$y = 2\\lambda$,$x = \\lambda$,因此 $y = ?$\n\n\n\n\n\n代入約束條件 $2x+y=10$,求極值點:\n\n\n\n$\\lambda = ?$\n\n\n\n\n\n\n---\n\n### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n\n\n\n**Step 1:設定**\n\n目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$\n\n**Step 2:計算梯度**\n\n$$\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle$$\n\n**Step 3:聯立方程組**\n\n$$20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200$$\n\n$$\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x$$\n\n**Step 4:代入約束條件**\n\n$$4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67$$\n\n**Step 5:計算最大產量**\n\n$$f\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74$$\n\n\n\n\n\n設定目標函數和約束條件:\n- 目標函數:$f(x,y) = ?$\n\n\n\n- 約束條件:$g(x,y) = ?$\n\n\n\n\n\n由梯度方程得 $\\lambda = 5xy = 10x^2$,因此 $x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $y = 2x$\nc. $x = 2y$\nd. $x + y = 0$\n\n\n\n\n代入約束條件,求最佳組合:\n\n\n\n\n\n代入目標函數,最大產量:\n\n\n\n\n\n\n---\n\n## 3️⃣ 雙重約束條件與應用\n在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。\n\n\n定理\n雙重約束條件\n在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。 \n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合: \n$$\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)$$ \n這裡我們引入了兩個拉格朗日乘數: \n- $\\lambda$ (Lambda):對應約束條件 $g_1$。 \n- $\\mu$ (Mu):對應約束條件 $g_2$。 \n\n\n**Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?**\n\n\n\na. Yes\nb. No\n\n\n\n$\\nabla f$ 只要**落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內**(線性組合)即可,不必同時平行於兩者。\n\n\n\n\n方法\n雙重約束找極值 \n1. 設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。 \n2. 建立聯立方程: 我們會有**五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程**: \n - $f_x = \\lambda (g_1)_x + \\mu (g_2)_x$ \n - $f_y = \\lambda (g_1)_y + \\mu (g_2)_y$ \n - $f_z = \\lambda (g_1)_z + \\mu (g_2)_z$ \n - $g_1(x, y, z) = c_1$ \n - $g_2(x, y, z) = c_2$ \n3. 解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。 \n\n💡解題策略 : \n當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「**幾個未知數,就要有幾個方程組**。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。 \n---\n\n其實 $\\lambda$ 的數值是有實際意義的: \n$$\\lambda = \\frac{\\partial f}{\\partial c}$$ \n這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。 \n- 舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。 \n- 這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。 \n- 因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = xy$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$2x+y=10$", + "kind": "math" + }, + { + "text": " 下的極值,並求拉格朗日乘數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "極值點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "5/2,5" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 的值:" + } + ], + "answers": [ + "5/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 λ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_676d2eb9ab", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:建立聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 2:建立聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\ny = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\ny = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:求解", + "newline": "false", + "runs": [ + { + "text": "Step 3:求解", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由 $x = \\lambda$,代入 $y = 2\\lambda$:$y = 2x$", + "newline": "false", + "runs": [ + { + "text": "由 " + }, + { + "latex": "$x = \\lambda$", + "kind": "math" + }, + { + "text": ",代入 " + }, + { + "latex": "$y = 2\\lambda$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$y = 2x$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入約束條件:$2x+2x=10 \\implies x = \\dfrac{5}{2}$,$y = 5$", + "newline": "false", + "runs": [ + { + "text": "代入約束條件:" + }, + { + "latex": "$2x+2x=10 \\implies x = \\dfrac{5}{2}$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 5$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:拉格朗日乘數", + "newline": "false", + "runs": [ + { + "text": "Step 4:拉格朗日乘數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\lambda = x = \\frac{5}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\lambda = x = \\frac{5}{2}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_60e6a033f0", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-34", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-1::q1", + "prompt_runs": [ + { + "latex": "$\\nabla f = \\langle f_x,f_y\\rangle =$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "y,x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 f_x, f_y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-1" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-1::q2", + "prompt_runs": [ + { + "latex": "$\\nabla g = \\langle g_x,g_y\\rangle =$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "2,1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 g_x, g_y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-2::q3", + "prompt_runs": [ + { + "text": "由 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$y = 2\\lambda$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x = \\lambda$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$y = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 y 和 x 的關係", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-2" + } + ], + "gate_from": "flow-34::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-3::q4", + "prompt_runs": [ + { + "text": "代入約束條件 " + }, + { + "latex": "$2x+y=10$", + "kind": "math" + }, + { + "text": ",求極值點:" + } + ], + "answers": [ + "5/2,5" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-3" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-3::q5", + "prompt_runs": [ + { + "latex": "$\\lambda = ?$", + "kind": "math" + } + ], + "answers": [ + "5/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 λ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-3" + } + ], + "gate_from": "flow-34::step-2::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n\n\n\n**Step 1:設定**\n\n目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$\n\n**Step 2:計算梯度**\n\n$$\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle$$\n\n**Step 3:聯立方程組**\n\n$$20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200$$\n\n$$\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x$$\n\n**Step 4:代入約束條件**\n\n$$4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67$$\n\n**Step 5:計算最大產量**\n\n$$f\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74$$\n\n\n\n\n\n設定目標函數和約束條件:\n- 目標函數:$f(x,y) = ?$\n\n\n\n- 約束條件:$g(x,y) = ?$\n\n\n\n\n\n由梯度方程得 $\\lambda = 5xy = 10x^2$,因此 $x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $y = 2x$\nc. $x = 2y$\nd. $x + y = 0$\n\n\n\n\n代入約束條件,求最佳組合:\n\n\n\n\n\n代入目標函數,最大產量:\n\n\n\n\n\n\n---\n\n## 3️⃣ 雙重約束條件與應用\n在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。\n\n\n定理\n雙重約束條件\n在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。 \n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合: \n$$\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)$$ \n這裡我們引入了兩個拉格朗日乘數: \n- $\\lambda$ (Lambda):對應約束條件 $g_1$。 \n- $\\mu$ (Mu):對應約束條件 $g_2$。 \n\n\n**Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?**\n\n\n\na. Yes\nb. No\n\n\n\n$\\nabla f$ 只要**落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內**(線性組合)即可,不必同時平行於兩者。\n\n\n\n\n方法\n雙重約束找極值 \n1. 設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。 \n2. 建立聯立方程: 我們會有**五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程**: \n - $f_x = \\lambda (g_1)_x + \\mu (g_2)_x$ \n - $f_y = \\lambda (g_1)_y + \\mu (g_2)_y$ \n - $f_z = \\lambda (g_1)_z + \\mu (g_2)_z$ \n - $g_1(x, y, z) = c_1$ \n - $g_2(x, y, z) = c_2$ \n3. 解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。 \n\n💡解題策略 : \n當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「**幾個未知數,就要有幾個方程組**。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。 \n---\n\n其實 $\\lambda$ 的數值是有實際意義的: \n$$\\lambda = \\frac{\\partial f}{\\partial c}$$ \n這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。 \n- 舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。 \n- 這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。 \n- 因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。", + "newline": "false", + "runs": [ + { + "text": "某公司預算 " + }, + { + "latex": "$200$", + "kind": "math" + }, + { + "text": " 萬,原料 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 每單位 " + }, + { + "latex": "$4$", + "kind": "math" + }, + { + "text": " 萬元,原料 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 每單位 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 萬元,總產量 " + }, + { + "latex": "$f(x,y) = 10x^2y$", + "kind": "math" + }, + { + "text": "。在預算限制下找最大產量。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最佳原料組合 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "(取到小數第二位):" + } + ], + "answers": [ + "33.33,66.67" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最大產量(取到小數第二位):" + } + ], + "answers": [ + "740740.74" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入最大產量", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a884607695", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設定", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$", + "newline": "false", + "runs": [ + { + "text": "目標函數:" + }, + { + "latex": "$f(x,y) = 10x^2y$", + "kind": "math" + }, + { + "text": ";約束條件:" + }, + { + "latex": "$4x+y = 200$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 3:聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入約束條件", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入約束條件", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 5:計算最大產量", + "newline": "false", + "runs": [ + { + "text": "Step 5:計算最大產量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_aeda61ff89", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-35", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-1::q1", + "prompt_runs": [ + { + "text": "設定目標函數和約束條件:- 目標函數:" + }, + { + "latex": "$f(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "10*x^2*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入目標函數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-1" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "約束條件:" + }, + { + "latex": "$g(x,y) = ?$", + "kind": "math" + } + ], + "content": "約束條件:$g(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-1::q2", + "prompt_runs": [], + "answers": [ + "4*x+y=200" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入約束條件", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-35::step-2::q3", + "prompt_runs": [ + { + "text": "由梯度方程得 " + }, + { + "latex": "$\\lambda = 5xy = 10x^2$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$x = y$" + }, + { + "key": "b", + "text": "$y = 2x$" + }, + { + "key": "c", + "text": "$x = 2y$" + }, + { + "key": "d", + "text": "$x + y = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-35", + "step": "step-2" + } + ], + "gate_from": "flow-35::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-3::q4", + "prompt_runs": [ + { + "text": "代入約束條件,求最佳組合:" + } + ], + "answers": [ + "33.33,66.67" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y(小數第二位)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-3" + } + ], + "gate_from": "flow-35::step-2::q3" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-4::q5", + "prompt_runs": [ + { + "text": "代入目標函數,最大產量:" + } + ], + "answers": [ + "740740.74" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入最大產量", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-4" + } + ], + "gate_from": "flow-35::step-3::q4" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 2, + "content": "3️⃣ 雙重約束條件與應用", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 雙重約束條件與應用", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。", + "newline": "false", + "runs": [ + { + "text": "在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:" + }, + { + "latex": "$g_1(x,y,z) = c_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$g_2(x,y,z) = c_2$", + "kind": "math" + }, + { + "text": "的話要怎麼辦。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "雙重約束條件", + "body": [ + { + "type": "paragraph", + "content": "在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。\n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合:\n$$\n\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)\n$$這裡我們引入了兩個拉格朗日乘數:\n", + "newline": "true", + "runs": [ + { + "text": "在兩個約束條件下,極值點發生在目標函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 位於兩個約束條件的梯度 " + }, + { + "latex": "$\\nabla g_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\nabla g_2$", + "kind": "math" + }, + { + "text": " 所形成的平面上。" + }, + { + "newline": "true" + }, + { + "text": "數學上,這表示 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 可以寫成 " + }, + { + "latex": "$\\nabla g_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\nabla g_2$", + "kind": "math" + }, + { + "text": " 的線性組合:" + }, + { + "newline": "true" + }, + { + "latex": "$$\n\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)\n$$", + "kind": "math_block" + }, + { + "text": "這裡我們引入了兩個拉格朗日乘數:" + }, + { + "newline": "true" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " (Lambda):對應約束條件 " + }, + { + "latex": "$g_1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lambda$ (Lambda):對應約束條件 $g_1$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\mu$", + "kind": "math" + }, + { + "text": " (Mu):對應約束條件 " + }, + { + "latex": "$g_2$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\mu$ (Mu):對應約束條件 $g_2$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?", + "newline": "false", + "runs": [ + { + "text": "Q:「", + "style": "bold" + }, + { + "latex": "$\\nabla f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 必須同時平行於 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_1$", + "kind": "math", + "style": "bold" + }, + { + "text": " 和 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_2$", + "kind": "math", + "style": "bold" + }, + { + "text": "」這個說法對嗎?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-36", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-36::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-36", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "$\\nabla f$ 只要落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內(線性組合)即可,不必同時平行於兩者。", + "newline": "false", + "runs": [ + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 只要" + }, + { + "text": "落在 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_1$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_2$", + "kind": "math", + "style": "bold" + }, + { + "text": " 構成的平面內", + "style": "bold" + }, + { + "text": "(線性組合)即可,不必同時平行於兩者。" + } + ] + } + ], + "gate_from": "flow-36::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "方法", + "headline": "雙重約束找極值", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "設定函數: " + }, + { + "latex": "$f(x, y, z)$", + "kind": "math" + }, + { + "text": "、 " + }, + { + "latex": "$g_1(x, y, z) = c_1$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$g_2(x, y, z) = c_2$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "建立聯立方程: 我們會有" + }, + { + "text": "五個未知數 (", + "style": "bold" + }, + { + "latex": "$x, y, z, \\lambda, \\mu$", + "kind": "math", + "style": "bold" + }, + { + "text": ") 和五個方程", + "style": "bold" + }, + { + "text": ":" + } + ], + "content": "建立聯立方程: 我們會有五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_x = \\lambda (g_1)_x + \\mu (g_2)_x$", + "kind": "math" + } + ], + "content": "$f_x = \\lambda (g_1)_x + \\mu (g_2)_x$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_y = \\lambda (g_1)_y + \\mu (g_2)_y$", + "kind": "math" + } + ], + "content": "$f_y = \\lambda (g_1)_y + \\mu (g_2)_y$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_z = \\lambda (g_1)_z + \\mu (g_2)_z$", + "kind": "math" + } + ], + "content": "$f_z = \\lambda (g_1)_z + \\mu (g_2)_z$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$g_1(x, y, z) = c_1$", + "kind": "math" + } + ], + "content": "$g_1(x, y, z) = c_1$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$g_2(x, y, z) = c_2$", + "kind": "math" + } + ], + "content": "$g_2(x, y, z) = c_2$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "解出這五個方程組中的 " + }, + { + "latex": "$(x, y, z)$", + "kind": "math" + }, + { + "text": " 點,然後代入 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 進行比較,即可找到極值。" + } + ], + "content": "解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "💡解題策略 : 當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「幾個未知數,就要有幾個方程組。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。\n", + "newline": "true", + "runs": [ + { + "text": "💡解題策略 : 當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「" + }, + { + "text": "幾個未知數,就要有幾個方程組", + "style": "bold" + }, + { + "text": "。」 引入幾個約束條件,就引入幾個 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\mu$", + "kind": "math" + }, + { + "text": " 等乘數來平衡梯度。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_021d00b75a", + "label": "看更多", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "其實 $\\lambda$ 的數值是有實際意義的:\n$$\n\\lambda = \\frac{\\partial f}{\\partial c}\n$$這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。\n", + "newline": "true", + "runs": [ + { + "text": "其實 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 的數值是有實際意義的:" + }, + { + "newline": "true" + }, + { + "latex": "$$\n\\lambda = \\frac{\\partial f}{\\partial c}\n$$", + "kind": "math_block" + }, + { + "text": "這表示:如果我們將約束條件 " + }, + { + "latex": "$g(x, y) = c$", + "kind": "math" + }, + { + "text": " 中的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 稍微改變一單位,目標函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的極值會改變大約 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 這麼多。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "舉例: 假設你找到最大產量 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 時,對應的成本約束為 " + }, + { + "latex": "$g=100$", + "kind": "math" + }, + { + "text": ",此時 " + }, + { + "latex": "$\\lambda = 5$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "這表示,如果你願意多花一塊錢 (將成本約束增加到 " + }, + { + "latex": "$g=101$", + "kind": "math" + }, + { + "text": "),你的最大產量 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 大約可以增加 5 個單位。" + } + ], + "content": "這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!" + } + ], + "content": "因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-1", + "title": "1️⃣ 拉格朗日乘數法的概念", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "1️⃣ 拉格朗日乘數法的概念", + "newline": "true", + "runs": [ + { + "text": "1️⃣ 拉格朗日乘數法的概念", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "1" + }, + { + "type": "card", + "kind": "定理", + "headline": "拉格朗日乘數法", + "body": [ + { + "type": "paragraph", + "content": "若 $(x_0,y_0,z_0)$ 是在限制條件 $g(x,y,z)=C$ 下,使 $f(x,y,z)$ 取得極值的點,則存在常數 $\\lambda$ 使得:$$\n\\nabla f(x_0,y_0,z_0) = \\lambda\\,\\nabla g(x_0,y_0,z_0)\n$$其中 $\\lambda$ 稱為拉格朗日乘數(Lagrange multiplier)。", + "newline": "false", + "runs": [ + { + "text": "若 " + }, + { + "latex": "$(x_0,y_0,z_0)$", + "kind": "math" + }, + { + "text": " 是在限制條件 " + }, + { + "latex": "$g(x,y,z)=C$", + "kind": "math" + }, + { + "text": " 下,使 " + }, + { + "latex": "$f(x,y,z)$", + "kind": "math" + }, + { + "text": " 取得極值的點,則存在常數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 使得:" + }, + { + "latex": "$$\n\\nabla f(x_0,y_0,z_0) = \\lambda\\,\\nabla g(x_0,y_0,z_0)\n$$", + "kind": "math_block" + }, + { + "text": "其中 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 稱為" + }, + { + "text": "拉格朗日乘數(Lagrange multiplier)", + "style": "bold" + }, + { + "text": "。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_b17a534b64", + "label": "拉格朗日乘數法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "geogebra", + "id": "sjtsw3sx", + "width": "100%", + "height": "480", + "border": "0", + "caption": "拉格朗日乘數法", + "card": "0" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "登山比喻:想像你是一位登山家,目標是找到山,也就是函數 $f(x,y)$ 的最高點或最低點。不過現在你不能自由移動,而是只能沿著一條繩索走。這條繩索就是約束條件 $g(x,y)=c$。\n因此,拉格朗日乘數法要解決的問題是:在約束條件 $g(x,y)=c$ 上,找出函數 $f(x,y)$ 的最大值或最小值。", + "newline": "true", + "runs": [ + { + "text": "登山比喻:", + "style": "bold" + }, + { + "text": "想像你是一位登山家,目標是找到山,也就是函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的最高點或最低點。不過現在你不能自由移動,而是只能沿著一條繩索走。這條繩索就是約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": "。" + }, + { + "newline": "true" + }, + { + "text": "因此,拉格朗日乘數法要解決的問題是:在約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": " 上,找出函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 的最大值或最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在微積分中,梯度 $\\nabla f$ 表示函數 $f$ 上升最快的方向;而 $\\nabla g$ 則垂直於約束曲線 $g(x,y)=c$。\n拉格朗日乘數法的核心想法是:當 $f(x,y)$ 在約束條件上達到極值時,$\\nabla f$ 會與 $\\nabla g$ 平行。\n也就是說,存在一個數 $\\lambda$,使得$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y).\n$$其中,$\\lambda$ 稱為拉格朗日乘數。", + "newline": "true", + "runs": [ + { + "text": "在微積分中,梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 表示函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 上升最快的方向;而 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " 則垂直於約束曲線 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": "。" + }, + { + "newline": "true" + }, + { + "text": "拉格朗日乘數法的核心想法是:當 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 在約束條件上達到極值時," + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 會與 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " 平行。" + }, + { + "newline": "true" + }, + { + "text": "也就是說,存在一個數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": ",使得" + }, + { + "latex": "$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y).\n$$", + "kind": "math_block" + }, + { + "text": "其中," + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 稱為" + }, + { + "text": "拉格朗日乘數", + "style": "bold" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "所以,要在約束條件 $g(x,y)=c$ 下找極值,我們需要解下面這組方程式:$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y), \\qquad g(x,y)=c.\n$$", + "newline": "false", + "runs": [ + { + "text": "所以,要在約束條件 " + }, + { + "latex": "$g(x,y)=c$", + "kind": "math" + }, + { + "text": " 下找極值,我們需要解下面這組方程式:" + }, + { + "latex": "$$\n\\nabla f(x,y)=\\lambda \\nabla g(x,y), \\qquad g(x,y)=c.\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:「在極值點 $\\nabla f$ 與約束曲線相切」這個說法對嗎?", + "newline": "false", + "runs": [ + { + "text": "Q:「在極值點 ", + "style": "bold" + }, + { + "latex": "$\\nabla f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與約束曲線相切」這個說法對嗎?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-32", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-32::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-32", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "正確說法:極值點發生在$f$ 的等高線與約束曲線相切的地方,等價地,$\\nabla f$ 與 $\\nabla g$ 平行:$$\n\\nabla f(x,y) = \\lambda\\,\\nabla g(x,y)\n$$$\\nabla f$ 是等高線的法向量,不是切向量,所以不會「跟約束曲線相切」。", + "newline": "false", + "runs": [ + { + "text": "正確說法:極值點發生在" + }, + { + "latex": "$f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 的等高線與約束曲線相切", + "style": "bold" + }, + { + "text": "的地方,等價地," + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 與 " + }, + { + "latex": "$\\nabla g$", + "kind": "math" + }, + { + "text": " " + }, + { + "text": "平行", + "style": "bold" + }, + { + "text": ":" + }, + { + "latex": "$$\n\\nabla f(x,y) = \\lambda\\,\\nabla g(x,y)\n$$", + "kind": "math_block" + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 是等高線的" + }, + { + "text": "法向量", + "style": "bold" + }, + { + "text": ",不是切向量,所以不會「跟約束曲線相切」。" + } + ] + } + ], + "gate_from": "flow-32::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 1", + "newline": "true", + "runs": [ + { + "text": "Example 1", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 1, + "ai_prompt_md": "### Example 1\n拉格朗日乘數法中,方程式 $\\nabla f = \\lambda \\nabla g$ 成立的幾何意義是什麼?\n\na. 目標函數 $f$ 的梯度方向與約束條件 $g$ 的等高線方向一致。\nb. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量互相垂直。\nc. 目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量平行。\nd. $\\lambda$ 的值代表極值點的大小。\n\n\n---\n\n\n註解\n§1 小結\n- 拉格朗日乘數法處理「在約束條件下的最佳化」問題\n- 極值點條件:$\\nabla f = \\lambda \\nabla g$(梯度平行)\n- 幾何解釋:$f$ 的等高線與約束曲線 $g=c$ 相切\n\n\n---\n\n## 2️⃣ 拉格朗日乘數法計算\n在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題: \n尋找函數 $f(x_1, x_2, \\dots, x_n)$ 在約束條件 $g(x_1, x_2, \\dots, x_n) = c$ 下的極值。 \n我們知道,關鍵在於解出 $\\nabla f = \\lambda \\nabla g$ 這個向量方程式,以及原來的約束條件。 \n\n在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧! \n\n方法\n拉格朗日乘數法計算步驟\n**步驟一**:設定目標函數 $f(x,y)$ 與約束條件 $g(x,y) = c$\n\n**步驟二**:展開 $\\nabla f = \\lambda\\nabla g$ 和約束條件,建立聯立方程組:\n1. $f_x = \\lambda g_x$\n2. $f_y = \\lambda g_y$\n\n**步驟三**:解聯立方程組\n\n**步驟四**:代回 $f$ 比較函數值,找最大/最小值\n\n\n---\n\n### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n**Step 3:求解**\n\n由前兩式:$2x = 2y \\implies x = y$\n\n代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$\n\n候選點:$(2,2)$,$\\lambda = 4$\n\n**Step 4:代回計算**\n\n$$f(2,2) = 4 + 4 = 8$$\n\n因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。\n\n\n\n\n\n建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n$x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $x = 2y$\nc. $y = 2x$\nd. $x + y = 0$\n\n\n\n\n代入 $x = y$ 到約束條件 $x+y=4$,候選極值點 $(x,y)$:\n\n\n\n\n\n$f(2,2) = 2^2 + 2^2 = 8$\n\n因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:\n\n- 最小值:$8$,發生在 $(2,2)$\n- 最大值:不存在\n\n\n\n\n---\n\n### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-1" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "", + "prompt_runs": [ + { + "text": "拉格朗日乘數法中,方程式 " + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": " 成立的幾何意義是什麼?" + } + ], + "options": [ + { + "key": "a", + "text": "目標函數 $f$ 的梯度方向與約束條件 $g$ 的等高線方向一致。" + }, + { + "key": "b", + "text": "目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量互相垂直。" + }, + { + "key": "c", + "text": "目標函數 $f$ 的梯度向量與約束條件 $g$ 的梯度向量平行。" + }, + { + "key": "d", + "text": "$\\lambda$ 的值代表極值點的大小。" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "c", + "ai_prompt_md": "### Example 1\n拉格朗日乘數法中,方程式 $\\nabla f = \\lambda \\nabla g$ 成立的幾何意義是什麼?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "card", + "kind": "註解", + "headline": "§1 小結", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "拉格朗日乘數法處理「在約束條件下的最佳化」問題" + } + ], + "content": "拉格朗日乘數法處理「在約束條件下的最佳化」問題" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "極值點條件:" + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": "(梯度平行)" + } + ], + "content": "極值點條件:$\\nabla f = \\lambda \\nabla g$(梯度平行)" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "幾何解釋:" + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的等高線與約束曲線 " + }, + { + "latex": "$g=c$", + "kind": "math" + }, + { + "text": " 相切" + } + ], + "content": "幾何解釋:$f$ 的等高線與約束曲線 $g=c$ 相切" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-2", + "title": "2️⃣ 拉格朗日乘數法計算", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "2️⃣ 拉格朗日乘數法計算", + "newline": "true", + "runs": [ + { + "text": "2️⃣ 拉格朗日乘數法計算", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "2" + }, + { + "type": "paragraph", + "content": "在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題:\n尋找函數 $f(x_1, x_2, \\dots, x_n)$ 在約束條件 $g(x_1, x_2, \\dots, x_n) = c$ 下的極值。\n我們知道,關鍵在於解出 $\\nabla f = \\lambda \\nabla g$ 這個向量方程式,以及原來的約束條件。 ", + "newline": "true", + "runs": [ + { + "text": "在開始計算之前,我們再來回顧一下,拉格朗日乘數法就是要解決這個問題:" + }, + { + "newline": "true" + }, + { + "text": "尋找函數 " + }, + { + "latex": "$f(x_1, x_2, \\dots, x_n)$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$g(x_1, x_2, \\dots, x_n) = c$", + "kind": "math" + }, + { + "text": " 下的極值。" + }, + { + "newline": "true" + }, + { + "text": "我們知道,關鍵在於解出 " + }, + { + "latex": "$\\nabla f = \\lambda \\nabla g$", + "kind": "math" + }, + { + "text": " 這個向量方程式,以及原來的約束條件。 " + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧!\n", + "newline": "true", + "runs": [ + { + "text": "在複習完後,我們就正式進入拉格朗日乘數法的核心計算步驟吧!" + }, + { + "newline": "true" + } + ] + }, + { + "type": "card", + "kind": "方法", + "headline": "拉格朗日乘數法計算步驟", + "body": [ + { + "type": "paragraph", + "content": "步驟一:設定目標函數 $f(x,y)$ 與約束條件 $g(x,y) = c$", + "newline": "false", + "runs": [ + { + "text": "步驟一", + "style": "bold" + }, + { + "text": ":設定目標函數 " + }, + { + "latex": "$f(x,y)$", + "kind": "math" + }, + { + "text": " 與約束條件 " + }, + { + "latex": "$g(x,y) = c$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟二:展開 $\\nabla f = \\lambda\\nabla g$ 和約束條件,建立聯立方程組:", + "newline": "false", + "runs": [ + { + "text": "步驟二", + "style": "bold" + }, + { + "text": ":展開 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": " 和約束條件,建立聯立方程組:" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "latex": "$f_x = \\lambda g_x$", + "kind": "math" + } + ], + "content": "$f_x = \\lambda g_x$" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "latex": "$f_y = \\lambda g_y$", + "kind": "math" + } + ], + "content": "$f_y = \\lambda g_y$" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟三:解聯立方程組", + "newline": "false", + "runs": [ + { + "text": "步驟三", + "style": "bold" + }, + { + "text": ":解聯立方程組" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "步驟四:代回 $f$ 比較函數值,找最大/最小值", + "newline": "false", + "runs": [ + { + "text": "步驟四", + "style": "bold" + }, + { + "text": ":代回 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 比較函數值,找最大/最小值" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 2", + "newline": "true", + "runs": [ + { + "text": "Example 2", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 2, + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n**Step 3:求解**\n\n由前兩式:$2x = 2y \\implies x = y$\n\n代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$\n\n候選點:$(2,2)$,$\\lambda = 4$\n\n**Step 4:代回計算**\n\n$$f(2,2) = 4 + 4 = 8$$\n\n因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。\n\n\n\n\n\n建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:\n$$2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4$$\n\n$x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $x = 2y$\nc. $y = 2x$\nd. $x + y = 0$\n\n\n\n\n代入 $x = y$ 到約束條件 $x+y=4$,候選極值點 $(x,y)$:\n\n\n\n\n\n$f(2,2) = 2^2 + 2^2 = 8$\n\n因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:\n\n- 最小值:$8$,發生在 $(2,2)$\n- 最大值:不存在\n\n\n\n\n---\n\n### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-2" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = x^2 + y^2$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$g(x,y) = x + y = 4$", + "kind": "math" + }, + { + "text": " 下的最小值。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最小值發生在 " + }, + { + "latex": "$(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "2,2" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最小值為:" + } + ], + "answers": [ + "8" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入答案", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_879055cd4c", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle 2x, 2y \\rangle, \\qquad \\nabla g = \\langle 1, 1 \\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:建立聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 2:建立聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:求解", + "newline": "false", + "runs": [ + { + "text": "Step 3:求解", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由前兩式:$2x = 2y \\implies x = y$", + "newline": "false", + "runs": [ + { + "text": "由前兩式:" + }, + { + "latex": "$2x = 2y \\implies x = y$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入約束條件:$2x = 4 \\implies x = 2$,$y = 2$", + "newline": "false", + "runs": [ + { + "text": "代入約束條件:" + }, + { + "latex": "$2x = 4 \\implies x = 2$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 2$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "候選點:$(2,2)$,$\\lambda = 4$", + "newline": "false", + "runs": [ + { + "text": "候選點:" + }, + { + "latex": "$(2,2)$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\lambda = 4$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代回計算", + "newline": "false", + "runs": [ + { + "text": "Step 4:代回計算", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf(2,2) = 4 + 4 = 8\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf(2,2) = 4 + 4 = 8\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因約束條件是無界直線,$x^2+y^2$ 可以任意大,所以只有最小值 $8$,沒有最大值。", + "newline": "false", + "runs": [ + { + "text": "因約束條件是無界直線," + }, + { + "latex": "$x^2+y^2$", + "kind": "math" + }, + { + "text": " 可以任意大,所以只有最小值 " + }, + { + "latex": "$8$", + "kind": "math" + }, + { + "text": ",沒有最大值。" + } + ] + } + ], + "ai_prompt_md": "### Example 2\n\n求函數 $f(x,y) = x^2 + y^2$ 在約束條件 $g(x,y) = x + y = 4$ 下的最小值。\n\n最小值發生在 $(x,y) = ?$\n\n\n最小值為:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_7ac6e078d6", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-33", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "建立聯立方程組,$\\nabla f = \\langle 2x,2y\\rangle$,$\\nabla g = \\langle 1,1\\rangle$,由 $\\nabla f = \\lambda\\nabla g$ 得:$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "newline": "false", + "runs": [ + { + "text": "建立聯立方程組," + }, + { + "latex": "$\\nabla f = \\langle 2x,2y\\rangle$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$\\nabla g = \\langle 1,1\\rangle$", + "kind": "math" + }, + { + "text": ",由 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": " 得:" + }, + { + "latex": "$$\n2x = \\lambda, \\qquad 2y = \\lambda, \\qquad x+y=4\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "choice", + "id": "flow-33::step-1::q1", + "prompt_runs": [ + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$x = y$" + }, + { + "key": "b", + "text": "$x = 2y$" + }, + { + "key": "c", + "text": "$y = 2x$" + }, + { + "key": "d", + "text": "$x + y = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "a", + "flow": "flow-33", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-33::step-2::q2", + "prompt_runs": [ + { + "text": "代入 " + }, + { + "latex": "$x = y$", + "kind": "math" + }, + { + "text": " 到約束條件 " + }, + { + "latex": "$x+y=4$", + "kind": "math" + }, + { + "text": ",候選極值點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "2,2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-33", + "step": "step-2" + } + ], + "gate_from": "flow-33::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "$f(2,2) = 2^2 + 2^2 = 8$", + "newline": "false", + "runs": [ + { + "latex": "$f(2,2) = 2^2 + 2^2 = 8$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "因為約束條件是無界直線,沿著直線走遠時 $f$ 可以趨向 $+\\infty$,所以:", + "newline": "false", + "runs": [ + { + "text": "因為約束條件是無界直線,沿著直線走遠時 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 可以趨向 " + }, + { + "latex": "$+\\infty$", + "kind": "math" + }, + { + "text": ",所以:" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最小值:" + }, + { + "latex": "$8$", + "kind": "math" + }, + { + "text": ",發生在 " + }, + { + "latex": "$(2,2)$", + "kind": "math" + } + ], + "content": "最小值:$8$,發生在 $(2,2)$" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "最大值:不存在" + } + ], + "content": "最大值:不存在" + } + ] + } + ], + "gate_from": "flow-33::step-2::q2" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 3", + "newline": "true", + "runs": [ + { + "text": "Example 3", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 3, + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n", + "id": "Example-3" + }, + { + "type": "paragraph", + "content": "尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?", + "newline": "false", + "runs": [ + { + "text": "尋找函數 " + }, + { + "latex": "$f(x,y,z,w)$", + "kind": "math" + }, + { + "text": "(四個變數)在單一約束條件 " + }, + { + "latex": "$g(x,y,z,w)=c$", + "kind": "math" + }, + { + "text": " 下的極值,共需解出幾個聯立方程?" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [], + "answers": [ + "5" + ], + "normalize": [ + "numeric", + "nospace" + ], + "placeholder": "輸入方程個數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_440adbc418", + "label": "看解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "未知數:$x, y, z, w$(4 個)和 $\\lambda$(1 個),共 5 個。因此需要 5 個方程組:4 個梯度分量方程 + 1 個約束條件。", + "newline": "false", + "runs": [ + { + "text": "未知數:" + }, + { + "latex": "$x, y, z, w$", + "kind": "math" + }, + { + "text": "(4 個)和 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": "(1 個),共 5 個。因此需要 5 個方程組:4 個梯度分量方程 + 1 個約束條件。" + } + ] + } + ], + "ai_prompt_md": "### Example 3\n\n尋找函數 $f(x,y,z,w)$(四個變數)在單一約束條件 $g(x,y,z,w)=c$ 下的極值,共需解出幾個聯立方程?\n\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 4", + "newline": "true", + "runs": [ + { + "text": "Example 4", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 4, + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:\n\n\n\n\n**Step 1:計算梯度**\n\n$$\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle$$\n\n**Step 2:建立聯立方程組**\n\n$$y = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10$$\n\n**Step 3:求解**\n\n由 $x = \\lambda$,代入 $y = 2\\lambda$:$y = 2x$\n\n代入約束條件:$2x+2x=10 \\implies x = \\dfrac{5}{2}$,$y = 5$\n\n**Step 4:拉格朗日乘數**\n\n$$\\lambda = x = \\frac{5}{2}$$\n\n\n\n\n\n$\\nabla f = \\langle f_x,f_y\\rangle = $:\n\n\n\n$\\nabla g = \\langle g_x,g_y\\rangle = $:\n\n\n\n\n\n由 $\\nabla f = \\lambda\\nabla g$:$y = 2\\lambda$,$x = \\lambda$,因此 $y = ?$\n\n\n\n\n\n代入約束條件 $2x+y=10$,求極值點:\n\n\n\n$\\lambda = ?$\n\n\n\n\n\n\n---\n\n### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n\n\n\n**Step 1:設定**\n\n目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$\n\n**Step 2:計算梯度**\n\n$$\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle$$\n\n**Step 3:聯立方程組**\n\n$$20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200$$\n\n$$\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x$$\n\n**Step 4:代入約束條件**\n\n$$4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67$$\n\n**Step 5:計算最大產量**\n\n$$f\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74$$\n\n\n\n\n\n設定目標函數和約束條件:\n- 目標函數:$f(x,y) = ?$\n\n\n\n- 約束條件:$g(x,y) = ?$\n\n\n\n\n\n由梯度方程得 $\\lambda = 5xy = 10x^2$,因此 $x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $y = 2x$\nc. $x = 2y$\nd. $x + y = 0$\n\n\n\n\n代入約束條件,求最佳組合:\n\n\n\n\n\n代入目標函數,最大產量:\n\n\n\n\n\n\n---\n\n## 3️⃣ 雙重約束條件與應用\n在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。\n\n\n定理\n雙重約束條件\n在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。 \n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合: \n$$\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)$$ \n這裡我們引入了兩個拉格朗日乘數: \n- $\\lambda$ (Lambda):對應約束條件 $g_1$。 \n- $\\mu$ (Mu):對應約束條件 $g_2$。 \n\n\n**Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?**\n\n\n\na. Yes\nb. No\n\n\n\n$\\nabla f$ 只要**落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內**(線性組合)即可,不必同時平行於兩者。\n\n\n\n\n方法\n雙重約束找極值 \n1. 設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。 \n2. 建立聯立方程: 我們會有**五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程**: \n - $f_x = \\lambda (g_1)_x + \\mu (g_2)_x$ \n - $f_y = \\lambda (g_1)_y + \\mu (g_2)_y$ \n - $f_z = \\lambda (g_1)_z + \\mu (g_2)_z$ \n - $g_1(x, y, z) = c_1$ \n - $g_2(x, y, z) = c_2$ \n3. 解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。 \n\n💡解題策略 : \n當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「**幾個未知數,就要有幾個方程組**。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。 \n---\n\n其實 $\\lambda$ 的數值是有實際意義的: \n$$\\lambda = \\frac{\\partial f}{\\partial c}$$ \n這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。 \n- 舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。 \n- 這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。 \n- 因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!\n\n\n---", + "id": "Example-4" + }, + { + "type": "paragraph", + "content": "求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。", + "newline": "false", + "runs": [ + { + "text": "求函數 " + }, + { + "latex": "$f(x,y) = xy$", + "kind": "math" + }, + { + "text": " 在約束條件 " + }, + { + "latex": "$2x+y=10$", + "kind": "math" + }, + { + "text": " 下的極值,並求拉格朗日乘數 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": "。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "極值點 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "5/2,5" + ], + "normalize": [ + "sym", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 的值:" + } + ], + "answers": [ + "5/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 λ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_676d2eb9ab", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 1:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle y, x\\rangle, \\qquad \\nabla g = \\langle 2, 1\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:建立聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 2:建立聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\ny = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\ny = 2\\lambda, \\qquad x = \\lambda, \\qquad 2x+y=10\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:求解", + "newline": "false", + "runs": [ + { + "text": "Step 3:求解", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "由 $x = \\lambda$,代入 $y = 2\\lambda$:$y = 2x$", + "newline": "false", + "runs": [ + { + "text": "由 " + }, + { + "latex": "$x = \\lambda$", + "kind": "math" + }, + { + "text": ",代入 " + }, + { + "latex": "$y = 2\\lambda$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$y = 2x$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "代入約束條件:$2x+2x=10 \\implies x = \\dfrac{5}{2}$,$y = 5$", + "newline": "false", + "runs": [ + { + "text": "代入約束條件:" + }, + { + "latex": "$2x+2x=10 \\implies x = \\dfrac{5}{2}$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$y = 5$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:拉格朗日乘數", + "newline": "false", + "runs": [ + { + "text": "Step 4:拉格朗日乘數", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\lambda = x = \\frac{5}{2}\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\lambda = x = \\frac{5}{2}\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 4\n\n求函數 $f(x,y) = xy$ 在約束條件 $2x+y=10$ 下的極值,並求拉格朗日乘數 $\\lambda$。\n\n極值點 $(x,y)$:\n\n\n$\\lambda$ 的值:\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_60e6a033f0", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-34", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-1::q1", + "prompt_runs": [ + { + "latex": "$\\nabla f = \\langle f_x,f_y\\rangle =$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "y,x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 f_x, f_y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-1" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-1::q2", + "prompt_runs": [ + { + "latex": "$\\nabla g = \\langle g_x,g_y\\rangle =$", + "kind": "math" + }, + { + "text": ":" + } + ], + "answers": [ + "2,1" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 g_x, g_y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-2::q3", + "prompt_runs": [ + { + "text": "由 " + }, + { + "latex": "$\\nabla f = \\lambda\\nabla g$", + "kind": "math" + }, + { + "text": ":" + }, + { + "latex": "$y = 2\\lambda$", + "kind": "math" + }, + { + "text": "," + }, + { + "latex": "$x = \\lambda$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$y = ?$", + "kind": "math" + } + ], + "answers": [ + "2*x" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 y 和 x 的關係", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-2" + } + ], + "gate_from": "flow-34::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-3::q4", + "prompt_runs": [ + { + "text": "代入約束條件 " + }, + { + "latex": "$2x+y=10$", + "kind": "math" + }, + { + "text": ",求極值點:" + } + ], + "answers": [ + "5/2,5" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-3" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-34::step-3::q5", + "prompt_runs": [ + { + "latex": "$\\lambda = ?$", + "kind": "math" + } + ], + "answers": [ + "5/2" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 λ", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-34", + "step": "step-3" + } + ], + "gate_from": "flow-34::step-2::q3" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "heading", + "level": 3, + "content": "Example 5", + "newline": "true", + "runs": [ + { + "text": "Example 5", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "example_seq": 5, + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n\n\n\n**Step 1:設定**\n\n目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$\n\n**Step 2:計算梯度**\n\n$$\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle$$\n\n**Step 3:聯立方程組**\n\n$$20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200$$\n\n$$\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x$$\n\n**Step 4:代入約束條件**\n\n$$4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67$$\n\n**Step 5:計算最大產量**\n\n$$f\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74$$\n\n\n\n\n\n設定目標函數和約束條件:\n- 目標函數:$f(x,y) = ?$\n\n\n\n- 約束條件:$g(x,y) = ?$\n\n\n\n\n\n由梯度方程得 $\\lambda = 5xy = 10x^2$,因此 $x$ 和 $y$ 的關係:\n\na. $x = y$\nb. $y = 2x$\nc. $x = 2y$\nd. $x + y = 0$\n\n\n\n\n代入約束條件,求最佳組合:\n\n\n\n\n\n代入目標函數,最大產量:\n\n\n\n\n\n\n---\n\n## 3️⃣ 雙重約束條件與應用\n在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。\n\n\n定理\n雙重約束條件\n在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。 \n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合: \n$$\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)$$ \n這裡我們引入了兩個拉格朗日乘數: \n- $\\lambda$ (Lambda):對應約束條件 $g_1$。 \n- $\\mu$ (Mu):對應約束條件 $g_2$。 \n\n\n**Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?**\n\n\n\na. Yes\nb. No\n\n\n\n$\\nabla f$ 只要**落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內**(線性組合)即可,不必同時平行於兩者。\n\n\n\n\n方法\n雙重約束找極值 \n1. 設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。 \n2. 建立聯立方程: 我們會有**五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程**: \n - $f_x = \\lambda (g_1)_x + \\mu (g_2)_x$ \n - $f_y = \\lambda (g_1)_y + \\mu (g_2)_y$ \n - $f_z = \\lambda (g_1)_z + \\mu (g_2)_z$ \n - $g_1(x, y, z) = c_1$ \n - $g_2(x, y, z) = c_2$ \n3. 解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。 \n\n💡解題策略 : \n當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「**幾個未知數,就要有幾個方程組**。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。 \n---\n\n其實 $\\lambda$ 的數值是有實際意義的: \n$$\\lambda = \\frac{\\partial f}{\\partial c}$$ \n這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。 \n- 舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。 \n- 這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。 \n- 因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!\n\n\n---", + "id": "Example-5" + }, + { + "type": "paragraph", + "content": "某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。", + "newline": "false", + "runs": [ + { + "text": "某公司預算 " + }, + { + "latex": "$200$", + "kind": "math" + }, + { + "text": " 萬,原料 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 每單位 " + }, + { + "latex": "$4$", + "kind": "math" + }, + { + "text": " 萬元,原料 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 每單位 " + }, + { + "latex": "$1$", + "kind": "math" + }, + { + "text": " 萬元,總產量 " + }, + { + "latex": "$f(x,y) = 10x^2y$", + "kind": "math" + }, + { + "text": "。在預算限制下找最大產量。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最佳原料組合 " + }, + { + "latex": "$(x,y)$", + "kind": "math" + }, + { + "text": "(取到小數第二位):" + } + ], + "answers": [ + "33.33,66.67" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入 x,y", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "quiz", + "qtype": "fill", + "id": "", + "prompt_runs": [ + { + "text": "最大產量(取到小數第二位):" + } + ], + "answers": [ + "740740.74" + ], + "normalize": [ + "nospace" + ], + "placeholder": "輸入最大產量", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_a884607695", + "label": "詳細解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "Step 1:設定", + "newline": "false", + "runs": [ + { + "text": "Step 1:設定", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "目標函數:$f(x,y) = 10x^2y$;約束條件:$4x+y = 200$", + "newline": "false", + "runs": [ + { + "text": "目標函數:" + }, + { + "latex": "$f(x,y) = 10x^2y$", + "kind": "math" + }, + { + "text": ";約束條件:" + }, + { + "latex": "$4x+y = 200$", + "kind": "math" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 2:計算梯度", + "newline": "false", + "runs": [ + { + "text": "Step 2:計算梯度", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\nabla f = \\langle 20xy, 10x^2\\rangle, \\qquad \\nabla g = \\langle 4, 1\\rangle\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 3:聯立方程組", + "newline": "false", + "runs": [ + { + "text": "Step 3:聯立方程組", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n20xy = 4\\lambda, \\qquad 10x^2 = \\lambda, \\qquad 4x+y=200\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n\\lambda = 5xy, \\qquad \\lambda = 10x^2 \\implies y = 2x\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 4:代入約束條件", + "newline": "false", + "runs": [ + { + "text": "Step 4:代入約束條件", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\n4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\n4x+2x=200 \\implies x=\\frac{100}{3}\\approx33.33, \\qquad y=\\frac{200}{3}\\approx66.67\n$$", + "kind": "math_block" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Step 5:計算最大產量", + "newline": "false", + "runs": [ + { + "text": "Step 5:計算最大產量", + "style": "bold" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "$$\nf\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74\n$$", + "newline": "false", + "runs": [ + { + "latex": "$$\nf\\!\\left(\\frac{100}{3},\\frac{200}{3}\\right) = 10\\cdot\\frac{10000}{9}\\cdot\\frac{200}{3} = \\frac{20000000}{27}\\approx740740.74\n$$", + "kind": "math_block" + } + ] + } + ], + "ai_prompt_md": "### Example 5\n\n某公司預算 $200$ 萬,原料 $x$ 每單位 $4$ 萬元,原料 $y$ 每單位 $1$ 萬元,總產量 $f(x,y) = 10x^2y$。在預算限制下找最大產量。\n\n最佳原料組合 $(x,y)$(取到小數第二位):\n\n\n\n最大產量(取到小數第二位):\n\n" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "solution", + "uid": "sol_aeda61ff89", + "label": "引導解法", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "flow", + "id": "flow-35", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-1::q1", + "prompt_runs": [ + { + "text": "設定目標函數和約束條件:- 目標函數:" + }, + { + "latex": "$f(x,y) = ?$", + "kind": "math" + } + ], + "answers": [ + "10*x^2*y" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入目標函數", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-1" + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "約束條件:" + }, + { + "latex": "$g(x,y) = ?$", + "kind": "math" + } + ], + "content": "約束條件:$g(x,y) = ?$" + } + ] + }, + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-1::q2", + "prompt_runs": [], + "answers": [ + "4*x+y=200" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入約束條件", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-35::step-2::q3", + "prompt_runs": [ + { + "text": "由梯度方程得 " + }, + { + "latex": "$\\lambda = 5xy = 10x^2$", + "kind": "math" + }, + { + "text": ",因此 " + }, + { + "latex": "$x$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$y$", + "kind": "math" + }, + { + "text": " 的關係:" + } + ], + "options": [ + { + "key": "a", + "text": "$x = y$" + }, + { + "key": "b", + "text": "$y = 2x$" + }, + { + "key": "c", + "text": "$x = 2y$" + }, + { + "key": "d", + "text": "$x + y = 0$" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-35", + "step": "step-2" + } + ], + "gate_from": "flow-35::step-1::q1" + }, + { + "id": "step-3", + "title": "步驟 3", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-3::q4", + "prompt_runs": [ + { + "text": "代入約束條件,求最佳組合:" + } + ], + "answers": [ + "33.33,66.67" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入 x,y(小數第二位)", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-3" + } + ], + "gate_from": "flow-35::step-2::q3" + }, + { + "id": "step-4", + "title": "步驟 4", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "fill", + "id": "flow-35::step-4::q5", + "prompt_runs": [ + { + "text": "代入目標函數,最大產量:" + } + ], + "answers": [ + "740740.74" + ], + "normalize": [ + "sym", + "numeric", + "nospace" + ], + "placeholder": "輸入最大產量", + "border": "1", + "inline_math": "1", + "right_msg": "", + "wrong_msg": "", + "card": "0", + "flow": "flow-35", + "step": "step-4" + } + ], + "gate_from": "flow-35::step-3::q4" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + }, + { + "id": "sec-3", + "title": "3️⃣ 雙重約束條件與應用", + "blocks": [ + { + "type": "heading", + "level": 2, + "content": "3️⃣ 雙重約束條件與應用", + "newline": "true", + "runs": [ + { + "text": "3️⃣ 雙重約束條件與應用", + "color": "teal", + "color_light": "teal", + "color_dark": "#49F0C3" + } + ], + "color": "teal", + "id": "3" + }, + { + "type": "paragraph", + "content": "在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:$g_1(x,y,z) = c_1$ 和 $g_2(x,y,z) = c_2$的話要怎麼辦。", + "newline": "false", + "runs": [ + { + "text": "在這之前,我們只考慮了單一約束條件,現在我們要將這個方法擴展到更複雜的情境,若同時受到兩個約束條件限制:" + }, + { + "latex": "$g_1(x,y,z) = c_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$g_2(x,y,z) = c_2$", + "kind": "math" + }, + { + "text": "的話要怎麼辦。" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "定理", + "headline": "雙重約束條件", + "body": [ + { + "type": "paragraph", + "content": "在兩個約束條件下,極值點發生在目標函數 $f$ 的梯度 $\\nabla f$ 位於兩個約束條件的梯度 $\\nabla g_1$ 和 $\\nabla g_2$ 所形成的平面上。\n數學上,這表示 $\\nabla f$ 可以寫成 $\\nabla g_1$ 和 $\\nabla g_2$ 的線性組合:\n$$\n\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)\n$$這裡我們引入了兩個拉格朗日乘數:\n", + "newline": "true", + "runs": [ + { + "text": "在兩個約束條件下,極值點發生在目標函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的梯度 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 位於兩個約束條件的梯度 " + }, + { + "latex": "$\\nabla g_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\nabla g_2$", + "kind": "math" + }, + { + "text": " 所形成的平面上。" + }, + { + "newline": "true" + }, + { + "text": "數學上,這表示 " + }, + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 可以寫成 " + }, + { + "latex": "$\\nabla g_1$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\nabla g_2$", + "kind": "math" + }, + { + "text": " 的線性組合:" + }, + { + "newline": "true" + }, + { + "latex": "$$\n\\nabla f(x, y, z) = \\lambda \\nabla g_1(x, y, z) + \\mu \\nabla g_2(x, y, z)\n$$", + "kind": "math_block" + }, + { + "text": "這裡我們引入了兩個拉格朗日乘數:" + }, + { + "newline": "true" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " (Lambda):對應約束條件 " + }, + { + "latex": "$g_1$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\lambda$ (Lambda):對應約束條件 $g_1$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "latex": "$\\mu$", + "kind": "math" + }, + { + "text": " (Mu):對應約束條件 " + }, + { + "latex": "$g_2$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "$\\mu$ (Mu):對應約束條件 $g_2$。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "paragraph", + "content": "Q:「$\\nabla f$ 必須同時平行於 $\\nabla g_1$ 和 $\\nabla g_2$」這個說法對嗎?", + "newline": "false", + "runs": [ + { + "text": "Q:「", + "style": "bold" + }, + { + "latex": "$\\nabla f$", + "kind": "math", + "style": "bold" + }, + { + "text": " 必須同時平行於 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_1$", + "kind": "math", + "style": "bold" + }, + { + "text": " 和 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_2$", + "kind": "math", + "style": "bold" + }, + { + "text": "」這個說法對嗎?", + "style": "bold" + } + ] + }, + { + "type": "flow", + "id": "flow-36", + "persist": "", + "steps": [ + { + "id": "step-1", + "title": "步驟 1", + "cond": "all", + "content": [ + { + "type": "quiz", + "qtype": "choice", + "id": "flow-36::step-1::q1", + "prompt_runs": [], + "options": [ + { + "key": "a", + "text": "Yes" + }, + { + "key": "b", + "text": "No" + } + ], + "shuffle": false, + "explain": "", + "right_msg": "", + "wrong_msg": "", + "wrong_hints": {}, + "card": "0", + "answer": "b", + "flow": "flow-36", + "step": "step-1" + } + ], + "gate_from": null + }, + { + "id": "step-2", + "title": "步驟 2", + "cond": "all", + "content": [ + { + "type": "paragraph", + "content": "$\\nabla f$ 只要落在 $\\nabla g_1$ 與 $\\nabla g_2$ 構成的平面內(線性組合)即可,不必同時平行於兩者。", + "newline": "false", + "runs": [ + { + "latex": "$\\nabla f$", + "kind": "math" + }, + { + "text": " 只要" + }, + { + "text": "落在 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_1$", + "kind": "math", + "style": "bold" + }, + { + "text": " 與 ", + "style": "bold" + }, + { + "latex": "$\\nabla g_2$", + "kind": "math", + "style": "bold" + }, + { + "text": " 構成的平面內", + "style": "bold" + }, + { + "text": "(線性組合)即可,不必同時平行於兩者。" + } + ] + } + ], + "gate_from": "flow-36::step-1::q1" + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "card", + "kind": "方法", + "headline": "雙重約束找極值", + "body": [ + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "1.", + "runs": [ + { + "text": "設定函數: " + }, + { + "latex": "$f(x, y, z)$", + "kind": "math" + }, + { + "text": "、 " + }, + { + "latex": "$g_1(x, y, z) = c_1$", + "kind": "math" + }, + { + "text": "、" + }, + { + "latex": "$g_2(x, y, z) = c_2$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "設定函數: $f(x, y, z)$、 $g_1(x, y, z) = c_1$、$g_2(x, y, z) = c_2$。" + }, + { + "indent": 0, + "marker": "2.", + "runs": [ + { + "text": "建立聯立方程: 我們會有" + }, + { + "text": "五個未知數 (", + "style": "bold" + }, + { + "latex": "$x, y, z, \\lambda, \\mu$", + "kind": "math", + "style": "bold" + }, + { + "text": ") 和五個方程", + "style": "bold" + }, + { + "text": ":" + } + ], + "content": "建立聯立方程: 我們會有五個未知數 ($x, y, z, \\lambda, \\mu$) 和五個方程:" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_x = \\lambda (g_1)_x + \\mu (g_2)_x$", + "kind": "math" + } + ], + "content": "$f_x = \\lambda (g_1)_x + \\mu (g_2)_x$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_y = \\lambda (g_1)_y + \\mu (g_2)_y$", + "kind": "math" + } + ], + "content": "$f_y = \\lambda (g_1)_y + \\mu (g_2)_y$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$f_z = \\lambda (g_1)_z + \\mu (g_2)_z$", + "kind": "math" + } + ], + "content": "$f_z = \\lambda (g_1)_z + \\mu (g_2)_z$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$g_1(x, y, z) = c_1$", + "kind": "math" + } + ], + "content": "$g_1(x, y, z) = c_1$" + }, + { + "indent": 2, + "marker": "-", + "runs": [ + { + "latex": "$g_2(x, y, z) = c_2$", + "kind": "math" + } + ], + "content": "$g_2(x, y, z) = c_2$" + }, + { + "indent": 0, + "marker": "3.", + "runs": [ + { + "text": "解出這五個方程組中的 " + }, + { + "latex": "$(x, y, z)$", + "kind": "math" + }, + { + "text": " 點,然後代入 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 進行比較,即可找到極值。" + } + ], + "content": "解出這五個方程組中的 $(x, y, z)$ 點,然後代入 $f$ 進行比較,即可找到極值。" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "💡解題策略 : 當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「幾個未知數,就要有幾個方程組。」 引入幾個約束條件,就引入幾個 $\\lambda$ 和 $\\mu$ 等乘數來平衡梯度。\n", + "newline": "true", + "runs": [ + { + "text": "💡解題策略 : 當遇到多變數、多約束條件時,不要慌張。重點是把握核心:「" + }, + { + "text": "幾個未知數,就要有幾個方程組", + "style": "bold" + }, + { + "text": "。」 引入幾個約束條件,就引入幾個 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 和 " + }, + { + "latex": "$\\mu$", + "kind": "math" + }, + { + "text": " 等乘數來平衡梯度。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "horizontal_rule", + "content": "---" + }, + { + "type": "solution", + "uid": "sol_021d00b75a", + "label": "看更多", + "default": "closed", + "persist": "none", + "card": "0", + "accent": "", + "after": "", + "body": [ + { + "type": "paragraph", + "content": "其實 $\\lambda$ 的數值是有實際意義的:\n$$\n\\lambda = \\frac{\\partial f}{\\partial c}\n$$這表示:如果我們將約束條件 $g(x, y) = c$ 中的常數 $c$ 稍微改變一單位,目標函數 $f$ 的極值會改變大約 $\\lambda$ 這麼多。\n", + "newline": "true", + "runs": [ + { + "text": "其實 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 的數值是有實際意義的:" + }, + { + "newline": "true" + }, + { + "latex": "$$\n\\lambda = \\frac{\\partial f}{\\partial c}\n$$", + "kind": "math_block" + }, + { + "text": "這表示:如果我們將約束條件 " + }, + { + "latex": "$g(x, y) = c$", + "kind": "math" + }, + { + "text": " 中的常數 " + }, + { + "latex": "$c$", + "kind": "math" + }, + { + "text": " 稍微改變一單位,目標函數 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 的極值會改變大約 " + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 這麼多。" + }, + { + "newline": "true" + } + ] + }, + { + "type": "list", + "content": [ + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "舉例: 假設你找到最大產量 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 時,對應的成本約束為 " + }, + { + "latex": "$g=100$", + "kind": "math" + }, + { + "text": ",此時 " + }, + { + "latex": "$\\lambda = 5$", + "kind": "math" + }, + { + "text": "。" + } + ], + "content": "舉例: 假設你找到最大產量 $f$ 時,對應的成本約束為 $g=100$,此時 $\\lambda = 5$。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "這表示,如果你願意多花一塊錢 (將成本約束增加到 " + }, + { + "latex": "$g=101$", + "kind": "math" + }, + { + "text": "),你的最大產量 " + }, + { + "latex": "$f$", + "kind": "math" + }, + { + "text": " 大約可以增加 5 個單位。" + } + ], + "content": "這表示,如果你願意多花一塊錢 (將成本約束增加到 $g=101$),你的最大產量 $f$ 大約可以增加 5 個單位。" + }, + { + "indent": 0, + "marker": "-", + "runs": [ + { + "text": "因此," + }, + { + "latex": "$\\lambda$", + "kind": "math" + }, + { + "text": " 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!" + } + ], + "content": "因此,$\\lambda$ 常被稱為邊際收益或影子價格 (Shadow Price),對資源分配決策非常有用!" + } + ] + } + ] + }, + { + "type": "paragraph", + "content": "", + "runs": [], + "newline": "true" + }, + { + "type": "horizontal_rule", + "content": "---" + } + ] + } + ] +} \ No newline at end of file diff --git a/pages/Ch14/ch14.py b/pages/Ch14/ch14.py new file mode 100644 index 0000000000000000000000000000000000000000..25d9a979a13d892088afde55d3eccdb23c001da7 --- /dev/null +++ b/pages/Ch14/ch14.py @@ -0,0 +1,70 @@ +from dash import register_page +import dash_mantine_components as dmc +from layout.Chapter_card import create_card + +register_page(__name__, path="/Ch14", title="第十四章:偏導數") + +card_data = [ + { + "title": "14-1 多變數函數", + "badges": [("CH14", "pink"), ("多變數", "blue"), ("基礎", "green")], + "description": ["了解多變數函數定義", "學會等高線及等高曲面", "能畫出圖形"], + "link": "/Ch14_1", + "test": "/Ch14_1/test/", + }, + { + "title": "14-2 極限與連續", + "badges": [("CH14", "pink"), ("連續", "blue"), ("極限", "orange")], + "description": ["極限與連續"], + "link": "/Ch14_2", + "test": "/Ch14_2/test/", + }, + { + "title": "14-3 偏導數", + "badges": [("CH14", "pink"), ("偏導數", "orange")], + "description": ["偏導數", "計算"], + "link": "/Ch14_3", + "test": "/Ch14_3/test/", + }, + { + "title": "14-4 切平面和線性近似", + "badges": [("CH14", "pink"), ("切平面和線性近似", "orange")], + "description": ["切平面", "線性近似"], + "link": "/Ch14_4", + "test": "/Ch14_4/test/", + }, + { + "title": "14-5 連鎖律", + "badges": [("CH14", "pink"), ("連鎖律", "orange")], + "description": ["連鎖律", "合成函數求導"], + "link": "/Ch14_5", + "test": "/Ch14_5/test/", + }, + { + "title": "14-6 方向導數和梯度向量", + "badges": [("CH14", "pink"), ("方向導數和梯度向量", "orange")], + "description": ["方向導數", "梯度向量"], + "link": "/Ch14_6", + "test": "/Ch14_6/test/", + }, + { + "title": "14-7 極值", + "badges": [("CH14", "pink"), ("極值", "orange")], + "description": ["臨界點", "二階判別"], + "link": "/Ch14_7", + "test": "/Ch14_7/test/", + }, + { + "title": "14-8 拉格朗日乘數", + "badges": [("CH14", "pink"), ("拉格朗日乘數", "orange")], + "description": ["限制式極值", "拉格朗日乘數"], + "link": "/Ch14_8", + "test": "/Ch14_8/test/", + }, +] + +layout = dmc.SimpleGrid( + cols=2, + spacing="sm", + children=[create_card(data) for data in card_data], +) diff --git a/pages/home.py b/pages/home.py new file mode 100644 index 0000000000000000000000000000000000000000..07bede774f2e200f20846e890be04796da74b0ac --- /dev/null +++ b/pages/home.py @@ -0,0 +1,141 @@ +import dash +from dash import Dash, html, dcc +from dash import Input, Output, State, callback, clientside_callback +import dash_mantine_components as dmc +from dash_iconify import DashIconify +from layout.toc import make_toc + +# # 將此 py 註冊為 app 的一個分頁 +dash.register_page(__name__, path='/', title ="玩轉微積:首頁") + + +# titles = [ "網站成立理念", "微積分的重要性", "豐富的線上資源", "這個網站的特色", "製作團隊與期許" ] +titles = [ + {"label": "網站成立理念", "id": "title_1"}, + {"label": "微積分的重要性", "id": "title_2"}, + {"label": "豐富的線上資源", "id": "title_3"}, + {"label": "這個網站的特色", "id": "title_4"}, + {"label": "製作團隊與期許", "id": "title_5"}, +] + +texts = [ + ################ + '''在開展這個網站之前,我們想先分享我們製作本平台的初衷與動機。從微積分的重要性談起,也許是個不錯的起點。''', + ############### + '''微積分(Calculus)是現今科學與工程領域中最核心的數學工具之一, + 幾乎所有大學的理工、商管科系以至於技職體系等,皆將其列為必修課程,其重要性不言可喻。 + 更進一步的說,這門學問凝聚了千百年來人類對**「無窮」**的思考與建構,包含了**「無窮小」**、**「無窮大」**、**「無窮逼近」**、**「無窮分割」**、 + **「無窮累加」**等。 + 早在古希臘時,阿基米德便開始思索如何利用窮盡法估量拋物線長度、圓周長、圓面積等,他的方法與思想被紀錄在《方法論》手稿中。 + 中世紀英國的牛頓與萊布尼茲,將這些思想以更有結構、張力的方式敘述,開創微積分理論,奠定了近代科學與工程發展的基石。''', + ################ + '''隨著網路與開放教育資源的發展,微積分的學習方式已不再侷限於課堂教學。 + 無論是開放式課程(Open Course Ware)、磨課師(MOOCs)、或是利用 GeoGebra、Desmos 等工具製作的互動工具,都為學生提供了多元的學習管道。 + 近年來也有許多延展實境(XR)與動畫模擬資源,讓抽象的微積分概念更具體直觀。''', + ################ + ''' + 我們打造這個網站的初衷,是希望讓微積分的學習者從「動手玩」的角度進行自主學習。 + 透過設計的互動元件,學習者能更直觀地理解每個主題,並在探索中產生「驚喜」與「共鳴」。 + 我們也導入 GPT 技術,讓使用者在答題錯誤時能即時獲得引導與解析,因為我們深信:從錯中學習,是有效學習的重要途徑。 + ''', + ################ + ''' + 本網站由國立高雄大學應用數學系師生共同開發。初期參與成員包含教師梁育豪、碩士班學生賴竹盈、大學部學生陳筠潔。 + 我們希望藉由不同學習階段的成員協作,結合多面向的思維,共同建構一個充滿啟發性的學習平台。 + 由於資源有限,網站仍可能有不足之處,懇請您不吝提供建議與指教,讓我們持續改進,一同推動更有趣、更有效的微積分教學。 + ''' + ] + + +import re +import dash_mantine_components as dmc + +def markdown2dmc_bold( text, color = "orange" ): + """ + 將包含 **加粗** 的文字,轉為 dmc.Text 與加粗 dmc.Text 組成的 list。 + """ + pattern = r"\*\*(.*?)\*\*" + segments = [] + last_idx = 0 + + for match in re.finditer(pattern, text): + start, end = match.span() + bold_text = match.group(1) + + # 前段非加粗文字 + if start > last_idx: + segments.append(text[last_idx:start]) + + # 加粗文字 + segments.append( dmc.Text( bold_text, fw = 700, span = True, c = color ) ) + + last_idx = end + + # 加入最後一段文字 + if last_idx < len(text): + segments.append(text[last_idx:]) + + return segments + + + +height = 16 + +layout = html.Div( + children = [ + dmc.Grid( + align = "flex-start", + children = [ + # 主內容區 + dmc.GridCol( + span={"xs": 12, "sm": 12, "md": 9, "lg": 9, "xl": 9}, + children=dmc.Container( + children=[ + *( # 用迴圈展開,避免重複碼與漏逗號 + item + for i, t in enumerate(titles) + for item in [ + dmc.Title( + t["label"], + id=t["id"], + py=10 if i == 0 else 15, + c="teal" if i == 0 else "indigo", + order=2 if i == 0 else 3, + ), + dmc.Text(markdown2dmc_bold(texts[i])), + ] + ) + ], + fluid=False, + style={"lineHeight": "2"}, + ), + ), + make_toc(titles, top_offset=80) # 只呼叫這一個函數即可 + # # 目錄區 + # dmc.GridCol( + # dmc.Stack( + # children = [ + # dmc.Title("目錄", order = 3), + # * [ + # dmc.NavLink( + # label = titles[ii], + # href = f"#title_{ii}", + # leftSection = DashIconify( icon = "tabler:point-filled", height = 14 ), + # active = "exact", + # variant = "light", + # py = "6", + # my = "0", + # ) for ii in range(len(titles)) + # ], + # ], + # gap = "xs", + # ), + # span = {"xs": 0, "sm": 0, "md": 3, "lg": 3, "xl": 3 }, + # visibleFrom = "md", + # style = {"position": "sticky", "top": 80, } + # ) + ], + ) + ] +) + diff --git a/pages/teacher.py b/pages/teacher.py new file mode 100644 index 0000000000000000000000000000000000000000..e9c416ebbe215fefc85f211e976c755f6afe8a42 --- /dev/null +++ b/pages/teacher.py @@ -0,0 +1,322 @@ +""" +pages/teacher.py ── 老師後台(/teacher) +""" +import os +import dash +from dash import html, dcc, callback, Input, Output, State, no_update, ALL +import dash_mantine_components as dmc +from dash_iconify import DashIconify +from collections import defaultdict + +dash.register_page(__name__, path="/teacher", title="老師後台") + + +def layout(): + return dmc.Container( + maw=1100, p="md", + children=[ + dcc.Store(id="teacher-auth-store", storage_type="session", data=False), + + # ── 密碼輸入 ── + html.Div(id="teacher-login-section", + children=dmc.Center( + style={"minHeight": "60vh"}, + children=dmc.Paper(p="xl", radius="md", withBorder=True, w=360, + children=[ + dmc.Group([DashIconify(icon="tabler:lock", height=28), + dmc.Title("老師後台", order=3)], gap="xs", mb="lg"), + dmc.PasswordInput(id="teacher-password-input", label="後台密碼", + placeholder="請輸入密碼", + leftSection=DashIconify(icon="tabler:key", height=16), mb="md"), + dmc.Alert(id="teacher-login-error", children="", color="red", + style={"display": "none"}, mb="sm"), + dmc.Button("登入", id="teacher-login-btn", fullWidth=True), + ]), + )), + + # ── 後台主體 ── + html.Div(id="teacher-dashboard-section", style={"display": "none"}, + children=[ + dmc.Group(justify="space-between", mb="lg", children=[ + dmc.Title("📊 學生學習統計", order=2), + dmc.Group([ + dmc.Button("重新整理", id="teacher-refresh-btn", + leftSection=DashIconify(icon="tabler:refresh", height=16), + variant="outline", size="sm"), + dmc.Button("清除全部資料", id="teacher-clear-btn", + leftSection=DashIconify(icon="tabler:trash", height=16), + variant="outline", color="red", size="sm"), + dmc.Button("登出", id="teacher-logout-btn", + leftSection=DashIconify(icon="tabler:logout", height=16), + variant="subtle", color="gray", size="sm"), + ], gap="xs"), + ]), + + html.Div(id="teacher-stats-cards", style={"marginBottom": "1rem"}), + + # 學生列表 + dmc.Text("學生詳細資料", fw=700, size="lg", mb="sm"), + html.Div(id="teacher-student-table"), + + # 單元統計 + dmc.Divider(my="lg"), + dmc.Text("📚 單元答題統計", fw=700, size="lg", mb="sm"), + html.Div(id="teacher-unit-stats"), + + # 個別學生事件 + dmc.Divider(my="lg"), + html.Div(id="teacher-events-section"), + ]), + ], + ) + + +# ─── 登入 / 登出 ────────────────────────────────────────────────────────── + +@callback( + Output("teacher-auth-store", "data"), + Output("teacher-login-error", "children"), + Output("teacher-login-error", "style"), + Input("teacher-login-btn", "n_clicks"), + State("teacher-password-input", "value"), + prevent_initial_call=True, +) +def handle_login(_, pw): + if pw == os.getenv("TEACHER_PASSWORD", "teacher123"): + return True, "", {"display": "none"} + return False, "密碼錯誤", {"display": "block"} + + +@callback( + Output("teacher-auth-store", "data", allow_duplicate=True), + Input("teacher-logout-btn", "n_clicks"), + prevent_initial_call=True, +) +def handle_logout(_): + return False + + +@callback( + Output("teacher-login-section", "style"), + Output("teacher-dashboard-section", "style"), + Input("teacher-auth-store", "data"), +) +def toggle_sections(auth): + if auth: + return {"display": "none"}, {"display": "block"} + return {"display": "block"}, {"display": "none"} + + +# ─── 清除全部資料 ───────────────────────────────────────────────────────── + +@callback( + Output("teacher-refresh-btn", "n_clicks"), + Input("teacher-clear-btn", "n_clicks"), + prevent_initial_call=True, +) +def clear_all_data(n): + if not n: + return no_update + try: + from firebase_init import get_db + db = get_db() + students = db.collection("students").stream() + for s in students: + # 刪除 events 子集合 + events = db.collection("students").document(s.id)\ + .collection("events").stream() + for ev in events: + ev.reference.delete() + # 重置計數 + s.reference.set({ + "quiz_correct_count": 0, + "quiz_wrong_count": 0, + "ai_hints_used_count": 0, + "solutions_viewed_count": 0, + }, merge=True) + print("[Teacher] 已清除所有答題記錄") + except Exception as e: + print(f"[Teacher] 清除失敗:{e}") + return 1 # 觸發重新整理 + + +# ─── 載入儀表板 ─────────────────────────────────────────────────────────── + +@callback( + Output("teacher-stats-cards", "children"), + Output("teacher-student-table", "children"), + Output("teacher-unit-stats", "children"), + Input("teacher-auth-store", "data"), + Input("teacher-refresh-btn", "n_clicks"), + prevent_initial_call=False, +) +def load_dashboard(auth, _): + if not auth: + return no_update, no_update, no_update + + try: + from firebase_progress import get_all_students, get_student_events + students = get_all_students() + except Exception as e: + err = dmc.Alert(f"讀取失敗:{e}", color="red") + return err, err, err + + if not students: + empty = dmc.Text("目前沒有學生資料。", c="dimmed") + return empty, empty, empty + + # ── 統計卡片 ── + total = len(students) + correct = sum(s.get("quiz_correct_count", 0) for s in students) + wrong = sum(s.get("quiz_wrong_count", 0) for s in students) + hints = sum(s.get("ai_hints_used_count", 0) for s in students) + + stats_cards = dmc.SimpleGrid(cols={"base": 2, "sm": 4}, spacing="md", mb="lg", + children=[ + _stat_card("學生人數", str(total), "tabler:users", "blue"), + _stat_card("答題答對", str(correct), "tabler:check", "green"), + _stat_card("答題答錯", str(wrong), "tabler:x", "red"), + _stat_card("AI 提示", str(hints), "tabler:sparkles", "violet"), + ]) + + # ── 學生列表 ── + rows = [] + for s in sorted(students, key=lambda x: x.get("last_seen", ""), reverse=True): + sid = s.get("student_id", "") + c = s.get("quiz_correct_count", 0) + w = s.get("quiz_wrong_count", 0) + t = c + w + rate = f"{c/t*100:.0f}%" if t > 0 else "—" + last = (s.get("last_seen", "")[:16] or "—").replace("T", " ") + rows.append(dmc.TableTr([ + dmc.TableTd(sid), + dmc.TableTd(str(c), style={"color": "green"}), + dmc.TableTd(str(w), style={"color": "red"}), + dmc.TableTd(rate), + dmc.TableTd(str(s.get("ai_hints_used_count", 0))), + dmc.TableTd(last, style={"fontSize": "12px", "color": "#888"}), + dmc.TableTd(dmc.Button("查看記錄", + id={"type": "teacher-view-events", "sid": sid}, + size="xs", variant="subtle")), + ])) + + table = dmc.Table(striped=True, highlightOnHover=True, withTableBorder=True, + children=[ + dmc.TableThead(dmc.TableTr([dmc.TableTh(h) for h in + ["學號", "答對", "答錯", "正確率", "AI提示", "最後活動", ""]])), + dmc.TableTbody(rows), + ]) + + # ── 單元統計 ── + unit_data = defaultdict(lambda: {"correct": 0, "wrong": 0, "qids": set()}) + for s in students: + sid = s.get("student_id", "") + try: + events = get_student_events(sid, limit=500) + for ev in events: + unit = ev.get("unit", "unknown") + qid = ev.get("qid", "") + etype = ev.get("type", "") + if etype == "quiz_correct": + unit_data[unit]["correct"] += 1 + unit_data[unit]["qids"].add(qid) + elif etype == "quiz_wrong": + unit_data[unit]["wrong"] += 1 + unit_data[unit]["qids"].add(qid) + except Exception: + pass + + unit_rows = [] + for unit, d in sorted(unit_data.items()): + c, w = d["correct"], d["wrong"] + t = c + w + rate = f"{c/t*100:.0f}%" if t > 0 else "—" + unit_rows.append(dmc.TableTr([ + dmc.TableTd(unit.replace("_", "/"), style={"fontSize": "13px"}), + dmc.TableTd(str(len(d["qids"]))), + dmc.TableTd(str(c), style={"color": "green"}), + dmc.TableTd(str(w), style={"color": "red"}), + dmc.TableTd(rate), + ])) + + unit_table = dmc.Table(striped=True, withTableBorder=True, + children=[ + dmc.TableThead(dmc.TableTr([dmc.TableTh(h) for h in + ["單元", "題數", "答對次數", "答錯次數", "正確率"]])), + dmc.TableTbody(unit_rows) if unit_rows else + dmc.TableTbody(dmc.TableTr(dmc.TableTd("沒有記錄"))), + ]) + + return stats_cards, table, unit_table + + +# ─── 個別學生事件 ───────────────────────────────────────────────────────── + +@callback( + Output("teacher-events-section", "children"), + Input({"type": "teacher-view-events", "sid": ALL}, "n_clicks"), + prevent_initial_call=True, +) +def show_events(n_clicks_list): + trigger = dash.callback_context.triggered_id + if not trigger or not isinstance(trigger, dict): + return no_update + + sid = trigger.get("sid", "") + if not sid: + return no_update + + try: + from firebase_progress import get_student_events + events = get_student_events(sid, limit=50) + except Exception as e: + return dmc.Alert(f"讀取失敗:{e}", color="red") + + rows = [] + for ev in events: + etype = ev.get("type", "") + _, color = _event_style(etype) + rows.append(dmc.TableTr([ + dmc.TableTd(dmc.Badge(etype, color=color, variant="light", size="sm")), + dmc.TableTd(ev.get("unit", "—").replace("_", "/"), + style={"fontSize": "12px"}), + dmc.TableTd(ev.get("qid") or ev.get("solution_id", "—"), + style={"fontSize": "11px", "color": "#888"}), + dmc.TableTd((ev.get("ts", "")[:16] or "—").replace("T", " "), + style={"fontSize": "12px", "color": "#888"}), + ])) + + return html.Div([ + dmc.Text(f"📋 {sid} 的學習記錄(最近 50 筆)", fw=700, size="md", mb="sm"), + dmc.Table(striped=True, withTableBorder=True, + children=[ + dmc.TableThead(dmc.TableTr([dmc.TableTh(h) for h in + ["事件", "單元", "題目", "時間"]])), + dmc.TableTbody(rows) if rows else + dmc.TableTbody(dmc.TableTr(dmc.TableTd("沒有記錄"))), + ]), + ]) + + +# ─── 輔助 ──────────────────────────────────────────────────────────────── + +def _stat_card(label, value, icon, color): + return dmc.Paper(p="md", radius="md", withBorder=True, + children=dmc.Group([ + DashIconify(icon=icon, height=32, + color=f"var(--mantine-color-{color}-6)"), + html.Div([ + dmc.Text(value, fw=700, size="xl"), + dmc.Text(label, size="sm", c="dimmed"), + ]), + ], gap="md")) + + +def _event_style(etype): + m = { + "quiz_correct": ("tabler:check", "green"), + "quiz_wrong": ("tabler:x", "red"), + "solution_viewed": ("tabler:eye", "blue"), + "hint_used": ("tabler:sparkles", "violet"), + } + return m.get(etype, ("tabler:point", "gray")) diff --git a/paths.json b/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..3fc9c40772e10f42a8d483c56395fbeb03c867b9 --- /dev/null +++ b/paths.json @@ -0,0 +1,264 @@ +{ + "chapters": [ + { + "name": "Ch14", + "path": "/Ch14", + "title": "第十四章:偏導數", + "folder": "pages/Ch14", + "cards": [ + { + "title": "14-1 多變數函數", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "多變數", + "blue" + ], + [ + "基礎", + "green" + ] + ], + "description": [ + "了解多變數函數定義", + "學會等高線及等高曲面", + "能畫出圖形" + ], + "link": "/Ch14_1", + "test": "/Ch14_1/test/" + }, + { + "title": "14-2 極限與連續", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "連續", + "blue" + ], + [ + "極限", + "orange" + ] + ], + "description": [ + "極限與連續" + ], + "link": "/Ch14_2", + "test": "/Ch14_2/test/" + }, + { + "title": "14-3 偏導數", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "偏導數", + "orange" + ] + ], + "description": [ + "偏導數", + "計算" + ], + "link": "/Ch14_3", + "test": "/Ch14_3/test/" + }, + { + "title": "14-4 切平面和線性近似", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "切平面和線性近似", + "orange" + ] + ], + "description": [ + "切平面", + "線性近似" + ], + "link": "/Ch14_4", + "test": "/Ch14_4/test/" + }, + { + "title": "14-5 連鎖律", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "連鎖律", + "orange" + ] + ], + "description": [ + "連鎖律", + "合成函數求導" + ], + "link": "/Ch14_5", + "test": "/Ch14_5/test/" + }, + { + "title": "14-6 方向導數和梯度向量", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "方向導數和梯度向量", + "orange" + ] + ], + "description": [ + "方向導數", + "梯度向量" + ], + "link": "/Ch14_6", + "test": "/Ch14_6/test/" + }, + { + "title": "14-7 極值", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "極值", + "orange" + ] + ], + "description": [ + "臨界點", + "二階判別" + ], + "link": "/Ch14_7", + "test": "/Ch14_7/test/" + }, + { + "title": "14-8 拉格朗日乘數", + "badges": [ + [ + "CH14", + "pink" + ], + [ + "拉格朗日乘數", + "orange" + ] + ], + "description": [ + "限制式極值", + "拉格朗日乘數" + ], + "link": "/Ch14_8", + "test": "/Ch14_8/test/" + } + ], + "nav_label": "第十四章:偏導數", + "nav_icon": "mdi:number-14-box-multiple-outline", + "sections": [ + { + "label": "第十四章總覽", + "href": "/Ch14", + "icon": "tabler:square-rounded-number-0" + }, + { + "label": "CH14_1:多變數函數", + "href": "/Ch14_1", + "icon": "tabler:square-rounded-number-1" + }, + { + "label": "CH14_2:極限和連續", + "href": "/Ch14_2", + "icon": "tabler:square-rounded-number-2" + }, + { + "label": "CH14_3:偏導數", + "href": "/Ch14_3", + "icon": "tabler:square-rounded-number-3" + }, + { + "label": "CH14_4:切平面和線性近似", + "href": "/Ch14_4", + "icon": "tabler:square-rounded-number-4" + }, + { + "label": "CH14_5:連鎖律", + "href": "/Ch14_5", + "icon": "tabler:square-rounded-number-5" + }, + { + "label": "CH14_6:方向導數和梯度向量", + "href": "/Ch14_6", + "icon": "tabler:square-rounded-number-6" + }, + { + "label": "CH14_7:極值", + "href": "/Ch14_7", + "icon": "tabler:square-rounded-number-7" + }, + { + "label": "CH14_8:拉格朗日乘數", + "href": "/Ch14_8", + "icon": "tabler:square-rounded-number-8" + } + ] + } + ], + "tasks": [ + { + "name": "Ch14_1", + "md": "pages/Ch14/C14_1/Md_14_1.md", + "out": "pages/Ch14/C14_1/exported_result_14_1.json" + }, + { + "name": "Ch14_2", + "md": "pages/Ch14/C14_2/Md_14_2.md", + "out": "pages/Ch14/C14_2/exported_result_14_2.json" + }, + { + "name": "Ch14_3", + "md": "pages/Ch14/C14_3/Md_14_3.md", + "out": "pages/Ch14/C14_3/exported_result_14_3.json" + }, + { + "name": "Ch14_4", + "md": "pages/Ch14/C14_4/Md_14_4.md", + "out": "pages/Ch14/C14_4/exported_result_14_4.json" + }, + { + "name": "Ch14_5", + "md": "pages/Ch14/C14_5/Md_14_5.md", + "out": "pages/Ch14/C14_5/exported_result_14_5.json" + }, + { + "name": "Ch14_6", + "md": "pages/Ch14/C14_6/Md_14_6.md", + "out": "pages/Ch14/C14_6/exported_result_14_6.json" + }, + { + "name": "Ch14_7", + "md": "pages/Ch14/C14_7/Md_14_7.md", + "out": "pages/Ch14/C14_7/exported_result_14_7.json" + }, + { + "name": "Ch14_8", + "md": "pages/Ch14/C14_8/Md_14_8.md", + "out": "pages/Ch14/C14_8/exported_result_14_8.json" + } + ], + "up_to_date": false +} \ No newline at end of file diff --git a/question14_3.md b/question14_3.md new file mode 100644 index 0000000000000000000000000000000000000000..e75b7a4b4b365da3e8bc53532521225a00f1d9c8 --- /dev/null +++ b/question14_3.md @@ -0,0 +1,395 @@ + +# 升級版前測(10 題) + +每題選項都可保留: +**A / B / C / D / 不清楚或不會** + +## 1. 偏導數定義 + +若要計算函數 $f(x,y)$ 在點 $(a,b)$ 對 $x$ 的偏導數 $f_x(a,b)$,下列哪一個式子正確? + +A. $ \lim_{\Delta x\to 0}\dfrac{f(a+\Delta x,b)-f(a,b)}{\Delta x} $ + +B. $ \lim_{\Delta x\to 0}\dfrac{f(a+\Delta x,b+\Delta x)-f(a,b)}{\Delta x} $ + +C. $ \lim_{\Delta y\to 0}\dfrac{f(a,b+\Delta y)-f(a,b)}{\Delta y} $ + +D. $ \lim_{\Delta x\to 0}\dfrac{f(a,b+\Delta x)-f(a,b)}{\Delta x} $ + +**答案:A** + +--- + +## 2. 幾何意義 + +設 $z=f(x,y)$,則 $f_x(a,b)$ 對應的是哪一條截線在點 $P=(a,b,f(a,b))$ 的切線斜率? + +A. 曲面與平面 $x=a$ 的截線 + +B. 曲面與平面 $y=b$ 的截線 + +C. 曲面與平面 $z=f(a,b)$ 的截線 + +D. 曲面上任意方向曲線的切線斜率 + +**答案:B** + +--- + +## 3. 基本偏導提升版 + +若 $f(x,y)=x^2e^y+\sin(xy)$,則 $f_x(x,y)=$ + +A. $2xe^y+\cos(xy)$ + +B. $2xe^y+y\cos(xy)$ + +C. $x^2e^y+y\cos(xy)$ + +D. $2xe^y+x\cos(xy)$ + +**答案:B** + +--- + +## 4. 偏導函數代點 + +若 $f(x,y)=x^2e^y+\sin(xy)$,則 $f_y(1,0)=$ + +A. $1$ + +B. $2$ + +C. $e$ + +D. $0$ + +**答案:B** + +因為 +$f_y=x^2e^y+x\cos(xy)$, +所以 $f_y(1,0)=1+1=2$。 + +--- + +## 5. 偏導函數 vs 偏導數值 + +若已知 $f_x(x,y)=2xy-3y$,則 $f_x(1,4)=$ + +A. $4$ + +B. $-4$ + +C. $-2$ + +D. $2$ + +**答案:B** + +--- + +## 6. 鏈鎖律型偏導 + +若 $f(x,y)=\sin(x^2y-3xy)$,則 $f_y(x,y)=$ + +A. $(x^2-3x)\sin(x^2y-3xy)$ + +B. $(2xy-3y)\cos(x^2y-3xy)$ + +C. $(x^2-3x)\cos(x^2y-3xy)$ + +D. $(2x-3)\cos(x^2y-3xy)$ + +**答案:C** + +--- + +## 7. 線性估計 + +若已知 $f(2,1)=5$,且 $f_x(2,1)=-3$,當只有 $x$ 由 $2$ 變成 $2.1$ 時,依線性估計,$f(2.1,1)$ 最接近哪一個值? + +A. $4.7$ + +B. $5.3$ + +C. $2$ + +D. $-0.3$ + +**答案:A** + +--- + +## 8. 混合偏導 + +若 $f(x,y)=x^2y^3-e^{xy}$,則 $f_{xy}(1,0)=$ + +A. $0$ + +B. $1$ + +C. $-1$ + +D. $-2$ + +**答案:C** + +--- + +## 9. 原點偏導存在性 + +定義 +$$ +f(x,y)= +\begin{cases} +\dfrac{x^2-y^2}{x^2+y^2}, & (x,y)\neq(0,0),\ +0, & (x,y)=(0,0)。 +\end{cases} +$$ +則 $f_x(0,0)$ 為何? + +A. $0$ + +B. $1$ + +C. 不存在 + +D. $-1$ + +**答案:C** + +因為 +$$ +f_x(0,0)=\lim_{h\to 0}\frac{f(h,0)-f(0,0)}{h} +=\lim_{h\to 0}\frac{1-0}{h} +$$ +極限不存在。 + +--- + +## 10. 隱函數偏微分入門 + +若 +$$ +x^2+y^2+z^2=6 +$$ +其中 $z$ 為 $x,y$ 的函數,則在點 $(1,1,2)$, +$$ +\frac{\partial z}{\partial x} +$$ +的值為何? + +A. $-\dfrac12$ + +B. $\dfrac12$ + +C. $-1$ + +D. $1$ + +**答案:A** + +--- + +# 升級版後測(10 題) + +這份我設計成和前測大致等值,但再多一點整合性。 + +## 1. 偏導數定義 + +若要計算函數 $f(x,y)$ 在點 $(a,b)$ 對 $y$ 的偏導數 $f_y(a,b)$,下列哪一個式子正確? + +A. $ \lim_{\Delta x\to 0}\dfrac{f(a+\Delta x,b)-f(a,b)}{\Delta x} $ + +B. $ \lim_{\Delta y\to 0}\dfrac{f(a,b+\Delta y)-f(a,b)}{\Delta y} $ + +C. $ \lim_{\Delta y\to 0}\dfrac{f(a+\Delta y,b+\Delta y)-f(a,b)}{\Delta y} $ + +D. $ \lim_{\Delta y\to 0}\dfrac{f(a+\Delta y,b)-f(a,b)}{\Delta y} $ + +**答案:B** + +--- + +## 2. 幾何意義進階版 + +下列哪一個敘述正確? + +A. $f_x(a,b)$ 是曲面與平面 $x=a$ 的截線切線斜率,$f_y(a,b)$ 是曲面與平面 $y=b$ 的截線切線斜率 + +B. $f_x(a,b)$ 是曲面與平面 $y=b$ 的截線切線斜率,$f_y(a,b)$ 是曲面與平面 $x=a$ 的截線切線斜率 + +C. $f_x(a,b)$ 與 $f_y(a,b)$ 都是同一條截線的切線斜率 + +D. $f_x(a,b)$ 與 $f_y(a,b)$ 都是曲面法向量的分量 + +**答案:B** + +--- + +## 3. 基本偏導提升版 + +若 $f(x,y)=\ln(x^2+y^2)+xe^{xy}$,則 $f_x(1,1)=$ + +A. $1+e$ + +B. $1+2e$ + +C. $2+e$ + +D. $2+2e$ + +**答案:B** + +因為 +$$ +f_x=\frac{2x}{x^2+y^2}+e^{xy}+xye^{xy} +$$ +代入 $(1,1)$ 得 +$$ +1+e+e=1+2e。 +$$ + +--- + +## 4. 偏導函數代點 + +若 $f(x,y)=(x^2+3y)e^{xy}$,則 $f_y(1,1)=$ + +A. $4e$ + +B. $5e$ + +C. $7e$ + +D. $8e$ + +**答案:C** + +--- + +## 5. 鏈鎖律型偏導 + +若 $f(x,y)=\cos(x^2y+y^2)$,則 $f_x(x,y)=$ + +A. $-(2xy)\sin(x^2y+y^2)$ + +B. $(2xy)\sin(x^2y+y^2)$ + +C. $-(x^2+2y)\sin(x^2y+y^2)$ + +D. $(x^2+2y)\cos(x^2y+y^2)$ + +**答案:A** + +--- + +## 6. 線性估計 + +若已知 $f(1,2)=-1$,且 $f_y(1,2)=4.5$。當只有 $y$ 由 $2$ 變成 $1.98$ 時,依線性估計,$f(1,1.98)$ 最接近哪一個值? + +A. $-0.91$ + +B. $-1.09$ + +C. $-5.5$ + +D. $3.5$ + +**答案:B** + +--- + +## 7. Clairaut 定理 + +若 $f_{xy}$ 與 $f_{yx}$ 在某區域內皆存在且連續,則下列何者正確? + +A. $f_{xy}=-f_{yx}$ + +B. $f_{xy}=f_{yx}$ + +C. $f_{xy}=0$ + +D. $f_{xy}$ 一定不存在 + +**答案:B** + +--- + +## 8. 混合偏導 + +若 $f(x,y)=xe^{xy}+y\cos x$,則 $f_{xy}(0,1)=$ + +A. $-1$ + +B. $0$ + +C. $1$ + +D. $2$ + +**答案:B** + +--- + +## 9. 三變數偏導 + +若 +$$ +f(x,y,z)=e^{xz}\ln(y+z), +$$ +則 $f_z(1,1,1)=$ + +A. $e\ln 2$ + +B. $\dfrac e2$ + +C. $e\left(\ln 2+\dfrac12\right)$ + +D. $e\left(\ln 2+1\right)$ + +**答案:C** + +--- + +## 10. 隱函數偏微分應用題 + +已知 +$$ +x^2+y^2+z^2+xyz=4, +$$ +其中 $z$ 為 $x,y$ 的函數。則 +$$ +\frac{\partial z}{\partial x} +$$ +為何? + +A. $-\dfrac{2x+yz}{2z+xy}$ + +B. $-\dfrac{2x+xy}{2z+yz}$ + +C. $\dfrac{2x+yz}{2z+xy}$ + +D. $-\dfrac{2z+xy}{2x+yz}$ + +**答案:A** + +--- + +# 這樣升難度,會比上一版更好的地方 + +這版不是單純把計算變長,而是把難度提高在這幾個地方: + +1. **多一步推理** + 不是只問「公式是什麼」,而是要先判斷對哪個變數微分,再做運算。 + +2. **偏導函數與點值分開考** + 很多學生會把 $f_x(x,y)$ 和 $f_x(1,2)$ 混在一起,這類題很有鑑別力。 + +3. **鏈鎖律和混合偏導變多** + 這比純粹基本偏導更能分出程度。 + +4. **後測保留 1 題真正的整合應用** + 這樣後測還是比較能看出學後能力,但不會整份卷子都超難。 + +--- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..89af474daa3a31fdaa19fb077feae50bbe513e30 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +dash==2.18.2 +dash-mantine-components==0.14.5 +dash-iconify==0.1.2 +firebase-admin==6.5.0 +google-genai==1.5.0 +python-dotenv==1.0.1 +gunicorn==22.0.0 +numpy==1.26.4 +plotly==5.22.0 +sympy==1.12 diff --git a/session_state.js b/session_state.js new file mode 100644 index 0000000000000000000000000000000000000000..ddbad89995447bbcc58a4bda518a425b867f5d5e --- /dev/null +++ b/session_state.js @@ -0,0 +1,203 @@ +/** + * session_state.js + * 放在 assets/ 目錄,Dash 自動載入。 + */ +(function () { + "use strict"; + + var STORE_KEY = "dash_math_page_state"; + + function loadState() { + try { return JSON.parse(sessionStorage.getItem(STORE_KEY) || "{}"); } + catch (e) { return {}; } + } + + function saveState(state) { + try { sessionStorage.setItem(STORE_KEY, JSON.stringify(state)); } + catch (e) {} + } + + function getPathname() { return window.location.pathname || "/"; } + + function getPageState() { + var s = loadState(); var p = getPathname(); + if (!s[p]) s[p] = {}; + return { state: s, page: p, ps: s[p] }; + } + + function save(key, value) { + var r = getPageState(); + r.ps[key] = value; + r.state[r.page] = r.ps; + saveState(r.state); + } + + // ── 從 id 字串取得 key ──────────────────────────────────────────────── + + function parseId(idStr) { + try { return JSON.parse(idStr); } + catch (e) { return null; } + } + + // ── 快照目前頁面所有狀態 ────────────────────────────────────────────── + + function snapshotState() { + var r = getPageState(); + var ps = r.ps; + + // 1. 填空題輸入值 + if (!ps.quiz_inputs) ps.quiz_inputs = {}; + document.querySelectorAll("[id]").forEach(function (el) { + var parsed = parseId(el.id); + if (!parsed || parsed.type !== "quiz-input") return; + var inp = el.querySelector("input"); + if (inp) ps.quiz_inputs[parsed.qid] = inp.value || ""; + }); + + // 2. 選擇題已選中的按鈕(找 data-active 或 aria-pressed 的按鈕) + if (!ps.quiz_choice) ps.quiz_choice = {}; + document.querySelectorAll("[id]").forEach(function (el) { + var parsed = parseId(el.id); + if (!parsed || parsed.type !== "quiz-feedback-choice") return; + // feedback 有內容代表已作答 + if (el.textContent && el.textContent.trim()) { + ps.quiz_choice[parsed.qid] = { + children: el.textContent.trim(), + color: el.getAttribute("data-color") || "" + }; + } + }); + + // 3. 解法展開狀態 + if (!ps.solutions) ps.solutions = {}; + document.querySelectorAll("button[id]").forEach(function (btn) { + var parsed = parseId(btn.id); + if (!parsed || parsed.type !== "solution-toggle") return; + var key = parsed.key; + // 找對應的 collapse 元素,判斷是否展開 + var collapseEl = document.querySelector( + '[id=\'{"key":"' + key + '","type":"solution-collapse"}\'],' + + '[id=\'{"type":"solution-collapse","key":"' + key + '"}\']' + ); + if (collapseEl) { + ps.solutions[key] = collapseEl.offsetHeight > 10; + } + }); + + r.state[r.page] = ps; + saveState(r.state); + } + + // ── 恢復狀態 ────────────────────────────────────────────────────────── + + var _restoring = false; + + function restoreState() { + var r = getPageState(); + var ps = r.ps; + _restoring = true; + + // 1. 恢復 section + if (ps.section) { + var secBtn = document.querySelector('[data-sid="' + ps.section + '"]'); + if (secBtn) secBtn.click(); + } + + // 2. 恢復填空題輸入值 + var inputs = ps.quiz_inputs || {}; + Object.keys(inputs).forEach(function (qid) { + var val = inputs[qid]; + if (!val) return; + var el = document.querySelector('[id=\'{"qid":"' + qid + '","type":"quiz-input"}\'],' + + '[id=\'{"type":"quiz-input","qid":"' + qid + '"}\']'); + if (!el) return; + var inp = el.querySelector("input"); + if (!inp) return; + var setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; + setter.call(inp, val); + inp.dispatchEvent(new Event("input", { bubbles: true })); + }); + + // 3. 恢復解法展開(點擊 toggle 按鈕) + var solutions = ps.solutions || {}; + Object.keys(solutions).forEach(function (key) { + if (!solutions[key]) return; + var btn = document.querySelector( + '[id=\'{"key":"' + key + '","type":"solution-toggle"}\'],' + + '[id=\'{"type":"solution-toggle","key":"' + key + '"}\']' + ); + if (btn) btn.click(); + }); + + setTimeout(function () { _restoring = false; }, 600); + } + + // ── 監聽 section 按鈕點擊 ──────────────────────────────────────────── + + var _secListened = new Set(); + + function attachSectionListeners() { + document.querySelectorAll("[data-sid]").forEach(function (btn) { + var sid = btn.getAttribute("data-sid"); + if (_secListened.has(sid)) return; + _secListened.add(sid); + btn.addEventListener("click", function () { + if (_restoring) return; + save("section", sid); + }); + }); + } + + // ── 定時快照(每 2 秒存一次目前狀態)──────────────────────────────── + + function startAutoSnapshot() { + setInterval(function () { + if (!_restoring) snapshotState(); + }, 2000); + } + + // ── 監聽 URL 變化 ───────────────────────────────────────────────────── + + var _lastPathname = null; + var _restoreTimer = null; + + function checkPathname() { + var cur = getPathname(); + if (cur !== _lastPathname) { + _lastPathname = cur; + _secListened.clear(); + clearTimeout(_restoreTimer); + _restoreTimer = setTimeout(function () { + attachSectionListeners(); + restoreState(); + }, 1000); + } else { + attachSectionListeners(); + } + } + + // ── 初始化 ──────────────────────────────────────────────────────────── + + var _mutTimer = null; + var observer = new MutationObserver(function () { + clearTimeout(_mutTimer); + _mutTimer = setTimeout(checkPathname, 150); + }); + + function init() { + _lastPathname = getPathname(); + observer.observe(document.body, { childList: true, subtree: true }); + startAutoSnapshot(); + setTimeout(function () { + attachSectionListeners(); + restoreState(); + }, 1200); + } + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init); + } else { + init(); + } + +})(); diff --git a/session_state.py b/session_state.py new file mode 100644 index 0000000000000000000000000000000000000000..0c210c5d010aadf1498e27ecec4acea88eb49408 --- /dev/null +++ b/session_state.py @@ -0,0 +1,12 @@ +""" +session_state.py +---------------- +只提供 Store 元件,實際的狀態保存由 assets/session_state.js 處理。 +""" +from dash import dcc + + +def create_session_stores(): + return [ + dcc.Store(id="page-session-store", storage_type="session", data={}), + ] diff --git a/site_manager.py b/site_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..98f719af07ae7e7d99777926ab2685422b8b6e66 --- /dev/null +++ b/site_manager.py @@ -0,0 +1,477 @@ +""" +site_manager.py +--------------- +網站內容管理工具。 + + python site_manager.py # 互動選單 + python site_manager.py list # 列出所有 task + python site_manager.py add [name] # 新增單元 task + python site_manager.py delete [name] # 刪除單元 task + python site_manager.py scan # 掃描 pages/ 補齊 paths.json + python site_manager.py gen [all|unit|chapter|navbar] # 生成頁面 + python site_manager.py gen --force # 強制覆蓋 + python site_manager.py gen --dry-run # 預覽不寫入 +""" + +from __future__ import annotations +import json, re, argparse +from pathlib import Path + +CONFIG_PATH = Path("paths.json") +PAGES_ROOT = Path("pages") + +# ───────────────────────────────────────────────────────────────────────────── +# 範本字串(用變數儲存,避免縮排問題) +# ───────────────────────────────────────────────────────────────────────────── + +def _unit_template(json_filename: str, route: str, title: str) -> str: + return ( + "import dash\n" + "from layout.page_builder import make_test_page\n" + "from pathlib import Path\n" + "\n" + "HERE = Path(__file__).resolve().parent\n" + f'JSON_PATH = HERE / "{json_filename}"\n' + "\n" + f'dash.register_page(__name__, path="/{route}", title="{title}")\n' + "\n" + "def layout():\n" + " return make_test_page(str(JSON_PATH), top_offset=90)\n" + ) + + +def _chapter_template(path: str, title: str, cards_repr: str) -> str: + return ( + "from dash import register_page\n" + "import dash_mantine_components as dmc\n" + "from layout.Chapter_card import create_card\n" + "\n" + f'register_page(__name__, path="{path}", title="{title}")\n' + "\n" + f"card_data = {cards_repr}\n" + "\n" + "layout = dmc.SimpleGrid(\n" + " cols=2,\n" + ' spacing="sm",\n' + " children=[create_card(data) for data in card_data],\n" + ")\n" + ) + + +def _navbar_template(chapter_links: str) -> str: + return ( + "import dash\n" + "from dash import html\n" + "import dash_mantine_components as dmc\n" + "from dash_iconify import DashIconify\n" + "\n" + "# 此檔案由 site_manager.py 自動生成,請勿手動修改\n" + "\n" + "def generate_navbar():\n" + " height = 16\n" + " navbar_content = html.Div(\n" + " [\n" + " dmc.NavLink(\n" + ' label="首頁",\n' + ' href="/",\n' + ' leftSection=DashIconify(icon="bi:house-door-fill", height=height),\n' + ' active="partial",\n' + " ),\n" + f"{chapter_links}\n" + " ],\n" + " style={\n" + ' "width": {"xs": 200, "sm": 250, "md": 300, "lg": 300},\n' + ' "overflowY": "auto",\n' + ' "maxHeight": "100vh",\n' + " },\n" + " )\n" + " return dmc.AppShellNavbar(\n" + ' id="navbar",\n' + " children=[\n" + ' dmc.Divider(label="頁面導覽", variant="solid", labelPosition="left", size="md"),\n' + " navbar_content,\n" + " ],\n" + ' p="md",\n' + " )\n" + ) + + +def _chapter_nav_block(nav_label: str, nav_icon: str, section_links: str) -> str: + return ( + " dmc.NavLink(\n" + f' label="{nav_label}",\n' + f' leftSection=DashIconify(icon="{nav_icon}", height=height),\n' + " childrenOffset=28,\n" + ' active="partial",\n' + " children=[\n" + f"{section_links}\n" + " ],\n" + " )," + ) + + +def _section_link(label: str, href: str, icon: str) -> str: + return ( + " dmc.NavLink(\n" + f' label="{label}",\n' + f' href="{href}",\n' + ' active="exact",\n' + " childrenOffset=14,\n" + f' leftSection=DashIconify(icon="{icon}", height=height),\n' + " )," + ) + +# ───────────────────────────────────────────────────────────────────────────── +# paths.json 讀寫 +# ───────────────────────────────────────────────────────────────────────────── + +def _load() -> dict: + if CONFIG_PATH.exists(): + return json.loads(CONFIG_PATH.read_text(encoding="utf-8")) + return {"chapters": [], "tasks": [], "up_to_date": True} + +def _save(cfg: dict) -> None: + CONFIG_PATH.write_text(json.dumps(cfg, ensure_ascii=False, indent=2), encoding="utf-8") + print(f"✅ 已儲存 {CONFIG_PATH}") + +def _task_names(cfg: dict) -> set[str]: + return {t["name"] for t in cfg.get("tasks", [])} + +def _infer_paths(name: str) -> tuple[str, str]: + m = re.match(r'[Cc][Hh]?(\d+)[_\-](\d+)', name) + if m: + ch, sec = m.group(1), m.group(2) + folder = PAGES_ROOT / f"Ch{ch}" / f"C{ch}_{sec}" + return str(folder / f"Md_{ch}_{sec}.md"), str(folder / f"exported_result_{ch}_{sec}.json") + return "", "" + +# ───────────────────────────────────────────────────────────────────────────── +# 卡片轉 Python 原始碼(badges 用 tuple) +# ───────────────────────────────────────────────────────────────────────────── + +def _cards_to_repr(cards: list[dict]) -> str: + lines = ["[\n"] + for card in cards: + lines.append(" {\n") + lines.append(f' "title": {json.dumps(card["title"], ensure_ascii=False)},\n') + badges = card.get("badges", []) + badge_strs = [f'("{b[0]}", "{b[1]}")' for b in badges] + lines.append(f' "badges": [{", ".join(badge_strs)}],\n') + desc = card.get("description", []) + desc_strs = ", ".join(json.dumps(d, ensure_ascii=False) for d in desc) + lines.append(f' "description": [{desc_strs}],\n') + lines.append(f' "link": {json.dumps(card.get("link", ""), ensure_ascii=False)},\n') + lines.append(f' "test": {json.dumps(card.get("test", ""), ensure_ascii=False)},\n') + if "trick" in card: + lines.append(f' "trick": {json.dumps(card["trick"], ensure_ascii=False)},\n') + lines.append(" },\n") + lines.append("]") + return "".join(lines) + +# ───────────────────────────────────────────────────────────────────────────── +# 命令:list +# ───────────────────────────────────────────────────────────────────────────── + +def cmd_list() -> None: + cfg = _load() + chs = cfg.get("chapters", []) + tasks = cfg.get("tasks", []) + + print(f"\n章節總覽({len(chs)} 個):") + for ch in chs: + print(f" • {ch['name']:<10} {ch.get('title','')} ({len(ch.get('cards',[]))} 張卡片)") + + print(f"\n單元 task({len(tasks)} 個):") + for i, t in enumerate(tasks, 1): + md_ok = "✔" if Path(t.get("md", "")).exists() else "✘" + out_ok = "✔" if Path(t.get("out", "")).exists() else "✘" + print(f" {i:2d}. {t['name']:<12} md:{md_ok} json:{out_ok} → {t.get('out','')}") + +# ───────────────────────────────────────────────────────────────────────────── +# 命令:add +# ───────────────────────────────────────────────────────────────────────────── + +def cmd_add(name: str | None = None) -> None: + cfg = _load() + if not name: + name = input("Task 名稱(例如 Ch14_3):").strip() + if not name: + print("❌ 名稱不能為空。"); return + if name in _task_names(cfg): + print(f"❌ '{name}' 已存在。"); return + + default_md, default_out = _infer_paths(name) + print(f"預設 md 路徑:{default_md or '(請自行輸入)'}") + md = input("md 路徑(Enter 使用預設):").strip() or default_md + print(f"預設 out 路徑:{default_out or '(請自行輸入)'}") + out = input("out 路徑(Enter 使用預設):").strip() or default_out + if not md or not out: + print("❌ 路徑不能為空。"); return + + md_path = Path(md) + md_path.parent.mkdir(parents=True, exist_ok=True) + Path(out).parent.mkdir(parents=True, exist_ok=True) + if not md_path.exists(): + md_path.write_text(f"# {name}\n\n在這裡撰寫教學內容。\n", encoding="utf-8") + print(f" 📄 已建立空白 MD:{md_path}") + + cfg["tasks"].append({"name": name, "md": md, "out": out}) + cfg["up_to_date"] = False + + # 自動加進對應 chapter + m = re.match(r'[Cc][Hh]?(\d+)[_\-](\d+)', name) + if m: + ch_num = m.group(1) + sec_num = m.group(2) + ch_key = f"Ch{ch_num}" + route = f"/{name}" + chapter = next((c for c in cfg.get("chapters", []) if c.get("name") == ch_key), None) + if chapter is None: + ans = input(f"\n找不到 {ch_key} 的章節總覽,要建立嗎?(y/n):").strip().lower() + if ans == "y": + title = input("章節標題:").strip() or ch_key + chapter = {"name": ch_key, "path": f"/{ch_key}", "title": title, + "folder": f"pages/{ch_key}", "cards": []} + cfg.setdefault("chapters", []).append(chapter) + print(f" 📁 已建立 chapter:{ch_key}") + if chapter is not None: + existing = {c.get("link") for c in chapter.get("cards", [])} + if route not in existing: + card_title = input("卡片標題(Enter 略過):").strip() + if card_title: + desc_raw = input("卡片說明(多行用 | 分隔,Enter 略過):").strip() + desc = [d.strip() for d in desc_raw.split("|") if d.strip()] + chapter.setdefault("cards", []).append({ + "title": card_title, "badges": [[ch_key, "pink"]], + "description": desc, "link": route, "test": f"{route}/test/" + }) + print(f" 🃏 已將卡片加入 {ch_key} 總覽") + + _save(cfg) + print(f"✅ 已新增 task:{name}\n 下一步:編輯 {md_path},然後執行 python build.py") + +# ───────────────────────────────────────────────────────────────────────────── +# 命令:delete +# ───────────────────────────────────────────────────────────────────────────── + +def cmd_delete(name: str | None = None) -> None: + cfg = _load() + if not name: + cmd_list() + name = input("\n要刪除的 task 名稱:").strip() + before = len(cfg["tasks"]) + cfg["tasks"] = [t for t in cfg["tasks"] if t["name"] != name] + if len(cfg["tasks"]) == before: + print(f"❌ 找不到 '{name}'。"); return + _save(cfg) + print(f"✅ 已刪除 task:{name}(MD/JSON 檔案需手動刪除)") + +# ───────────────────────────────────────────────────────────────────────────── +# 命令:scan +# ───────────────────────────────────────────────────────────────────────────── + +def cmd_scan() -> None: + cfg, existing, added = _load(), _task_names(_load()), [] + for md_file in sorted(PAGES_ROOT.rglob("Md_*.md")): + parts = md_file.parts + if len(parts) < 3: continue + m = re.match(r'C(\d+)_(\d+)', parts[-2]) + if not m: continue + ch, sec = m.group(1), m.group(2) + name = f"Ch{ch}_{sec}" + if name in existing: + print(f" — {name}:已存在"); continue + out = md_file.parent / f"exported_result_{ch}_{sec}.json" + cfg["tasks"].append({"name": name, "md": str(md_file), "out": str(out)}) + existing.add(name); added.append(name) + print(f" ✔ 新增:{name}") + if added: + cfg["up_to_date"] = False + _save(cfg) + print(f"\n共新增 {len(added)} 個 task。執行 python build.py 轉換 MD。") + else: + print("沒有新的 MD 需要補充。") + +# ───────────────────────────────────────────────────────────────────────────── +# 命令:gen(生成單元頁 + 總覽頁) +# ───────────────────────────────────────────────────────────────────────────── + +def cmd_gen(target: str = "all", force: bool = False, dry_run: bool = False) -> None: + cfg = _load() + base = CONFIG_PATH.resolve().parent + generated, skipped = [], [] + + # 單元頁 + if target in ("all", "unit"): + for t in cfg.get("tasks", []): + name = t.get("name", "") + out_path = Path(t.get("out", "")) + if not name or not out_path.name: continue + folder = (base / out_path).resolve().parent + page_file = folder / f"Dash_{name}.py" + if page_file.exists() and not force: + skipped.append(f" — [單元] {page_file}"); continue + content = _unit_template( + json_filename=(base / out_path).resolve().name, + route=name, title=name, + ) + if not dry_run: + folder.mkdir(parents=True, exist_ok=True) + page_file.write_text(content, encoding="utf-8") + generated.append(f" ✔ [單元] {page_file}") + + # 總覽頁 + if target in ("all", "chapter"): + for ch in cfg.get("chapters", []): + name = ch.get("name", "") + if not name: continue + folder = Path(ch.get("folder", f"pages/{name}")) + page_file = folder / f"{name.lower()}.py" + if page_file.exists() and not force: + skipped.append(f" — [總覽] {page_file}"); continue + content = _chapter_template( + path = ch.get("path", f"/{name}"), + title = ch.get("title", name), + cards_repr = _cards_to_repr(ch.get("cards", [])), + ) + if not dry_run: + folder.mkdir(parents=True, exist_ok=True) + page_file.write_text(content, encoding="utf-8") + generated.append(f" ✔ [總覽] {page_file}") + + label = "[dry-run] 會生成" if dry_run else "已生成" + if generated: + print(f"\n✅ {label} {len(generated)} 個檔案:") + print("\n".join(generated)) + if skipped: + print(f"\n⏭ 已略過 {len(skipped)} 個(用 --force 覆蓋):") + for s in skipped: print(s) + if not generated and not skipped: + print("沒有任何檔案需要生成。") + +# ───────────────────────────────────────────────────────────────────────────── +# 命令:gen navbar +# ───────────────────────────────────────────────────────────────────────────── + +def cmd_gen_navbar(force: bool = False, dry_run: bool = False) -> None: + cfg = _load() + chapters = cfg.get("chapters", []) + nav_file = Path("layout/shell/navbar.py") + + if not chapters: + print("paths.json 裡沒有 chapters,無法生成 navbar。"); return + if nav_file.exists() and not force: + print(f"⏭ {nav_file} 已存在,用 --force 覆蓋。"); return + + chapter_blocks = [] + for ch in chapters: + nav_label = ch.get("nav_label") or ch.get("title") or ch.get("name", "") + nav_icon = ch.get("nav_icon", "mdi:book-outline") + sections = ch.get("sections", []) + + if not sections: + ch_name = ch.get("name", "") + m = re.match(r'[Cc][Hh]?(\d+)', ch_name) + ch_num = m.group(1) if m else "" + sections = [{"label": f"{ch_name} 總覽", "href": f"/{ch_name}", + "icon": "tabler:square-rounded-number-0"}] + icons = ["one","two","three","four","five","six","seven","eight","nine"] + for t in cfg.get("tasks", []): + tn = t.get("name", "") + tm = re.match(rf'[Cc][Hh]?{ch_num}[_\-](\d+)', tn) if ch_num else None + if tm: + sec = int(tm.group(1)) + icon_name = icons[sec-1] if sec <= len(icons) else str(sec) + sections.append({"label": tn, "href": f"/{tn}", + "icon": f"tabler:square-rounded-number-{icon_name}"}) + + links = "\n".join( + _section_link(s.get("label",""), s.get("href","/"), s.get("icon","tabler:circle")) + for s in sections + ) + chapter_blocks.append(_chapter_nav_block(nav_label, nav_icon, links)) + + content = _navbar_template("\n".join(chapter_blocks)) + + if dry_run: + print(f"[dry-run] 會生成:{nav_file}\n") + print(content); return + + nav_file.parent.mkdir(parents=True, exist_ok=True) + nav_file.write_text(content, encoding="utf-8") + print(f"✅ 已生成:{nav_file}") + +# ───────────────────────────────────────────────────────────────────────────── +# 互動選單 +# ───────────────────────────────────────────────────────────────────────────── + +def menu() -> None: + while True: + print("\n═══════════ 網站管理工具 ═══════════") + print(" 1. 列出所有 task / chapter") + print(" 2. 新增單元 task") + print(" 3. 刪除單元 task") + print(" 4. 掃描 pages/ 補齊 paths.json") + print(" ─────────── 生成頁面 ───────────") + print(" 5. 生成全部頁面(單元 + 總覽)") + print(" 6. 強制重新生成全部") + print(" 7. 只生成小單元頁") + print(" 8. 強制重新生成小單元頁") + print(" 9. 只生成總覽頁") + print(" 10. 強制重新生成總覽頁") + print(" 11. 生成 navbar.py") + print(" 12. 強制重新生成 navbar.py") + print(" 0. 離開") + c = input("\n請選擇:").strip() + if c == "1": cmd_list() + elif c == "2": cmd_add() + elif c == "3": cmd_delete() + elif c == "4": cmd_scan() + elif c == "5": cmd_gen("all") + elif c == "6": cmd_gen("all", force=True) + elif c == "7": cmd_gen("unit") + elif c == "8": cmd_gen("unit", force=True) + elif c == "9": cmd_gen("chapter") + elif c == "10": cmd_gen("chapter", force=True) + elif c == "11": cmd_gen_navbar() + elif c == "12": cmd_gen_navbar(force=True) + elif c == "0": print("bye!"); break + else: print("請輸入 0-12。") + +# ───────────────────────────────────────────────────────────────────────────── +# 命令列介面 +# ───────────────────────────────────────────────────────────────────────────── + +if __name__ == "__main__": + ap = argparse.ArgumentParser(description="網站內容管理工具") + sub = ap.add_subparsers(dest="cmd") + + sub.add_parser("list", help="列出所有 task / chapter") + sub.add_parser("scan", help="掃描 pages/ 補齊 paths.json") + + p_add = sub.add_parser("add", help="新增單元 task") + p_add.add_argument("name", nargs="?") + + p_del = sub.add_parser("delete", help="刪除單元 task") + p_del.add_argument("name", nargs="?") + + p_gen = sub.add_parser("gen", help="生成頁面檔") + p_gen.add_argument("target", nargs="?", default="all", + choices=["all","unit","chapter","navbar"], + help="all=全部, unit=小單元, chapter=總覽, navbar=導覽列") + p_gen.add_argument("--force", action="store_true") + p_gen.add_argument("--dry-run", action="store_true") + + args = ap.parse_args() + + if args.cmd == "list": cmd_list() + elif args.cmd == "add": cmd_add(args.name) + elif args.cmd == "delete": cmd_delete(args.name) + elif args.cmd == "scan": cmd_scan() + elif args.cmd == "gen": + if args.target == "navbar": + cmd_gen_navbar(args.force, args.dry_run) + else: + cmd_gen(args.target, args.force, args.dry_run) + else: + menu() diff --git a/student_login.py b/student_login.py new file mode 100644 index 0000000000000000000000000000000000000000..5bafd263afc982ea1fe6fef0da2b89051fb0a42a --- /dev/null +++ b/student_login.py @@ -0,0 +1,153 @@ +""" +student_login.py +---------------- +學生登入元件。 +用 clientside callback 直接讀 localStorage,避免 Python callback 時序問題。 +""" +from __future__ import annotations +import dash +from dash import html, dcc, callback, Input, Output, State, no_update, clientside_callback +import dash_mantine_components as dmc +from dash_iconify import DashIconify + + +def create_student_store() -> dcc.Store: + return dcc.Store(id="student-id-store", storage_type="local", data="") + + +def create_login_modal() -> html.Div: + return html.Div([ + dmc.Modal( + id="student-login-modal", + opened=False, + centered=True, + closeOnClickOutside=False, + closeOnEscape=False, + withCloseButton=False, + title=dmc.Group([ + DashIconify(icon="tabler:school", height=24), + dmc.Text("歡迎使用數學學習平台", fw=700, size="lg"), + ], gap="xs"), + children=[ + dmc.Text( + "請輸入您的學號,系統將記錄您的學習進度。", + size="sm", c="dimmed", mb="md", + ), + dmc.TextInput( + id="student-id-input", + label="學號", + placeholder="例如:B11234567", + leftSection=DashIconify(icon="tabler:id-badge", height=16), + required=True, + mb="md", + ), + dmc.Alert( + id="student-login-error", + children="", + color="red", + variant="light", + style={"display": "none"}, + mb="sm", + ), + dmc.Button( + "開始學習", + id="student-login-btn", + fullWidth=True, + leftSection=DashIconify(icon="tabler:arrow-right", height=16), + ), + ], + size="sm", + ), + ]) + + +def create_student_badge() -> html.Div: + return html.Div( + id="student-badge", + style={"display": "none"}, + children=dmc.Group([ + dmc.Badge( + id="student-badge-text", + leftSection=DashIconify(icon="tabler:user", height=12), + variant="light", + color="teal", + size="sm", + ), + dmc.ActionIcon( + DashIconify(icon="tabler:logout", height=14), + id="student-logout-btn", + size="sm", + variant="subtle", + color="gray", + ), + ], gap=4), + ) + + +@callback( + Output("student-id-store", "data", allow_duplicate=True), + Input("student-logout-btn", "n_clicks"), + prevent_initial_call=True, +) +def logout_student(n_clicks): + if n_clicks: + return "" + return no_update + + +# ─── Clientside:頁面載入時直接從 localStorage 判斷是否開啟 modal ─────────── +# 完全在瀏覽器端執行,不需要等 Python callback,沒有時序問題 + +clientside_callback( + """ + function(storeData) { + // storeData 是 dcc.Store 讀到的值 + // 有學號 → 不開 modal;沒學號 → 開 modal + if (storeData && storeData !== "") { + return false; + } + return true; + } + """, + Output("student-login-modal", "opened"), + Input("student-id-store", "data"), + prevent_initial_call=False, +) + + +# ─── Python callback:按下「開始學習」後儲存學號 ────────────────────────── + +@callback( + Output("student-id-store", "data"), + Output("student-login-error", "children"), + Output("student-login-error", "style"), + Input("student-login-btn", "n_clicks"), + State("student-id-input", "value"), + prevent_initial_call=True, +) +def save_student_id(n_clicks, input_value): + sid = (input_value or "").strip() + if not sid: + return no_update, "請輸入學號", {"display": "block"} + + # 寫入 Firebase + try: + from firebase_progress import upsert_student + upsert_student(sid) + except Exception as e: + print(f"[Firebase] upsert_student 失敗:{e}") + + return sid, "", {"display": "none"} + + +# ─── 學生 badge 更新 ───────────────────────────────────────────────────── + +@callback( + Output("student-badge", "style"), + Output("student-badge-text", "children"), + Input("student-id-store", "data"), +) +def update_badge(student_id): + if student_id: + return {"display": "inline-flex", "alignItems": "center"}, f"學號:{student_id}" + return {"display": "none"}, ""