Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to maximize $P = 20q_a - 2q_a^2 + 16q_b-2q_b^2 – 1/4 (q_a + q_b)^2$, a profit equation, function of two separate quantities of products. I thought that what I need to do is to set both derivatives =0 and find where that equation holds for both variables, but I am having some trouble. Here's my work:

$dP/dq_a = 20 – 4q_a – 1/2 (q_a + q_b) = 0$
$dP/dq_b = 16 – 4q_b – 1/2 (q_a + q_b) = 0$
$4 – 4q_a +4q_b = 0$
$4 = 4 (q_a – q_b)$
$q_a = q_b + 1.$

As you can see from the last equation, I get $q_a = q_b + 1$, but when I plug a pair of 1, 0 ($q_a$ and $q_b$) into the derivative equations, I do not get 0's, so I guess I made a mistake somewhere (wolfram alpha gives a definitive answer). Please help, thanks!

share|cite|improve this question
The partial derivatives are $$\frac{\partial P}{\partial q_{a}}=20-\frac{9}{2}q_{a}-\frac{1}{2}q_{b}$$ $$\frac{\partial P}{\partial q_{b}}=16-\frac{9}{2}q_{b}-\frac{1}{2}q_{a},$$ and the solution of the system $$\left\{ \begin{array}{c} 20-\frac{9}{2}q_{a}-\frac{1}{2}q_{b}=0 \\ 16-\frac{9}{2}q_{b}-\frac{1}{2}q_{a}=0 \end{array} \right. $$ is $$q_{a}=\frac{41}{10},q_{b}=\frac{31}{10}.$$ – Américo Tavares Sep 17 '11 at 22:11
Your subject line should say "How to maximize this function". "Equation" is definitely not the right word; it's not an equation. – Michael Hardy Sep 17 '11 at 22:12
up vote 1 down vote accepted

What you have at the end is essentially just $dP/dq_a-dP/dq_b=0$. This isn't equivalent to making both derivatives simultaneously zero: you've just made them both equal. But if they're both zero it means they're both equal, so you can at least use your last line to go further. Plug $q_a=q_b+1$ back into one of the original derivatives, set to $0$, and solve; then substitute back for $q_a$.

Also note that in the first place you might have been better off if you'd seen what you were working with is a linear system of equations. Setting both derivatives equal to zero is the same as saying:

$$\begin{pmatrix}4+1/2 & 1/2\\ 1/2 & 4+1/2\end{pmatrix}\begin{pmatrix}q_a\\q_b\end{pmatrix}=\begin{pmatrix}20\\16\end{pmatrix}. $$ Do you know how to solve this?

share|cite|improve this answer
anon: Thank you! I will do that. – badeconomist Sep 17 '11 at 21:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.