Finite Difference Method Bernd Schr oder logo1 Bernd Schr oder - - PowerPoint PPT Presentation

finite difference method
SMART_READER_LITE
LIVE PREVIEW

Finite Difference Method Bernd Schr oder logo1 Bernd Schr oder - - PowerPoint PPT Presentation

Overview An Example Comparison to Actual Solution Conclusion Finite Difference Method Bernd Schr oder logo1 Bernd Schr oder Louisiana Tech University, College of Engineering and Science Finite Difference Method Overview An Example


slide-1
SLIDE 1

logo1 Overview An Example Comparison to Actual Solution Conclusion

Finite Difference Method

Bernd Schr¨

  • der

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-2
SLIDE 2

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-3
SLIDE 3

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-4
SLIDE 4

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ a

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-5
SLIDE 5

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-6
SLIDE 6

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-7
SLIDE 7

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-8
SLIDE 8

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-9
SLIDE 9

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3 x4

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-10
SLIDE 10

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3 x4 ···

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-11
SLIDE 11

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3 x4 xN−1 ···

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-12
SLIDE 12

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3 x4 xN−1 xN ···

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-13
SLIDE 13

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3 x4 xN−1 xN = b ···

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-14
SLIDE 14

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3 x4 xN−1 xN = b ···

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-15
SLIDE 15

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-16
SLIDE 16

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ a b

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-17
SLIDE 17

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a xN = b

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-18
SLIDE 18

logo1 Overview An Example Comparison to Actual Solution Conclusion

Start with the Grid

✲ x0 = a x1 x2 x3 x4 xN−1 xN = b ···

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-19
SLIDE 19

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-20
SLIDE 20

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′(x)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-21
SLIDE 21

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′(x) ≈ y(x+h)−y(x) h

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-22
SLIDE 22

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′(x) ≈ y(x+h)−y(x) h (Difference ∼ h)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-23
SLIDE 23

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′(x) ≈ y(x+h)−y(x) h (Difference ∼ h) y′(x) ≈ y(x)−y(x−h) h

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-24
SLIDE 24

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′(x) ≈ y(x+h)−y(x) h (Difference ∼ h) y′(x) ≈ y(x)−y(x−h) h (Difference ∼ h)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-25
SLIDE 25

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′(x) ≈ y(x+h)−y(x) h (Difference ∼ h) y′(x) ≈ y(x)−y(x−h) h (Difference ∼ h) y′(x) ≈ y(x+h)−y(x−h) 2h

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-26
SLIDE 26

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′(x) ≈ y(x+h)−y(x) h (Difference ∼ h) y′(x) ≈ y(x)−y(x−h) h (Difference ∼ h) y′(x) ≈ y(x+h)−y(x−h) 2h

  • Difference ∼ h2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-27
SLIDE 27

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-28
SLIDE 28

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′′(x)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-29
SLIDE 29

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′′(x) ≈ y′(x+h)−y′(x) h

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-30
SLIDE 30

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′′(x) ≈ y′(x+h)−y′(x) h ≈

y(x+h)−y(x) h

− y(x)−y(x−h)

h

h

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-31
SLIDE 31

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′′(x) ≈ y′(x+h)−y′(x) h ≈

y(x+h)−y(x) h

− y(x)−y(x−h)

h

h = y(x+h)−2y(x)+y(x−h) h2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-32
SLIDE 32

logo1 Overview An Example Comparison to Actual Solution Conclusion

Find Approximate Expressions for the Derivatives

y′′(x) ≈ y′(x+h)−y′(x) h ≈

y(x+h)−y(x) h

− y(x)−y(x−h)

h

h = y(x+h)−2y(x)+y(x−h) h2

  • Difference ∼ h2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-33
