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 atb.

Is the IVP well-posed?

  1. domain should be convex: D={(t,y)atby} — 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 yD, i.e. |f(t,x)f(t,y)|L|xy|.
    Theorem. |fy|CD, 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:=ban

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)dthf(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)dth2(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)dthf(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)=sin2y+4πt, and y(0)=0

This is well-posed:

  • domain of RHS is entire real plane
  • |fy|=|2cos2y|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:

Eij1=I[i,j=a]

L=[10045101]

L=[100451011]

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|=4a2>0
  • |A|=37a2>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 1ii).

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

Then LT=[4054010007554]=[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 Ap=maxxp=1Axp, but this is a pain to compute. We settle for the following theorems:

  1. A=max row sum=maxij=1n|aij|
  2. A1=AT=max column sum=maxji=1n|aij|
  3. A2=ρ(ATA), where ρ(A)=maxi|λi| is the largest magnitude eigenvalue.

Theorem. xA=xTAx is a norm if A is positive definite.

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

  1. x0, and x=0 if and only if x=0.
  2. αx=|α|x for all constants α
  3. x+yx+y, which holds iif and only if the Cauchy-Schwartz inequality (x,yx,xy,y).

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

xA=xTAx=xTLLTx=(LTx)T(LTx)=LTx22=LTx2

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


Next, αxA=α2xTAx=|α|xA


Finally, x,yA=xTAyxTAxyTAy=LTxLTyxAyA

quod erat demonstrandum


Example

Find 2 norm of A=[405010507]

Eigenvalues are found by

|4λ0501λ0507λ|=(1λ)(λ211λ+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) fp22=minqΠfq22, 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][a1a2an]=[f,ϕ1f,ϕ2f,ϕ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