# Find the stationary point of $y=(x-a)^p(x-b)^q$

If a, b, p, and q are positive with $a<b$ find the x-coordinate of the stationary point of the curve $y=(x-a)^p(x-b)^q$ in the domain $a<x<b$.

This is what I tried using the product rule:

$\dfrac{dy}{dx}=(x-a)^pq(x-b)^{q-1}+(x-b)^qp(x-a)^{p-1}$

I am stuck here and I don't know if I even differentiated correctly.

The answer is: $\dfrac{qa+pb}{p+q}$, but I have no idea how to get here. I know a and b will be stationary points but they are not in the domain.

-

You differentiated correctly.

Now solve equation $\dfrac{dy}{dx}=0$:
$$(x-a)^pq(x-b)^{q-1}+(x-b)^qp(x-a)^{p-1}=0$$ $$\dfrac{\left((x-a)^pq(x-b)^{q-1}+(x-b)^qp(x-a)^{p-1}\right)}{(x-a)^{p-1}(x-b)^{q-1}}=0$$ $$(x-a)q+(x-b)p=0$$

-
I dont get how you just can multiply by e.g. $(x-a)^{1-q}$ – Hans Groeffen Feb 15 '13 at 13:57
Also I have now got 4 unknown variables, I just simply don't know how to proceed with that. – Hans Groeffen Feb 15 '13 at 13:58
@Hans (x - a) is non-zero because a is not in the domain. So it's OK to multiply by any power of (x-a) – oks Feb 15 '13 at 13:59
To proceed, make x the common factor and get x(q + p) = aq + pb – oks Feb 15 '13 at 14:01
$(qx-qa+px-pb) = [x(q+p)=qa+pb] = \left[x=\dfrac{qa+pb}{q+p}\right]$ Is that the right way? – Hans Groeffen Feb 15 '13 at 14:05

A stationary point corresponds to the derivative being zero. If you set $\frac{dy}{dx} = 0$, and then divide through by $(x-a)^{p-1}$ and $(x-q)^{q-1}$ then it will just be algebraically rearranging what you are left with.

-