I am having trouble finding the first derivative of $R(P) = (Pe^r)(1-\frac{P}{K})$ I am having trouble finding the first derivative of $R(P) = (P\textrm{e}^r)(1-\frac{P}{K})$
I am told to use the product rule for this. The first part of it $(P\textrm{e}^r)$ I believe will remain the same for the derivative of it. I am struggling on the $(1-P/K)$.
 A: The derivative of the function $R(P) = Pe^r\left(1-\frac{P}{K}\right)$ with respect to $P$ can be found by applying the product rule, as follows
\begin{align}
\frac{d}{dP}R(P) &= \left(\frac{d}{dP}Pe^r\right)\left(1-\frac{P}{K}\right) + Pe^r\frac{d}{dP}\left(1-\frac{P}{K}\right)\\
&= e^r\left(1-\frac{P}{K}\right) + Pe^r\left(\frac{d}{dP}1 + \frac{d}{dP}\left(-\frac{P}{K}\right)\right)\\
&= e^r\left(1-\frac{P}{K}\right) + Pe^r\left(0 - \frac{1}{K}\right)\\
&= e^r\left(1-\frac{P}{K}\right) - \frac{Pe^r}{K}\\
&= e^r\left(1-\frac{2P}{K}\right)
\end{align}
A lot of the times, if one does some simple manipulations initially, the amount of work required can be greatly reduced. Notice that $R(P) = Pe^r\left(1-\frac{P}{K}\right) = e^r\left(P-\frac{P^2}{K}\right)$. Now the derivative is simply
\begin{align}
\frac{d}{dP}R(P) &= e^r\frac{d}{dP}\left(P-\frac{P^2}{K}\right)\\
&= e^r\left(\frac{d}{dP}P-\frac{d}{dP}\frac{P^2}{K}\right)\\
&= e^r\left(1-\frac{2P}{K}\right)
\end{align}
A: You may use product rule on $R(P)=e^r(P-\frac{P^2}{K})$ as follows:
$R'(P)=e^r\frac{d}{dP}(P-\frac{P^2}{K})$$+(P-\frac{P^2}{K})\frac{d}{dP}(e^r)$
