We give a simple constructive proof of a factorization theorem for scalar rational functions with a non-negative real part on the imaginary axis. A Mathematica program, performing this factorization, is provided.