I need to be able to set f(x)
to user input in my program. For example the user inputs x^3-3
. Then later in the program, a transformation can be applied to the function by using something like f(2x)
. The output of f(2x)
would be 8*x^3-3
. I am having trouble doing this though. I get user input with something such as Input "Enter a function:", fx
and apply this value to the function with Define f(x) = fx
. Now I will illustrate the problem with this. If a user inputs something such as x^2-2
, if I call f(2x)
it just returns x^2-2
as if I called f(x)
. I have tried many things such as Define f(x) = expr(fx)
, Define f(x) = eval(fx)
, and even pre-defining f(x)
as x
, and using f(x)->f(fx)
, but none of these things worked. Is there a function that makes this work?
After a long time I realized that Ti-basic doesn't support function composition. There isn't really a way around it.