The diagram above illustrates a square divided into four different-colored triangles, three of them with numbers given as their respective areas.

What is the area of the whole square?

If your result can be expressed in the form $a\left(b + c\sqrt{d}\right),$ where $a,b,c,d$ are all positive integers, $\gcd(b,c) = 1,$ and $d$ is square-free, input $a + b + c + d$ as your answer.

The answer is 14.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Let $k$ be the side of the square, $l$ the bottom left side, $m$ the bottom right side, $n$ the right bottom side, $o$ the right top side.

Since, it's a square it's true that:

$l+m=k$ and $n+o=k$

$\frac{1}{2}kl=4\Rightarrow l=\frac{8}{k}$

$l+m=k\Rightarrow m=\frac{k^{2}-8}{k}$

$\frac{1}{2}mn=5\Rightarrow n=\frac{10k}{k^{2}-8}$

$n+o=k\Rightarrow o=\frac{k^{3}-18k}{k^{2}-8}$

$\frac{1}{2}ko=3\Rightarrow k\frac{k^{3}-18k}{k^{2}-8}=6\Rightarrow k^{4}-24k^{2}+48=0$

The discriminant is:

$D=24^{2}-4*48=384=64*6\Rightarrow \sqrt{D}=8\sqrt{6}$

$k^{2}=\frac{24\pm 8\sqrt{6}}{2}\Rightarrow$

$k^{2}=12\pm 4\sqrt{6}$

If we use the negative sign, we see that $k^{2}=4(3-\sqrt{6})\approx 2.2$

That can not be the case since $k^{2}$ is the area of the square which can not be less than 3.

Therefor:

$k^{2}=12+4\sqrt{6}\Rightarrow$

$k^{2}=4(3+\sqrt{6})$

So:

$\boxed{a=4}$ $\boxed{b=3}$ $\boxed{c=1}$ $\boxed{d=6}$

And the answer is $\boxed{14}$

Note: Sorry that i've skipped over some tedious algebra