# Solution {-}

System driven by two independent Gaussian white sources.


```python
from sympy import Matrix, symbols, sqrt, eye, integrate

dt, q1, q2 = symbols('dt q1 q2')

F = Matrix([[0, 1],
            [0, 0]])

G = Matrix([[sqrt(q2), 0],
            [0, sqrt(q1)]])

# Transition matrix
phi = eye(2) + F*dt
phi
```




$\displaystyle \left[\begin{matrix}1 & dt\\0 & 1\end{matrix}\right]$




```python
# Process noise matrix
Q = integrate(phi@G@G.T@phi.T, dt)
Q
```




$\displaystyle \left[\begin{matrix}\frac{dt^{3} q_{1}}{3} + dt q_{2} & \frac{dt^{2} q_{1}}{2}\\\frac{dt^{2} q_{1}}{2} & dt q_{1}\end{matrix}\right]$




```python
from numpy import array, sqrt
from lib.vanloan import numeval

F = array([[0, 1],
           [0, 0]])

G = array([[sqrt(16), 0],
           [0, sqrt(4)]])

# Numerical evaluation (Van Loan)
[phi, Q] = numeval(F, G, 1)
print(phi)
print(Q)
```

    [[1. 1.]
     [0. 1.]]
    [[17.33333333  2.        ]
     [ 2.          4.        ]]

