[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 3 KB, 246x63, negative-involution.png [View same] [iqdb] [saucenao] [google]
14823211 No.14823211 [Reply] [Original]

I'm looking for a real function that has this property, but I can't find any.

Obviously, it's very easy to find a complex function that satisfies this property, namely: f(x) = ix. But I'm interested in a solution that's restricted to real numbers only.

Any ideas?

>> No.14823232

>>14823211
1. well order the positive reals [math]x_\alpha : \alpha < \mathfrak{c}[/math] and the negative reals [math]y_\alpha : \alpha < \mathfrak{c}[/math].
2. for each alpha, if f(x_alpha) has to equal something let it equal that. otherwise let it equal y/x_beta for the least unclaimed beta. Then the same thing for f(y).

I just injected heroin so ymmv

>> No.14823244

>>14823211
-abs(x)?

>> No.14823252

>>14823244
x<0
f(f(x))=-|-|x||=-|x|=-(-x)=x
I guess you could fix it with some piecewise shenanigans.

>> No.14823262

>>14823244
Hmm, that doesn't seem to work.

If f(x) = -abs(x), and x = -1, then:

f(-1) = -abs(-1) = -1

so:

f(f(-1)) = f(-1) = -abs(-1) = -1 = x

But unfortunately, the final result is x, not -x as required.

>> No.14823265

>>14823252
>>14823262
Hm. You're right.

>> No.14823266

>>14823211
Can't you just take a simple piecewise function like
[eqn] f(x) = \begin{cases} \frac{x}{1 - |x|} & \text{for } |x| < 1 \\
- \frac{x}{1 + |x|} & \text{for } |x| \geq 1
\end{cases}
[/eqn]
?

>> No.14823274

>>14823252
>I guess you could fix it with some piecewise shenanigans

Thanks.

I would even be okay with a piecewise solution if necessary. But of course, I would prefer an elegant solution that's just a single expression that works for all values of x.

>> No.14823280
File: 706 KB, 298x200, 1639760827368.gif [View same] [iqdb] [saucenao] [google]
14823280

>>14823211
I don't think it's possible. If f(x) flips the sign, then applying it twice will always give back the original sign. If it doesn't flip the sign, suppose x>0, so y=f(x) and y>0. Now f(y)=-x therefore f has to flip the sign. That's a contradiction.

>> No.14823286

>>14823266
>Can't you just take a simple piecewise function

Thanks, I'll check that one out. If necessary, I'll do it piecewise -- but I would also love to find a solution that's nice and elegant like the complex solution (f(x) = ix) is.

>> No.14823300

>>14823286
Complex numbers can be represented by particular real 2-by-2 matrices
https://en.wikipedia.org/wiki/Matrix_(mathematics)#Applications

>> No.14823303

>>14823211
it's a 90 degrees rotation

>> No.14823306

>>14823280
>I don't think it's possible.

It did occur to me that it might not be possible to solve using a single (non piecewise) expression.

However, I wondered if a piecewise approach might be able to solve it.

The one thing that's clear is that repetitive iteration of the function will produce a cycle period of 4, namely:

(a, b, -a, -b)*

The key is how to map a to b, but also to map b to -a using the same function. My instinct is that a piecewise approach could be successful in doing that. But, of course, it would be great if it could be done more elegantly.

>> No.14823315

>>14823266
This does not work for values less than equal to 0.5. But I think it is possible to come up with a more efficient solution where it will not work for some smaller uncountable segment. Essentially you need to divide the whole R into two parts, an uncountable set with working values, and an uncountable set without working values. Map the first set to the the second set flipping the signs. Map the second set to the first without flipping the signs. This will give a piecewise function as per OP's request. I don't think it is not possible to create a function that works for all values.

>>14823280
To add to this. It can both be true that: f flips the sign and f doesn't flip the sign. For example, my proposed function that flips for certain values, but doesn't for some, satisfies both statements.

>> No.14823316

>>14823306
I've just shown you that it can't be done no matter what.

>> No.14823318
File: 46 KB, 406x411, 4pRZQ.png [View same] [iqdb] [saucenao] [google]
14823318

>> No.14823319

>>14823315
I meant I don't think it is possible. Not I don't think it is not possible.

>> No.14823320

>>14823303
What's your second dimension?

>> No.14823322

[eqn]
f(x) = \begin{cases} \frac{1}{x} & \text{for } |x| < 1 \land x \not \in \mathbb{Z} \\ - \frac{1}{x} & \text{for } |x| > 1 \land x \not \in \mathbb{Z} \\ 2 x & \text{for } x \in (1 + 2 \mathbb{Z}) \\
-\frac{x}{2} & \text{for } x \in 2 \mathbb{Z}
\end{cases}


[/eqn]

>> No.14823323

>>14823315
> It can both be true that: f flips the sign and f doesn't flip the sign. For example, my proposed function that flips for certain values,
Then it will fail for other values.

>> No.14823324

>>14823323
Read.

>> No.14823329

>>14823300
Yes, I know. I was hoping for a solution using f: R -> R. Multiplication by a 2x2 matrix is modeled using a function whose domain and range are both 2D vectors, in other words, f: (R,R) -> (R,R).

>>14823303
That's certainly a promising line of attack. It raises the interesting question of how to "emulate" 90 degree rotation using a function f: R -> R.

>> No.14823331

>>14823324
Have fun looking for an obviously impossible solution, low-grade midwit. Some truly groundbreaking mathematics you're doing here. lol

>> No.14823334

Just make a composite function.

>> No.14823336

>>14823331
You literally did not read the entire thing, and keep acting like a retard.

>> No.14823337

>>14823322
Shit this doesn't work. For some integers. Take instead
x + 1 for positive odd numbers
x - 1 for negative odd numbers
1 - x for positive even numbers
-1 - x for negative even numbers

>> No.14823339

>>14823336
I did read the entirety of your low IQ tweet and it's retarded. This board is shameful.

>> No.14823346

>>14823211
I wouldn't be surprised if you need a complex function. I might be schizo, but first assume [math] f(x) = a(x)x [/math]. Differentiate [math] a(x)^2x = -1 [/math] and solve the resulting differential equation and you get an equation that only works on one side of the real line.

>> No.14823348

>>14823339
Dude, this is one of the few posts in this board which not /pol/bait or bmwf shit. Stop trying to sperg out, and just admit you didn't read the whole thing and just misunderstood.

>> No.14823353

>>14823262
g(f(x)) = -f(x)

>> No.14823356

>>14823316
Sorry about that. I'm so busy reading and writing responses right now that I'm not devoting enough time to a thorough analysis of the answers. I'll certainly study your answer more carefully once I have some time.

>> No.14823365

>>14823337
add to that f(0)=0 and i think you got it
/thread

>> No.14823369

>>14823329
>Multiplication by a 2x2 matrix
isn't it just +,-,* with a bunch real numbers?

>> No.14823371

If it does exist then [math]f(0) = 0[/math], proof:

Let [math]c = f(0)[/math]

This [math]f(c) = 0[/math]
So [math]c = f(0) = f(f(c)) = -c[/math]
So it must be [math]c = f(0) = 0 [/math]

>> No.14823374

>>14823365
Proof >>14823371

>> No.14823379

>>14823371
>>14823374
nvm i had a big brainlet moment there, just ignore my post >>14823365

>> No.14823380

>>14823211
Just unwind the call stack and see if f() has been called twice, if that's the case then return -x. Else you simply throw an InvocationException with a proper error message.

>> No.14823387

>>14823337
Is this the unique solution? I think it might be, that’s kinda crazy

>> No.14823390

>>14823369
>isn't it just +,-,* with a bunch real numbers?

Yes, it is. There is no question that a simple solution exists when the function is able to map a complex to another complex, or (equivalently) if the function can map a pair of reals to another pair of reals (as is done with 2x2 matrix multiplication).

My question is whether it can be done with a function that is restricted to mapping a SINGLE real to another SINGLE real. That seems to be a much more difficult challenge.

>> No.14823394

>>14823337
If it only doesn't work for integers then you found a more efficient solution than mine >>14823315 since yours doesn't work for countably many numbers.

>> No.14823411

>>14823211
If f(x) is a continuous bijective function in some interval [a,b],
then [math] f(f(x)) = -x [/math] will be equivalent to [math] f(x) = inv(-x) = f^{-1}(-x) [/math]
This means that [math] f(-x) = inv(x) [/math]. Subsequently [math] inv(x) [/math] is little more than the reflection of f(x) over the y-axis.
Now, let's express [math] f(f(x)) = -x [/math] as a function of [math] f(x) = y > x = f^{-1}(y) [/math].
We then have [math] f(y) = -f^{-1}(y) [/math] where I deliberately let f(y) undefined.
This means that f(y) must be identical to the negative of its inverse function. Because y has been arbitrarily chosen, the associated equation will draw the same curve as [math] f(x) = f-1(-x) [/math] as long as [math] y = f(x) [/math] is in the interval [a,b].
More importantly however, in [math] \mathbb{R} [/math], there is only one function that is identical to its inverse function which is f(x) = x. However, it does not fulfill the condition f(f(x)) = -x which means that this functional equation is unsolvable in [math] \mathbb{R} [/math].
If we also include [math] \mathbb{C} [/math], then the only solution to [math] f(f(x)) = -x [/math] is [math] f(x) = ix [/math] or [math] f(x) = -ix [/math].

>> No.14823412

>>14823380
>Else you simply throw an InvocationException

My preference would be for the function to produce a well-defined real result for all ALL real arguments.

However, if someone has a function that only works for some significant subset of the reals (for example, if it only works for f: N -> N) let me know!

>> No.14823415

>>14823211
f(x) = f(x)
g^-1(f(x)) = x
h(x) = -g^-1(f(x)) = -x

>> No.14823421 [DELETED] 

>>14823411
>l should have specified, due to the nature of the equivation, that any equation which simultaneously fulfills the requirement [math] f(x) = f^{-1}(-x) [/math] will also fulfill the requirement [math] f(x) = -f^{-1}(x) [/math] or [math] f^{-1}(-x) = -f^{-1}(x). Meaning that it must be a point-symmetrical function.

>> No.14823423 [DELETED] 

>>14823411
l should have specified, due to the nature of the equivation, that any equation which simultaneously fulfills the requirement [math] f(x)=f−1(−x) [/math] will also fulfill the requirement [math] f(x)=−f−1(x) [/math] or [math] f^{-1}(-x) = -f^{-1}(x) [/math] . Meaning that it must be a point-symmetric function.

>> No.14823427

>>14823411
l should have specified, due to the nature of the functional equation, that any equation which simultaneously fulfills the requirement [math] f(x)=f^{−1}(−x) [/math] will also fulfill the requirement [math] f(x)=−f^{−1}(x) [/math] or [math] f^{−1}(−x)=−f^{−1}(x) [/math]. Meaning that it must be a point-symmetric function.

>> No.14823450

>>14823371
why does f(c)=0 ?

>> No.14823456

>>14823211
what do you need this for?

>> No.14823475

>>14823318
My sincere thanks to all those who have proved that no function f: R->R can possibly exist such that f(f(x)) = -x.

But I have having a hard time understanding why the function that's graphed here:
>>14823318
is NOT a solution.

Can anybody poke any holes in
>>14823318
?

>> No.14823487

>>14823306
b=ia
There isn't another solution because you effective want to map a function applied twice to be equal to -1 meaning y^2=-1 so y=i. Yes, you can do some rotation stuff but in what plane? It's congruent to re^itheta. There's no solution that isn't congruent to using imaginary numbers

>> No.14823494
File: 16 KB, 654x557, W3g8t.png [View same] [iqdb] [saucenao] [google]
14823494

>>14823475

>> No.14823495

>>14823456
>what do you need this for?

I don't really "need" it, but I want it.

I'm building a list of interesting math problems and examples that would be appropriate for discussion with high school students.

Function iteration is an interesting topic, and it leads naturally to simple examples like f(f(x)) = x. I always knew that f(f(x)) = -x had an easy complex solution, but I wanted to see if it was possible to show a solution for f: R->R, since some of the younger students might not be familiar with complex numbers yet.

And if it turns out that no such function f: R->R exists, then showing the proof of that would be interesting for the more advanced students.

And thanks to all for your great responses to my question.

>> No.14823497

f(x) = {x^2 >= 1: -1/x, x^2 < 1: 1/x}
f(f(x)) = -x
https://www.desmos.com/calculator/pdtpynubfe

>> No.14823502

>>14823427
f(x)= -cos^-1(cos(x))
cos(-x) = cos(x)
-cos(-x) = -cos(x)
-cos^-1(cos(-x)) = -x
-cos^-1(cos(x)) = -x

>> No.14823514

>>14823475
Yes, my proof assumes that the function is continuous. The function in the picture is not continuous. I have now checked whether or not the function still works even if you converge to the cut points which it does.

>> No.14823520

>>14823502
f(f(x)) = -cos^-1(cos(-cos^-1(cos(x))))= -x

>> No.14823522

>>14823494
>There's no solution that isn't congruent to using imaginary numbers

I agree that's a very compelling argument, and that some other people in this thread have also written very compelling arguments that no such function exists.

But then I look at this graph:
>>14823494
and I wonder how this is NOT a graph of the function that provides the solution.

Am I missing something here? Are there any cases where this graph:
>>14823494
does NOT meet the condition that f(f(x)) = -x for all real x?

>> No.14823531

>>14823497
don't do f(x*f(x)) with this thing

>> No.14823537

>>14823514
>Yes, my proof assumes that the function is continuous.

Thanks. If I understand correctly, that seems to imply that a solution (if it exists) must be defined piecewise, or otherwise be based on some non-continuous function.

I'm okay with a piecewise function as an answer, but I do have to wonder if it can be done more eleganly using a single expression that works for all real x. And, of course, the "holy grail" would be a continuous function. Thanks for working on the "holy grail" part of it.

>> No.14823587

>>14823537
You have a proof by construction that shows that there is a non-continuous piecewise function that fulfills your condition whereas you also have a proof that shows that there is no continuous function such that f(f(x)) = -x. To be honest, when solving functional equations, it is usually assumed that you solve for a continuous function by algebraic means rather than just by trying to find one. Interestingly enough, the non-continuous example in the picture is nothing but piecewise segments of a linear function f(x) = x. So I think one can then throw up the question whether or not a functional equation that is not solved by a continuous function in R but can be solved by one in C may still be solved in R when we just lower the constraint to piecewise continuous functions.

>> No.14823629
File: 17 KB, 565x503, Capture.jpg [View same] [iqdb] [saucenao] [google]
14823629

>>14823522
would you consider discrete functions like floor, modulo, or sign(x) cheating by implicitly creating piecewise functions?

I'm close but I'm too lazy to get it right

>> No.14823679

>>14823629
Is it continuous? No.
Is it a function? Yes.

So?

>> No.14823687

>>14823587
>So I think one can then throw up the question whether or not a functional equation that is not solved by a continuous function in R but can be solved by one in C may still be solved in R when we just lower the constraint to piecewise continuous functions.

I suspect so. You can map R to C in a way that's both one-to-one and onto. (For example, you could extract all the even-position digits to create the real part, and extract all the odd-position digits to create the imaginary part.) So it seems like anything you can do in C you can do equivalently in R just by doing it through that mapping.

That's exactly the kind of idea I had in mind when I posed my question, but I wanted something a bit more elegant than just unzipping numbers apart and ripping out their digits like that. But, in the end, the solution still seems to be basically a kind of "unzipping" anyway, as suggested graphically in
>>14823494

My great thanks goes to the anon(s) who discovered the function
>>14823494
and created the graph of it.

>> No.14823689

>>14823450
[math] c = f(0) \implies f(c) = f(f(0)) = -0 = 0 [/math]

>> No.14823706
File: 66 KB, 904x1430, Untitled.png [View same] [iqdb] [saucenao] [google]
14823706

>>14823629
ok if you're really allergic to discrete functions and don't care what happens close to 0 you can approximate it

somebody else do the equivalent for floor(x)

>> No.14823742

>>14823629
>would you consider discrete functions like floor, modulo, or sign(x) cheating by implicitly creating piecewise functions?

I would definitely consider that approach. I don't think it's "cheating". If a tool gets the job done, then it works, and nobody can argue otherwise.

I really like that you created a single concise expression for the function (rather than relying on a piecewise approach). That makes the solution even more elegant.

I noticed your graph is a bit different than
>>14823494
but I'll study it to make sure it still satisfies f(f(x)) = -x.

Thanks again.

>> No.14823767
File: 20 KB, 674x472, Capture.jpg [View same] [iqdb] [saucenao] [google]
14823767

>>14823742
https://www.wolframalpha.com/input?i=f%28x%29+%3D++++%282%2F%281%2Be%5E%28-1000x%29%29-1%29++%281%2Bx+*+%28-1%29++%5E+floor%28x+%29%29+from+-10+to+10


you're supposed to replace -1000 with k and a limit to negative infinity, but that won't graph for some reason

>> No.14823818

>>14823767
>you're supposed to replace -1000 with k and a limit to negative infinity, but that won't graph for some reason

How about going back to the discrete approach used in
>>14823629
?
I think it's a lot easier to understand a function like sgn(x) than to replace it with something that requires the limit to -infinity.

>> No.14823826

>>14823244
>>14823262
f needs to be injective

>> No.14823872

>>14823497
f(x) = {x^2 >= b: -b/x, x^2<b: b/x}
f(f(x)) = -x as long as b>0
https://www.desmos.com/calculator/01bd3z07wq

>> No.14823946

>>14823497
f(x) = (|x|-x^2) / |(|x|-x^2)| * 1/x
f(f(x)) = -x
https://www.desmos.com/calculator/zdv5psehws

>> No.14824038

>>14823946
[math]f(x) = \frac{|x|-x^2}{\left||x|-x^2\right|} \times \frac{1}{x}[/math]
[math]f(f(x)) = -x[/math]

>> No.14824041

>>14823946
>>14823872
>>14823494
I kneel

>> No.14824051

>>14824038
Nice division by zero there for all the important numbers (0,-1,1).

>> No.14824098

>>14824051
You can just define f so it permutes those. However, suppose
1) f(1) = 1. Then f(f(1)) = 1
2) f(1) = 0. Then f(0) = -1 and f(-1) = 0, so f(f(-1)) = -1.
3) f(1) = -1. Then f(-1) = -1 and f(f(-1)) = -1.

