Question: $$p(x) = \frac{RTx}{1-bx} -ax^2$$

If $R$ and $T$ are constants, how can I find the derivative of this? 

What I obtained:

$p'(x) = RT(1-xb)^{-1} + (-1)(1-xb)^{-2}bRTx - 2ax$

Is this correct? 

Thanks!

Answer: 
$$p(x) = \frac{RTx}{1-bx} -ax^2=(RTx)(1-bx)^{-1}-ax^2$$

\begin{align}p'(x)&=(RT)(1-bx)^{-1}+(RTx)(-1)(1-bx)^{-2}(-b)-2ax \\
&=(RT)(1-bx)^{-1}+(bRTx)(1-bx)^{-2}-2ax\end{align}
I would say you should simplify a little bit more.

$f'(x) = RT(1-xb)^{-1} + (-1)(1-xb)^{-2}(-b)(RTx)- 2ax\\
RT(1-xb)^{-2}(1-xb + xb) - 2ax\\
\frac {RT}{(1-xb)^2}-2ax$