I have no clue about how to solve the following system
\begin{equation*} \begin{cases} x\cdot\nabla u=|x|^2, \quad x\in\mathbb{R}^n, \\ u|_{x_1=1}=3x_n. \end{cases} \end{equation*}
Study the domain where the function is defined.
Can you help me with some hints?
Use the method of characteristics to decompose the problem. Observe, we have the string of equations: $$\frac{dx_1}{x_1} = \ldots = \frac{dx_n}{x_n} = \frac{dz}{x_1^2 + \ldots x_n^2}$$
Solving for the constant characteristics for the first n-1 equations, we get: $$\phi_i = \frac{x_{i-1}}{x_i}$$
So the last equation becomes: $$\frac{dx_n}{x_n} = \frac{dz}{x_n^2 \phi_{n-1}^2(1 + \phi_{n-2}^2(\ldots (1 + \phi_1^2) \ldots )))}$$ Which, if we allow $\psi := \phi_{n-1}^2(1 + \phi_{n-2}^2(\ldots (1 + \phi_1^2) \ldots )))$, then this boils down to: $$\frac{dz}{\psi} = x_n dx_n$$ $$\implies \frac{z}{\psi} = \frac{1}{2}x_n^2 + \eta(\phi_1, \ldots, \phi_{n-1})$$ $$\implies z = \psi(\frac{1}{2}x_n^2 + \eta)$$
where we defined $\psi$ already, which we know equals: $$\psi = \frac{|x|^2}{x_n^2}$$ and $\eta$ is a function on the constants $\phi_1, \ldots, \phi_{n-1}$.
This leads to:
$$u = \frac{1}{2} x \cdot x + \eta(\phi_1, \ldots, \phi_{n-1})\frac{|x|^2}{x_n^2}$$
Now considering the initial conditions:
$$u(x_1 = 1, \cdot ) = 3x_n = \frac{1}{2}\sum_{i=1}^n x_i^2 + \eta(1, \phi_2, \ldots, \phi_{n-1}) \frac{1}{x_n^2} \sum_{i=1}^n x_i^2$$ $$\implies 3x_n^3 - \frac{x_n^2}{2}\sum_{i=1}^n x_i^2 = \eta(1, \phi_2, \ldots, \phi_{n-1}) \sum_{i=1}^n x_i^2$$ $$\implies \frac{3x_n^3}{|x|^2} - \frac{x_n^2}{2} = \eta(1, \phi_2, \ldots, \phi_{n-1}) $$ Of course we can easily translate the variables $\phi_2 = x_2, \phi_3 = \frac{x_3}{x_2}, \ldots$ which instantly makes $\eta$ a function of $x_2, \ldots, x_n$. Therefore, $$ \implies \eta = \frac{3x_n^3}{1 + \sum_{i=2}^n x_i^2} - \frac{x_n^2}{2}$$
Thus, we get: $$u = \frac{1}{2} x \cdot x + |x|^2 \left ( \frac{3x_n}{1 + \sum_{i=2}^n x_i^2} - \frac{1}{2} \right )$$
Which simplifies to: $$u = x \cdot x \left ( \frac{3x_n}{1 + \sum_{i=2}^n x_i^2} \right )$$