Find the solution of
$$u_{x}+u_{y}=u^{2}$$
passing through $u=x$ when $y=-x$ and indicate the region in the $(x,y)$ plane where your solution is valid.
I am current attempting this as part of exam prep. I started by parametrising the initial data.
$u_{0}(s) = s, x_{0}(s)=s, y_{0}(s)=-s$
Then writing a set of equations for characteristics:
$\frac{dx}{d\tau} = 1, \frac{dy}{d\tau} = 1, \frac{du}{d\tau} = u^{2}$
Integrating these we have:
$x=\tau + x_{0}(s), y=\tau + y_{0}(s), u=u^{2}\tau + u_{0}(s)$
That is
$x=\tau + s, y=\tau - s, u =u^{2}\tau + s$
After eliminating $\tau$ and $s$ from $u$ and using $u=x$, we have:
$u=\frac{1}{2}x^{2}(x+y)+\frac{1}{2}(x-y)$
However im not sure if what i have done is correct and where to go from here. Any help is appreciated.
In a slightly different way you get from the equations for the characteristic curves $y=x+C_1$, $\frac{du}{dx}=u^2$ so that $x+u^{-1}=C_2$ and as only one constant is free there is a function $F$ with $$ x+u^{-1}=C_2=f(C_1)=f(y-x) $$ and the initial condition implies $$ s+s^{-1}=f(-2s)\implies f(t)=-\frac t2-\frac 2t $$ and thus $$ u(x,y)=-\left(x+\frac{y-x}2+\frac2{y-x}\right)^{-1}=\frac{2(x-y)}{y^2-x^2+4} $$