What do I have wrong? graph function from math input

I’m trying to get serious about learning some CL, but the amount of time I’ve spent trying to figure this out does not bode well… LOL! I’m sure it’s something really simple.

I want the student to enter their inverse function in the math input, and then it will appear on the graph. It isn’t appearing on the graph.

I tried to follow the example here, but clearly I’m missing something… :thinking: thanks for any help you can offer!

It looks like simpleFunction doesn’t like the inverse function notation in the same way that a calculator cell doesn’t like that input. (I also changed the graph to have the cell y=f(x), but I don’t know if that was relevant. I forgot what it was before.) Perhaps @Jay can offer some alternative method.

1 Like

Aghh… yes, I see what you mean! I changed the initialLatex to have it say f(x)= and that seemed to be the trick, it works. I didn’t think that starting text in the box was anything more than a “label” so I figured it could be whatever I wanted it to be. I wonder if there’s a way to make it work? I could do a workaround by making it a table instead (I think?) but I really like the way it looks as designed.

I was not sure about exactly what the line in the graph needed to be. In the sample I was using as a guide, there is a line for f(x) and another line that defines f(x) as a graph that is never visible - I’m not sure why? It looks like just having “f(x)” in the graph works fine, from my new testing.

OK, I’ve made some edits with a 2nd and 3rd screen. I believe that the link I used above now points to the updated version. 2nd screen works as I originally intended, but it says “f(x)=” in the math input instead of f^-1. :confused: I suppose I could change the prompt to something like “let f(x) be the inverse of g(x)…” but that it more convoluted.

On screen 3, I do it with a table instead. That works, but again, I prefer my original plan. Would still love to know if there is a way to make it work!