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}
Use the quotient rule: ($\frac {f(x)}{g(x)} = \frac {f'(x)g(x) - f(x)g'(x)}{g^2(x)}$)

the sum rule: ($(f(x) + g(x))' = f'(x) + g'(x)$.)

constant rule: ($(af(x))' = af'(x)$)

And power rule: ($[x^k]' = kx^{k-1}$) 

And the entire thing is simple:

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

$p'(x) = \frac{[RTx]'(1-bx) -RTx[1-bx]'}{(1-bx)^2} -[ax^2]'=$

$ \frac {RT(1-bx)-RTx(-b)}{(1-bx)^2} - 2ax=$

$\frac {RT - RTbx + RTxb}{(1-bx)^2} -2ax = \frac {RT}{(1-bx)^2} - 2ax$.