Artificial intelligent assistant

How to solve the differential equation $dN/dt=aN-\mu t$ in terms of $t$, $a$, $\mu$ and $N(0)$ The number, $N$, of animals of a certain species at time $t$ years increases at a rate of $aN$ per year by births, but decreases at a rate of $\mu t$ per year by deaths, where $a$ and $\mu$ are positive constants. Modelled as continuous variables, $N$ and $t$ are related by the differential equation: $$dN/dt=aN-\mu t$$ Given that $N=N(0)$ when $t=0$, find $N$ in terms of $t$, $a$, $\mu$ and $N(0)$.

You can use an integrating factor.

$$e^{-at}N'(t) - ae^{-at}N(t) = -\mu t e^{-at}$$

Now undo the product rule.

$$\left(e^{-at} N(t)\right)' = -\mu te^{-at}$$

Now integrate to see that $$ e^{-at}N(t) - N(0) = -\mu \int_0^t se^{-as}\,ds.$$

To finish, integrate by parts and solve for $N$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d76f5dcf75c91417c80c526a4354596c