Portfolio optimization and other miscellaneous examples (linear, quadratic, integer, and dynamic programming)