# 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)$$

• Write $y'=k-a(t)$ and integrate – no need for fancy integrating factors here. Dec 2, 2021 at 11:10
• Oh wow. Can't believe I didn't see that. Thanks
– Rumi
Dec 2, 2021 at 11:11
• Just out of curiosity, would integrating factors have worked here?
– Rumi
Dec 2, 2021 at 11:14
• What I meant to ask was something different, I have made a slight edit. I have the following abstract form. $\frac{dy}{dt} + y(t) = k$, The goal is to solve for y(t) and get rid of dy/dt. Integrating factor method worked very cleanly as I had y(t) on one side and no dy/dt or y(t) on the other
– Rumi
Dec 2, 2021 at 11:55
• In that case, the integrating factor method works. However, it is a bit easier to use separation of variables. One obtains $$\int \frac{dy}{k-y}=\int dt.$$ Dec 2, 2021 at 11:56

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!

• It seems like the OP edited their question (replaced $a(t)$ with $y(t)$). Dec 2, 2021 at 11:55
• I did do that. Sorry about the confusion.
– Rumi
Dec 2, 2021 at 11:59