Function Composition: Understanding Multi-Var.

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.
  • #1
estro
241
0
I have hard time understanding composition of functions in several variables.
Suppose [tex]f(x,y)=(xcosy,\frac {x-y}{y-x})[/tex], how should I write f(f(x,y))?
 
Physics news on Phys.org
  • #2
Hi estro! :smile:

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

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

Well, we have

[tex]f(f(x,y))=f(xcosy,\frac {x-y}{y-x})[/tex]

Can you work this out further?
 
  • #3
estro said:
I have hard time understanding composition of functions in several variables.
Suppose [tex]f(x,y)=(xcosy,\frac {x-y}{y-x})[/tex], 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))?
 
  • #4
micromass said:
Hi estro! :smile:



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

Well, we have

[tex]f(f(x,y))=f(xcosy,\frac {x-y}{y-x})[/tex]

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: [tex]f(f(x,y))=((xcosy)cosy,\frac {x-\frac {x-y} {y-x}} {\frac {x-y} {y-x}-x})[/tex]

Please give me feedback...=)
 
  • #5
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: [tex]f(f(x,y))=((xcosy)cosy,\frac {x-\frac {x-y} {y-x}} {\frac {x-y} {y-x}-x})[/tex]

Please give me feedback...=)

Hmm, let me explain it differently:

[tex]f(f(x,y))=f(x\cos{y},\frac{x-y}{y-x})=(u\cos{v},\frac{u-v}{v-u})[/tex]

with

[tex]u=x\cos{y}~~\text{and}~~v=\frac{x-y}{y-x}[/tex]

Can you do it now?
 
  • #6
Hi estro. :)

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

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

Let's define:
[tex]u = x \cos y[/tex]
[tex]v = \frac {x-y}{y-x}[/tex]

Then
[tex]f(f(x,y)) = f(u,v) = (u \cos v,\frac {u-v}{v-u})[/tex]

Now substitute u and v ...EDIT: Wow, micromass just posted exactly what I just posted at the same time! :bugeye:
 
Last edited:
  • #7
Thank you all guys, I think now I get it:

[tex]f(f(x,y))=(xcosycos(\frac {x-y}{y-z}), \frac {xcosy-\frac {x-y} {y-x}} {\frac {x-y}{y-x}-xcosy})[/tex]

It seems to me that this composition is violation of human rights...=)
 
  • #8
estro said:
Thank you all guys, I think now I get it:

[tex]f(f(x,y))=(xcosycos(\frac {x-y}{y-z}), \frac {xcosy-\frac {x-y} {y-x}} {\frac {x-y}{y-x}-xcosy})[/tex]

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

Seems correct! :smile:
I'll warn the Geneva convention :biggrin:
 

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
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
223
  • Calculus and Beyond Homework Help
Replies
4
Views
693
  • Calculus and Beyond Homework Help
Replies
23
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
470
  • Calculus and Beyond Homework Help
Replies
2
Views
543
  • Calculus and Beyond Homework Help
Replies
27
Views
737
  • Calculus and Beyond Homework Help
Replies
5
Views
620
  • Calculus and Beyond Homework Help
Replies
10
Views
827
  • Calculus and Beyond Homework Help
Replies
2
Views
462
Back
Top