5

I'm trying to type up a fairly annoying closed form, and I don't understand why it isn't letting me typeset it.

The equation is this:

$P_{n}=4\times\bigg(\dfrac{1}{2}\bigg)^{\big{\lfloor\frac{n+1}{2}\rfloor-1}}\times\bigg(2\bigg)^{\big{\frac{3-(-1)^{n}}{4}}}

When I place the \big command in the first index (when raising half to the power of the floor function), it works just fine. But when I do exactly the same to the next index, it returns the Missing delimiter (. inserted). error.

I tried looking into what that error means, but only seemed to be able to find answers specific to particular pieces of code. From what I gathered, the code is telling me that I need to put a . somewhere in order to nullify a delimiter, but I don't have any delimiters that need nullifying to my understanding; I need all of them!

Apologies for any un-neatness. This is only my second question and I'm still learning the TeX language.

Thanks for your time and patience,

Eliot.

1
  • It's most likely a missing right bracket (one tends to forget the right one rather in left-to-right writing ;-).
    – user31729
    Sep 21, 2014 at 8:09

2 Answers 2

4

Pretty annoying indeed. But I'd use the slashed form for 1/2 and \tfrac for the fractions in the exponents. However, this needs some corrections, because the exponent would hide the base, without them. So I propose to raise the exponents by some amount. In order to fix also the alignment of the fraction numerators, a \mathstrut is used for n+1 to compensate for the parentheses in (-1) in the other exponent. Finally, \bigl and \bigr are used for the floor parentheses because \left and \right would produce too big fences.

The auxiliary macro \makehigher pretends that the base is higher than its natural height by adding an invisible rule.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\makehigher}[2][3]{%
  {\rule{0pt}{#1ex}#2}%
}


\begin{document}
\[
P_{n}=4\cdot
\makehigher{(1/2)}^{\bigl\lfloor\tfrac{\mathstrut n+1}{2}\bigr\rfloor-1}\cdot
\makehigher{2}^{\tfrac{3-(-1)^{n}}{4}}
\]
\end{document}

Adjust the amount of raising (default 3ex) by using the optional argument; you could try \makehigher[2.5]{...}).

Here's a picture where I added also a rule to show that the fraction lines in the exponents are level with each other.

enter image description here

5

The macro \big "expects" an opening or closing 'item', e.g, ( ) [ ] \{ \} \langle \rangle. Writing \big{...} throws an error, as you've discovered.

However, from the comments you've posted, I understand that your objective is not to produce curly braces to surround the exponent but, rather, to enlarge the font size used in the exponent. Since first-level superscript (and subscript) material is set in \scriptstyle by default, you should specify \textstyle -- the next "math size" up from \scriptstyle -- at the start of the exponent material.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for \dfrac macro
\begin{document}
$P_{n}=4\times\biggl(\dfrac{1}{2}\biggr)^ {\textstyle \left\lfloor\frac{n+1}{2}\right\rfloor-1}
\times
\biggl(2\biggr)^{\textstyle\frac{3-(-1)^{n}}{4}}$
\end{document}
3
  • Thanks for the prompt reply. However, I'm not intending on having the curly brackets around the indices. The reason I had \big{ insert stuff here that will be typeset bigger } is precisely for the reason inside those brackets. My problem essentially, is that left alone, the indices are far too small to read as they are a bit complex. I just wanted to make the indices bigger so that my tutor can read them, haha.
    – Old mate
    Sep 21, 2014 at 8:24
  • Tried that - makes it too big :/
    – Old mate
    Sep 21, 2014 at 8:26
  • Ah, perfect. That seemed to work. Thank you very much for your patience.
    – Old mate
    Sep 21, 2014 at 8:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .