You will need to understand utility theory, and this can be understood by reading works by Von Neumann/Morgenstern and later authors.
The optimization stuff is Lagrange Multipliers which is taught in a Multi-variable/Vector Calculus book.
The Lagrange stuff requires a knowledge of normal calculus techniques including all the differential calculus.
For convex stuff, you also want to understand Jensens Inequality for a variety of things including for expectation.
Finally I have to ask: what do you mean by static and dynamic optimization?