2

I am using the following code:

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{gensymb}

\begin{document}

\begin{align*}
  x &= a^{\log_a (x)} \bigg\vert \ln () \\
  \Leftrightarrow \qquad \ln (x) &= \ln \left(a^{\log_a (x)} \right) \\
  \Leftrightarrow \qquad \ln (x) &= \log_a (x) \cdot \ln (a) \bigg\vert - \ln (a) \\
  \Leftrightarrow \qquad \frac{\ln (x)}{\ln (a)} &= \log_a (x) \right)
\end{align*}

\end{document}

to produce something close to an equivalent transformation, however it gives me the error

! Missing } inserted. } l.187 \end{align*} ?

I am sorry that this is such a basic and already often-asked question but I cannot seem to find the exact error.

1
  • 4
    Remove the last \right) that's misplaced.
    – egreg
    Sep 18, 2017 at 13:42

2 Answers 2

3

There's a spurious \right) at the end.

However, you may want a different way to present the thing:

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{gensymb}

\begin{document}

\begin{alignat*}{3}
&&                        x &= a^{\log_a (x)} &\qquad& \bigg\vert \ln () \\
&\Leftrightarrow \qquad & \ln (x) &= \ln (a^{\log_a (x)}) \\
&\Leftrightarrow \qquad & \ln (x) &= \log_a (x) \cdot \ln (a) &\qquad& \bigg\vert / \ln (a) \\
&\Leftrightarrow \qquad & \frac{\ln (x)}{\ln (a)} &= \log_a (x) 
\end{alignat*}

\begin{alignat*}{3}
&&                        x &= a^{\log_a (x)} &&\qquad\text{apply $\ln$} \\
&\Leftrightarrow \qquad & \ln (x) &= \ln (a^{\log_a (x)}) \\
&\Leftrightarrow \qquad & \ln (x) &= \log_a (x) \cdot \ln (a) &&\qquad\text{divide by $\ln(a)$} \\
&\Leftrightarrow \qquad & \frac{\ln (x)}{\ln (a)} &= \log_a (x) 
\end{alignat*}

\end{document}

I removed the \left and \right in the second line, that produces too big delimiters; normal size seems sufficient, but \bigl( and \bigr) may be good as well.

enter image description here

2
  • thank you, this is a way better way than what I originally tried. I have not yet heard of the alignat environment but it seems way more suitable for my needs, thank you.
    – user143732
    Sep 18, 2017 at 13:51
  • also thanks for correcting my - ln(a) to / ln(a) :D
    – user143732
    Sep 18, 2017 at 14:00
1

It appears to me that you have an extra \right at the end. Also, you have an extra parenthesis.

The following code compiles for me:

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{gensymb}

\begin{document}

\begin{align*}
  x &= a^{\log_a (x)} \bigg\vert \ln () \\
  \Leftrightarrow \qquad \ln (x) &= \ln \left(a^{\log_a (x)} \right) \\
  \Leftrightarrow \qquad \ln (x) &= \log_a (x) \cdot \ln (a) \bigg\vert - \ln (a) \\
  \Leftrightarrow \qquad \frac{\ln (x)}{\ln (a)} &= \log_a (x)
\end{align*}

\end{document}
1
  • Yes this code solves it. This will be the accepted answer. I am sorry I didn't see that for myself, thank you.
    – user143732
    Sep 18, 2017 at 13:46

You must log in to answer this question.