How do you go about solving the differential equation of the following form? [closed]

$\frac{dy}{dt} + y(t) = k$, where $k$ is a constant.

Would the method of integrating factors typically used for the following forms work:

$\frac{dy}{dt} + a(t)y = b(t)$


Yes, integrating factors will work, here: \begin{align*} \frac{dy}{dt}+y(t)&=k\\ e^{\int P(t)\,dt}&=e^t\\ e^t\,\frac{dy}{dt}+e^t\,y(t)&=k\,e^t\\ \frac{d}{dt}\left[e^t\,y(t)\right]&=k\,e^t\\ e^t\,y(t)&=k\,e^t+C\\ y(t)&=k+C\,e^{-t}. \end{align*} To check, you plug back into the DE: $$\dot{y}(t)=-Ce^{-t},$$ so that $$\dot{y}(t)+y(t)=-Ce^{-t}+k+Ce^{-t}=k,$$ as required.


You can just integrate by passing everything except the derivative to the other side, i.e

$$\dfrac{dy}{dt} = k - a(t) \Rightarrow y = \int (k - a(t)) \ dt = kt - A(t) + C$$

where $A(t)$ is a primitive of $a(t)$ and $C$ is the integration constant.

Cheers!