# Expressing a certain expression as a given variable

Now $$\dfrac{x}{x^2+x+1}=a$$ is known, I want to express the $$\dfrac{x^2}{x^4+x^2+1}$$ in the forms of a, how should I do it?

The answer is $$\dfrac{a^2}{1-2a}$$, and there is a limitation of $$-1\leq a \leq \dfrac{1}{3}$$, of course.

• Another function Eliminate: Eliminate[{y == x^2/(x^4 + x^2 + 1),x/(x^2 + x + 1) == a},x] gives a^2 + 2 a y == y. Aug 15 at 2:34
• @lilyric Thanks. Then Solve[a^2 + 2 a y == y, {y}, Reals] will give the form I want. Aug 15 at 2:38

We can solve y and eliminate x.
Solve[{y == x^2/(x^4 + x^2 + 1),

• @ThomasPeng Clear[x, y, a]; Solve[{y == x^2/(x^4 + x^2 + 1), x/(x^2 + x + 1) == a}, y, {x}] // Simplify Aug 15 at 2:35
• @ThomasPeng Clear[x, y, a]; Solve[{y == x^2/(x^4 + x^2 + 1), x/(x^2 + x + 1) == a}, y, {x}, Method -> Reduce] // Simplify Aug 15 at 2:36