Beruflich Dokumente
Kultur Dokumente
Fakultt fr Informatik
Dr. Tobias Lasser
Richard Brosig, Jakob Vogel
WiSe 2011/12
Solution for Exercise Sheet 10
February 2, 2012
Assignment 1
Poisson Distribution
X Poi(), Y Poi()
a) Compute the distribution of X +Y = n
n
= P(X = k) P(Y = n k)
k=0
n k nk
e e
k!
k=0
(n k)!
k nk
k=0 k!(n k)!
=e+
=e+
=e+
=
1 n
n!
k nk
e+ ( + )n
Poi( + )
n!
(ii) Compute the parameter of the conditional distribution P[{X = k}|{X +Y = n}]!
In the previous exercise we already mentioned that this distribution is Binomially distributed. This is the sum of coin flip experiments. We can see the event X as head and
Y as tail. Since we already have n and k we have to compute the probability p of the
1 http://en.wikipedia.org/wiki/Binomial_theorem
P(X = k|X +Y = n) =
e k
k!
(nk)
e (nk)!
e(+) (+)n
n!
e k e
(nk) n!
k!(n k)! e(+) ( + )n
n!
k nk
=
k!(n k)! ( + )n
k
nk
n!
=
k!(n k)! +
+
B n,
+
=
u0 C1 (R)
a) Proof that
u(x,t) = u0 (x + vt)
is an analytical solution of equation (1)!
First compute the partial derivations of the solution
ux (x,t) = u00 (x + vt)
ut (x,t) = u00 (x + vt)v
After substitution of these two equations in (1) we get
u(x,t)
u(x,t)
v
t
x
=ut (x,t) vux (x,t)
0=
(1)
Derive a numerical scheme for the computation of the advection equation, by substituting
the temporal partial derivative with the approximation given by the Taylor expansions. For
the spatial derivative use the first two Taylor expansions to get a equation without u(x,t) and
substitute this equation in (1). (This formular is called central differences)
Afterwards, try to get a formula for u(x,t + ).
First the we have derive a equation for the spatial partial derivation, by eliminating u(x,t)
with the use of the two spartial Taylor expansions. Subtracting this two equations we get
u(x,t)
u(x,t)
+h
x
x
u(x,t) u(x + h,t) u(x h,t)
t
2h
2h
u(x,t + ) u(x,t)
u(x + h,t) u(x h,t)
=v
2h
0=
u(x,t + ) = u(x,t) +
v
(u(x + h,t) u(x h,t))
2h
(2)
c) Implement this scheme in Matlab and compute the numerical and analytical solution of the
two advection equations with
(i) v = 0.5
(ii) v = 2
and the boundary conditions
(
0
|x| > p/2
u0 =
cos2 (x) else
u(5,t) = u(5,t) = 0 t [0, 1)
= 0.1
h = 0.1
Ddiscrete
Dcont,v=0.5 = (0.75, 0)
In the case v = 2 the numerical solution does not depend on the points where the analytical
solution depends on. In this case the method cant be stable (see fig. 1).
There is a relationship between v, h and such that the analytical domain of dependence is
a subset of the numerical one. This is called the CFL-condition (Courant-Friedrichs-Lewy).
Give an explicit equation for this condition!
Looking at the discrete domain of dependence we can see that the size of this is changing
with the ratio of the temporal and spartial spacing h/. For a stable method discretisation
we need to have
h
v
or
v
1
h
= 0.1
h = 0.1
Ddiscrete
Dcont,v=0.5 = (0.75, 0)
v
(u(x + h,t + ) u(x h,t + ))
2h
In this case the numerical domain of dependence is the whole boundary of the state space,
but we have to solve a linear equation for each time step(see fig 2).
f) PDEs are often used to simulate physical models. Why does a numerical scheme which is
implicit in time not yield a good approximation to a physical solution?
Knowing the fact, that an implicit numerical scheme (5) in the spatial direction seems to
be better than a explicit one (1), someone can think about a method which is also implicit
in time. This methods tends to be instable again, since they are not modeling the physical
background correct. It is a bad idea to have a point like (x,t + ) in the discretization, since
future states should not affect the present state!