Jim Whitney Economics 102
 Solving profit-maximizing problems under perfect competition
First-order conditions and second-order conditions
 
Situation: Perfectly competitive firm:
    P = 105 => TR = PQ = 105Q
    TC = 196 + 147Q - 24Q2 + 2Q3
where Q = 1000s of units and TC = $1000s.

Profit = TR - TC
    = 105Q - (196 + 147Q - 24Q2 + 2Q3)
   = -196 - 42Q + 24Q2 - 2Q3

Solution:
Step1: d(Profit)/dQ = -42 + 48Q - 6Q2
Step2: FOC: -42 + 48Q - 6Q2 = 0
Step3: Rearrange to solve:
    - 6Q2 + 48Q - 42 = 0
    Solution values: Q=1,7