SLIDE 33

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-34
SLIDE 34

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-35
SLIDE 35

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-36
SLIDE 36

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-37
SLIDE 37

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-38
SLIDE 38

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-39
SLIDE 39

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn, replace y(xn −h)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-40
SLIDE 40

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn, replace y(xn −h) = y(xn−1) with yn−1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-41
SLIDE 41

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn, replace y(xn −h) = y(xn−1) with yn−1, replace y(xn +h)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-42
SLIDE 42

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn, replace y(xn −h) = y(xn−1) with yn−1, replace y(xn +h) = y(xn+1) with yn+1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-43
SLIDE 43

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn, replace y(xn −h) = y(xn−1) with yn−1, replace y(xn +h) = y(xn+1) with yn+1, replace xn with x0 +nh

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-44
SLIDE 44

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn, replace y(xn −h) = y(xn−1) with yn−1, replace y(xn +h) = y(xn+1) with yn+1, replace xn with x0 +nh, and replace h with its numerical value.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-45
SLIDE 45

logo1 Overview An Example Comparison to Actual Solution Conclusion

Discretize the Problem

  • 1. Determine a grid xn, n = 0,...,N.
  • 2. In the differential equation,

replace y′(x) with y(x+h)−y(x−h) 2h , replace y′′(x) with y(x+h)−2y(x)+y(x−h) h2 .

  • 3. In the resulting equation, replace x with xn.
  • 4. In the resulting equation,

replace y(xn) with yn, replace y(xn −h) = y(xn−1) with yn−1, replace y(xn +h) = y(xn+1) with yn+1, replace xn with x0 +nh, and replace h with its numerical value.

  • 5. Solve the resulting system of equations.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-46
SLIDE 46

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-47
SLIDE 47

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-48
SLIDE 48

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-49
SLIDE 49

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-50
SLIDE 50

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-51
SLIDE 51

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-52
SLIDE 52

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-53
SLIDE 53

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-54
SLIDE 54

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

=

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-55
SLIDE 55

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-56
SLIDE 56

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-57
SLIDE 57

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-58
SLIDE 58

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-59
SLIDE 59

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-60
SLIDE 60

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2−2h2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-61
SLIDE 61

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2−2h2

+y(x−h)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-62
SLIDE 62

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2−2h2

