Solving $\frac{dy}{dt}+y=1$ differential equation? When solving $\frac{dy}{dt} +y = 1$, I get the answer $y= 1-Ae^t$, however the answer claims to be $y= 1-Ae^{-t}$
Where does this minus come from?
 A: When you integrate after taking the same terms on same side you get $\frac {\log (1-y)} {-1} = t+c$ where $c$ is the constant of integration. This $-1$ here gives the minus sign after solving.
A: It depends on the exact method you use to approach the problem. If you use the method of integrating factors, the integrating factor is $e^{\int 1 dt}=e^t$, so $\frac{d}{dt}(e^t y)=e^t$, so $e^t y = e^t + A$, so $y=1+Ae^{-t}$. (Since $A$ is an arbitrary constant, the $+$ can be a $-$.)
Other methods would be separation of variables and linear superposition (homogeneous solution+particular solution = general solution).
A: You can verify your solution by plugging it into the equation.
$$(1-Ae^t)'+(1-Ae^t)=-Ae^t+1-Ae^t\color{red}{\ne1}.$$
You clearly see that this solution is wrong, but the fix isn't far, it suffices to change one sign...
A: $$y'(t)+y(t)=1\Longleftrightarrow$$
$$y'(t)=1-y(t)\Longleftrightarrow$$
$$\frac{y'(t)}{1-y(t)}=1\Longleftrightarrow$$
$$\int\frac{y'(t)}{1-y(t)}\space\text{d}t=\int1\space\text{d}t\Longleftrightarrow$$
$$\int\frac{y'(t)}{1-y(t)}\space\text{d}t=t+\text{C}$$

For the integral substitute $u=1-y(t)$ and $\text{d}u=-y'(t)\space\text{d}t$:
$$\int\frac{y'(t)}{1-y(t)}\space\text{d}t=-\int\frac{1}{u}\space\text{d}t=-\ln\left|u\right|+\text{C}=-\ln\left|1-y(t)\right|+\text{C}$$

So, we get:
$$-\ln\left|1-y(t)\right|=t+\text{C}\Longleftrightarrow$$
$$\ln\left|1-y(t)\right|=\text{C}-t\Longleftrightarrow$$
$$\left|1-y(t)\right|=\exp\left[\text{C}-t\right]\Longleftrightarrow$$
$$\left|1-y(t)\right|=\frac{\text{C}}{e^t}$$
