Title: Lesson 6: Solution of Integral Equations
1Lesson 6 Solution of Integral Equations
- Application of our integration techniques to
integral equations - Introduction of Dirac notation
- Conversion of differential equations to integral
equations - Solution of integral equations
- Solution of linked equations
- Neumann self-linked equations
2Dirac notation
- In our integrations so far, I have simplified the
mathematics a bit by always selecting a I was
careful to always choose x between a and b. -
- I was careful to always choose x between a and b.
What if I had not done this? -
3Dirac notation (2)
- A more rigorous way to approach this is to look
at the Monte Carlo attack of the integral in TWO
steps - (1) an approximation of f(x) itself using
- (2) a substitution of this functional
approximation into the integral -
4Dirac notation (3)
This is the approach we will take from now on.
The notation has the advantage of giving
us not only the weight but also reminding us of
the selected point. This way we can think of a
sample as having these two piecesa weight
and a location
5Developing integral equations from differential
equations Simple
- We now know how to attack integrals with Monte
Carlo - We desire to be able to solve differential
equations estimate functionals (usually
integrals or point values) of the function that
solves a given equation - Traditional solution Convert them into integral
equations and apply the MC integration rules to
them - Example Find the value of f(4), given the
differential equation and boundary condition -
6Simple integral equations (2)
- Answer We can integrate from 0 (the known value)
to the desired value to get - Now we apply one of the four integration methods
to the integral in the equation
7Simple integral equations (2)
- NOTE From now on, I will skip the summation and
division by N and just write
8Simple integral equations (3)
- The normal procedure for this method is to
- Choose a value of between a and b using a
probability distribution p(x) (of YOUR choosing).
- Score
- So, lets do it.
- What PDF should we use?
- Lazy mans PDF uniform
- Optimum PDF ? (You tell me)
9Linked equations
- When you are faced with linked equation sets, the
principles are the same, put you have to be more
careful - Putting in multiple boundary conditions
- Keeping up with multiple sampled variables (each
equation will have one) - Most tricky Realizing and adapting to CHANGING
LIMITS on the integrals (after the first) - MUCH more difficult to optimize the choice of the
PDFs used -
10Linked equation example
- Example Find f(2) for the second order
differential equation - In order to make it fit the category, we will
start be re-writing as the linked set
11Linked equation example (2)
- Applying our tools to the second equation first,
we begin by transforming it into an integral
equation for the value at x2 - Using our MC integration approximation, we get
- How do we get the ? Answer We estimate
it from the other equation.
12Linked equation example (3)
- Applying our tools to the first equation first,
we begin by transforming it into an integral
equation for the value at -
- The resulting procedure is
- Choose a value of using
- Choose a value of using
- Score
13Linked equation example (4)
- Now lets do it.
- What PDFs to use?
- Flat
- Better than flat
14Sampling from recurring equations Neumann series
- Sampling from recurring equations introduces a
complexity We cannot use the above procedure
because, the procedure requires that we sample
from f(x) on the right-hand side in order to
sample from f(x) on the left-hand side. - However, for linear occurrences of f(x) on the
right-hand side, we can "bootstrap" a solution by
representing f(x) as an infinite Neumann series - on BOTH sides of the equation and properly
lining up terms.
15Neumann series (2)
- If we have the general linear recurring integral
equation - with known source term q(x) and linear
operator K(x,x), we can substitute to get - We can line up the left hand and right hand
terms in the following way
16Neumann series (3)
- Obviously, the sum of the solutions of these
coupled equations obeys the original equation. - We solve them sequentially, eliminating the
circular dependence - Of course, this procedure has an infinite number
of steps for each sample of , so it will have to
be truncated somehow, but -- before worrying
about that -- let us first look at an example.
17Neumann series (4)
- Example Develop an infinite sampling procedure
for the recurring equation - Answer Integrating the differential equation
over x from 0 to x (and applying the boundary
condition) gives us the recurring integral
equation
18Neumann series (5)
- If we insert the infinite Neumann series for the
function on both sides, we get the following
coupled equations
19Neumann series (6)
- Since the function f(x) is the infinite sum of
these, the procedure to sample from is - 1. Sample from using
- 2. Sample from using the above sample
-
20Neumann series (7)
- 3. Sample from using the above sample
- Sample from using the above sample
21Neumann series (8)
- Observations
- The procedure is infinite in theory, but not
infinite in practice because as soon as we pick a
value of x that is SMALLER than the one before
it, then the weight will go to zero. Once this
happens, of course, we can ignore the higher
order f's because they will be zero as well.
What else could we do to terminate the sequence? - We must remember that it is not a single sample
of f0(x) or f1(x) , etc., that constitutes our
sample of the function, but ALL OF THEM together.
Therefore, the i'th sample of f(x) is, formally - Note We do NOT divide by the number of
contributions to the ith sample
22Neumann series (9)
- Observations
- Therefore, if we improve our approximation by
taking N samples, the combined best result would
be - As a practical matter, point 2 means that our
coding must collect data in "sample bins" -- i.e,
which collect data from individual Neumann terms
within a single sample -- and, at the end of the
sample, contribute from the "sample bins" to the
overall "solution bins".
23Convergence of recurring equations
- You should be aware that there is a good
possibility that a straight-forward application
of the procedure for recurring equations will
result in a divergent procedure - Convergence is guaranteed only if the eigenvalues
of the recurrence operator K in -
- have magnitude less than one.
24Tallies
- All of this discussion has been focused on
sampling a function at a point. - BUT, it is more common for us to be interested in
INTEGRALS of the functionse.g., reaction rates
in a cell. - These integrals are referred to as tallies and
most of them represent a physical or mathematical
value we want to know - In our current sampling strategy, our samples
include Dirac deltas, so our only choice for
these tallies is to create integral tallies using
the samples
25Tallies (2)
- Although tallies are not mathematically necessary
(one could keep the and for later
use), almost all MC codes use them to save
storage.
26Homework P-6
- Analyze, develop a procedure, and implement to
solve the following differential equations - 1.
- 2. Solve as a linked set (2 equations)
27Homework P-6
- You have an initial inventory of one isotope of
type A that decays to isotope B with a decay
constant of lA1.0 sec-1. - B decays to C with a decay constant of lB0.5
sec-1. - Write and run a MC program to determine much of C
(per initial A atom) will be present after 3
seconds. - Assume there is initially no B or C.
28Homework P-6 (contd)
- I will help you get started. The equations are
- Your job is to find good (or bad, your choice)
pdfs, work out the algebra, and code it to
answer find how much C you have at 3 seconds.