# Square with variable $x$ inside

I am learning about how to calculate the length of a path with integration. The equation is:

$$\sqrt{1+\Big (\frac{dy}{dx} \Big)^2}$$

So I have to integrate it between $a$ and $b$. In my book I have an example, I understand it but don't know how he solved this:

$$\sqrt{\frac{1}{4} \times (x^4 + 2 + \frac{1}{x^4})}$$

for which the result after eliminating the square root is:

$$1/2 \times (x^2 + \frac{1}{x^2})$$

I know that $\sqrt{1/4} = 1/2$ but I can't understand how the rest is solved.

-
Don't really see any integrals or equations, but note that $x^4 + 2 + \frac 1 {x^4} = (x^2+\frac 1 {x^2})^2$ – davin Jun 21 '12 at 15:28
@Andres : "Equation" is not the right word; the expression you have there is not an equation. Also, "solve" is not the right word. One solve problems; one solves equations; one evaluates or finds or simplifies expressions. – Michael Hardy Jun 21 '12 at 17:20

This is a special case of the familiar identity $$a^2+2ab+b^2=(a+b)^2,$$ with $a=x^2$ and $b=\frac{1}{x^2}$. That makes the "middle" term $2ab$ equal to $2$.
The easiest way to see things is probably to work backwards, and expand $$\left(x^2+\frac{1}{x^2}\right)^2.$$
Remark: In most cases, if we take a function $y$, and calculate $\sqrt{1+\left(\frac{dy}{dx}\right)^2}$, we get something ugly that cannot be integrated in terms of elementary functions. So arclength problems often involve fairly artificial functions $y$ for which $\sqrt{1+\left(\frac{dy}{dx}\right)^2}$ magically happens to simplify.