$$dX_t=tX_t \, dt+\exp \left(\frac{t^2}{2}\right)$$ and I'm supposed to solve this, in the way $X_t=f(t,W_t)$.

So I use Itô's formula: $$dX_t=\frac{\partial f}{\partial t}dt+\frac{\partial f}{\partial x}dW_t+\frac{1}{2}\frac{\partial^2 f}{\partial x^2}dt$$ and then get that: $$\frac{\partial f}{\partial t}+\frac{1}{2}\frac{\partial^2 f}{\partial x^2}=\mu(t,x)=t\cdot x \\ \frac{\partial f}{\partial x}=\sigma(t,x)=\exp \left(\frac{t^2}{2}\right).$$ From the second line, I'd get: $f=\exp\left(\frac{t^2}{2}\right)\cdot x$, but then the first line would become: $$t\cdot \exp \left(\frac{t^2}{2} \right)\cdot x + \frac{1}{2}\cdot 0$$ which is not $t\cdot x$. Where is the mistake?