>> No.14824124

>>14824098
Nah, it would be better to return to the piecewise version.

>> No.14824126

>>14824051
>>14824098
[math]f(0) = 0[/math] must hold by >>14823371

>> No.14824179

>>14824124
The piecewise version has the same division by zero problem and there isn't a way to permute the same problematic points.
>>14824126
Adding an extra contradiction is okay. The point was that the piecewise definition can't be fixed by permuting 0, -1 and 1.

Still, good job! I also kneel.

>> No.14824207

>>14823380
>>>/g/

>> No.14824228

This was an interesting question to think about! I didn’t read much of the thread closely so maybe someone said this already, but here’s my suggestion: For every [math]x\in\mathbf R[/math], let [math]n\in\mathbf N[/math] such that [math]n\le|x|<n+1[/math]. If [math]n[/math] is even, let [math]f(x)=1+x[/math]; if [math]n[/math] is odd, let [math]f(x)=1-x[/math].

>> No.14824236

>>14823502
>-cos^-1(cos(-x)) = -x
This isnt true.

>-cos^-1(cos(-x)) = x
Is the correct equation.

>> No.14824238

>>14824228
Actually, now that I think about it, maybe it should be [math]f(x)=\operatorname{sign}x\cdot(1+|x|)[/math] for even [math]n[/math] and [math]f(x)=\operatorname{sign}x\cdot(1-|x|)[/math] for odd [math]n[/math].

