Each firm chooses the quantity to supply in order to maximize profits, taking the other's choice as given. The (first order) conditions for profit maximization are xp_x+p-c_x+s=0 for the domestic firm and yp_{y}+p-c_{y}=0 for the foreign firm, where subscripted variables denote partial derivatives. Solving these for y implicitly defines a best response function for each firm; y=R1(x;s) and y=R2(x). These are illustrated in the figure below, with the domestic firm's output on the x axis and foreign firm's output on the y axis.Additional mathematical assumptions on the inverse demand function and the cost functions are needed to ensure that the above conditions define a maximum and that the reaction functions slope downward (choices are "strategic substitutes") and that they cross. The graph illustrates the case of linear demand of the form p = a - b(x + y).
