Integral solution (or a simpler) to consumer surplus - What is wrong? Problem
Given demand $D(p)=A-ap$, and $A,a&gt;0$ and a fixed price $0&lt;p_1&lt;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?
Your calculation is correct. We can doublecheck your work with a graphical approach.
As shown in the figure below, $CS$ at some arbitrary and not necessarily equilibrium price $p_0$ is the gray-shaded area. If we take the non-integral approach, we get
\begin{equation}
CS=\frac12\left(\frac{A}a-p_0\right)D(p_0)=\frac12\left(\frac{A}a-p_0\right)(A-ap_0)=\frac{(A-ap_0)^2}{2a}.
\end{equation}
Differentiating with respect to $p_0$, we get
\begin{equation}
CS'=-A+ap_0.
\end{equation}