Using Derivatives to Solve Optimization Problems