Find $P$ such that $P' | P$ I want to know how to answer this question:

Find all polynomial in $\mathbb{R}[X]$ such that the derivative $P' \ | \ P$.

My effort:
We know that 


*

*An $n$ degree polynomial has $n$ roots in $\mathbb{C}$. 

*$P(x) = P'(x) \cdot (ax+b).$
Thus we can suppose that
$$P' = b(x-a_1)(x-a_2)\dots(x-a_{n-1}),$$ 
and 
$$P = c(x-a_1)(x-a_2)\dots(x-a_{n-1}) (x-a_{n})$$ 
where $b, c\in \mathbb{R}$ and $a_1,\dots,a_n \in \mathbb{C}$.
Take the derivative we have 
$$P' = c(x-a_2)(x-a_3)\dots(x-a_n)+c(x-a_1)(x-a_2)\dots(x-a_n)+ \dots + c(x-a_2)(x-a_3)\dots(x-a_{n-1}).$$
Since $P'(a_1) = 0$, we then have $c(a_1-a_2)\dots(a_1-a_n) = 0$, thus $x\in \{{a_2,\dots, a_n}\}$. Suppose that $a_1=a_2$. 
Then $$P = c(x-a_1)^2(x-a_3)\dots(x-a_{n-1}) (x-a_{n}).$$
Hopefully at some point, I can get $P = c(x-a_1)^n$.
 A: Let $$P(x) = a_nx^n+....+a_1x+a_0,$$ then we have $$ a_nx^n + ...+a_1x+a_0 = (a_n\cdot n\cdot a) x^n+...+(aa_1+2a_2b)x+a_1b$$ Since $a_n\neq 0$ we get $an=1$, so $a=1/n$

