Solve first order differential equation in two dimensions $x\in\mathbb R^2$, $a\in\mathbb R^2$, $v=(1,1)$
We know: $v\cdot \nabla f(x)=g(a\cdot x)+v\cdot x$.
1) What is $f(x)$ in terms of $g$?
2) What is $f(x)$ if $f(x_1,x_2)=h(x_1)+h(x_2)$?

The PDE form is $f_{x_1}+f_{x_2}=g(a\cdot x)+x_1+x_2$
Let $h(x)=g(ax)+x_1+x_2$ then this is a quasilinear pde form:
$f_{x_1}+f_{x_2}=h(x_1,x_2)$.
It seems like this is equivalent to the following parametric form:
$dx_1/dt=1$, $dx_2/dt=1$, $df/dt=h$.
Therefore we have $x_1=t+c_1$, $x_2=t+c_2$, $f=\int h dt$.
So $f=\int g(a_1(t+c_1)+a_2(t+c_2))+2t+c_1+c_2dt$;
$f=t^2+(c_1+c_2)t+c_3+\frac{1}{a_1+a_2}G((a_1+a_2)t+a_1c_1+a_2c_2)$
But I think I need the $f$ in terms of $x_1$ and $x_2$?
 A: (1) The equation $v\cdot \nabla f(x) = g(a\cdot x) + v\cdot x$ rewrites as
$$
f_{,1} + f_{,2} = g(a_1 x_1 + a_2 x_2) + x_1 + x_2 \, .
$$
This is a non-homogeneous advection equation (linear transport equation), which can be solved by using the method of characteristics. Following this method, we have the set of parametrized curves $x_1(t) = t+c_1$, $x_2(t) = t+c_2$, which are straight lines with slope one in the plane $x\in\Bbb R^2$. Along these curves, we have $$f(t) = t^2 + Ct + c_3 + \int_0^t g(A\tau+C')\,\text d\tau\, ,$$ where $A = a_1+a_2$, $C = c_1+c_2$ and $C' = a_1c_1+a_2c_2$. Assuming $c_3=F(c_2)$, the variable $t$ is eliminated by substitution of $c_2 = x_2-t$ and $t=x_1-c_1$ (i.e., $c_3=F(x_2-x_1+c_1)$). Similar substitutions are made in the case $c_3=F(c_1)$.
(2) The second part uses abusive notation. Thus, let us define $\varphi$ such that $f(x_1,x_2) = \varphi(x_1) + \varphi(x_2)$. The PDE becomes
$$
g(a\cdot x) = \psi(x_1) + \psi(x_2)
$$
with $\psi = \varphi' - \text{id}$, which means that $\psi(x_1) = g(a_1 x_1) - \psi(0)$ and $\psi(x_2) = g(a_2 x_2) - \psi(0)$. Since this must be true for all $x$, we must have $a_1 = a_2 =\alpha$. Now we are left with $g(\alpha (x_1+x_2))= \psi(x_1) + \psi(x_2)$, which implies that $\psi(x_1)=\tfrac1{1+\beta} g(\alpha (1+\beta) x_1)$ by setting $x_1=\beta x_2$. The only possibility to have an expression of $\psi$ which does not depend on $\beta$ is that $g$ is a linear function, and we have $\psi(x_1)= \alpha g( x_1)$.
