# How to write the expression?

How to write this expression in LaTeX?

Mathematics teacher's hat on. Can you point to some real world mathematical problem that leads to consider such a beast? I'm sure you can't. If you plan to inflict this to some student, please, don't. Mathematics teacher's hat off.

I'll assume it's just academic interest to explore the possibilities of TeX.

It's actually straightforward. A few points to note:

1. with delarray we can make the fences as high as the expression;
2. \vphantom{\Big|} is used to move the big exponent a bit higher;
3. a handful of thin spaces helps to control the spacing;
4. an optional argument needs surrounding braces, because of the nested \sqrt with an optional argument.
\documentclass{article}
\usepackage{amsmath,delarray}

\begin{document}

$\begin{array}\lbrack{@{}c}\rbrack \!\!\sqrt[{\sqrt[\sqrt{3}]{\sqrt{3}}}]{ (3\sqrt{3})^{\vphantom{\Big|}\! \sqrt[\sqrt{3}]{ \sqrt{3}^{\sqrt{3}+1} } } } \end{array}^{\sqrt{3}}$

\end{document}


\documentclass{article}
\usepackage{amsmath}
\newcommand{\ifrac}[2][]{\genfrac{}{}{0pt}{}{#2}{#1}}
\begin{document}
$\left[\sqrt[{\sqrt[{\sqrt{3}}]{\sqrt{3}}}]{(3\sqrt{3})} \ifrac[\vphantom{\sqrt{3}}]{\sqrt[{\sqrt{3}}]{\sqrt{3}\ifrac{\sqrt{3}+1}}} \right]^{\sqrt{3}}$
\end{document}


The following gives the expected result,

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\left[ \sqrt[{\sqrt[\sqrt{3}]{\sqrt{3}}}]{% {(3\sqrt{3})}^{\sqrt[\sqrt{3}]{{\sqrt{3}}^{\sqrt{3}+1}}}% } \right]^{\sqrt{3}}$
\end{document}


I'm not sure why, but LaTeX will throw an Argument of \@sqrt has an extra } error if the root index \sqrt[\sqrt{3}]{\sqrt{3}} is not surrounded by extra curly braces.

• About your last note: see egreg's 4th point in his answer; If you input \sqrt[\sqrt[3]{x}]{x}, the first \sqrt will grab its optional argument delimited by the [ and the next ], which ends up being \sqrt[3, and then you can see where this goes. Adding braces makes the outermost \sqrt grab the correct argument. See here: tex.stackexchange.com/a/515152/134574 – Phelype Oleinik Feb 1 at 21:18