how to solve $u_t + uu_x =f(x,t)$ with initial condition $u(x,0)= \phi(x)$
For the simple case $f(x,t)=1 $ and $\phi(x)=x$, I've tried to proceed like for the homogeneous one. I find the characteristics are parabolae $$X(t)=\frac {t^2}{2} +X(0)(1+t)$$
but the solution won't be constant along these characteristics because of the source term f!
I find that if I define $v(t)=u(X(t),t) \ \ $, $v$ would be solution to $v'=1$ hence $$v(t)=t+k=t+v(0)=t+u(X(0),0)=t+X(0)$$ plugging this into u I get $$ u(X(t),t)=u(\frac {t^2}{2} +X(0)(1+t),t)$$ and then, solving for $X(0)$ in terms of $x$ $$u(x,t)=\frac{1}{1+t}(x-\frac {t^2}{2} )+t$$
Am I missing something here?
And how should I procced for a generic f and $\phi$?