Open jlperla opened 5 years ago
For an h(x)
example, you should try a few things. First, do an impulse by choosing some x
in the grid at node m
and then
h = [0; 0;. .... 1 ; 0;. 0]
etc. i.e. only have a value at the m'th point.
Also try a truncated exponential, which will end up being the main one we are interested in.
The continous equation for an exponential , truncated at xmax and with parameter theta is
θ = 2.0
x̄ = 4.0
f(x) = θ * exp(-θ * x) / (1 - exp(-θ * x̄))
To discretize on a grid
# Discretize on grid x?
x = range(0.0, x̄, length = 10)
f̂ = f.(x) / sum(f.(x) )
# Or should we be taking out the ends?
f̂ = f.(x[2:end-1]) / sum(f.(x[2:end-1]) )
We can add this to a new KFE notebook for looking at evolutions of KFE with birth-death.
The setup will be a:
delta >= 0
each periodx=0
and a reflecting barrier at somex_max
h(x)
with support onx = [0, x_max]
.In differentiable form, I believe the setup is then
where
int_0^{xmax} h(x) dx = 1
f(t,x)
functionS(t) = delta + mu f(t, 0) + sigma^2/2 D_x f(t,0)
but you should verify.h(x)
above is correct.h(x)
to ensure it is conservative. i.e. pdf at all interior points renormalized to sum to 1, etc.?