MATH 417 Lecture 19

From Notes
Jump to navigation Jump to search

« previous | Tuesday, April 1, 2014 | next »


Exam Discussion

Perfect score is 102

Problem 1

x=g(x)=(x+1)13

p0=32 and set pn+1=g(pn)=(pn+1)13

  1. If 1≤x≤2, then show 1≤x≤2. In this case 1<23=g(1)≤g(x)≤g(2)=33<2
  2. |g′(x)|=131(x+1)23≤13⋅413=k<1


Solve |pn−p|≤knmax⁡(p0−a,b−p0)<1100 for n: n=3


Problem 2

Interpolate polynomial using LaGrange method given all 4th-order divided differences (i.e. f[⋅,⋅,⋅,⋅,⋅] are 10

 x  p(x)
-2   2
         -1
 0   0       1/3
          0       5/3
 1   0        7        10
         14        ?
 2  14        ?
          ?
 ?   ?


Hence p(x)=2−(x+2)+13(x+2)x+53(x+2)x(x−1)+10(x+2)x(x−1)(x−2)

x3(53+10(−1))→−253


Problem 3

Find Hermite polynomial

x  p(x)
0   2
         0
0   2        -1/4
       -1/2          5/4
2   1         9/4
         4
2   1


H3(x)=2+0⋅x−14x2+54x2(x−2)


Problem 4

Taylor Series expansion given x0−h, x0, and x0+3h.


f(x0−h)=f(x0)−hf′(x0)+h22f″(x0)+O(h3)f(x0+3h)=f(x0)+3hf′(x0)+9h22f″(x0)+O(h3)9f(x0−h)−f(x0+3h)=8f(x0)−12hf′(x0)+O(h3)

Thus

12hf′(x0)=f(x0+3h)+8f(x0)−O(h3)

and

f′(x0)=−9f(x0−h)+8f(x0)+f(x0+3h)12h+O(h2)


Problem 4

∫03f(x)dx=c0f(0)+c1f(x1)

c0=34, c1=94, and x1=2


Problem 5

∫20132014f(x)dx≈c0f(x0)+c1f(x1)


On [−1,1], we have c0=c1=1 and x0=−x1=−33.

Scale to new range [0,1]: c0=c1=12, x0=12−33⋅12, and x1=12+33⋅12

Now shift to range [2013,2014]: c0=c1=12, x0=12−33⋅12+2013, and x1=12+33⋅12+2013

this has DAC=2n−1=3

Quiz Discussion

{y′=f(t,y)=y+t+cos⁡(πy)y(0)=0

for 0≤t≤1

Part A: Show Well-Posedness

  1. Continuous with respect to t
  2. |∂f∂x|=|1−πsin⁡(πy)|≤π+1<5

Part B: List methods

Euler's method: w0=0, wi+1=wi+hf(ti,wi)

Modified Euler's method: w0=0, wi+1=wi+h2(f(ti,wi)+f(ti+1,wi+hf(ti,wi))

Part C: Euler Approximation

  • w0=0
  • w1=12f(0,0)=12
  • w2=12+12f(12,12)=1


Numerical Linear Algebra

Practical problem: solve Ax→=b→ many times given b→1, b→2, etc.


Naïve method

Compute A−1.

When b→ comes along, compute A−1b→. The cost is 43n3 to compute A−1 plus (2n−1)n to multiply A−1 by b→


Smarter Method

Perform gaussian elimination on A, keeping track of each elementary matrix operation: E1, E2, E3, etc.

We will be left with EkEk−1…E1A=U, where U is an upper-triangular matrix. Solving once again for A (i.e. finding (Ek…E1)−1=L gives a lower triangular matrix

This gives A=LU, the LU-decomposition of A.

It costs 23n3 operations to decompose an n×n matrix A.

We store LU inside A:

[l11u12…u1nl21l22u2n⋮⋱⋮ln1ln2…lnn]


When b→ comes along, we have LUx→=b→.

  1. Solve Ly→=b→ for y→
  2. Solve Ux→=y→ for x→

each takes approximately n2−n operations to solve, so our total cost is now 2n2−2n