# Math Help - logarithm as exponent

1. ## logarithm as exponent

How do I enter a logarithm as an exponent?

2. Originally Posted by alyosha2
How do I enter a logarithm as an exponent?
$$x^{log_b (x)}$$ gives $x^{log_b (x)}$

3. when using

x^{log n-1}

$
x^{log n-1}
$

how do i keep the space beween log and n?

4. Originally Posted by alyosha2
how do i keep the space beween log and n?
Use "\log" instead of "log" : x^{\log n-1} gives $x^{\log n-1}$. However $\log n-1$ is ambiguous because it can mean $\log (n)-1$ or $\log(n-1)$ ; you'd better add parenthesis.

5. you can also type \; to make a space

e.g. x^{log\;n-1} $=x^{log\;n-1}$

6. Originally Posted by Stroodle
you can also type \; to make a space

e.g. x^{log\;n-1} $=x^{log\;n-1}$
or "~" or "\ ", or ...

I have four different space codes for math mode on my quick reference card, and I know that that list is not exhaustive.

CB

7. \, (backslash + comma) gives a small space, \ (backslash + space) gives a medium space while \quad gives a large space.

Code:
a \, b
a \ b
a \quad b
$a\,b$
$a\ b$
$a\quad b$

The small space is particularly useful for formatting integrals:

Code:
\int \sin x \, dx
$\int\sin x\,dx$
certainly looks neater than $\int\sin xdx.$