Solving $x^2+\frac{81x^2}{(9+x)^2}=40$ 
Solve the following equation:
$$x^2+\dfrac{81x^2}{(9+x)^2}=40$$

Unfortunately I have no ideas because after expanding I get an equation of 4 degree.
 A: $$x^2+\dfrac{81x^2}{(9+x)^2}=40\text;$$
$$x^2-\frac{18x^2}{x+9}+\frac{81x^2}{(x+9)^2}+\frac{18x^2}{x+9}=40\text;$$
$$\left( x-\frac{9x}{x+9}\right)^2+\frac{18x^2}{x+9}=40\text;$$
$$\left( \frac{x^2}{x+9}\right)^2+\frac{18x^2}{x+9}=40\text.$$
Let
$$\frac{x^2}{x+9}=t\text.$$
Then
$$t^2+18t-40=0\text.$$
Then
$$t=-20\quad\text{or}\quad t=2\text;$$
$$\frac{x^2}{x+9}=-20\quad\text{or}\quad\frac{x^2}{x+9}=2\text;$$
$$x^2+20x+180=0\quad\text{or}\quad x^2-2x-18=0\text;$$
$$x=1\pm\sqrt{19}\text.$$
Addition:

Solve the following equation $A^2(x)+B^2(x)=c$, where $A(x)-B(x)=A(x)B(x)$
Then
$$A^2(x)-2A(x)B(x)+B^2(x)+2A(x)B(x)=C$$
$$(A(x)-B(x))^2+2A(x)B(x)=c$$
Then $A(x)-B(x)=A(x)B(x)=t$

For example:

*

*$x^2+\left(\frac x{x-1}\right)^2=8$;

*$x^2+\left(\frac x{2x-1}\right)^2=2$;

*$\left(\frac x{x-1}\right)^2+\left(\frac x{x+1}\right)^2=90$;

*$x^2+\frac{25x^2}{(5+2x)^2}=104$;

*$x^2+\left(\frac x{x+1}\right)^2=3$;

*$\left(\frac{x-1}x\right)^2+\left(\frac{x-1}{x-2}\right)^2=\frac{40}9$;

*$x^2+\frac{4x^2}{(x+2)^2}=5$.

A: Here is another way to solve it.
Fully expanding it gives:
$$x^2(9+x)^2 + 81x^2 = 40(9+x)^2$$
$$(x^2-40)(9+x)^2 + 81x^2 = 0$$
$$(x^2-40)(81+18x+x^2)+81x^2 = 0$$
$$x^4+18x^3+122x^2-720x-3240=0$$
Important step:
$$(x^2-2x-18)(x^2+20x+180)=0$$
The last step is tricky but if you assume that a factorization of the form exists:
$$(ax^2 + bx + c)(dx^2 + ex + f) = 0$$
then mapping the coeffeicients to the corresponding powers of x gives:
$$ (ad)x^4 + (ae + db)x^3 + (af + dc + be)x^2 + (bf + ec)x + fc = 0$$
You have the following equations to solve:
$$ (a*d) = 1 $$ 
a=d=1 (or -1) for simplicity
So we have 4 equations and 4 unknowns
$$ (e+b) = 18 $$
$$ (f + c + be) = 122 $$
$$ (b*f + e*c) = -720$$
$$ (f*c) = -3240 $$
These are tough and long to solve by hand but eventually you get:
$$a = 1, b = -2, c = -18, d = 1, e = 20, f = 180$$
