Derivation of Flory's Model for Linear Condensation of Polymers

I'm having some trouble understanding a part of Flory's model for linear polycondensation reactions. In his 1936 paper, he derives an expression for the probability of the existence of a particular $x$-mer as



> 
> $$\Pi\_x = xp^{x-1}(1 - p)^2\tag{2}$$
> 
> 
> 


Later, he states the following:



> 
> In order to locate the $x$ value which gives a maximum in $\Pi\_x,$ let
> 
> 
> $$\partial\Pi\_x/\partial x = (1 - p)^2(p^{x - 1} + xp^{x - 1}\ln p) = 0$$
> 
> 
> 


Not being the most mathematically savvy person, can someone explain to me how he got to this expression?


### Reference


1. Flory, P. J. Molecular Size Distribution in Linear Condensation Polymers. *J. Am. Chem. Soc.* **1936**, 58 (10), 1877–1885. DOI: [10.1021/ja01301a016](https://doi.org/10.1021/ja01301a016).




Given $\Pi\_{x}$= $𝑥\*𝑝^{𝑥−1}$ \*$(1−𝑝)^2$


$\partial$ refers to partial differentiation.


$\frac{\partial \Pi\_{x}}{\partial x}$ means differentiating $\Pi\_{x}$ with respect to x.


Therefore $(1−𝑝)^2$ is a constant when differentiating with respect to x.
So during differentiation the constant stays as a constant multiplier.


Now see that there are two terms involving x, therefore we need to use the [product rule of differentiation](https://en.wikipedia.org/wiki/Product_rule).


$\left(\frac{\partial \Pi\_{x}}{\partial x}\right)$ = $(1−𝑝)^2$ \* ($𝑝^{𝑥−1}\* \frac{\partial x}{\partial x} + x\*\frac{\partial p^{x-1}}{\partial x}$)


$\frac{\partial x}{\partial x}$ = 1 and for calculating $\frac{\partial p^{x-1}}{\partial x}$ look at [exponentiation rule of differentiation](https://www.mytutor.co.uk/answers/5998/A-Level/Maths/How-do-you-differentiate-a-x/) as suggested by @Ian Bush in the comments.


Therefore we finally have :


$\left(\frac{\partial \Pi\_{x}}{\partial x}\right)$ = $(1−𝑝)^2$ \* ($𝑝^{𝑥−1}\* 1 + x\*ln(p)\*p^{x-1}$)


And since he is trying to locate the 𝑥 value which gives a maximum in $\Pi\_{x}$, he equates the equation to 0.


$\left(\frac{\partial \Pi\_{x}}{\partial x}\right)$ = $(1−𝑝)^2$ \* ($𝑝^{𝑥−1}\* 1 + x\*ln(p)\*p^{x-1}$) = 0


 1