In this paper, pole placement and two optimal control techniques which are the linear quadratic regulator and linear quadratic Gaussian are compared. A cart and inverted pendulum which is an inherently unstable dynamical system is used as a case study to analyze their performance and stability margins. Lagrangian equations defining the system dynamics are converted to linear state-space representation. The objective is to keep the pendulum in an upright position as the cart on which it is mounted moves from one position to another. MATLAB is used to solve the optimization problem and simulate the step response of the system. The robustness of both controllers is measured by giving uncertain model parameters to the system and observing the level of uncertainty these controllers can handle. The simulation results justify the relative advantages of these control schemes.