Act on the Hamiltonian \(H=F(a^\dagger a+b^\dagger b)+G(a^\dagger b^\dagger+ab)\) with the Bogoliubov transformation


 * 1) Write the Hamiltonian in terms of matrices: \(\hat{H} = \begin{pmatrix}\hat{a}^{\dagger} & \hat{b}\end{pmatrix} \begin{pmatrix} F & G \\ F & G\end{pmatrix} \begin{pmatrix}\hat{a} \\ \hat{b}^{\dagger}\end{pmatrix}\)
 * 2) Apply the Bogoliubov transformation \(\begin{pmatrix}\hat{a} \\ \hat{b}\end{pmatrix} = \begin{pmatrix}u & -v \\ -v & u\end{pmatrix} \begin{pmatrix}\hat{\alpha} \\ \hat{\beta}\end{pmatrix}\), where \(u^2 - v^2 = 1\): \(\hat{H} = \begin{pmatrix}\hat{\alpha}^{\dagger} & \hat{\beta}\end{pmatrix} \begin{pmatrix}u & -v \\ -v & u\end{pmatrix} \begin{pmatrix} F & G \\ F & G\end{pmatrix} \begin{pmatrix}u & -v \\ -v & u\end{pmatrix} \begin{pmatrix}\hat{\alpha} \\ \hat{\beta}^{\dagger}\end{pmatrix}\)
 * 3) Multiply out the matrices: \(\hat{H} = \begin{pmatrix}\hat{\alpha}^{\dagger} & \hat{\beta}\end{pmatrix} \begin{pmatrix} (u^2 + v^2) F -2uvG & (u^2 + v^2) G -2uvF \\ (u^2 + v^2) G -2uvF & (u^2 + v^2) F -2uvG\end{pmatrix} \begin{pmatrix}\hat{\alpha} \\ \hat{\beta}^{\dagger}\end{pmatrix}\)
 * 4) Write the matrix explicitly: \(\hat{H} = \left(\left(u^2 + v^2\right) F -2uvG\right)\left(\hat{\alpha}^{\dagger}\hat{\alpha} + \hat{\beta}\hat{\beta}^{\dagger}\right)\)
 * 5) Diagonalise.
 * 6) Set \((u^2 + v^2) G -2uvF = 0\), and square the expression: \((2u^2 -1)^2G^2 -4u^2(u-1)^2F^2=0\)
 * 7) Expand: \(u^4(4F^2 - 4G^2) -u^2(4F^2 - 4G^2) - G^2 =0\)
 * 8) Solve quadratically for \(u^2\): \(u^2= \frac{1}{2}\left(\frac{F}{\sqrt{F^2 - G^2}} + 1\right)\)
 * 9) Substitute this into \(u^2 - v^2 = 1\) to solve for \(v^2\): \(v^2= \frac{1}{2}\left(\frac{F}{\sqrt{F^2 - G^2}} - 1\right)\)
 * 10) Substitute these expressions into the Hamiltonian: \(\hat{H} = \left(\left(\frac{1}{2}\left(\frac{F}{\sqrt{F^2 - G^2}} + 1\right) + \frac{1}{2}\left(\frac{F}{\sqrt{F^2 - G^2}} - 1\right)\right) F -\frac{1}{2}\left(\frac{F}{\sqrt{F^2 - G^2}} + 1\right)\left(\frac{F}{\sqrt{F^2 - G^2}} - 1\right)G\right)\left(\hat{\alpha}^{\dagger}\hat{\alpha} + \hat{\beta}\hat{\beta}^{\dagger}\right)\)
 * 11) Simplify: \(\hat{H} = \sqrt{F^2 - G^2}\left(\hat{\alpha}^{\dagger}\hat{\alpha} + \hat{\beta}\hat{\beta}^{\dagger}\right) - F\)
 * 12) Use \(\hat{\beta}\hat{\beta}^{\dagger} = \hat{\beta}^{\dagger}\hat{\beta} + 1\) to rearrange: \(\hat{H} = \sqrt{F^2 - G^2}\left(\hat{\alpha}^{\dagger}\hat{\alpha} + \hat{\beta}^{\dagger}\hat{\beta}\right) + \sqrt{F^2 - G^2} - F\)