Function Composition: Understanding Multi-Var.

• estro
In summary, the conversation discussed the composition of functions in several variables and the specific example of f(f(x,y)). The experts provided an explanation of using helper variables to simplify the expression and confirmed the final simplified form. One of the participants also made a humorous remark about the complexity of the composition.
estro
I have hard time understanding composition of functions in several variables.
Suppose $$f(x,y)=(xcosy,\frac {x-y}{y-x})$$, how should I write f(f(x,y))?

Hi estro!

estro said:
I have hard time understanding composition of functions in several variables.
Suppose $$f(x,y)=(xcosy,\frac {x-y}{y-x})$$, how should I write f(f(x,y,z))?

I assume you mean f(f(x,y))?

Well, we have

$$f(f(x,y))=f(xcosy,\frac {x-y}{y-x})$$

Can you work this out further?

estro said:
I have hard time understanding composition of functions in several variables.
Suppose $$f(x,y)=(xcosy,\frac {x-y}{y-x})$$, how should I write f(f(x,y,z))?

You can't. f maps R2 to R2, so f(x, y, z) has too many inputs. Did you mean f(f(x, y))?

micromass said:
Hi estro!

I assume you mean f(f(x,y))?

Well, we have

$$f(f(x,y))=f(xcosy,\frac {x-y}{y-x})$$

Can you work this out further?

Thank you for the fast response, yes I mean f(f(x,y)). [fixed it in my first post]

So if i get it right: $$f(f(x,y))=((xcosy)cosy,\frac {x-\frac {x-y} {y-x}} {\frac {x-y} {y-x}-x})$$

Please give me feedback...=)

estro said:
Thank you for the fast response, yes I mean f(f(x,y)). [fixed it in my first post]

So if i get it right: $$f(f(x,y))=((xcosy)cosy,\frac {x-\frac {x-y} {y-x}} {\frac {x-y} {y-x}-x})$$

Please give me feedback...=)

Hmm, let me explain it differently:

$$f(f(x,y))=f(x\cos{y},\frac{x-y}{y-x})=(u\cos{v},\frac{u-v}{v-u})$$

with

$$u=x\cos{y}~~\text{and}~~v=\frac{x-y}{y-x}$$

Can you do it now?

Hi estro. :)

estro said:
I have hard time understanding composition of functions in several variables.
Suppose $$f(x,y)=(xcosy,\frac {x-y}{y-x})$$, how should I write f(f(x,y))?

Usually, when we have these confusing expressions, it pays to introduce helper variables.

Let's define:
$$u = x \cos y$$
$$v = \frac {x-y}{y-x}$$

Then
$$f(f(x,y)) = f(u,v) = (u \cos v,\frac {u-v}{v-u})$$

Now substitute u and v ...EDIT: Wow, micromass just posted exactly what I just posted at the same time!

Last edited:
Thank you all guys, I think now I get it:

$$f(f(x,y))=(xcosycos(\frac {x-y}{y-z}), \frac {xcosy-\frac {x-y} {y-x}} {\frac {x-y}{y-x}-xcosy})$$

It seems to me that this composition is violation of human rights...=)

estro said:
Thank you all guys, I think now I get it:

$$f(f(x,y))=(xcosycos(\frac {x-y}{y-z}), \frac {xcosy-\frac {x-y} {y-x}} {\frac {x-y}{y-x}-xcosy})$$

It seems to me that this composition is violation of human rights...=)

Seems correct!
I'll warn the Geneva convention

1. What is function composition?

Function composition is the process of combining two or more functions to create a new function. This new function then takes the output of one function and uses it as the input for another function, creating a chain of operations.

2. Why is understanding function composition important?

Understanding function composition allows for more efficient and organized coding. By breaking down complex tasks into smaller functions and then combining them, it can make code more readable, reusable, and easier to maintain.

3. How do you write a composed function?

To write a composed function, you simply use the output of one function as the input for another function. For example, if you have functions f(x) and g(x), the composed function would be (g ∘ f)(x) = g(f(x)).

4. What is the difference between function composition and function chaining?

Function composition and function chaining are often used interchangeably, but there is a slight difference. Function composition is the process of combining two or more functions to create a new function, while function chaining is the process of calling multiple functions in a sequence, with each function using the output of the previous one as its input.

5. How can you use function composition in real-world applications?

Function composition can be used in various real-world applications, such as data analysis, web development, and machine learning. It can help simplify complex tasks and make code more modular and flexible, allowing for easier maintenance and scalability.

Similar threads

• Calculus and Beyond Homework Help
Replies
4
Views
218
• Calculus and Beyond Homework Help
Replies
4
Views
244
• Calculus and Beyond Homework Help
Replies
5
Views
1K
• Calculus and Beyond Homework Help
Replies
6
Views
184
• Calculus and Beyond Homework Help
Replies
8
Views
333
• Calculus and Beyond Homework Help
Replies
5
Views
464
• Calculus and Beyond Homework Help
Replies
4
Views
853
• Calculus and Beyond Homework Help
Replies
23
Views
1K
• Calculus and Beyond Homework Help
Replies
3
Views
384
• Calculus and Beyond Homework Help
Replies
8
Views
661