MATH 417 Lecture 26

From Notes
Jump to navigation Jump to search

« previous | Thursday, April 24, 2014 | next »

End Exam 2 content


Pre-Exam Discussion

  • 6 problems total for possible score of over 100 (but 100 is perfect)
  • 1-2 problems from first exam's sections


Chapter 5

Initial Value Problem (IVP): dydt=f(t,y), and y(a)=α for a≤t≤b.

Is the IVP well-posed?

  1. domain should be convex: D={(t,y)∣a≤t≤by∈◻} — you should be able to draw straight line that never leaves the set between any two points (t,y).
  2. f is continuous in D
  3. f is Lipschitz with respect to y∈D, i.e. |f(t,x)−f(t,y)|≤L|x−y|.
    Theorem. |∂f∂y|≤C∈D, then f is Lipschitz with Lipschitz constant C.


Numerical Methods

y′(t)=f(t,y)∫titi+1y′(t)dt=∫titi+1f(t,y)dty(ti+1)−y(ti)=∫titi+1f(t,y)dty(ti+1)=y(ti)+∫titi+1f(t,y)dt

Over interval [a,b] with n sample points, we define h:=b−an

Let wi=y(ti), where ti=a+ih, with w0=y(a)=α

Rule is of form:

wi+1=wi+numerical integration method

Euler's Method

Approximate ∫titi+1f(t,y)dt by left endpoint riemann rule: ∫titi+1f(t,y)dt≈hf(ti,y(ti)).

wi+1=wi+hf(ti,wi)

Modified Euler's Method

Approximate ∫titi+1f(t,y)dt by trapezoidal rule: ∫titi+1f(t,y)dt≈h2(f(ti,wi)+f(ti+1,wi+hf(ti,wi))).

wi+1=wi+h2(f(ti,wi)+f(ti+1,wi+hf(ti,wi)))

Midpoint Method

Approximate ∫titi+1f(t,y)dt by midpoint rule: ∫titi+1f(t,y)dt≈hf(ti+h2,wi+h2f(ti,wi)).

wi+1=wi+hf(ti+h2,wi+h2f(ti,wi))

Heun's Method

Too complicated for exam.


Example

y′(t)=sin⁡2y+4πt, and y(0)=0

This is well-posed:

  • domain of RHS is entire real plane
  • |∂f∂y|=|2cos⁡2y|≤2

h=12

Let's use Modified Euler...

  • w0=0
  • w1=0+14(f(0,0)+f(12,0+12f(0,0)))=14f(12,0)=π2
  • w2=π2+14(f(12,π2)+f(1,pi2+12f(12,π2)))=2π


Chapter 6

(skip linear algebra review)

A=[501417502]

We wish to find L and U such that A=LU:

Standard Gaussian elimination sets the pivot elements equal to 1, and this requires a little extra modification to find L. If we stick with just elementay operation #3 (adding a multiple of one row to another), then computation of L is easy:

Elementary matrix 3 is given by Eij=I[i,j=a]: this will add a times row j to row i. The i,j-th entry of the identity matrix is a. Computing the inverse is incredibly straightforward:

Eij−1=I[i,j=−a]

L=[1004510◻◻1]

L=[10045101◻1]

L=[1004510101]


Positive Definite Matrices

Theorem. A matrix A is positive definite if and only if the determinants of all the minors of A are positive:

A=[4a5a10507]

Hence

  • |4|=4>0
  • |4aa1|=4−a2>0
  • |A|=3−7a2>0

From these constraints, we get a∈(−37,37)


Cholesky [sp?] Factorization

Given symmetric matrix A, find L such that A=LLT.

To get this, perform LU decomposition, but replace diagonal pivot elements of L with ℓii (and multiply the corresponding column by 1ℓii).

Let A=[405010507]=[4000105034][1054010001]

Then LT=[4054010007−5⋅54]=[20520100032]

This is often called the square root of a matrix, since the closest we can get to an abstract "square" of any matrix (of any size) is AAT.


Matrix Norms

All norms discussed here are called "native"

Defined as ‖A‖p=max‖x→‖p=1‖Ax→‖p, but this is a pain to compute. We settle for the following theorems:

  1. ‖A‖∞=max row sum=maxi∑j=1n|aij|
  2. ‖A‖1=‖AT‖∞=max column sum=maxj∑i=1n|aij|
  3. ‖A‖2=ρ(ATA), where ρ(A)=maxi|λi| is the largest magnitude eigenvalue.

Theorem. ‖x→‖A=x→TAx is a norm if A is positive definite.

Proof. By definition, ‖⋅‖ is a norm if and only if it satisfies the following:

  1. ‖x‖≥0, and ‖x‖=0 if and only if x=0.
  2. ‖αx‖=|α|‖x‖ for all constants α
  3. ‖x+y‖≤‖x‖+‖y‖, which holds iif and only if the Cauchy-Schwartz inequality (⟨x,y⟩≤⟨x,x⟩⋅⟨y,y⟩).

Since A is symmetric, we can find L such that A=LLT. thus

‖x→‖A=x→TAx→=x→TLLTx→=(LTx→)T(LTx→)=‖LTx‖22=‖LTx‖2

We know this norm is always greater than 0 and equal to zero only when x→=0→.


Next, ‖αx→‖A=α2x→TAx→=|α|‖x→‖A


Finally, ⟨x,yA⟩=xTAy≤x→TAx→y→TAy→=‖LTx→‖‖LTy→‖≤‖x→‖A⋅‖y→‖A

quod erat demonstrandum


Example

Find ℓ2 norm of A=[405010507]

Eigenvalues are found by

|4−λ0501−λ0507−λ|=(1−λ)(λ2−11λ+3)=0

So λ∈{1,11±1092}, and maxi|λi|=11+1092


Chapter 8

Given f(x), approximate p(x)=a1ϕ1(x)+a2ϕ2(x)+…+anϕn(x).

To do this, we find the best least squares fit (i.e. minimize Euclidean distance) ‖f−p‖22=minq∈Π‖f−q‖22, where Π=Span{ϕ1,ϕ2,…,ϕn}.

Normal equations given by

[⟨ϕ1,ϕ1⟩⟨ϕ1,ϕ2⟩…⟨ϕ1,ϕn⟩⟨ϕ2,ϕ1⟩⟨ϕ2,ϕ2⟩…⟨ϕ2,ϕn⟩⋮⋮⋱⋮⟨ϕn,ϕ1⟩⟨ϕn,ϕ2⟩…⟨ϕn,ϕn⟩][a1a2⋮an]=[⟨f,ϕ1⟩⟨f,ϕ2⟩⋮⟨f,ϕn⟩]


  • Given continuous functions, the inner product is given by ⟨f,g⟩=∫abf(x)g(x)w(x)dx
  • Given point samples, the inner product is given by ⟨f,g⟩=∑ifigiwi