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 1x2, then show 1x2. In this case 1<23=g(1)g(x)g(2)=33<2
  2. |g(x)|=131(x+1)2313413=k<1


Solve |pnp|knmax(p0a,bp0)<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(x1)+10(x+2)x(x1)(x2)

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+0x14x2+54x2(x2)


Problem 4

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


f(x0h)=f(x0)hf(x0)+h22f(x0)+O(h3)f(x0+3h)=f(x0)+3hf(x0)+9h22f(x0)+O(h3)9f(x0h)f(x0+3h)=8f(x0)12hf(x0)+O(h3)

Thus

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

and

f(x0)=9f(x0h)+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)dxc0f(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=123312, and x1=12+3312

Now shift to range [2013,2014]: c0=c1=12, x0=123312+2013, and x1=12+3312+2013

this has DAC=2n1=3

Quiz Discussion

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

for 0t1

Part A: Show Well-Posedness

  1. Continuous with respect to t
  2. |fx|=|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 b1, b2, etc.


Naïve method

Compute A1.

When b comes along, compute A1b. The cost is 43n3 to compute A1 plus (2n1)n to multiply A1 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 EkEk1E1A=U, where U is an upper-triangular matrix. Solving once again for A (i.e. finding (EkE1)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:

[l11u12u1nl21l22u2nln1ln2lnn]


When b comes along, we have LUx=b.

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

each takes approximately n2n operations to solve, so our total cost is now 2n22n