# Wrong sign on the final answer, where did I go wrong? Algebra

$12x^2-12x = 0$
This was suppose to be 18, but it is -18.

I think it is because of how I modified one of the factors.
$\sqrt{x^2+x^2}$
$\sqrt{2x^2}$
$\sqrt{2}\cdot \sqrt{x^2}$
$x\sqrt{2}$
If I let wolfram do this, it gives the same but it says "assuming X is positive". Isn't that redundant? Any negative number squared is positive? The problem could be with the other factor that I modified.
$\sqrt{(6-x)^2+(6-x)^2}$
$x\sqrt2 -6\sqrt2$

To sum it up:
$x\sqrt2(x\sqrt2-6\sqrt2) = 2x^2-12x$
It should be $-2x^2+12x$, because that would indeed give positive 18 as it's answer.

Update! With all the info!

The task is to find x such that the area of the rectangle would be as big as possible. I used the Pythagorean theorem and wrote out the following equation.
$\sqrt{(6-x)^2+(6-x)^2} \cdot \sqrt{x^2+x^2} = A$ of the rectangle.
The left factor would be the long side of the rectangle and the right factor would be the short side. I need to write this out nicely and then find when the derivative is 0. For max area.

-
It looks as if you are trying to find the solutions of a certain equation. Unfortunately, that equation is not explicitly stated. I assume it cannot be the first equation that you wrote down, namely $12x^2-12x=0$, since certainly you know how to solve that. It would help if you gave the equation or problem you are trying to solve. –  André Nicolas Oct 19 '11 at 7:38
@AndréNicolas updated as requested! :) –  Algific Oct 19 '11 at 7:55

As you point out, by the Pythagorean Theorem, the area of the rectangle can be written as $$\sqrt{2x^2}\sqrt{2(6-x)^2}.$$

Note that from the geometry, we have $0 < x < 6$. It follows that $\sqrt{2x^2}=\sqrt{2}\;x$ and $\sqrt{2(6-x)^2}=\sqrt{2}\;(6-x)$.

Thus, if $A(x)$ is the area, then $$A(x)=2x(6-x).$$

(Incidentally, we can find the area in a more basic way. The two triangles at the Northeast and Southwest have combined area $x^2$, and the other two triangles have combined area $(6-x)^2$, for a total of $x^2+(6-x)^2=2x^2-12x+36$. We can now minimize this, or subtract from $6^2$ and conclude that $A(x)=12x-2x^2$.)

Maximize, using any of the standard tools. We could use the calculus, but in part because of the precalculus tag, we complete the square. We have $$A(x)=-2(x^2-6x)=-2((x-3)^2+9=18-2(x-3)^2.$$ The maximum is reached when $(x-3)^2=0$, that is, when $x=3$. The value of the area at $x=3$ is $18$.

Comment on error: The mistake in the post was in the simplification of $\sqrt{(6-x)^2+(6-x)^2}$. You obtained $x\sqrt{2} -6\sqrt{2}$, and the correct value is $6\sqrt{2}-x\sqrt{2}$. The expression $x\sqrt{2}-6\sqrt{2}$ cannot be right, since for $\;0<x <6$, it gives a negative number. Maybe if you had written it as $\sqrt{2}(x-6)$ the mistake would have become obvious.

We are trying to find a certain length, the square root of $2(6-x)^2$. The square root of any (non-negative) number is non-negative.

A rule that one might want to remember is that $\sqrt{a^2}=|a|$. So our square root is $\sqrt{2}|6-x|$. Since $0 \le x \le 6$ by the geometry, $|6-x|=6-x$.

-

$b^2=2(6-x)^2 \Rightarrow b=\sqrt{2}(6-x)$

$a^2=2x^2 \Rightarrow a=\sqrt{2}x$

$A=ab \Rightarrow A=2(6x-x^2)\Rightarrow A'_x=2(6-2x)$

$A'_x=0\Rightarrow x=3 \Rightarrow A=18$

-