Logarithmic function in simpleFunction

I am creating an activity for students to connect exponential to logarithmic functions.
I have f=simpleFunction(“2^x”) for the exponential bit and it works perfect.

What is the equivalent for Log_2(x)?

Thank you very much

Hey @AlfonsoG ! Welcome to the forum!

The script you’re looking for is:


A bit of info about how to get here:

You can go to desmos.com/calculator and type in the expression you want. Copy-paste the line to CL and you will get something like "\log_{2}\left(x\right)"

But, this doesn’t quite work. Manipulating Latex in CL is a bit awkward, and currently requires “double-escaping” the slashes in the expression (we’re thinking about how to make this better). So from here, double up every slash, to get the expression above. You can see it working here:

Thank you very much Denis. I would have not found this in 10^6 years ; )