# Inverse of a function

#### dttrapo

##### New member
Hello! I'm really struggling with this problem:

Find the inverse of g(x)=−2ln(7x+1)

I'm not sure which steps to take to figure out the inverse here. Any advice would be greatly appreciated!

#### Harry_the_cat

##### Senior Member
Let y = -2ln(7x+1)

Rearrange to get x = .... Can you do this step?

Interchange x and y.

Your new y will be the inverse of g(x).

#### HallsofIvy

##### Elite Member
Harry_the_cat suggests you solve for x, then swap x and y.
I tend to think "the other way around"- first swap x and y-
y= -2ln(7x+ 1) becomes x= -2ln(7y+1)
then solve for y. Of course it is exactly the same thing.

You "solve for" a variable by "undoing" whatever has been done to it. Here, the equation, x= -2 ln(7y+1), says that, given a value of y, to find x, we would
1) multiply by 7
2) add 1
3) take the logarithm
4) multiply by -2.

To "undo" we do the opposite of each step in the opposite order.
1) the opposite of "multiply by -2" is "divide by -2"
2) the opposite of "take the logarithm" is "take the exponential"
3) the opposite of "add 1" is "subtract 1"
4) the opposite of "multiply by 7" is "divide by 7".
And, of course, whatever we do to one side of the equation we must do to the other side.

So, starting with x= -2 ln(7y+1) we
1) divide by -2: x/(-2)= -x/2= ln(7y+ 1)
2) take the exponential: e^(-x/2)= 7y+ 1
3) subtract 1: e^(-x/2)- 1= 7y
4) divide by 7: (e^(-x/2)- 1)/7= y

g^-1(x)= (e^(-x/2)- 1)/7.

Perhaps it was the logarithm that was bothering you. Remember that the logarithm is defined as the inverse function to the exponential function, e^(ln(x))= x, and so the exponential function is the inverse function to the logarithm: ln(e^x)= x.

#### dttrapo

##### New member
It was definitely the logarithm that was tripping me up. I really struggle with them for some reason. I really appreciate all the help!