In [1]:
%pylab inline
import sympy
sympy.init_printing()


Populating the interactive namespace from numpy and matplotlib

In [2]:
t0, t1, tau, Q, P, dt, T = sympy.symbols(
    't0, t1, tau, Q, P, \Delta_t, T',
    real=True, positive=True)

In [3]:
def Phi(t, tau):
    return sympy.exp(-(t - tau)/T)

In [4]:
Q_d = sympy.integrate(Phi(t1, tau)*Q*Phi(t1, tau),
                    (tau, t0, t1)).simplify()
simp_subs = {
    2*(t1 - t0): 2*dt,
    (2*t0 - 2*t1)/T: -2*dt/T
}
Q_d = Q_d.simplify().subs(simp_subs)
Q_d


Out[4]:
$$- \frac{Q T}{2} \left(-1 + e^{- \frac{2 \Delta_t}{T}}\right)$$

In [5]:
dt = 1.0/250
T = 1000
gyro_sigma_rrw = 1e-5
gyro_sigma_rrw*gyro_sigma_rrw*T/2*(1 - exp(-2*dt/1000))


Out[5]:
$$3.99998400002e-13$$