Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another.

Similar presentations


Presentation on theme: "Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another."— Presentation transcript:

1 Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another class of problems in which one of the conditions is not an initial value condition but rather a boundary value

2 Boundary Value Problems l For example, take the case of a slab of material that has a constant temperature at each end of the slab and a varying temperature along its length L T = T 1 T = T 2

3 Boundary Value Problems l We will look at two methods of solving this type of problem: l The Shooting Method l The Finite Difference Method

4 The Shooting Method Given: with: Here we have only ONE initial condition

5 The Shooting Method l The Shooting Method guesses the other initial condition (in this case the inital value of dF/dx) l The DE is then solved out to the value of x n. l If the other boundary value is satisfied, then one has the answer l If not, one guesses an improved value for the unknown IC and reiterates

6 The Shooting Method Example: with: Here we have only ONE initial condition Let’s GUESS that y’(1) = -2

7 The Shooting Method Using MathCad we obtain: For guessed F’(1) = -2

8 The Shooting Method Using MathCad we obtain: Boundary value of F = -1 at x = 3

9 The Shooting Method Using MathCad again we obtain: For new guessed F’(1) = -4

10 The Shooting Method Using MathCad we obtain: For guessed F’(1) = -4

11 The Shooting Method l Thus we have taken a two guesses for the starting value of the first derivative. l The initial value problem was then solved out to the final value of x. l We can now use these two estimates of the starting value of the first derivative to give an improved estimate:

12 The Shooting Method l Using the Secant Method to estimate a new starting value:

13 The Shooting Method

14

15 l Here we see that we have arrived at an exact anwer for the unknown starting value of F’ and have now solved the D.E. l This worked exactly for us for a LINEAR D.E. l If the D.E. was NON-linear, our estimate of F’ based on the previous two estimates would not have converged exactly in one iteration and we would have been required to iterate.

16 Finite Difference Methods l Finite Difference Methods for the solution of Boundary value problems replace the differential equation with a central difference quotient that is evaluated at some step size l This results in the formation of a series of simultaneous algebraic equations l These algebraic equations are solved using the previous techniques for the solution of simultaneous equations

17 Finite Difference Methods Given: with:

18 Finite Difference Methods l If we have higher order equations, we can write difference equations for the associated higher order differentials l These difference expressions are then substituted into the differential equation. l This results in a Finite Difference Analog.

19 Finite Difference Methods Example: with:

20 Finite Difference Methods Rearranging: OR This is our Finite Difference Analog (FDA)

21 Finite Difference Methods For instance, if h = (x n - x 0 )/2 = 1 = the smallest possible step size: We obtain one equation with one unknown, y 1 = y(x=2)

22 Finite Difference Methods For h = 1 : Solving for the unknown, y 1 = y(x=2) = -2/2.6 = 0.76923

23 Finite Difference Methods For a smaller h = (3-1)/4 = 0.5:

24 Finite Difference Methods Lastly:

25 Finite Difference Methods Or, simplifying: 2 - 2.175y 1 + y 2 = 0.375 y 1 - 2.15y 2 + y 3 = 0.5 y 2 - 2.125 y 3 + (-1) = 0.625 These can be further simplified to: 2.175y 1 + y 2 = -1.625 y 1 - 2.15y 2 + y 3 = 0.5 y 2 - 2.125 y 3 = 1.625

26 Finite Difference Methods Or: which has the solution:

27 Finite Difference Methods If we compare these results to the results from the Shooting Method: Note that the errors are in the 2nd decimal:

28 Finite Difference Methods l If we required greater accuracy, the value of h that would be required would be quite small. l In general, the Shooting Method is much more easily performed with greater accuracy. l There are, however, some types of equations that cannot be solved using the shooting method.

29 Eigenvalue Problems Consider: which has an analytic solution: with B.C.’s:

30 Eigenvalue Problems Appying the 1st B.C: the 2nd B.C.: This is an eigenvalue problem: non- zero solutions for specific ’s.

31 Eigenvalue Problems Consider: which has an analytic solution: with B.C.’s:

32 Eigenvalue Problems Appying the 1st B.C: the 2nd B.C.: This is an eigenvalue problem: non- zero solutions for specific ’s.

33 Eigenvalue Problems Using Finite Differences: with:

34 Eigenvalue Problems Or, multiplying through by h 2 and rearranging: This is our Finite Difference Analog (FDA) for this eigenvalue problem

35 Eigenvalue Problems If we evaluate this expression with 2 intervals or h = (x n - x 0 )/m = (1 - 0)/2 = 0.5:

36 Eigenvalue Problems Solving this one equation with one unknown, we obtain: y 1 = 0 (a trivial answer) or 2 = 8 = 2.828 this is an approximation of the true eigenvalue at  = .

37 Eigenvalue Problems If we evaluate this expression with 3 intervals or h = (x n - x 0 )/3 = (1 - 0)/3 = 1/3:

38 Eigenvalue Problems and for n = 2:

39 Eigenvalue Problems Or: which has the solution:

40 Eigenvalue Problems Or: which has the solution:

41 Eigenvalue Problems Solving for the corresponding [y]: For 2 = 9 we have the solution:

42 Eigenvalue Problems For 2 = 27 we have the solution:

43 Eigenvalue Problems

44 l A mesh of m subdivisions will describe a function with m-1 oscillations. l It will also lead to the estimation of the first m-1 eigenvalues. A finer mesh (smaller h) will result in a more accurate estimate of the values. l Likewise, the size of the matrix will be larger.


Download ppt "Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another."

Similar presentations


Ads by Google