White-noise addition to an ARMA(1,1) process (source code)

= White-noise addition to an ARMA(1,1) process
{title2=$A=v(1+\theta^2)+w(1+\phi^2),\quad C=v\theta-w\phi$}

Adding <independent> <white noise> of variance $w$ to a process with transfer function $(1+\theta z)/(1-\phi z)$ and driving variance $v$ gives numerator $A+2C\cos\omega$ in its rational <time-series spectral density>. Put $P=A+2C$ and $Q=A-2C$. If both are positive, the invertible moving-average factor has coefficient $\alpha=(\sqrt P-\sqrt Q)/(\sqrt P+\sqrt Q)$ and driving variance $\lambda=(\sqrt P+\sqrt Q)^2/4$. Filtering the actual sum by $(1+\alpha B)^{-1}(1-\phi B)$ produces its <weak white noise> driver.