Write $$ {P'(x) \over P(x)} = {1\over ax+b}$$
Then $$a(\ln P(x))' = (\ln(ax+b))'$$ and thus $$a\ln(P(x) = \ln(ax+b) + c$$
So $$P(x) = (ax+b)^{1\over a} e^c = (ax+b)^ne^c$$
A: For a polynomial $P$ of degree $n$, we always have
$${P'(x)\over P(x)}={1\over x-r_1}+{1\over x-r_2}+\cdots+{1\over x-r_n}$$
where $r_1,r_2,\ldots,r_n$ are the roots of $P$.  If, at the same time, we have $P'\mid P$, then $P(x)={1\over n}(x-r)P'(x)$ for some $r$ (since $P'$ is of degree $n-1$ with lead coefficient that is $n$ times the lead coefficient of $P$).  This gives us
$${n\over x-r}={1\over x-r_1}+{1\over x-r_2}+\cdots+{1\over x-r_n}$$
If we do not have $r_1=r_2=\cdots=r_n=r$, then the right hand side has a singularity where the left hand side does not. Thus if $P'\mid P$, we must have $r_1=r_2=\cdots=r_n=r$, and so $P$ must have the form $P(x)=a(x-r)^n$. We also need $a,r\in\mathbb{R}$ in order for $P$ to have real coefficients.
Remark: The key equality can be proved by induction: If $P(x)=(x-r_n)Q(x)$ with
$${Q'(x)\over Q(x))}={1\over x-r_1}+{1\over x-r_2}+\cdots+{1\over x-r_{n-1}}$$
then
$$\begin{align}
{P'(x)\over P(x)}
&={((x-r_n)Q(x))'\over(x-r_n)Q(x)}\\
&={(x-r_n)Q'(x)+Q(x)\over(x-r_n)Q(x)}\\
&={Q'(x)\over Q(x)}+{1\over x-r_n}\\
&={1\over x-r_1}+{1\over x-r_2}+\cdots+{1\over x-r_{n-1}}+{1\over x-r_n}
\end{align}$$
(with the base case, $P(x)=a(x-r_1)$, being straightforward to check).
A: Write $P(x) = P'(x) L(x)$, where $L$ has degree $1$.
Write $P(x) = L(x)^m Q(x)$, where $Q$ is coprime with $L$.
Then $P' = m L^{m-1} L' Q + L^m Q'$ and so $L^m Q = P = P'L = m L^{m} L' Q + L^{m+1} Q'$.
Therefore, $Q$ divides $ L^{m+1} Q'$. Since, $Q$ is coprime with $L$, $Q$ must divide $Q'$, and this happens iff $Q$ is constant.
Thus, $P=q L^m$.
A: Assume $P$ is of degree $n$. Then $P'$ is of degree $n-1$. Then of course, $P'| P$, means that there is a polinomial $Q$ of degree 1 such that $P'Q = P$. (Otherwise the degree of $QP'$ would not be the same as the one of $P$)
Let's write $P = a_n x^n + ... + a_1x + a_0$. Then $P' = n a_n x^{n-1} + (n-1)a_{n-1}x^{n-2}+... + a_1$
We can write $Q$ as $bx + c$, so $Q P' = (bx+c)(n a_n x^{n-1} + (n-1)a_{n-1}x^{n-2}+... + a_1) = $ $= a_n n b  x^n + (a_{n-1}(n-1)b + na_n c)x^{n-1}+... + (a_{i-1} (i-1)b+a_i ic)x^{i-1} +  (a_1 b + a_2 2 c )x+a_1 c $
Then, since $QP' = P$, we must have 
\begin{cases} a_n = a_n n b \\ ...   \\ a_{i-1} = a_{i-1} (i-1) b + a_i i c \\ ...  \\ a_0 = a_1c \end{cases}
For the first equation we know we must have $b = \frac{1}{n}$ and from the last $c = \frac{a_0}{a_1}$
Then, if all the other $a_{i-1} = a_{i-1} (i-1) b + a_i i c$ for $i = 1... n-1$ are good with that, we reach our goal. That means they have to solve $a_{i-1} = a_{i-1} (i-1) \frac{1}{n} + a_i i \frac{a_0}{a_1}$
That is $a_{i-1} (1 - \frac{i-1}{n}) = a_i i \frac{a_0}{a_1}$, which is $a_{i-1} = a_i i \frac{a_0}{a_1}\frac{n}{n-i+1}= a_i \frac{a_0}{a_1}\frac{in}{n-i+1}$
That gives us a way to find, with free $a_0, a_1, a_n$ all the others $a_i$. However, if we apply that to $a_1$, it gives us $a_1=a_2 \frac{a_0}{a_1}\frac{n}{n} $, which means $a_1 ^2 = a_2 a_0$
A: $P$ is a solution to the differential equation
$$\frac{P}{P'} = Ax + B $$
for some $A$ and $B$ in $\mathbb R$.
This is true because
1)   $\operatorname{deg} (P') = \operatorname{deg}(P) - 1$, 
2)   $P/P'$ happens to be a polynomial because $P' \mid P$
3)    $P/P'$ has degree $1$ by my first point, and therefore has the general form $Ax+B$
Taking the reciprocal gives
$$\frac{P'}{P} = \frac 1 {Ax + B}$$
This is a separable differential equation. So we can write the above as
$$\frac{d}{dx}\log(P(x)) = \frac1A\frac{d}{dx}\log(Ax+ B)$$
And you can solve it, but it would be slightly non-rigorous because if either $P(x)$ or $Ax + B$ are not positive then it's not legal to take the $\log$.
So we do it rigorously: There is a non-empty open interval $I$ in which $Ax + B$ is positive. Over $I$, it's OK to take $\log(Ax+B)$. But then even over $I$, $f(x)$ can still be negative. To make $f(x)$ "loggable", multiply it by an appropriate power of $-1$ to make it positive. All of this gets us:
$$\frac{d}{dx}\log((-1)^CP(x)) = \frac 1 A \frac{d}{dx}\log(Ax + B), x \in I$$
Taking anti-derivatives and re-arranging gets us $$P(x) = (-1)^Ce^D(Ax+B)^{1/A}$$
This can be written as $$P(x) = \alpha (\beta x + \gamma)^n $$
for arbitrary $\alpha, \beta, \gamma \in\mathbb R$, where $\alpha, \beta \neq 0$.
A polynomial over $I$ generalises uniquely over $\mathbb R$, and has the above form.
