Skip to Content

Math4501 Lecture 2

Solving non-linear equations

Let f:RnRn\vec{f}:\mathbb{R}^n\to\mathbb{R}^n we want to solve f(x)=0\vec{f}(\vec{x})=\vec{0}. (mm equations, mm variables)

In case if f\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]Rf:[0,1]\to\mathbb{R} be a continuous function.

Find polynomial pnp_n of degree nn such that pn(xi)=f(xi)p_n(x_i)=f(x_i) for i=0,1,,ni=0,1,\cdots,n.

Then, some key questions are involved:

  1. How to compute c0,c1,,cnc_0,c_1,\cdots,c_n?
  2. If ff is continuously differentiable, does pnp_n' approximate ff'?
  3. If ff is integrable, does 01pn(x)dx\int_0^1 p_n(x)dx approximate 01f(x)dx\int_0^1 f(x)dx?

Deeper questions:

Is the approximation efficient?

Scalar problem

Problem 1: Let f:[a,b]Rf:[a,b]\to\mathbb{R} be a continuous function. Find ξ[a,b]\xi\in[a,b] such that f(ξ)=0f(\xi)=0.

Problem 2: Let f:[a,b]Rf:[a,b]\to\mathbb{R} be a continuous function. Find ξ[a,b]\xi\in[a,b] such that f(ξ)=ξf(\xi)=\xi.

P1, P2 are equivalent. f(x)f(x)xf(x)\coloneqq f(x)-x is a continuous function.

Intermediate value theorem 

Some advantage in solving P1 as P2

When does a solution exists

Trivial case: f(x)=0f(x)=0 for some x[a,b]x\in[a,b].

Without loss of generality, assume f(a)f(b)<0f(a)f(b)<0, Then there exists ξ(a,b)\xi\in(a,b) such that f(ξ)=0f(\xi)=0.

Bisection algorithm:

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(an)<0f(a_n)<0 for all nn and f(bn)>0f(b_n)>0 for all nn.

limnf(an)0\lim_{n\to\infty} f(a_n)\leq 0 and limnf(bn)0\lim_{n\to\infty} f(b_n)\geq 0.

If limit exists, then limnf(an)=limnf(bn)=0\lim_{n\to\infty} f(a_n)=\lim_{n\to\infty} f(b_n)=0.

Such limit exists by the sequence ana_n and bnb_n is Cauchy and we are in real number field.

This can be used to solve P2:

Recall that if we define f(x)g(x)xf(x)\coloneqq g(x)-x, then f(x)=0f(x)=0 if and only if f(a)f(b)<0f(a)f(b)<0. That is (g(a)a)(g(b)b)0(g(a)-a)(g(b)-b)\leq 0.

Last updated on