Why is it ok to let a number in an inequality identity be a variable and differentiate with respect it to prove the identity? 
Prove that$$\frac{a^p}{p}+\frac{b^q}{q}\geq ab$$
  where $$ \frac{1}{p}+\frac{1}{q} =1$$ and 
  $a,b,p,q\in\mathbb{R}^+$

Solution. Let $x=a$, and define
$$f(x) =\frac{x^p}{p}+\frac{b^q}{q}-xb$$
Then we take the derivative of this function, proving that this has a minimum stationary point that lies above $x$ axis. Therefore $f(x)>0$ for $x>0$.

Can someone tell me why this works, letting $a$ become a variable. Why isn't it necessary to let $a$, $b$, $p$, $q$ all be variables and do partial derivatives?

 A: The symbol $a$ in the equation $\frac{a^p}{b} + \frac{b^q}{q} \ge ab$, as well as the symbols $b,p,q$, are indeed all variables.
However, variables can be treated differently in logical formulas. For example, a quantified variable becomes what we call a bound variable. Formally that's what is happening in this problem, although the quantifiers have been suppressed. A better way to word things would be like this:

For every $b,p,q > 0$, consider the function $f(x) = \frac{x^p}{p} + \frac{b^q}{q} - xb$.

Notice what has happened: I've stuck a universal quantifier in front of $b,p,q$, thereby making them bound variables, so they are now essentially constants in the formula for the function $f$. And now I'm free to apply the laws of calculus in which $b,p,q$ are indeed constants. 
Also, the reason that $x$ was substituted in place of $a$ is simply because of our human mathematical conventions: it is more common for $a$ to be a constant and for $x$ to be a variable, so if I want to leave $a$ as a free variable it is easier on my comprehension to replace it by $x$.
