Linear differential equation with driving In class we are solving the linear differential equation with driving given by
$$
\frac{dx}{dt} = -\gamma x + f(t)
$$
The professor first transformed to a new variable $y$,
$$
y(t) := x(t) e^{\gamma t}
$$
and then calculate the differential equation for $y$:
$$
\frac{dy}{dt} = \frac{\partial y}{\partial x}\frac{dx}{dt} + \frac{\partial y}{\partial t} = e^{\gamma t} f(t)
$$
Problem: I don't understand how he reached the last step, i.e., how it equals $e^{\gamma t} f(t)$. 
Attempt: Here is what I get for the differentials:
$$
\frac{\partial y}{\partial x} = e^{\gamma t} \\
\frac{dx}{dt} = -\gamma x + f(t) \\
\frac{\partial y}{\partial t} = e^{\gamma t}\frac{dx}{dt} + x(t)\gamma e^{\gamma t}
$$
Given these, I get
$$
\frac{\partial y}{\partial x}\frac{dx}{dt} + \frac{\partial y}{\partial t} = -\gamma x e^{\gamma t} + 2fe^{\gamma t}
$$
which is incorrect. It's probably my differentials that are incorrect, but what am I doing wrong here?

$$\frac{dx}{dt}+\gamma x=f(t)\Rightarrow e^{-t} \frac{d(e^t x)}{dt}=f(t) \Rightarrow \frac{d(e^t x)}{dt}=e^t f(t). $$
Finally, integrating we get $$e^t x=\int e^t f(t)+C \Rightarrow x=e^{-t} \int e^t x dt+C e^{-t}.$$
