We know that the integral of $\frac{dy}{dx}$ is $y+c$.

However, I've encountered a problem modeling the growth of population, which can be expressed as

$\frac{dP}{dt}=kP$ . where $P$ is the population and $t$ is time

Integrating both sides with regard to dt gives $P(t)= kPt$.

I know this is wrong but can someone clarify for me what exactly did I do wrong?
What is the specific thing in this case preventing me from integrating on both sides?

### Edit:

Thanks I know it's separation of variables. But I don't really get when to separate variables and when not... Say for example $dy/dt=2r^3$, in this case you can directly integrate both sides with respect to $t$ and get $y(t)=(t^4)/2+C$. Why can't we view ($t^3$) as a certain $P(t)$??