Does there exist a distribution defined on $\mathbb{R}$ which is $1/x$ over $(-\infty,0)$ and $2/x$ over $(0,+\infty)$? Does there exist  a distribution defined on $\mathbb{R}$ which is $1/x$ over $(-\infty,0)$ and $2/x$ over $(0,+\infty)$?
I think yes but i am not very sure:
Let $u_1(\phi)$ be $2\int_0^{+\infty}(\frac{\phi(x)-\phi(0)}{x})dx$ and $u_2(\phi)$ be $\int_{-\infty}^{0}(\frac{\phi(x)-\phi(0)}{x})dx$ for every test function $\phi$.
Does $u_1+u_2$ works?
I don't understand if it must satisfy some "gluing" conditions.
(And the problem is which are all homogeneous distributions of order a negative integer over $\mathbb{R}$?)
 A: In addition to the other good answwers, the issue of homogeneity is of some interest.
Neither of the two functions $1/x$, $1/|x|$ is locally $L^1$ near $0$, so some variant of them must be defined indirectly, for example, by meromorphic continuation, or by other "regularization".
The {\it odd} distribution defined by meromorphic continuation of $\mathrm{sgn}(x)/|x|^s$ is holomorphic at $s=1$, and the value is (a constant multiple of) the Cauchy Principal Value integral $\varphi\to P.V. \int_{\mathbb R} {\varphi(x)\over x}\,dx$. The meromorphic cont'n of the {\it even} distribution $1/|x|^s$ has a simple pole at $s=1$, with residue (some constant multiple of) Dirac's $\delta$.
Thus, in addition to degree of (positive-) homogeneity (possibly gauged by eigenvalues of the Euler operator $x{\partial\over \partial x}$, we should also pay attention to {\it parity}, under the action of $\pm 1$. Thus, The function $u(x)$ that is $1/x$ for $x>0$ and $0$ for $x<0$ is a non-trivial linear combination of both...
This suggests that with $v(x)=\log |x|$ for $x>0$ and $0$ for $x<0$ might fail to be positive-homogeneous, and indeed this is the case. In contrast, the Principal Value functional is homogeneous of the expected degree (however we choose to normalize things). But the failure of the formula may be (but happens not to be, here) misleading. Namely, the functional (integrate-against) $1/|x|$ on the closed subspace of test functions (e.g.) vanishing to infinite order at $0$ need not be given by the same formula. (And if we forget requirements of parity and homogeneity, Hahn-Banach of course gives extensions...)
We claim that the only even-parity, positive-homogeneous-degree $-1$ distribution $u$ is (up to constant multiples) $\delta$. In particular, the support of such $u$ must be $0$, and it cannot be (any non-zero constant multiple of) $1/|x|$ away from $0$. To see this, let $f$ be a test function that is even, identically $1$ on $[-1,1]$, identically $0$ off $[-2,2]$, and monotonically decreases from $1$ to $0$ on $[1,2]$ and oppositely on $[-2,-1]$. By construction, $f(x)-f(2x)$ is identically $0$ near $0$, so has support away from $0$. Since $\mathbb R^\times$ is transitive on the punctured real line, uniqueness of invariant functionals shows that the restriction of $u$ to the space $X$ of test functions vanishing to infinite order at $0$ must be a constant multiple $c/|x|$ of (integration against) $1/|x|$. Thus,
$$
0 \;=\; u(x \to f(x)-f(2x)) \;=\; c\int_{\mathbb R} {f(x)-f(2x)\over |x|}\;dx
$$
The integrand is non-negative everywhere, and strictly positive on a set of positive measure. Thus, the integral itself is non-zero. Hence, the constant $c$ must be $0$.
In particular, although $\log|x|$ and $\mathrm{sgn}\cdot \log|x|$ are locally $L^1$ near $0$, and so have distributional derivatives computed correctly away from $0$ as $1/|x|$ and $1/x$, in the first case that derivative is not homogeneous. (In the latter, it is, being the principal value distribution.)
That is, whatever regularization we do perform on integrate-against-$1/|x|$ (unless we produce the $0$ functional), the outcome cannot possibly be homogeneous.
EDIT: the Euler equation is more-or-less equivalent to "positive" homogeneity, meaning homogeneity (however we normalize it) only for positive dilations. That is, we are only talking about the action of positive real numbers on functions and distributions. To include the action of negative real numbers (after the action of positive ones is specified), we only need to specify the action of $\pm 1$, that is, parity. The Euler differential equation does not touch parity...
The approach through meromorphic continuation of families is not strictly necessary to understand the existence and uniqueness here... though I do think in the long run it is very beneficial. Perhaps steep prerequisites, yes. "Vector-valued integrals" and "vector-valued holomorphic functions" (after Schwartz and Grothendieck). I do treat these things in various of my notes, but, yes, while it's less crazy than some other things, it's perhaps not suitable for absolute beginners looking at PDE involving distributions.
A: By requiring conditions only on $(0,\infty)$ and on $(-\infty,0)$, there is no uniqueness of the distribution you are looking for since one can add any distribution of the form $c\,\delta_0^{(n)}$. First, there is no homogeneous distribution with the constraints you are requiring (The residue of the function in $0$ should be $0$ for that to be possible, as you can find in a good course on distribution theory).
The way I like to find a singular distribution is by looking at the derivative of a $L^1_{\mathrm{loc}}$ function. Here, we can take for example $f=g'$ with
$$
g(x) = (1+H(x))\ln(|x|)
$$
where $H(x) = \mathbf{1}_{\mathbb R_+}$, so that in the classical sense, $f(x) = g'(x) = 1/x$ when $x< 0$ and $f(x) = 2/x$ when $x>0$. Now we can do the derivative in the sense of distributions: for $\varphi\in C^\infty_c$,
$$
\begin{align*}
\langle f,\varphi\rangle = -\langle g,\varphi'\rangle &= -\int_{\mathbb R} (1+H(x))\ln(|x|)\, \varphi'(x)\,\mathrm{d}x
\\
&= -2\int_0^\infty \ln(x)\, \varphi'(x)\,\mathrm{d}x - \int_{-\infty}^0 \ln(-x)\, \varphi'(x)\,\mathrm{d}x
\end{align*}
$$
For the first integral we have (integrating by parts and using the fact that $\ln(1)=0$)
$$
\begin{align*}
-\int_0^\infty \ln(x)\, \varphi'(x)\,\mathrm{d}x &= -\int_0^1\ln(x)\, (\varphi(x)-\varphi(0))'\,\mathrm{d}x - \int_1^\infty \ln(x)\, \varphi'(x)\,\mathrm{d}x
\\
&= \int_0^1  \frac{\varphi(x)-\varphi(0)}{x}\,\mathrm{d}x + \int_1^\infty \frac{\varphi(x)}{x}\,\mathrm{d}x
\\
&= \int_0^\infty  \frac{\varphi(x)-\varphi(0)\,\mathbf{1}_{[0,1]}(x)}{x}\,\mathrm{d}x
\end{align*}
$$
and with a similar computation for the second integral, we get a the end
$$
\begin{align*}
\langle f,\varphi\rangle = \int_{-\infty}^0 \frac{\varphi(x)-\varphi(0)\,\mathbf{1}_{[-1,0]}(x)}{x}\,\mathrm{d}x + 2\int_0^\infty  \frac{\varphi(x)-\varphi(0)\,\mathbf{1}_{[0,1]}(x)}{x}\,\mathrm{d}x
\end{align*}
$$

Remark: If we want all the solutions, then we can take any distribution of the form $f(x) + \sum_n c_n\,\delta_0^{(n)}$. Remark in particular that taking $f(x) + c\delta_0$ is equivalent to replacing $\mathbf{1}_{[0,1]}$ by $\mathbf{1}_{[0,R]}$ for some $R$ in the above integral, and is also equivalent to replace $g$ by another antiderivative $g+c H(x)$. So my choice here corresponds to taking $c=0$.
A: Let $u:\mathbb{R} \to \mathbb{R}$ be defined by
$$
u(x) = \begin{cases}
\ln |x| & (x<0) \\
0 & (x=0) \\
2\ln |x| & (x>0)
\end{cases}
$$
This function is locally integrable, so it defines a distribution by integration, and its derivative, also a distribution, satisfies
$$
u'(x) = \begin{cases}
\frac{1}{x} & (x<0) \\
\frac{2}{x} & (x>0)
\end{cases}
$$
