Functional equation: $ f : \mathbb R ^ * \to \mathbb R $ with $ \frac 1 x f ( - x ) + f \left( \frac 1 x \right) = x $ I tried to solve this problem:

Determine all function $ f : \mathbb R ^ * \to \mathbb R $ such that $ \forall x \in \mathbb R ^ * $
$$ \frac 1 x f ( - x ) + f \left( \frac 1 x \right) = x \text . $$

Basically I tried the classical way to substitute so I got this :
Let $ P ( x ) $ be the assertion above.

*

*$ P ( 1 ) $: we obtain $ f ( - 1 ) + f ( 1 ) = 1 $.

All what I know about this function is this information!
I don't know if there's another technique to simplify it or reduce it. Some help please!
 A: Take $x = 1/y$ to obtain
$$yf\left(- \frac1y \right) + f(y) = \frac 1y.$$
Next, take $x = -y$ to get
$$-\frac 1y f(y) + f\left( - \frac1y\right) = -y.$$
This is a system of linear equations in $f(y)$ and $f(-1/y)$. In particular, multiply both sides of the second equation by $-y$ to get
$$f(y) - yf\left(-\frac1y\right) = y^2,$$
from which adding with the first equation yields
$$2f(y) = y^2 + \frac1y,$$
or, substituting back in $x$,
$$f(x) = \frac12 \left(x^2 + \frac1x \right),$$
from which it should follow that this is the only function $f$ that satisfies the functional equation.
A: Fix $a \neq 0$. Then plugging in respectively $x = a$ and $x = -\frac{1}{a}$, we get,
\begin{align*}
\frac{1}{a}f(-a) + f\left(\frac{1}{a}\right) &= a \\
-af\left(\frac{1}{a}\right) + f(-a) &= -\frac{1}{a}.
\end{align*}
This is a system of linear equations in terms of unknowns $x = f(-a)$ and $y = f\left(\frac{1}{a}\right)$, represented by the following augmented matrix
$$\left[\begin{array}{cc|c}\frac{1}{a} & 1 & a \\ 1 & -a & -\frac{1}{a}\end{array}\right].$$
Row reducing, we get
$$\left[\begin{array}{cc|c}1 & 0 & \frac{1}{2}\left(a^2 - \frac{1}{a}\right) \\ 0 & 1 & \frac{1}{2}\left(a + \frac{1}{a^2}\right)\end{array}\right].$$
In particular, this implies
$$f(-a) = \frac{1}{2}\left(a^2 - \frac{1}{a}\right) \implies f(x) = \frac{1}{2}\left(x^2 + \frac{1}{x}\right).$$
