What are FOCs and SOCs?

I keep seeing the terms first-order conditions and second-order conditions used in my undergrad economics class on production functions, monopolies, etc but I have no idea what these terms mean. It seems like a completely ambiguous term. What kind of conditions?

Can someone explain what these terms mean? If it is context dependent, provided some of them most elementary meanings you associate with the term.

Suppose you have a differentiable function $f(x)$, which you want to optimize by choosing $x$. If $f(x)$ is utility or profit, then you want to choose $x$ (i.e. consumption bundle or quantity produced) to make the value of $f$ as large as possible. If $f(x)$ is a cost function, then you want to choose $x$ to make $f$ as small as possible. FOC and SOC are conditions that determine whether a solution maximizes or minimizes a given function.

At the undergrad level, what is usually the case is that you need to choose $x^*$ such that the derivative of $f$ is equal to zero: $$f'(x^*)=0.$$ This is the FOC. The intuition for this condition is that a function attains its extremum (either maximum or minimum) when its derivative is equal to zero (see picture below). [You should be aware that there are more subtleties involved: look up terms like "interior vs corner solutions", "global vs local maximum/minimum", and "saddle point" to learn more]. However, as the picture illustrates, simply finding $x^*$ where $f'(x^*)=0$ is not enough to conclude that $x^*$ is the solution that maximizes or minimizes the objective function. In both graphs, the function attains a zero slope at $x^*$, but $x^*$ is a maximizer in the left graph, but a minimizer in the right graph.

To check whether $x^*$ is a maximizer or a minimizer, you need the SOC. The SOC for maximizer is $$f''(x^*)<0$$ and the SOC for minimizer is $$f''(x^*)> 0.$$ Intuitively, if $x^*$ maximizes $f$, the slope of $f$ around $x^*$ is decreasing. Take the left graph, where $x^*$ is a maximizer. We see that the slope of $f$ is positive on the left of $x^*$ and negative on the right. Thus, around the neighborhood of $x^*$, as $x$ increases, $f'(x)$ decreases. The intuition for the case of minimizer is similar.

• But why it's not called "First derivative test" is still a mystery for me. Nov 10 '18 at 16:34

For example when you are talking about profit maximization starting from a profit function $\pi(q)$, the main condition for a maximum is that: $$\frac{\partial \pi}{\partial q}=0$$ This is the FOC (first order condition).

Though, to be sure that what you have found above is a true maximum you should also check a 'secondary' condition which is: $$\frac{\partial^2 \pi}{\partial q^2}<0$$ This is called the SOC (second order condition).

The target is to find a local maximum (or minimum) of a function.

If the function is differentiable twice:

In case you function is not differentiable, you can do a more general extremum test.

Note: it's impossible to construct an algorithm to find a global maximum for an arbitrary function.

Neoclassical economists certainly rename those two mathematical methods to first-order conditions and second-order conditions to look cool or for other historical reasons. Why use a name widely used when you can just make one up?

The term is also used on constrained maximization when they use the Lagrange multiplier method and Karush–Kuhn–Tucker conditions. Again, I don't thinks the term is used by non-economist.