Thought I’d put this in it’s own thread. I made a way to check for transformations in function notation basically by ‘tricking’ Desmos into thinking f is a variable, and then calculating student values of a, h, and k.
(Updated link with dashboard checkmark functioning)
@Daniel_Grubbs, this was really cool. Thanks for thinking through that and sharing with all of us.
One modification I made was to get rid of the parseEquation in favor of accepting an expression like f(x)+1 to graph. It wasn’t as intuitive to me that you wanted g(x)= until I peeked under the hood of your CL
eq1=simpleFunction(Input.latex,“f”,“x”)
One thing I think I’ve noticed here is that it seems like I can’t create horizontal stretches/compressions. Is that right, or am I missing something?
Just a word of caution for anyone who’s using this for transformations.
It’s intended to be a transformation in function notation, so the function f(x) (in blue) is to be mapped to g(x) in red (though it shouldn’t matter if you use h(x)). I had to use parseEquation because simpleFunction alone wasn’t accepting function notation if you enter g(x)=.
The answer for the example should be: g(x)=-f(x-1)+7
It should work for stretches and compressions if using function notation.
Thanks for setting me straight. I appreciate the example and initialLatex in there now
I am attaching a video of what I see when I try to enter -f(x) and f(-x). I see the same thing (a reflection across the x-axis), which I was not expecting. I can get vertical stretch/compression to appear, but I don’t see horizontal stretch/compression. Am I missing something here?
Thanks for looking into that with me. This manipulation to get function notation accepted is very helpful. Thank you for running with the idea and sharing out!
@Daniel_Grubbs I’m trying to do the reverse of what you posted (also, whoa), let the kids move the vertex around, test their input against it.
Right now my script grabs h, k from the graph and (is failing to) make functions that I can test at two separate points using simpleFunction() and evaluateAt().
My debugging tells me that my h, k values are undefined, but that’s the point that’s getting dragged around in the graph…
*edit: anseq doesn’t like having | in the simpleFunction(). How could I indicate absolute value without that? \abs, \mod, \mid, & \vert don’t work either…
Since the CL isn’t playing nicely for you, why not do all your calculations in the graph? Since anseq is basically g(x) in the graph, just make variables there equivalent to g(0) and g(1) and reference those in your CL.
Just FYI, you can reference numbers from graphs directly in other components. You don’t need to make a variable in the CL first. You have ans1 and ans2 in your graph CL, which you then reference for ansval1 and 2 in your math input. You can be more direct:
Have you put any thought into how you might modify your activity here to accommodate for a horizontal stretch/compression? I’ve spent the last 45 minutes thinking about it, and I’m not sure that it is possible, at least not with how you’ve defined a, h, and k.
I’ve tried to figure it out. There’s just too many variables interacting to solve for b. Perhaps the beta pattern constructors in the CL documentation might work, but I haven’t fiddled with those yet.
@Daniel_Grubbs thanks for connecting me with this thread! I looked at what you had done and got excited. Then I realized that you are not actually graphing what is typed, but working out the values of a, h, and k based on the output that comes. I wish I could just assign it to a function to draw the graph, I’m trying to include horizontal stretching and flipping as well. You mentioned something about beta patterns, but I have no idea what that is, and can’t find the documentation for it.
Well, by defining the a, h, and k you can define a function for graphing within the graph:
h(x)=af(x-h)+k
The Desmos calculator accepts function form, but you can’t do it through CL, which is why I defined those variables.
Edit: It is graphing, but not directly. I’m kind of tricking the CL into recognizing function notation by defining those variables, which is why the other transformations become difficult because you can’t really solve for them. I still haven’t messed with pattern matching for this in particular yet.