# Plot inverse function Mathematica

• Mathematica
I want to plot inverse function using Mathematica
Code:
In:=f = Solve[x == a * Log[y/100], y]

Out = {{y -> 100 E^(x/a)}}
and then? how to use this reult to plot?

Thanks

Another question is about the axeslabel, when I set the Frame->True, the AxesLabel can not be displayed correctly, where the label of x-coordinate is correct, but that of y-coordinate is missing, How to solve this problem?

thanks again

Last edited:

Hepth
Gold Member
You can strip out the result from the brackets:

Code:
In:= f = Solve[x == a*Log[y/100], y]
Out= {{y->100 E^(x/a)}}
In:= F = f[][][]
Out= 100 E^(x/a)

Then Plot[F,{x,-3,3}] to plot. (assuming you have a value for "a")

Hepth
Gold Member
Also, once you use "Frame-> True" you need to change your "AxisLabel" to a "FrameLabel". That should solve it.

You can strip out the result from the brackets:

Code:
In:= f = Solve[x == a*Log[y/100], y]
Out= {{y->100 E^(x/a)}}
In:= F = f[][][]
Out= 100 E^(x/a)

Then Plot[F,{x,-3,3}] to plot. (assuming you have a value for "a")

I am completely a beginner therefore I would like to ask what you did in the In.. i mean what is the philosphy behind it..

Yannis

Hepth
Gold Member
ok:
209: I set f is the solution set {{y->100 ...}} etc
212: I basically say, take the 2nd component of the 1st component of the 1st component of "f"

So you have :
{{y->100 E^(x/a)}}[] = {y->100 E^(x/a)}
{{y->100 E^(x/a)}}[][] = y->100 E^(x/a)
{{y->100 E^(x/a)}}[][][] = 100 E^(x/a)

Basically the {}{} brackets are like a set, or table. And since its doubly thick {{X-> Y}} You need to pull out "Y".
the [] and [] takes the first or second or whatever value of the set preceeding it.
{1,2,3,4,3,2,1}[] = 3 (indexed the 5th component)

If there were two solutions you would get to choose. Notice:

In:= f = Solve[x^2 == 4, x]
Out= {{x->-2},{x->2}}
In:= f[]
Out= {x->-2}
In:= f[]
Out= {x->2}

ok:
209: I set f is the solution set {{y->100 ...}} etc
212: I basically say, take the 2nd component of the 1st component of the 1st component of "f"

So you have :
{{y->100 E^(x/a)}}[] = {y->100 E^(x/a)}
{{y->100 E^(x/a)}}[][] = y->100 E^(x/a)
{{y->100 E^(x/a)}}[][][] = 100 E^(x/a)

Basically the {}{} brackets are like a set, or table. And since its doubly thick {{X-> Y}} You need to pull out "Y".
the [] and [] takes the first or second or whatever value of the set preceeding it.
{1,2,3,4,3,2,1}[] = 3 (indexed the 5th component)

If there were two solutions you would get to choose. Notice:

In:= f = Solve[x^2 == 4, x]
Out= {{x->-2},{x->2}}
In:= f[]
Out= {x->-2}
In:= f[]
Out= {x->2}

Great! Just on time since I was trying to do exaclty what u illustrate in your last example..thank u very much!!!!