From 802993833b92390bdd927e19fa57a1c89b6a2691 Mon Sep 17 00:00:00 2001 From: Trance-0 <60459821+Trance-0@users.noreply.github.com> Date: Wed, 27 Aug 2025 15:52:24 -0500 Subject: [PATCH] update --- content/Math4501/Math4501_L1.md | 2 +- content/Math4501/Math4501_L2.md | 76 +++++++++++++++++++++++++++++++++ content/Math4501/_meta.js | 8 ++++ content/Math4501/index.md | 3 ++ 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 content/Math4501/Math4501_L2.md create mode 100644 content/Math4501/_meta.js create mode 100644 content/Math4501/index.md diff --git a/content/Math4501/Math4501_L1.md b/content/Math4501/Math4501_L1.md index 4e9ebe0..c4bd261 100644 --- a/content/Math4501/Math4501_L1.md +++ b/content/Math4501/Math4501_L1.md @@ -1,6 +1,6 @@ # Math4501 Lecture 1 -In many practical problems (ODEs, PdEs, Sys of eqn) +In many practical problems (ODEs (ordinary differential equations), PdEs (partial differential equations), System of equations) closed-form analytical solutions are unknown. diff --git a/content/Math4501/Math4501_L2.md b/content/Math4501/Math4501_L2.md new file mode 100644 index 0000000..f03a42b --- /dev/null +++ b/content/Math4501/Math4501_L2.md @@ -0,0 +1,76 @@ +# Math4501 Lecture 2 + +Solving non-linear equations + +Let $\vec{f}:\mathbb{R}^n\to\mathbb{R}^n$ we want to solve $\vec{f}(\vec{x})=\vec{0}$. ($m$ equations, $m$ variables) + +In case if $\vec{f}$ is linear, we can solve it by Gaussian elimination. + +Closely related to the problem: eigenvalue problem. + +related to root finding problem for polynomial. + +## Polynomial approximations + +Let $f:[0,1]\to\mathbb{R}$ be a continuous function. + +Find polynomial $p_n$ of degree $n$ such that $p_n(x_i)=f(x_i)$ for $i=0,1,\cdots,n$. + +Then, some key questions are involved: + +1. How to compute $c_0,c_1,\cdots,c_n$? +2. If $f$ is continuously differentiable, does $p_n'$ approximate $f'$? +3. If $f$ is integrable, does $\int_0^1 p_n(x)dx$ approximate $\int_0^1 f(x)dx$? + +Deeper questions: + +Is the approximation **efficient**? + +## Scalar problem + +Problem 1: Let $f:[a,b]\to\mathbb{R}$ be a continuous function. Find $\xi\in[a,b]$ such that $f(\xi)=0$. + +Problem 2: Let $f:[a,b]\to\mathbb{R}$ be a continuous function. Find $\xi\in[a,b]$ such that $f(\xi)=\xi$. + +P1, P2 are equivalent. $f(x)\coloneqq f(x)-x$ is a continuous function. + +[Intermediate value theorem](https://notenextra.trance-0.com/Math4121/Math4121_L3#definition-5121-intermediate-value) + +> Some advantage in solving P1 as P2 + +### When does a solution exists + +Trivial case: $f(x)=0$ for some $x\in[a,b]$. + +Without loss of generality, assume $f(a)f(b)<0$, Then there exists $\xi\in(a,b)$ such that $f(\xi)=0$. + +Bisection algorithm: + +```python +def bisection(f, a, b, tol=1e-6, max_iter=100): + # first we setup two sequences $a_n$ and $b_n$ + # require: + # |a_n - b_n| \leq 2^{-n} (b-a) + for i in range(max_iter): + c = (a + b) / 2 + if c < tol or f(c) == 0: + return c + elif f(a) * f(c) < 0: + b = c + else: + a = c + return None +``` + +Let $f(a_n)<0$ for all $n$ and $f(b_n)>0$ for all $n$. + +$\lim_{n\to\infty} f(a_n)\leq 0$ and $\lim_{n\to\infty} f(b_n)\geq 0$. + +If limit exists, then $\lim_{n\to\infty} f(a_n)=\lim_{n\to\infty} f(b_n)=0$. + +Such limit exists by the sequence $a_n$ and $b_n$ is Cauchy and we are in real number field. + +This can be used to solve P2: + +Recall that if we define $f(x)\coloneqq g(x)-x$, then $f(x)=0$ if and only if $f(a)f(b)<0$. That is $(g(a)-a)(g(b)-b)\leq 0$. + diff --git a/content/Math4501/_meta.js b/content/Math4501/_meta.js new file mode 100644 index 0000000..f15d5fd --- /dev/null +++ b/content/Math4501/_meta.js @@ -0,0 +1,8 @@ +export default { + index: "Course Description", + "---":{ + type: 'separator' + }, + Math4501_L1: "Numerical Applied Mathematics (Lecture 1)", + Math4501_L2: "Numerical Applied Mathematics (Lecture 2)", +} diff --git a/content/Math4501/index.md b/content/Math4501/index.md new file mode 100644 index 0000000..4cf4d70 --- /dev/null +++ b/content/Math4501/index.md @@ -0,0 +1,3 @@ +# Math4501 + +Numerical Applied Mathematics \ No newline at end of file