+y(x−h)(1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-63
SLIDE 63

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2−2h2

+y(x−h)(1+xh)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-64
SLIDE 64

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2−2h2

+y(x−h)(1+xh) =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-65
SLIDE 65

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2−2h2

+y(x−h)(1+xh) = y(xn +h)(1−xnh)+y(xn)

  • −2−2h2

+y(xn −h)(1+xnh) =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-66
SLIDE 66

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

h := 1−0 8 = 1 8, xn := 0+n1 8 y′′ −2xy′ −2y = y(x+h)−2y(x)+y(x−h) h2 −2xy(x+h)−y(x−h) 2h −2y(x) = y(x+h)−2y(x)+y(x−h)−xh

  • y(x+h)−y(x−h)
  • −2h2y(x)

= y(x+h)(1−xh) +y(x)

  • −2−2h2

+y(x−h)(1+xh) = y(xn +h)(1−xnh)+y(xn)

  • −2−2h2

+y(xn −h)(1+xnh) = yn+1

  • 1− 1

64n

  • +yn
  • −2− 1

32

  • +yn−1
  • 1+ 1

64n

  • =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-67
SLIDE 67

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-68
SLIDE 68

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Boundaries :

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-69
SLIDE 69

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Boundaries : yn+1

  • 1− 1

64n

  • +yn
  • −2− 1

32

  • +yn−1
  • 1+ 1

64n

  • =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-70
SLIDE 70

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Boundaries : yn+1

  • 1− 1

64n

  • +yn
  • −2− 1

32

  • +yn−1
  • 1+ 1

64n

  • =

n = 1 : y2 63 64 +y1

  • −65

32

  • +y0

65 64 =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-71
SLIDE 71

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Boundaries : yn+1

  • 1− 1

64n

  • +yn
  • −2− 1

32

  • +yn−1
  • 1+ 1

64n

  • =

n = 1 : y2 63 64 +y1

  • −65

32

  • +y0

65 64 = y2 63 64 +y1

  • −65

32

  • =

−65 64

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-72
SLIDE 72

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Boundaries : yn+1

  • 1− 1

64n

  • +yn
  • −2− 1

32

  • +yn−1
  • 1+ 1

64n

  • =

n = 1 : y2 63 64 +y1

  • −65

32

  • +y0

65 64 = y2 63 64 +y1

  • −65

32

  • =

−65 64 n = 7 : y8 57 64 +y7

  • −65

32

  • +y6

71 64 =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-73
SLIDE 73

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Boundaries : yn+1

  • 1− 1

64n

  • +yn
  • −2− 1

32

  • +yn−1
  • 1+ 1

64n

  • =

n = 1 : y2 63 64 +y1

  • −65

32

  • +y0

65 64 = y2 63 64 +y1

  • −65

32

  • =

−65 64 n = 7 : y8 57 64 +y7

  • −65

32

  • +y6

71 64 = y7

  • −65

32

  • +y6

71 64 = −e57 64

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-74
SLIDE 74

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-75
SLIDE 75

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-76
SLIDE 76

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-77
SLIDE 77

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-78
SLIDE 78

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-79
SLIDE 79

logo1 Overview An Example Comparison to Actual Solution Conclusion

Use Finite Differences with 8 Intervals to Solve the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-80
SLIDE 80

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-81
SLIDE 81

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-82
SLIDE 82

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-83
SLIDE 83

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1 √

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-84
SLIDE 84

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1 √ y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-85
SLIDE 85

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1 √ y(1) = e √

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-86
SLIDE 86

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1 √ y(1) = e √ y′(x) = 2xex2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-87
SLIDE 87

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1 √ y(1) = e √ y′(x) = 2xex2 y′′(x) = 2ex2 +4x2ex2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-88
SLIDE 88

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1 √ y(1) = e √ y′(x) = 2xex2 y′′(x) = 2ex2 +4x2ex2 = 2y+2xy′

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-89
SLIDE 89

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

y(x) = ex2 y(0) = 1 √ y(1) = e √ y′(x) = 2xex2 y′′(x) = 2ex2 +4x2ex2 = 2y+2xy′ √

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-90
SLIDE 90

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-91
SLIDE 91

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-92
SLIDE 92

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-93
SLIDE 93

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-94
SLIDE 94

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-95
SLIDE 95

logo1 Overview An Example Comparison to Actual Solution Conclusion

Actual Solution of the Boundary Value Problem y′′ −2xy′ −2y = 0, y(0) = 1, y(1) = e

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-96
SLIDE 96

logo1 Overview An Example Comparison to Actual Solution Conclusion

The Finite Difference Method

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-97
SLIDE 97

logo1 Overview An Example Comparison to Actual Solution Conclusion

The Finite Difference Method

  • 1. The finite difference method is usually applied to partial

differential equations

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-98
SLIDE 98

logo1 Overview An Example Comparison to Actual Solution Conclusion

The Finite Difference Method

  • 1. The finite difference method is usually applied to partial

differential equations (hence the term “grid”).

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-99
SLIDE 99

logo1 Overview An Example Comparison to Actual Solution Conclusion

The Finite Difference Method

  • 1. The finite difference method is usually applied to partial

differential equations (hence the term “grid”).

  • 2. The solution is typically not known.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-100
SLIDE 100

logo1 Overview An Example Comparison to Actual Solution Conclusion

The Finite Difference Method

  • 1. The finite difference method is usually applied to partial

differential equations (hence the term “grid”).

  • 2. The solution is typically not known.
  • 3. One way to get an indication that we are close to a solution

is to refine the grid and compare consecutive approximations.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-101
SLIDE 101

logo1 Overview An Example Comparison to Actual Solution Conclusion

The Finite Difference Method

  • 1. The finite difference method is usually applied to partial

differential equations (hence the term “grid”).

  • 2. The solution is typically not known.
  • 3. One way to get an indication that we are close to a solution

is to refine the grid and compare consecutive

  • approximations. If they are not too far apart, we may be

close to the solution.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method

slide-102
SLIDE 102

logo1 Overview An Example Comparison to Actual Solution Conclusion

The Finite Difference Method

  • 1. The finite difference method is usually applied to partial

differential equations (hence the term “grid”).

  • 2. The solution is typically not known.
  • 3. One way to get an indication that we are close to a solution

is to refine the grid and compare consecutive

  • approximations. If they are not too far apart, we may be

close to the solution.

  • 4. Finite difference methods lead to large systems of linear

equations which need to be solved with numerical techniques.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Finite Difference Method