Overbrace on Powers

How can I make an overbrace on powers without it being buggy. Example:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amstext}
\usepackage[brazil]{babel}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{subfigure}
\usepackage{latexsym}
\usepackage[normalem]{ulem}
\usepackage[all]{xy}
\usepackage{epsfig}
\usepackage{pgf}
\usepackage{yhmath}
\usepackage{mathdots}
\usepackage{MnSymbol}

\begin{document}

\begin{array}{ccc}

\end{document}


• Hello egreg. Can you explain a little your code? Why do two extra macros have to be used? Jul 29 at 17:23
• @projetmbc I need to pass three arguments to \mathpalette, but it only accepts two: \mathpalette wants as arguments a two-argument macro and the material to be processed. The first argument to the two-argument macro is automatically supplied and is \displaystyle and so on. So I delegate the job to a three-argument macro. See tex.stackexchange.com/a/34412/4427 Jul 29 at 17:27
• I'll try this solution here and I'll give you the feedback. Jul 29 at 17:45
• Unfortunately, it didn't work. I'll leave it like that because it is just a solutions file I'm making for myself. Thank you very much for the time spent trying to help me, the effort is greatly apreciated! Jul 29 at 17:49

I cannot reproduce your picture. Below is my picture generated from your example:

• To be fair, on close examination, I do see a discontinuity between the linear portion and the curved part of the brace also in your example (although consistent in all three cases). But that may just be dependent on the pdf-reader. Jul 29 at 16:46
• But the output is very wrong, don't you agree? Jul 29 at 16:46
• Thank you very much for the feedback! I don't know why it is so broken in my compilation. Jul 29 at 17:39
• @MatthiasArras, Sharp eyes!! The discontinuity is probably caused by my pdf-reader. It disappeared when I further magnified the picture. Jul 29 at 21:14
• @egreg, Indeed. Your answer is much better. Jul 29 at 21:14