Compose more than two functions

I would like to compose four functions and graph it.
My function is here.
The error may have something to do with functions having a one variable output by default.
Is there a way to have a two (or more) variable output for intermediate functions T1, R, and T2 in the graph of 0 = F( T2 ( R ( T1 ( x,y ) ) ) ) .
Note that T1, R, and T2 represent plane transformations, which are functions from R^2 to R^2, and F is a function from R^2 to R.

Your transformations are points. You have to access the coordinates of points separately, so something more like this:
F(T_2(R(T_1(x,y).x,T_1(x,y).y).x,R(T_1(x,y).x,T_1(x,y).y).x.y).x, T_2... .y)
I tried it and don’t think it transforms quite how you want though.

Edit: I think T1 and T2 cancel each other out, and you only need one of them. Is this what you want?
https://www.desmos.com/calculator/xu9zcp3sk0

Edit2: And here’s more like @eric 's solution
https://www.desmos.com/calculator/f1iqlmwdzx

You can use points as arguments to functions, but it means you have to access the coordinates independently from within the functions. Here’s a version of what you had, re-written to use points as arguments: compositions

1 Like

Dear Daniel,
Thank you for the help. My goal was to rotate the parabola y = x^2 by 45° with the center of rotation (1,2). I am trying to finagle your solution, using the P.x , P.y idea. And yes, T1 and T2 are inverse transformations of the plane (also we could call them ‘coordinate rule’ transformations).

The strategy for the solution was to translate the plane so that the vertex of the parabola is at (1,2). Then rotate the plane 45°. Then translate the plane back to (0,0). Here is a link to the explicit solution , move the slider labeled ‘a’ Graphing Calculator

Why not use the explicit solution?

I wanted to rotate a parabola about a generic center of rotation, that was my ultimate goal. So that i can use the sliders change the position for the general center of rotation (h,k).

I changed your 1’s and 2’s to h’s and k’s and got this. If you want a student to see a in degrees, you could make a slider d from 0-45 and have a=d*pi/180.

https://www.desmos.com/calculator/mkrhkfuee1

1 Like

This is exactly what i wanted. Rotate the parabola y = x^2 about a general center of rotation (h,k) and angle ‘a’ , defined by sliders.
Nice and elegant code. Thanks a million.

Yes that works. I got the same explicit solution. Thanks Daniel.
Sorry if i led you on a goose chase.
My ultimate goal evolved into graphing the more general problem, (big thanks to eric for his code), without actually having to write out the explicit equation, namely rotating the parabola y = x^2 by the counterclockwise angle a , about the generic center of rotation (h,k), defined by the user and implemented by sliders (or entered manually).
https://www.desmos.com/calculator/2caplqknxt

And yes to find such an equation explicitly you would have to compose 4 functions which is a fun exercise.

By the way i was inspired to get that solution by this article, if you scroll down to ‘transformations’ http://www.geom.uiuc.edu/docs/reference/CRC-formulas/node3.html#eqsubs

Wow… once again i am in awe of desmos capability.

I can’t wait when desmos offers full 3d graphing capability (and i dont mean those hacky 2d parametric curves which give the impression of depth, but that might be a way for desmos coders to wrap their heads around graphing 3d and start this project).

Desmos is the best 2d browser supported graphing calculator, as far as ease of use, share-ability.

Geogebra has a browser supported graphing calculator as well but it seems to have limited capability and is geared more towards Euclidean constructions. To get more capability you have to download the full app. Personally I don’t find geogebra intuitive. It’s a different bowl of rice.

I will go back to this post when i get time and see if i missed anything. Thanks again.

I also added a copy of the original curve so you can compare the transformed curve to the ‘parent’ curve
https://www.desmos.com/calculator/6f38kwrprf

Cleaned up here is a rotation of any function about a generic point.
https://www.desmos.com/calculator/lojbaqqg0q
Drag the center of rotation to move it around, or feel free to change the function y = f(x).

Desmos does get a little slow if you try to rotate say f(x) = tan x about a generic decimal approximated center, but that is understandable, i can only imagine how data intensive that is.

The commands also easily allows to rotate any cartesian equation of the form C(x,y) = 0, such as the equation of a circle x^2 - y^2 - r^2 = 0

Also using similar ideas one can do any plane transformation, such as dilate a line about a point not the origin.