>> No.14824254

>>14824238
Also, [math]n<|x|\le n+1[/math] (and [math]f(0)=0[/math]).

>> No.14824284

>>14823946
Pretty damn clever approach. Too bad about it being undefined at x in {-1, 0, 1}.

>> No.14824310

>>14823211
if 0 < 2n < x < 2n+1 then let
> f(x)= x+1
> f(x+1)=-x
> f(-x) = -x-1
> f(-x-1)=x
this puts each nonzero real into a unique orbit of length 4

>> No.14824372

What if we sacrifice an infinity small amount of accuracy?
[math]f(x)=\frac{b-x^2}{|b-x^2|+\frac{1}{b}}\times \frac{b}{x+\frac{1}{b}}[/math]
[math]b\to\infty[/math]
https://www.desmos.com/calculator/iuqvwsxpzc

>> No.14824396

>>14824236
Wrong. All values of x become positive because the identity cos(-x) = cos(x).

>> No.14824480

>>14823211
Isn't one answer simply f(x)=(+/-) i*x ?

>> No.14824496

>>14824480
Also I think f(x)=x is a solution

Generally we need f(x)=f^-1(x) so any function that is symmetric under reflections across the like y=x is a solution

>> No.14824546

>>14824480
Reading comprehension much? Go back to India

>> No.14824594 [DELETED] 
File: 47 KB, 800x800, f(f(x))=-x.png [View same] [iqdb] [saucenao] [google]
14824594

>>14824372
This one is better, it's perfectly accurate and all discontinuities effectively merge at 0.
[math]f(x)=\frac{b-x^2}{|b-x^2|}\times \frac{b}{x}[/math]
[math]b\to 0[/math]
https://www.desmos.com/calculator/anplxcwpky

>> No.14824615
File: 47 KB, 800x800, f(f(x))=-x.png [View same] [iqdb] [saucenao] [google]
14824615

>>14824372
This one is better, it's perfectly accurate and all discontinuities effectively merge at 0.
[math]f(x)=\frac{b-x^2}{|b-x^2|}\times \frac{b}{x}[/math]
[math]b\to 0^+[/math]
https://www.desmos.com/calculator/anplxcwpky

>> No.14824617

>>14824480
op said REAL.
>>14823211
>>14823494
>>14823767
pic result
I took the liberty of decoration with alternative solution, screwed up the outward end points but Idc.

>> No.14824619
File: 123 KB, 1515x930, windmill.png [View same] [iqdb] [saucenao] [google]
14824619

>>14824617
Oops, forgot the pic

>> No.14824768

weird witchery
https://www.desmos.com/calculator/irs1tfqmjb

>> No.14824870

>>14823353
this lmao wtf is this thread even? is this a huge troll?

>> No.14824942

>>14823872
what is the ":"in the set

>> No.14824977

>>14824942

[math]f(x) = \begin{cases} -\frac{b}{x} & \text{for } x^2 \ge b \\ \frac{b}{x} & \text{for } x^2 < b \end{cases}[/math]

[math]f(f(x))=-x \text{ for }b>0[/math]

>> No.14824980

>>14824768
that must be a glitch in the graphic calculator, it's doesn't work irl

>> No.14824995

>>14824980
I made a function in desmos that also provided the incorrect answer for f(f(x)) when I was experimenting. I came up with f(x) = -abs(x)sgn(x) and when I parameterized f(x) = f(t), f(f(x)) was providing the solution f(f(x)) = -x though when I did the calculations in excel it just gave me back x.

>> No.14825009

>>14824615
so the first part only yields a positive 1 when -1 < x < 1 and the second part of the fuction alternates the x as 1/x and x. Nice one anon.
/thread

>> No.14825026

>>14824977
okay the : is highly non conventional

>> No.14825036

>>14825026
I have seen : and | equally often, and use both frequently.

t. 4th year math undergrad

>> No.14825078

>>14825026
It's not and it is how you type piecewise functions in Desmos.

>> No.14825109 [DELETED] 
File: 38 KB, 1171x420, f.png [View same] [iqdb] [saucenao] [google]
14825109

>>14823211
That one is easy in binary. Just flip the least significant bit, that would be an infinitesimal for an R number, and if that bit is set then change the sign.

https://godbolt.org/z/4s3ETzxo7

>> No.14825131
File: 35 KB, 1109x373, f.png [View same] [iqdb] [saucenao] [google]
14825131

That one is easy in binary. Just flip the least significant bit, that would be an infinitesimal for an R number, and if that bit is not set then change the sign.

https://godbolt.org/z/fvrfx4EbG

>> No.14825350
File: 17 KB, 975x667, fu.png [View same] [iqdb] [saucenao] [google]
14825350

>>14823211
f(a) = b
f(f(a)) = f(b) = -a
f(f(f(a))) = f(f(b)) = f(-a) = -b
f(f(f(f(a)))) = f(-b) = a

So you get these cycles: b(-a)(-b)ab...

Since we get a sign flip once for every two applications, we can deduce:

1. f(x) has the opposite sign from x for some, but not all, x
2. if f(x) flips the sign, f(f(x)) doesn't
3. if f(x) doesn't flip the sign, f(f(x)) does

Therefore 'a' values and 'b' values have to come from two distinct subsets of the positive reals; otherwise f would have to both flip and not flip the sign for some arguments. Pic rel: small diagram that sums up the special requirements for OP's functions. Unsurprisingly, it's similar to rotations with complex numbers in most aspects. Constructing them in a piecewise fashion according to these requirements should be straightforward, but you could exploit the regular alternations of the sign-flipping and the way the values alternate between the two sets.

>> No.14825600

>>14825350
OP here. Your post summarizes what I had concluded when I first looked at the problem. But I had a hard time imagining an elegant approach to defining the two distinct subsets, and what kind of "no flip" operation would take you from one subset to the other.

> it's similar to rotations with complex numbers
I always knew that you could do it the "lazy" way and just map R to C, perform f(x) = ix in C, and map the results back into R again; and then create a composition of those 3 functions. But I couldn't find an elegant way to map R to C. I know that you can "unzip" a real number apart into two complex parts by (for example) selecting all the even-position digits for the real part and all the odd-position digits for the imaginary part. But I had hoped for something more elegant, and that's why I turned to you guys.

I'm really grateful for all the anons who obviously did a lot of work on this problem, and posted some great analysis and solutions. You guys are the best!

>> No.14825606

>>14823211
f(x)=-xf^-1(x)
:^)

>> No.14825608

f(x)=0

>> No.14825609

>>14823387
unique? no you could do variations like +2 and -2 instead of +1 and -1

>> No.14825614

>>14825131
(OP again.) Y'know, that approach had occurred to me, because I was a C/C++ programmer for most of my career. It's amusing for me to see the actual code for it. Thanks.

>> No.14825621

>>14825600
f(x)=cos(ypi) where y is in the range (-1,1), y=2x*10^n, and n is any integer (there is of course only one possible n)
I don't know how to write this in proper notation (even if proper notation doesnt currently exist there is no reason it shouldn't since we have similarily arbitrary notations such as absolute value and truncation) and I am not even certain if this will be a solution to the OP problem but maybe on the right track? Since cos(z) is positive for (0,pi) and negative for (pi,2pi)

>> No.14825624

>>14825614
LMAO ITS A FUNNY COMPUTER CODE BRO
HAHAHA LMFAO ROFL MAUO!!!:)

>> No.14825628

>>14825621
WAIT NO sin not cos, sorry

>> No.14825633

>>14825621
wait I did something else wrong there. It would need to be the biggest possible y in the range (-1,1), I misspoke when I said there is only one possible n

>> No.14825655

>>14825600
>I had a hard time imagining an elegant approach to defining the two distinct subsets
Just choose some arbitrary interval to for the 'a' numbers and the rest for the 'b' numbers. Pick some arbitrary means to "compress" the positive reals onto an interval, and "decompress" them from an interval (i.e. a function with a horizontal asymptote) then construct a piecewise function following the rules.

For example:
Map [0, 1] to [1, inf]
Map [1, inf] to [-1, 0]
Map [-1, 0] to [-1, -inf]
Map [-1, inf] to [0, 1]

>> No.14825658 [DELETED] 

