Having problems finding $x$ in terms of $a$ and $b$. I have attempted this question but have not found a solution. I am currently stuck. Hints on how I may go further would be helpful. Thank You in advance.
The Question:
$$\frac{a^2b}{x^2} + \left(1+\frac{b}{x}\right)a = 2b+ \frac{a^2}{x}$$
What I have done so far that I believe is correct:
$$\frac{a^2b}{x^2} + \frac{ab}{x} + a = 2b+ \frac{a^2}{x}$$
If you would like to see other work that I have attempted on this question I can also place it up. 
 A: Bring $a\left(1+\frac{b}{x}\right)+\frac{a^2b}{x^2}$ together using the common denominator $x^2$. Bring $2b+\frac{a^2}{x}$ together using the common denominator $x$:
$$
\frac{a^2b+abx+ax^2}{x^2}=\frac{a^2+2bx}{x}.
$$
Now cross multiply:
$$
x(a^2b+abx+ax^2)=x^2(a^2+2bx).
$$
Then expand out the terms of the left- and right-hand sides:
$$
a^2bx+abx^2+ax^3=a^2x^2+2bx^3.
$$
Now subtract $a^2x^2+2bx^3$ from both sides to get
$$
a^2bx-a^2x^2+abx^2+ax^3-2bx^3=0.
$$
Collect everything in terms of $x$:
$$
a^2bx+x^2(ab-a^2)+x^3(a-2b)=0.
$$
Now notice that the left-hand side factors into a product with three terms:
$$
x(a-x)(ab-ax+2bx)=0.
$$
Split this into three equations:
$$
a-x=0\quad\text{or}\quad x=0\quad\text{or}\quad ab-ax+2bx=0.
$$
Simple manipulations to these three equations shows that
$$
x=a\quad\text{or}\quad x=0\quad\text{or}\quad x=-\frac{ab}{2b-a}.
$$
By the original expression, we know that $x\neq 0$; thus, the final answer is
$$
x=a\quad\text{or}\quad x=-\frac{ab}{2b-a}.
$$
A: You must have $x \ne 0$, so pose: $y=\dfrac{1}{x}$ and the equation become:
$$
a^2by^2+a(b-a)y+a-2b=0
$$
the discriminat is:
$$
\Delta= a^2(b-a)^2-4a^2b(a-2b)= a^2(a-3b)^2
$$
and the solutions:
$$
y=\dfrac{a(a-b)\pm a(a-3b)}{2a^2b}
$$
and so:
$$
x= \dfrac{2a^2b}{a(a-b)\pm a(a-3b)}
$$
and now you can discute for which value of $a$ and $b$ you have no solutions ($a=0$) , one solution ($a=3b$) or two solutions.
A: Take the equation:
$$\frac{a^2b}{x^2} + \frac{ab}{x} + a = 2b+ \frac{a^2}{x}$$
Multiply each side by $x^2$:
$$a^2b+abx+ax^2=2bx^2+a^2x$$
Subtract $2bx^2+a^2x$ from each side:
$$a^2b+abx+ax^2-2bx^2-a^2x=0$$
Rearrange it as a quadratic equation:
$$(a-2b)x^2+(ab-a^2)x+(a^2b)=0$$
And solve as you would any quadratic equation:
$$x_{1,2}=\frac{-(ab-a^2)\pm\sqrt{(ab-a^2)^2-4(a-2b)(a^2b)}}{2(a-2b)}$$
