4.8 multiple integrals and monte carlo integrationzxu2/acms40390f13/mc-integration.pdfΒ Β· 4 [π ,...
TRANSCRIPT
![Page 1: 4.8 Multiple Integrals and Monte Carlo Integrationzxu2/acms40390F13/MC-Integration.pdfΒ Β· 4 [π , +2π , + 2 +π( , )] The approximation is of order (( β )( β )[ β 2+(](https://reader033.vdocuments.us/reader033/viewer/2022050506/5f97ceb2c542240b4445f4de/html5/thumbnails/1.jpg)
4.8 Multiple Integrals and Monte Carlo Integration
![Page 2: 4.8 Multiple Integrals and Monte Carlo Integrationzxu2/acms40390F13/MC-Integration.pdfΒ Β· 4 [π , +2π , + 2 +π( , )] The approximation is of order (( β )( β )[ β 2+(](https://reader033.vdocuments.us/reader033/viewer/2022050506/5f97ceb2c542240b4445f4de/html5/thumbnails/2.jpg)
β’ Composite Trapezoidal rule to approximate double
Integral: π π₯, π¦ ππ΄π where π = π₯, π¦ π β€ π₯ β€
π, π β€ π¦ β€ π} for some constants π, π, π and π.
β’ Let π = (π β π)/2, β = (π β π)/2.
β’ π π₯, π¦ ππ΄π = π π₯, π¦ ππ¦
π
π
π
πππ₯
β π β π
4[π π₯, π + 2π π₯,
π + π
2+ π(π₯, π)]
π
π
ππ₯
![Page 3: 4.8 Multiple Integrals and Monte Carlo Integrationzxu2/acms40390F13/MC-Integration.pdfΒ Β· 4 [π , +2π , + 2 +π( , )] The approximation is of order (( β )( β )[ β 2+(](https://reader033.vdocuments.us/reader033/viewer/2022050506/5f97ceb2c542240b4445f4de/html5/thumbnails/3.jpg)
β π β π
4[π π₯, π + 2π π₯,
π + π
2+ π(π₯, π)]
π
π
ππ₯
=(π β π)
4
(π β π)
4[π π, π + 2π π,
π + π
2+ π(π, π)]
+(π β π)
4
(π β π)
42 ππ + π
2, π + 2π
π + π
2,π + π
2+ ππ + π
2, π
+(π β π)
4
(π β π)
4[π π, π + 2π π,
π + π
2+ π(π, π)]
The approximation is of order π((π β π)(π β π)[ π β π 2 + (π β π)2])
![Page 4: 4.8 Multiple Integrals and Monte Carlo Integrationzxu2/acms40390F13/MC-Integration.pdfΒ Β· 4 [π , +2π , + 2 +π( , )] The approximation is of order (( β )( β )[ β 2+(](https://reader033.vdocuments.us/reader033/viewer/2022050506/5f97ceb2c542240b4445f4de/html5/thumbnails/4.jpg)
Monte Carlo Simulation
The needle crosses a line if π¦ β€ πΏ/2sin(π) Q: Whatβs the probability π that the needle will intersect on of these lines? β’ Let π¦ be the distance between the needleβs midpoint and the
closest line, and π be the angle of the needle to the horizontal. β’ Assume that π¦ takes uniformly distributed values between 0 and
D/2; and π takes uniformly distributed values between 0 and π.
![Page 5: 4.8 Multiple Integrals and Monte Carlo Integrationzxu2/acms40390F13/MC-Integration.pdfΒ Β· 4 [π , +2π , + 2 +π( , )] The approximation is of order (( β )( β )[ β 2+(](https://reader033.vdocuments.us/reader033/viewer/2022050506/5f97ceb2c542240b4445f4de/html5/thumbnails/5.jpg)
β’ Let πΏ = π· = 1.
β’ The probability is the ratio of the area of the shaded region to the area of rectangle.
β’ π = 1
2π ππππππ0
π/2= 2/π
Hit and miss method: The volume of the external region is ππ and the fraction of hits is πβ. Then the volume of the region to be integrated is π = πππβ.
![Page 6: 4.8 Multiple Integrals and Monte Carlo Integrationzxu2/acms40390F13/MC-Integration.pdfΒ Β· 4 [π , +2π , + 2 +π( , )] The approximation is of order (( β )( β )[ β 2+(](https://reader033.vdocuments.us/reader033/viewer/2022050506/5f97ceb2c542240b4445f4de/html5/thumbnails/6.jpg)
Algorithm of Monte Carlo
β’ Define a domain of possible inputs.
β’ Generate inputs randomly from a probability distribution over the domain.
β’ Perform a deterministic computation on the inputs.
β’ aggregate the results from all deterministic computation.
![Page 7: 4.8 Multiple Integrals and Monte Carlo Integrationzxu2/acms40390F13/MC-Integration.pdfΒ Β· 4 [π , +2π , + 2 +π( , )] The approximation is of order (( β )( β )[ β 2+(](https://reader033.vdocuments.us/reader033/viewer/2022050506/5f97ceb2c542240b4445f4de/html5/thumbnails/7.jpg)
Monte Carlo Integration (sampling)
π΄ = limπββ π(π₯π)βπ₯
π
π=1
Where βπ₯ =πβπ
π, π₯π = π + (π β 0.5)βπ₯.
π΄ βπ β π
π π(π₯π)
π
π=1
Which can be interpreted as taking the average over π in the
interval, i.e., π΄ β π β π < π >, where < π >= π π₯πππ=1
π.