Problem
Given demand $D(p)=A-ap$, and $A,a>0$ and a fixed price $0<p_1<A/a$ by some company.
Calculate the consumer surplus and its derivative with respect to $p$. What is this number?
My solution so far
I could not find a simple way to do it since quantity is not known, $q_0$. I calculated the consumer surplus as
$CS=\int_{p}^{A/a}D(p)dp=\int_{p}^{A/a}(A-ap)dp=\frac{1}{2a}(A-ap)^2=\frac{(A-ap)^2}{2a}$
and its derivative as
$\frac{\partial CS}{\partial p}=\left ( \frac{(A-ap)^2}{2a} \right )=2(A-ap) \left ( \frac{\partial }{\partial p} (A-ap) \right )\frac{1}{2a}=-(A-ap)\left ( \frac{\partial }{\partial p} p \right )=-A+ap$
Which I am almost certain is incorrect. I am not sure on how to approach this without a equalibrium or am I missing it?