DOC: add demo of factorize
Merge pull request #5731 from unutbu/factorize-doc

DOC: add demo of factorize