The author of my book writes:
$$x^2+1=x^2\left(1+\frac{1}{x^2}\right)$$
$$=\frac{1}{x^2}\left[1-\frac{1}{x^2}+\frac{1}{x^4}-\frac{1}{x^6}+\cdots\right]$$
I do not understand the last step. How did the author write the last step. Please help.
The author of my book writes:
$$x^2+1=x^2\left(1+\frac{1}{x^2}\right)$$
$$=\frac{1}{x^2}\left[1-\frac{1}{x^2}+\frac{1}{x^4}-\frac{1}{x^6}+\cdots\right]$$
I do not understand the last step. How did the author write the last step. Please help.
I don't think they are equal. As others have said $$ \frac{x^2}{1+x^2} = 1 - \frac{1}{x^2} + \frac{1}{x^4} \dots \text{ for } \left\lvert \frac{-1}{x^2} \right\rvert < 1 $$
so for $x = \sqrt{2}$
$$
\frac{1}{x^2} \left( 1 - \frac{1}{x^2} + \frac{1}{x^4} \dots \right) = \frac{1}{2} \left( \frac{2}{3} \right) = \frac{1}{3}.
$$
However $x^2+1 = 3 \neq \frac{1}{3}$.
I believe your author intended to write $$ \frac{1}{x^2+1}=\frac{1}{x^2\left(1+\frac{1}{x^2}\right)} \\ =\frac{1}{x^2}\left[1-\frac{1}{x^2}+\frac{1}{x^4}-\frac{1}{x^6}+\cdots\right] $$
Formula is not correct. Take the sum of a geometric series:
$$\sum_{i=0}^{\infty} ar^i=\frac{a}{1-r}$$
Lets work backward from your last equation:
$$\frac{1}{x^2}\left[1-\frac{1}{x^2}+\frac{1}{x^4}-\frac{1}{x^6}+\cdots\right]=\frac{1}{x^2}\left[\sum_{i=0}^{\infty} \left(\frac{1}{x^{4}}\right)^i-x^2\sum_{i=0}^{\infty} \left(\frac{1}{x^{4}}\right)^i+x^2\right]=$$
The two sums in the brackets are simply geometric sums with $r=\frac{1}{x^4}$, thus:
$$\left[\sum_{i=0}^{\infty} \left(\frac{1}{x^{4}}\right)^i-x^2\sum_{i=0}^{\infty} \left(\frac{1}{x^{4}}\right)^i+x^2\right]=\left[\frac{1}{1-\frac{1}{x^4}}-\frac{x^2}{1-\frac{1}{x^4}} +x^2\right]=\left[\frac{1-x^2+(1-\frac{1}{x^4})x^2}{1-\frac{1}{x^4}}\right]$$
The last equation simplifies to:
$$\left[\frac{1-\frac{1}{x^2}}{1-\frac{1}{x^4}}\right]=\frac{x^2}{1+x^2}\implies x^2+1=\frac{1}{x^2+1}???$$ This is not correct
You may write $$x^2 + 1 = x^2(1 + \frac{1}{x^2})$$
as $$\frac{1}{(1 + \frac{1}{x^2})} = \frac{x^2}{1 + x^2}$$
and $$\frac{1}{1 + \frac{1}{x^2}} = \sum_{n=0}^{\infty} \frac{(-1)^n}{x^{2n}}$$
Edit: To avoid any more downvotes, the author has made a mistake, clearly the equation does not hold, this was just an attemptive to reinterpret whatever the author's intention was.