# The inverse of a function

#### Integrator

Hello all,

A high school problem:

Which is the inverse of the function $$\displaystyle f(x)=-x+\log_3 x$$ , where $$\displaystyle x>0$$?

All the best,

Integrator

Last edited:

#### skipjack

Forum Staff
Did you invent this problem? The domain needs to be further restricted for $f(x)$ to be invertible.

#### Integrator

Did you invent this problem? The domain needs to be further restricted for $f(x)$ to be invertible.
Hello,

The problem is from another forum and I do not know to solve it ...
I do not understand!The domain is $$\displaystyle x>0$$ is not sufficient?Thank you very much!

All the best,

Integrator

#### romsek

Math Team
Hello,

The problem is from another forum and I do not know to solve it ...
I do not understand!The domain is $$\displaystyle x>0$$ is not sufficient?Thank you very much!

All the best,

Integrator
just graph the thing and you'll see it's modal on x>0

#### skipjack

Forum Staff
The domain is $$\displaystyle x>0$$ is not sufficient?
With that domain, $f(x)$ isn't invertible. For $f(x)$ to be real, $x > 0$ is needed anyway.

Were various choices offered for the answer? If so, what were they?

#### Maschke

...
The question is how to get that and what it even means.

For one thing, as has been pointed out, $- x + \log x$ isn't injective so it's not clear even what it means for it to have an inverse. But as the Wolfram Alpha picture shows, you can certainly reflect the graph in the line $y = x$. So the first thing is to properly define the functional inverse in this case.

By the way I'm using $\log$ as the natural log and ignoring the base 3 so that there's one less irrelevant detail.

The trick to get this line of reasoning off the ground is that $e^{-x + \log x} = x e^{-x}$, which should look somewhat familiar. The function $x e^x$ is strictly increasing for $x \geq 0$ and therefore has an inverse, though not an elementary one. Its inverse is defined as the Lambert W function.

Now the idea is to use this to get Wolfram's answer. You have to account for the $- x$ and at some point undo the exponentiation. I've made some progress but not enough.

This is of course no high school problem. Not in my high school anyway!

Last edited:

#### Integrator

The question is how to get that and what it even means.

For one thing, as has been pointed out, $- x + \log x$ isn't injective so it's not clear even what it means for it to have an inverse. But as the Wolfram Alpha picture shows, you can certainly reflect the graph in the line $y = x$. So the first thing is to properly define the functional inverse in this case.

By the way I'm using $\log$ as the natural log and ignoring the base 3 so that there's one less irrelevant detail.

The trick to get this line of reasoning off the ground is that $e^{-x + \log x} = x e^{-x}$, which should look somewhat familiar. The function $x e^x$ is strictly increasing for $x \geq 0$ and therefore has an inverse, though not an elementary one. Its inverse is defined as the Lambert W function.

Now the idea is to use this to get Wolfram's answer. You have to account for the $- x$ and at some point undo the exponentiation. I've made some progress but not enough.

This is of course no high school problem. Not in my high school anyway!
Hello,

Some say the function is not invertible...
Thank you very much!

All the best,

Integrator

#### Maschke

Some say the function is not invertible...
Yes since it's not injective it's not invertible in the traditional sense.

But its graph can be reflected in the line $y = x$ and apparently if one is clever one can work out Wolfram's answer from the W function insight. So the problem is to (1) define what inverse means in this context and (2) work out the algebraic manipulations to get Wolfram's answer.

• 1 person

#### skipjack

Forum Staff
Let $\text{W}$ denote the Lambert W function.

Let $y$ denote the inverse of the function $-x + \log_3(x)$ with domain (0, 1],
then $x = -y + \log_3(y) = -y + \ln(y)/\!\ln(3)$, where $x \leqslant -1$ and $0 < y \leqslant 1$,
so $\ln(3)x = -\ln(3)y + \ln(y)$,
which implies $3^{\large x} = ye^{-\large\ln(3)y}$,
and so $-\ln(3)3^x = -\ln(3)ye^{-\large\ln(3)y}$.
Hence $-\ln(3)y = \text{W}\!\left(-\ln(3)3^{\large x}\right)$,
i.e. $y = -\text{W}\!\left(-\ln(3)3^{\large x})/\!\ln(3\right)$.

If $x \geqslant 1$, the inverse is $-\text{W}_{-1}\!\left(-\ln(3)3^{\large x})/\!\ln(3\right)$.

(I've omitted some justification of the above.)

• 3 people