Solving separable ODE with determinant I'm trying to prove an energy conservation statement and I'm using Jacobi's formula which states
$$\frac{d(\mathbf{\det{P_{\omega}}})}{dx_3} = \text{Tr}\,({\mathbf{H_{\omega}}})\det{\mathbf{P_{\omega}}} $$
for my setup, where 
$$\mathbf{P_{\omega}} = \mathbf{P_{\omega}}(x_3) = \begin{bmatrix} \chi_1(x_3) &  \chi_2(x_3) \\  \chi_3(x_3) &  \chi_4(x_3) \end{bmatrix}
$$
with initial condition $\mathbf{P_{\omega}}(0) = \mathbf{I}$, the $2\times2$ identity matrix.
 My problem is that my RHS gives
$$\frac{d(\mathbf{\det{P_{\omega}}})}{dx_3} = 2i(\eta(x_3)-\bar\eta)\det{\mathbf{P_{\omega}}}.$$
Does this simply have solution
$$\det{\mathbf{P_{\omega}}} = A\exp{2i\bigg(\int \eta(x_3)dx_3 -\bar \eta x_3\bigg)}\quad?$$
I should note that $\bar \eta$ is a constant. Any help would be appreciated - mostly on how to use my IC. Thanks
 A: Perhaps the easiest way to incorporate the initial conditions
$\mathbf{P_{\omega}}(0) = \mathbf{I} \tag 1$
into the solution of 
$\dfrac{d(\mathbf{\det{P_{\omega}}})}{dx_3} = \text{Tr}\,({\mathbf{H_{\omega}}})\det{\mathbf{P_{\omega}}} \tag 2$
is to solve the equation in terms of definite integrals, into which constraints such as (1) may be readily inserted/substituted.  In the present case we have
$\text{Tr}\,(\mathbf{H_\omega}) = 2i(\eta(x_3) - \bar \eta), \tag 3$
so that (2) becomes
$\dfrac{d(\mathbf{\det{P_{\omega}}})}{dx_3} = 2i(\eta(x_3) - \bar \eta) \det{\mathbf{P_{\omega}}}, \tag 4$
which in the usual manner leads us to
$\dfrac{1}{\det{\mathbf{P_{\omega}}}}\dfrac{d(\mathbf{\det{P_{\omega}}})}{dx_3} = 2i(\eta(x_3) - \bar \eta), \tag 5$
that is
$\dfrac {d \ln (\mathbf{\det{P_{\omega}}})}{dx_3} = 2i(\eta(x_3) - \bar \eta). \tag 6$
We may integrate this equation 'twixt $0$ and $x_3$:
$\ln \dfrac{ \mathbf{\det{P_{\omega}}}(x_3)}{\mathbf{\det{P_{\omega}}}(0)} = \ln \left (\mathbf{\det{P_{\omega}}}(x_3) \right) - \ln \left (\mathbf{\det{P_{\omega}}}(0) \right)$
$= \displaystyle \int_0^{x_3} \dfrac {d \ln (\mathbf{\det{P_{\omega}}})}{ds}\; ds = \displaystyle 2i \int_0^{x_3} (\eta(s) - \bar \eta) \; ds, \tag 7$
whence
$\dfrac{ \mathbf{\det{P_{\omega}}}(x_3)}{\mathbf{\det{P_{\omega}}}(0)} = \exp \left ( \displaystyle 2i \int_0^{x_3} (\eta(s) - \bar \eta) \; ds \right ); \tag 8$
or
$\mathbf{\det{P_{\omega}}}(x_3) = \mathbf{\det{P_{\omega}}}(0)\displaystyle \exp \left (2i \int_0^{x_3} (\eta(s) - \bar \eta) \; ds \right ); \tag 9$
finally, we note that the initial condition (1) on $P_{\omega}(0)$ allows us to affirm that
$\det \mathbf P_{\omega}(0) = \det \mathbf I = 1; \tag{10}$
(9) thus becomes
$\mathbf{\det{P_{\omega}}}(x_3) = \displaystyle \exp \left (2i \int_0^{x_3} (\eta(s) - \bar \eta) \; ds \right ), \tag{11}$
the solution of (2) satisfying (1).
