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)$??
If you integrate directly you get $$\int dp=\int kp dt$$ $$\implies p(t)=k\int p dt$$ you can't evaluate the integral you are stuck
Thats why we need to separate variables here $$\frac {dp}p=kdt$$ After integration $$\int \frac {dp}p=k\int dt \implies \ln p=kt+C$$ $$p=Ce^{kt}$$
With your example with y ,note that you have no y on the right side of the equation like the equation with p. These two differential equations are different.You have y on one side and t on the other side already. Thats what we tried to have with the equation with p(t). $$\frac {dy}{dt}=2t^3$$ $$\implies \int dy=2\int t^3dt$$ $$y(t)=\frac {t^4}2+C$$