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?

Differentiate $y(t) = x(t) e^{\gamma t}$ with the product rule:
$$y'(t)=x'(t)e^{\gamma t}+x(t) \gamma e^{\gamma t}.$$
Since $x'(t)=- \gamma x(t)+f(t)$, we get
$$y'(t)=(- \gamma x(t)+f(t))e^{\gamma t}+x(t)\gamma e^{\gamma t}=f(t)e^{\gamma t}.$$
