1 / 26

Solving ODE and PDE by Monte Carlo Method

Solving ODE and PDE by Monte Carlo Method. University of Washington Insuk Joh. Table of Contents. Introduction to Monte Carlo Method Solving ODE: General Case Solving ODE: Gambler’s Ruin Solving PDE: Laplace Equation Solving PDE: General Elliptic Equation Conclusion. Table of Contents.

sasha
Download Presentation

Solving ODE and PDE by Monte Carlo Method

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Solving ODE and PDEby Monte Carlo Method University of Washington InsukJoh

  2. Table of Contents • Introduction to Monte Carlo Method • Solving ODE: General Case • Solving ODE: Gambler’s Ruin • Solving PDE: Laplace Equation • Solving PDE: General Elliptic Equation • Conclusion

  3. Table of Contents • Introduction to Monte Carlo Method • Solving ODE: General Case • Solving ODE: Gambler’s Ruin • Solving PDE: Laplace Equation • Solving PDE: General Elliptic Equation • Conclusion

  4. Monte Carlo Method • Numerical method • Uses random sampling to obtain distribution of probabilistic entity • Useful to obtain solution of implicit equation • Useful if deterministic model is NOT available

  5. Monte Carlo Method • Example Problem: Calculate the value of π.

  6. Monte Carlo Method • Example Problem: Calculate the value of π. It is known that Asquare = 1 , Acircle = π/4 Use random sampling. Count the number of dots in the circle.

  7. Table of Contents • Introduction to Monte Carlo Method • Solving ODE: General Case • Solving ODE: Gambler’s Ruin • Solving PDE: Laplace Equation • Solving PDE: General Elliptic Equation • Conclusion

  8. ODE: General Case • ODE form where

  9. ODE: General Case • Step 1: Change the form of equation • Step 2: Generate random samples. N = (# of all samples) • Step 3: Count # of samples greater than k, S = (# of samples greater than k) • Step 4: Calculate y(j) • Step 5: Repeat Step 2 ~ Step 4

  10. ODE: General Case • Example • Error less than 1 %

  11. Table of Contents • Introduction to Monte Carlo Method • Solving ODE: General Solution • Solving ODE: Gambler’s Ruin • Solving PDE: Laplace Equation • Solving PDE: General Elliptic Equation • Conclusion

  12. ODE: Gambler’s Ruin • 2nd Order ODE • Problem of probability for winning a game where v(x,t) = probability of a guy A wins the game p = probability of person A wins one round x = stakes for game t = tth round

  13. ODE: Gambler’s Ruin • Two equations, probability p and coefficient β are related by • The solution has the form of

  14. ODE: Gambler’s Ruin • Algorithm

  15. Table of Contents • Introduction to Monte Carlo Method • Solving ODE: General Case • Solving ODE: Gambler’s Ruin • Solving PDE: Laplace Equation • Solving PDE: General Elliptic Equation • Conclusion

  16. PDE: Laplace Equation • Laplace Equation in k-dimension

  17. PDE: Laplace Equation • Finite difference method

  18. PDE: Laplace Equation

  19. PDE: Laplace Equation • Random walk : A drunk person walks from node P. The probability to choose any one of the four neighboring node is equal, which is ¼. If he reaches a boundary node, the random walk ends, and a new random walk starts.

  20. PDE: Laplace Equation • The solution where M = number of boundary nodes N = number of random walk trials Ni= number of visit at the boundary node i f(Qi) = boundary condition at boundary node i

  21. Table of Contents • Introduction to Monte Carlo Method • Solving ODE: General Case • Solving ODE: Gambler’s Ruin • Solving PDE: Laplace Equation • Solving PDE: General Elliptic Equation • Conclusion

  22. PDE: General Elliptic Equation • Elliptic Equation where B11 > 0 , B22 > 0 , and B11B22 – B122 > 0

  23. PDE: General Elliptic Equation • Finite difference method Where , , , , 5 neighboring nodes with different probability!

  24. Table of Contents • Introduction to Monte Carlo Method • Solving ODE: General Case • Solving ODE: Gambler’s Ruin • Solving PDE: Laplace Equation • Solving PDE: General Elliptic Equation • Conclusion

  25. Conclusion • Advantage • No suffering from complicated geometry • Useful for high number of dimensions (curse of dimensionality) • Useful for functions without explicit form • No suffering from complicated geometry • Disadvantage • Requires large number of step size and sample size • Converges slowly

  26. Conclusion • To improve accuracy • Larger number of random sampling • Smaller steps (∆x) • For special case, change parameter (

More Related