I have a question which requires me to use the method of characteristics in order to solve the PDE $u_x + 2u_t - 4u = e^{x+t}$.
This results in the system of ODE's $\frac{dx}{dr} = 1 , \frac{dt}{dr} = 2 , \frac{du}{dr} = 4u + e^{x+t} $
The solutions to the first two equations are $x = r + c_1$ and $t = 2r + c_2$ respectively however when solving the third equation I get $u = c_4e^{4r} - e^{3r + c1 + c2}$ and according to my prof the solution to this equation is supposed to be $u = c_3e^{4r} + e^{4r + c1 + c2}(1-e^{-r})$ and I'm not sure how that got that.
on the characteristic you have $x = r+c_1, t = 2r+c_2$ and $$\frac{du}{dr} -4u =e^{x+t} = e^{3r+c_1 + c_2}\to \frac{d}{dr}\left(ue^{-4r}\right)=e^{-r+c_1+c_2}$$ which on integration gives you $$ue^{-4r}= c_3-e^{-r_1 + c_1 + c_2}\to u = c_3e^{4r}-e^{3r+c_1+c_2} $$
your solution and the profs solution are the same. the reason is if you identify $$c_4 = c_3 +e^{c_1+c_2}$$ then you can see that both are equal.