>>14823211
My reading of this is that Intuitively it is a contradiction, and can only work if you use a paradox that then fools you into thinking it worked. That is why it works for imaginary numbers — you paradox a paradox and fool yourself into thinking it worked, because you resolve the paradox with a paradox without being able to see the paradox.

You are asking for a continuous real valued function that maps x from the domain of R to some x in R that when mapped again creates the negative of the original x.

if the function maps to a positive for all x, how can it map to a negative when used again?
if the function maps to a negative, how can it map to another negative without changing the value of x when mapped again?
No cyclical function could return a variable’s negative in one iteration and still be cyclical. (The cycle would stop)

>> No.14825682

>>14825658
>shits out wordcel pseudo-philosophy
>doesn't understand highschool-level math
Like clockwork. >>>/lit/

>> No.14825710

>>14825609
+2 -2 wouldn’t work because you’d lose the info from going back and forth from odd to even, but +3 -3 might work

>> No.14825738
File: 9 KB, 424x290, foobar.png [View same] [iqdb] [saucenao] [google]
14825738

>>14825600
>>14825655
Here's some code to demonstrate the general principle. You could plug your own 'compress' and 'uncompress' functions or get rid of the piecewise conditions by expoiting symmetries or whatever but it's all going to follow the same general pattern.

>> No.14825740

>>14823494
>>14824619
So any function that has 90 deg rotational symmetry?

>> No.14825784

>>14825740
You nailed it. It's easy to see why considering >>14825350 and >>14825738.

>> No.14825803
File: 313 KB, 1125x1375, 74B3A9A6-694D-41D5-BC10-F450B4612F21.jpg [View same] [iqdb] [saucenao] [google]
14825803

Throwing my hat in. This one also has discontinuities but you could move them around I suppose

>> No.14825861

>>14825803
OP here. Your expression "sgn((x+1)(x-1)) / x" is very elegant, except that f(f(1)) and f(f(-1)) are incorrect.

Note that there are a lot of solutions proposed in this thread are either incorrect or undefined for some pair of numbers b and -b, but yours seems to be the most elegant of the bunch (to my eye).

So far, the only solution that I believe is perfect in all cases is:
>>14823494
but I haven't seen anyone yet convert that graph perfectly to an expression (or piecewise expressions). Lots of people have come close, but there always seems to be a trouble spot somewhere, usually where an integer value of x gets mapped to the wrong place. The perfect solution probably requires playing around with floor() versus ceil() versus trunc() to get it perfectly right in all cases.

I'll be working on converting that graph to an expression (or piecewise expressions) perfectly, but I also invite others to try.

>> No.14825901

>>14825861
There's kinda no point if you're just recreating a piece wise function algorithmically using discrete functions. I mean multiplying something with .5*sgn(x)+.5 already gives you the short-circuit of an if else statement. I'd be more interested in a set-theoretic definition that makes a fractal windmill, or something that vaguely looks like weierstrass function when zooming in

>> No.14825904

>>14823211
f(x) = xi

>> No.14825913
File: 381 KB, 800x582, giga-xi.png [View same] [iqdb] [saucenao] [google]
14825913

>>14825904
>real function
>xi

>> No.14825954

>>14825861
The windmill can be written as

[eqn] f(x) = \begin{cases} 0 & \text{for } x=0 \\
x+1 & \text{for } x>0 \land \lceil x \rceil \mod 2 = 1 \\
1-x & \text{for } x>0 \land \lceil x \rceil \mod 2 = 0 \\
x-1 & \text{for } x<0 \land \lfloor x \rfloor \mod 2 = 1 \\
-1-x & \text{for } x<0 \land \lfloor x \rfloor \mod 2 = 0 \\


\end{cases}
[/eqn]

>> No.14826139

>>14825954
OP here. I believe that's correct in all cases. Thanks.

>> No.14826249

>>14823280
why does [math] f(x) [/math] needs to flip the sign? That would suggest that [math] f(f(x)) = -f(x) = x [/math]
But the first part of the equation is a presumption you hid.

>> No.14826263

>>14826249
The argument was both flipping and not flipping leads to a contradiction. I overlooked the possibility that it could flip the sign for some arguments but not others. Then I sat down and considered that possibility, which lead to this:
>>14825738
>>14825350
So I was obviously wrong back in that post and I retract it.

>> No.14826298

>>14825740
No, you also have to make sure f(x)=(r-x^k)^(1/k) type of symmetry inside each segment so that f(f(x))=x.

>> No.14826415

>>14824496
f(x) = x
implies
-x = f(f(x)) = f(x) = x
which is only true when x = 0.

>> No.14826462

>>14825350
Also, suppose g(x) is a sign-preserving bijection on the reals. Let h(x) = g^-1 ○ f ○ g (x).

