Find the value of $x$ in the displayed figure Find $x$ in the following figure.

$AB,AC,AD,BC,BE,CD$ are straight lines.
$AE=x$, $BE=CD=x-3$, $BC=10$, $AD=x+4$
$\angle BEC=90^{\circ}$, $\angle ADC=90^{\circ}$
NOTE: figure not to scale.

By the Pythagorean theorem we have
$$\begin{equation*}
CE=\sqrt{10^{2}-\left( x-3\right) ^{2}}=\sqrt{91-x^{2}+6x}
\end{equation*}$$
and
$$\begin{equation*}
CD^{2}+AD^{2}=AC^{2}=\left( CE+AE\right) ^{2}
\end{equation*}.$$
So we have to solve the following irrational equation
$$\begin{equation*}
\left( x-3\right) ^{2}+\left( x+4\right) ^{2}=\left( \sqrt{91-x^{2}+6x}
+x\right) ^{2},\tag{1}
\end{equation*}$$
which can be simplified to
$$\begin{equation*}
x^{2}-2x-33=\sqrt{-x^{4}+6x^{3}+91x^{2}}.
\end{equation*}$$
After squaring both sides and grouping the terms of the same degree we get the quartic equation 
$$\begin{equation*}
2x^{4}-10x^{3}-153x^{2}+132x+1089=0.\tag{2}
\end{equation*}$$
The coefficient of $x^{4}$ is $2=1\times 2$ and the constant term is $1089=1\times 3^{2}11^{2}$. To find possible rational roots of this equation, we apply the rational root theorem and test the numbers of the form 
$$\begin{equation*}
x=\pm \frac{p}{q},
\end{equation*}$$
where $p\in \left\{ 1,3,9,11,33,99,121,363,1089\right\} $ is a divisor of $1089$ and $q\in \left\{ 1,2\right\} $ is a divisor of $2$. It turns out that $x=3$ and $x=11$ are roots. Now we divide the LHS by $x-3$
$$
\begin{equation*}
\frac{2x^{4}-10x^{3}-153x^{2}+132x+1089}{x-3}=2x^{3}-4x^{2}-165x-363
\end{equation*}$$
and this quotient by $x-11$
$$\begin{equation*}
\frac{2x^{3}-4x^{2}-165x-363}{x-11}=2x^{2}+18x+33.
\end{equation*}$$
So we have the equivalent equation
$$\begin{equation*}
\left( x-3\right) (x-11)\left( 2x^{2}+18x+33\right) =0\tag{3}
\end{equation*}$$
Since the solutions of $2x^{2}+18x+33$ are both negative and $x=3$ is not a solution of the original irrational equation, the solution is therefore $$x=11.
$$
