Help with a derivative I need to take the derivative of the following function w.r.t. $x$.
(This is the General Beta of the Second Kind density function.)
$$\frac{a}{bB(p,q)}\frac{(x/b)^{ap-1}}{(1+(x/b)^a)^{p+q}}$$
$B(p,q)$ is the beta function.
Don't need the answer per se, but would appreciate some advice on what strategy I should use, especially as regards the derivative of the beta function.
Thanks
 A: Assuming that everything is real-valued and that a, b, p, and q are all independent of x, then we consider the following problem.
$$\left( K\frac{x^{ap-1} }{(1 + (x/b)^a)^{p + q}} \right)'$$
where $K = \dfrac{a}{bB(p,q) \cdot b^{ap-1}}$, i.e. constant to x. This is not such a bad problem, as it's just a composition of various functions that we learn how to differentiate in an intro calc class. But it's not very fun looking, and it's a bit messy. But keep track of the factors and plug along.
Now it's an application of either the quotient rule or the product rule - one's choice. I choose the product rule today. So we note the following:
$(x^{ap-1})' = (ap-1)x^{ap-2}$ and $(\;(1 + \frac{x^a}{b^a})^{-p-q}\;)'$ which, remembering the chain rule, becomes $(-p-q) (1 + \frac{x^a}{b^a})^{-p-q-1} \cdot \frac{ax^{a-1} }{b^a}$.
Putting these together, one gets
$$K \left( \frac{(ap-1)x^{ap-2}}{(1 + \frac{x^a}{b^a})^{p+q}}  + \frac{x^{ap-1} \cdot -(p+q) (\frac{ax^{a-1}}{b^a})}{(1 + \frac{x^a}{b^a})^{p+q+1}} \right)$$
And I have done my best to put factors in the order in which they appear from using the chain, product, and power rules.