Then
h(h(x)) = g^-1 ○ f ○ g ○ g^-1 ○ f ○ g (x)
h(h(x)) = g^-1 ○ f ○ f ○ g (x)
h(h(x)) = g^-1(f (f (g(x)))
h(h(x)) = g^-1(-1 * g(x))
h(h(x)) = -1 * g^-1(g(x))
h(h(x)) = -1 * x
h(h(x)) = -x

>> No.14826468

>>14825608
f(f(-1)) = 1
f(0) = 1
0 = 1

>> No.14826475

>>14823387
>>14825710
>>14825609
There are a LOT of solutions. See:
>>14826462

>> No.14826478

>>14825784
I see, if you have
f(a) = b and f(b) = -a
then plot (a,b), (b, -a)
the second point is always 90 degrees clockwise from the first. So the entire graph has to 90 degree rotational symmetry.

>> No.14826493

>>14826478
Symmetry isn't required.
For example, let
g(x) be x when x is negative, 0 when x is 0 and 1/x when x is positive.

Then do this:
>>14826462

>> No.14826517

>>14826478
>the entire graph has to 90 degree rotational symmetry.
Yes, I think so. It became especially apparent to me looking at the code I ended up writing to demonstrate my conclusion.

>> No.14826523

>>14826493
I don't get it, can you graph that?
>>14826462
implies that you already have an f(). Is there one you can apply to your g in
>h(x) = g^-1 ○ f ○ g (x)
where h doesn't end up rotationally symmetrical?

>> No.14826530

>>14826523
Oh I see what you mean. I meant that any h() you end up with is symmetrical. nevermind.

>> No.14826672

>>14825803

[math]f(x) = \begin{cases} 0 & \text{for } x = 0 \\ \frac{\operatorname{sign}\left(x^{2}-1\right)}{x} & \text{for } \log_{x^{2}}^{2}b=1 \\ \frac{b\operatorname{sign}\left(x^{2}-b\right)}{x} & \text{for } x \neq 0, \log_{x^{2}}^{2}b \neq 1 \end{cases}[/math]

[math]f(f(x)) = -x \text{ for } b>0 \text{, } b \neq 1[/math]

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

>> No.14826730

>>14826475
no f exists on the reals

>> No.14826800

>>14823211
This looks like the kind of function that could ruin someone's reputation, were it ACE'd into someone's training manual. Examining passive data collection, one is able to spot forms of this function in such a context and identify their purpose. Many such examples of various forms of this function, in this thread.

>> No.14826881

>>14825861

https://www.desmos.com/calculator/7ju3bk9kz0

>> No.14826917

>>14826881
Better colors
https://www.desmos.com/calculator/eurqjyrh9n

>> No.14826938

>>14823502
>trigonometry as a stalking-horse for complex numbers
This is the tack I'd take, not to do OP's homework for him. I don't know if your equations are right or wrong and I'm not going to check them.

>> No.14826943

>>14826730
Okay. That sounds reasonable. Do you have a proof of it? I may have missed it.

>> No.14826961 [DELETED] 

>>14826672
Using sign feels like cheating...

[math]f\left(x\right)=\frac{2\operatorname{sign}(x^{2})\operatorname{sign}\left(x^{2}-2\operatorname{sign}(x^{2})\right)}{x^{\operatorname{sign}\left(x^{2}\right)}}[/math]

https://www.desmos.com/calculator/0czkgbppm9

>> No.14826976

>>14826730
Stop using ableist language. All numbers have the right to be real or imaginary. Now the i is short for icala, meaning side in the Xhosa language. Instead "real numbers" use R numbers.

>> No.14826998

>>14826938
> >>14823502
> >trigonometry as a stalking-horse for complex numbers
> This is the tack I'd take

The argument of cos^-1 must be in within [-1..1] in order to obtain a real result. I'm assuming that OP wants his function to work on all real arguments. So I suspect that investigating a trig solution would be a waste of time.

>> No.14827000
File: 556 KB, 801x549, fug.png [View same] [iqdb] [saucenao] [google]
14827000

For obvious reasons [math] Z\not\equiv (\mathbb{R}\cap f(\mathbb{R})) [/math]
Where Z is the set that fits for [math] f(x)\;\forall{x\in\mathbb{R}} [/math]
So we can find exterior set of [math] \mathbb{R} [/math].
[math] Z \equiv A\oplus Bi [/math] For which it is possible to find that
[math] A \equiv \bigg(\mathbb{R}\cap \Big\{\frac{f(x) + \bar{f(x)}}{2} : x\in\mathbb{R}\Big\}\bigg) [/math] and that
[math] B \equiv \bigg(\mathbb{R}\cap \Big\{\frac{f(x) - \bar{f(x)}}{2} : x\in\mathbb{R}\Big\}\bigg) [/math]
Hence solving the intersection gives the needed sets A and B

>> No.14827013
File: 661 KB, 2560x1440, 1497108094750.jpg [View same] [iqdb] [saucenao] [google]
14827013

>>14826730
[math]f\left(x\right)=\left(\operatorname{mod}\left(\operatorname{ceil}\left(\operatorname{abs}\left(x\right)\right),\ 2\right)\ \cdot\ 2\ -\ 1\right)\cdot x+\operatorname{sign}\left(x\right)[/math]

>> No.14827022

>>14826672
Using sign feels like cheating. Sign(x^2) is 1 for everyone but 0. Conditions in b remove other 2 discontinuities.

[math]b=\left(4\operatorname{sign}(x^{2})+\left(3\left|\operatorname{sign}(4-x^{2})\right|-3\right)+\left(3\left|\operatorname{sign}\left(\frac{1}{4}-x^{2}\right)\right|-3\right)\right)[/math]

[math]f\left(x\right)=\frac{b\operatorname{sign}\left(x^{2}-b\right)}{x^{\operatorname{sign}\left(x^{2}\right)}}[/math]

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

>> No.14827024

>>14827013
Dum tranny kys

>> No.14827037
File: 1.01 MB, 1024x1024, 354image.jpg [View same] [iqdb] [saucenao] [google]
14827037

>>14827024
My penis is bigger than yours, bitch.

>> No.14827057

>>14827037
I don't understand why a worthless monkey like you even texts me or sends a thisperson... pic

>> No.14827077
File: 134 KB, 1065x1192, chimp_smile_come.jpg [View same] [iqdb] [saucenao] [google]
14827077

>>14827057
Come closer and we will see how many arms you are left with.

>> No.14827273

>>14827077
>>14827037
You are fucking! Fucking you bloody! You bloody! Fuck bastard bitch! Bloody fuck you bloody! Fucking bloody mother fuck bitch! Fucking bloody bastard! Bhenchod bloody! You blastard! Bloody no! Bloody fucking! Why you fuck me? I fuck you bloody! Bloody bastard! Fucking running like lady! Okay, have a nice day. Bye bye.

>> No.14828405

>>14823211
>>14823280
Someone prove it isn't possible, it has never been done before, you vill have conributed to ze math forever. Eat the bugs.

>> No.14828411

>>14823211
>>14823252
Also, does this shit oddly remind you fegs of imaginary numbers?

>> No.14829734

[math]\overbrace{f^{1/n}(f^{1/n}(f^{1/n}(...(x)...)))}^{n}=f(x)$\\$f^{1/n}(x)\begin{cases}<x, 1> & x_y=\emptyset\\<x, y+1> & x_y<n\\f(x) & x_y\ge n\end{cases}[/math]

lambda calculus, beta conversion and polish notation solution:
>true := \a.\b.(a)
>false := \a.\b.(b)
>cons := \a.\b.\f.(f a b) // ommitted
>car := \a.(a true)
>cdr := \a.(a false)
>add1 := \x.(+ x 1)

fn applies f after n function substitutions.
>fn := \f.\n.\x.((= (cdr x) false) (x 1) ((< (cdr x) (- n 1)) ((car x) (+ (cdr x) 1)) (f (car x))))

f3 applies add1 after 3 function substitutions. (demo)
>f3 := (fn add1 3)
>ß => (\f.\n.\x.((= (cdr x) false) (x 1) ((< (cdr x) (- n 1)) ((car x) (+ (cdr x) 1)) (f (car x)))) add1 3)
>ß => (\f.\n.\x.((= (cdr x) false) (x 1) ((< (cdr x) (- n 1)) ((car x) (+ (cdr x) 1)) (f (car x)))) add1 3)
>ß => (\n.\x.((= (cdr x) false) (x 1) ((< (cdr x) (- n 1)) ((car x) (+ (cdr x) 1)) (add1 (car x)))) 3)
>ß => \x.((= (cdr x) false) (x 1) ((< (cdr x) (- 3 1)) ((car x) (+ (cdr x) 1)) (add1 (car x))))
>ß => \x.((= (cdr x) false) (x 1) ((< (cdr x) 2) ((car x) (+ (cdr x) 1)) (add1 (car x))))

>> No.14829739

f3 applied to 9 three times should yield 10.
first time:
>(f3 (f3 (f3 9)))
>ß => (f3 (f3 (\x.((= (cdr x) false) (x 1) ((< (cdr x) 2) ((car x) (+ (cdr x) 1)) (add1 (car x)))) 9)))
>ß => (f3 (f3 (\x.((= (cdr 9) false) (9 1) ((< (cdr 9) 2) ((car 9) (+ (cdr 9) 1)) (add1 (car 9)))))))
>ß => (f3 (f3 (\x.(true (9 1) ((< (cdr 9) 2) ((car 9) (+ (cdr 9) 1)) (add1 (car 9)))))))
>ß => (f3 (f3 (9 1)))

second time:
>ß => (f3 (f3 (9 1)))
>ß => (f3 (\x.((= (cdr x) false) (x 1) ((< (cdr x) 2) ((car x) (+ (cdr x) 1)) (add1 (car x)))) (9 1)))
>ß => (f3 ((= (cdr (9 1)) false) ((9 1) 1) ((< (cdr (9 1)) 2) ((car (9 1)) (+ (cdr (9 1)) 1)) (add1 (car (9 1))))))
>ß => (f3 ((= 1 false) ((9 1) 1) ((< 1 2) (9 (+ 1 1)) (add1 9))))
>ß => (f3 (false ((9 1) 1) (true (9 2) (add1 9))))
>ß => (f3 (true (9 2) (add1 9)))
>ß => (f3 (9 2))

third time:
>ß => (f3 (9 2))
>ß => (\x.((= (cdr x) false) (x 1) ((< (cdr x) 2) ((car x) (+ (cdr x) 1)) (add1 (car x)))) (9 2))
>ß => ((= (cdr (9 2)) false) ((9 2) 1) ((< (cdr (9 2)) 2) ((car (9 2)) (+ (cdr (9 2)) 1)) (add1 (car (9 2)))))
>ß => ((= 2 false) ((9 2) 1) ((< 2 2) (9 (+ 2 1)) (add1 9)))
>ß => (false ((9 2) 1) (false (9 (+ 2 1)) (add1 9)))
>ß => (false (9 (+ 2 1)) (add1 9))
>ß => (add1 9)
>ß => (\x.(+ x 1) 9)
>ß => (+ 9 1)
>ß => 10

fn only yields f(x) after being applied successively to x n times. any application of fn inbetween 1 and n will yield a function and not a number, so fn(x) = f(x) has no real domain until it is applied to itself n times.

>> No.14829745

Can you generalize this into a new form of calculus where instead of definig functions in terms of their derivatives and solving for that like in Diffyq you define functions in terms of what their input fed back into themselves is?

For example find the functions where f(f(f(x))) = 2x^2

>> No.14829771

How come nobody has said f(x)=-|x| for x>0 and f(x)=|x| for x<=0? Those are exactly the piecewise shenanigans I meant here >>14823252. Is there something wrong with it?

>> No.14829773

>>14829745
nigga i just generalized it to all real and imaginary functions up to n applications. doesn't matter what your gay mathematical functions even are as long as the inputs and outputs match the right domains. last two posts have an example of the function [math]f^{1/3}(x)[/math] such that [math]f^{1/3}(f^{1/3}(f^{1/3}(x))) = x + 1[/math].

>> No.14829857

>>14829771
Never mind. I see what's up.