A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 4 years ago
Define a function f(x) such that f(f(x)) = x
anonymous
 4 years ago
Define a function f(x) such that f(f(x)) = x

This Question is Closed

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0\[f(f(x)) = x\]\[f(f(1)) \neq 1 \]

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0@Anwar f(f(x)) = (x) = x :P

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0This can be done in a few lines in Python. Python 1, Math 0 :D

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0It might be possible in C..... let me think

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0because Python (at least the default one) is C's baby, and if Python can do it, then C can :D

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0in python you can't even i++ :D

JamesJ
 4 years ago
Best ResponseYou've already chosen the best response.1What's the definition of the function? Don't give us Python code; the code is just the encapsulation of that definition. What is the definition itself in ordinary mathematical notation?

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0I was hoping someone could figure it out for me :( I think it has to do with complex numbers. f(x) = x*i

JamesJ
 4 years ago
Best ResponseYou've already chosen the best response.1oh, so it's not a real valued function? Then it's trivial.

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0but the question said we can't use complex numbers :(

JamesJ
 4 years ago
Best ResponseYou've already chosen the best response.1In which case, it's not trivial. Do you know the answer? I don't. I'd like you to tell me.

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0I don't know either, but it's one line in Python

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0f = lambda x: (lambda: x) if (not hasattr(x, '__call__')) else x()

JamesJ
 4 years ago
Best ResponseYou've already chosen the best response.1decode the line for us and tell us then. You're the Python expert.

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0it just says f is a function that returns a function that returns the additive inverse of a number if the argument is not a function and calls its input otherwise.

JamesJ
 4 years ago
Best ResponseYou've already chosen the best response.1Oh, so it's not a regular mathematical function at all.

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0is it possible to make it a regular math function?

JamesJ
 4 years ago
Best ResponseYou've already chosen the best response.1i don't think so, but i'll think about it a little.
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.