# Finding Nash Equilibria with Calculus

The problem is summarized as:

There are two players. Player 1's strategy is h. Player 2's strategy is w. Both of their strategy sets are within the range [0,500].

Player 1's payoff function is:

$P_h(h, w) = 50h + 2hw-\frac{1}{2}(h)^2$

Player 2's payoff function is:

$P_w(h, w) = 50w + 2hw - \frac{1}{2}(w)^2$

Find a Nash Equilibrium.

I was taught to solve these problems in the following way. Find the first derivative of Player 1's payoff function with respect to h, equate it to 0, then solve for h, and then repeat for Player 2 but with respect to w and solving for w instead. However, I found the first derivatives to be:

$P_h(h, w)^\prime = 50 + 2w - h$

$P_w(h, w)^\prime = 50 + 2h - w$

Now after equating these first derivatives to 0 and solving for h and w, we get that h = -50 and w = -50. The issue now is that these strategies aren't within the strategy set [0,500] as mentioned in the problem question. Where am I going wrong?

-
As with any optimization problem, you should check the boundary. The optimal strategy is (500,500), but the players would choose higher numbers if they were allowed to do so. (That is, as Paxinum pointed out, the derivatives are not 0 at (500,500)). – Théophile Jul 24 '12 at 20:00
@Théophile For this particular problem, what do you mean by checking the boundary? Do you mean checking at 0 and at 500 for both players, or one for each, or am I completely missing the point here? (I believe it's the last one.) – Kevin Jul 25 '12 at 7:30
Almost, Kevin: don't just check the four corners, though, but all four edges. One of the edges, for example, is $h = 0$. The derivative for Player 1 is then $P_h(h,w)^\prime = 50 + 2w$, which is positive regardless of the value of $w$. In other words, Player 1 has no incentive to stay at $0$. As for Player 2, $P_w(h,w)^\prime = 50 - w$, which is $0$ when $w=50$. However, this latter calculation wasn't really necessary because Player 1's dissatisfaction here means that there are no equilibria along $h=0$. Try similar calculations along the other edges. Does that make sense? – Théophile Jul 25 '12 at 16:18

From this, we can see that the point (h,w)=(500,500) is an equilibrium, and you can verify this by seeing that both the derivatives in this point are positive, and even more, $P_h(h,500)>0$ for all $h\in[0,500]$, and similarly $P_w(500,w)>0$ for all $w \in [0,500].$ Thus, no player would gain on changing the strategy if they are in (500,500).