Create a function to define the problem, the thing you are trying to optimize is the y value and the thing you are changing to optimize is the x value.

Step 2.

Differentiate the function with respect to the thing you are changing i.e f'(x)

Step 3.

Let the function, f'(x) equal to 0, and solve for x so that you are finding where the turning point of the function is.

Step 4.

Differentiate the function again, this time you are finding f”(x), sub in the value that you found in step 3. If the function equates to a positive you found the minimum and if it equates to a negative you found the maximum.