# Show this function is associative (or provide a counter example)

1. May 9, 2013

### ArcanaNoir

1. The problem statement, all variables and given/known data
I'm trying to show that $f(x,y)=x\sqrt{1+y^2}+y\sqrt{1+x^2}$ is associative, or provide a counter example. (All variables are real numbers.)

2. Relevant equations

3. The attempt at a solution

I have it down to needing to show that $$x\sqrt{(1+y^2)(1+z^2)}+z\sqrt{1+(x\sqrt{1+y^2}+y\sqrt{1+x^2})^2}$$ is equal to $$z\sqrt{(1+x^2)(1+y^2)}+x\sqrt{1+(z\sqrt{1+y^2}+y\sqrt{1+z^2})^2}$$

Playing with actual numbers I have always been able to see that they are indeed quite equal, yet algebraically I cannot prove it with arbitrary variables. I have been working on it for several days, and have tried expanding, completing the square, and everything else I can think of, but no luck

2. May 9, 2013

### SammyS

Staff Emeritus

3. May 9, 2013

### ArcanaNoir

Not that I can see, did you have something specific in mind? Commutativity doesn't imply associativity by itself. Based on your suggestion I tried changing some things like (y*x)*z and z*(y*x) and messing with order in that way but was unable to get anywhere with it.

4. May 9, 2013

### micromass

Staff Emeritus
We need to prove that

$$x\sqrt{(1+y^2)(1+z^2)}+z\sqrt{1+(x\sqrt{1+y^2}+y\sqrt{1+x^2})^2} =z\sqrt{(1+x^2)(1+y^2)}+x\sqrt{1+(z\sqrt{1+y^2}+y\sqrt{1+z^2})^2}$$

Assume that $x,y,z\geq 0$ first.

There are two terms with square roots inside square roots. Let's focus on those first. Isolate one of the terms:

$$z\sqrt{1+(x\sqrt{1+y^2}+y\sqrt{1+x^2})^2} =(z\sqrt{(1+x^2)(1+y^2)}-x\sqrt{(1+y^2)(1+z^2)})+x\sqrt{1+(z\sqrt{1+y^2}+y\sqrt{1+z^2})^2}$$

Square both sides of the equations. You will end up with one term having a square root inside a square root. Isolate that term. Square both sides of the equation. You will end up with only terms which have square roots. Now you might be able to see more clearly why equality holds. If not, we need to keep on isolating terms and squaring them.

This is tedious, but it works.

5. May 9, 2013

### ArcanaNoir

Okay, I will try this. Why do we have to assume they are greater than 0 though? I have to show it holds for the whole real line.

6. May 9, 2013

### micromass

Staff Emeritus
Because $x^2 = y^2$ and $x=y$ are not equivalent. They are only equivalent for positive numbers. So you should show it for positive numbers first, and then find an argument why it also holds for negative numbers.

7. May 9, 2013

### ArcanaNoir

Okay, I'll get working on it straight away. Thanks for the tips!

8. May 9, 2013

### ArcanaNoir

Are you sure this is possible to do by hand? Like in 20 pages or less....

9. May 9, 2013

### micromass

Staff Emeritus
Maybe you want to use a computer algebra system...

10. May 9, 2013

### ArcanaNoir

I was trying to use maple, but it was doing a horrible job. It won't expand things when I tell it to.

11. May 9, 2013

### ArcanaNoir

holy crap. Just figured out how to expand it completely, it's equally as useless. It's ten lines in maple for the right hand side.

12. May 9, 2013

### LCKurtz

So say you have rhs := right hand side. Calculate lhs and let Maple calculate lhs-rhs and see if it gives 0.

13. May 9, 2013

### Ray Vickson

I have tried this in Maple, and here is what happens: if we let
$$F(x,y,z) = f(x,f(y,z))^2-f(f(x,y),z)^2$$
and use 3d plotting to graph F(x0,y,z) for various fixed values of x0 and reasonable ranges of y and z, we always get a surface plot of random roundoff errors, with values of order 10^-(13) or less. So, numerically we do have confirmation.

We can also use Maple to get a multivariate Taylor expansion of F(x,y,z) at (0,0,0) up to various orders. For orders <= 30 the expansion is zero. Going much beyond order 30 takes patience, as the computation time increases rapidly: using Maple 11 on an HP Probook 4310s, the cpu times are 0.266 sec for order 20, 1.966 sec for order 25 and 9.313 sec for order 30. Anyway, we have some type of semi-confirmation that F = 0, since its multivariate derivatives of order <= 30 all vanish at (0,0,0).

What does not appear easy is to show F = 0 symbolically. I wonder if this is one of those cases where proving that A = B (for given symbolic A and B) is essentially un-doable; I read somewhere that there are some general results in symbolic computation that deal with such problems and that there are, indeed, such examples.

14. May 9, 2013

### ArcanaNoir

Thank you for looking at the plot, I had wondered about that but wasn't sure how to do it. Maybe I need to just admit to my professor that I'm stumped on this one. I suppose if I get all the rest of the problems it won't hurt my pride too bad. I wonder why he even wrote such an exercise!

15. May 9, 2013

### Ray Vickson

There must be some clever, alternative way to do it. What is the problem context (i.e., surrounding course content)? Maybe f(x,y) has some type of geometric interpretation that makes things clearer, or maybe such functions appear naturally in some types of applications. Do you have any suggestions?

16. May 9, 2013

### gerben

Realize that f(x, y) = g(x, y) + g(y, x), then write both f(f(x, y), z) and f(z, f(x, y)) in terms of g and see that they are the equal.

17. May 9, 2013

### Dick

Oh, that doesn't work. Did you try it? Put g(x,y)=x+y. That doesn't even work, even though f(x,y)=x+y does. I'd be really interested to know if there is an easy proof.

18. May 9, 2013

### Dick

You can make it a little easier by noticing f(f(kx,ky),kz))-f(kx,f(ky,kz))=0 iff f(f(x,y),z)=f(x,f(y,z)) for k!=0. So you can choose say, k=1/z and now you only have to prove f(f(x,y),1)=f(x,f(y,1)). That's a pretty modest simplification, I'll admit. I also found a paper that claims to show that the only rational functions f(x,y) that are associative are f(x,y)=x,y,x+y,xy, up to mobius transformations of f. But that doesn't help here since your f(x,y) isn't rational. But still, shows associative functions f are pretty special.

Last edited: May 9, 2013
19. May 9, 2013

### Ray Vickson

Success at last! Letting F1 = f(x,f(y,z)) and F2 = f(f(x,y),z), F1 becomes the sum of two terms with square-roots inside square roots. In Maple, we can extract the first one as L1 = op(1,F1). Since we are trying to prove F1 = F2, let's follow the suggestion by 'micromass' and compare L1 with R1 = F2 - op(2,F1); these ought to be equal, because in Maple we have F1 = op(1,F1)+op(2,F1). Leaving off the question of signs, square and expand both L1 and R1. We find that RR1 = R1^2 consists of 11 separate terms, of which two involve the same square-roots-within square-roots, but with different outside factors---both negative. The exact way to extract these depends on where they occur in the expression tree, but one can list all 11 terms through S = seq(op(i,RR1),i=1..11); in one session the two terms of interest were S[5] and S[11]. Writing RR1 = RR1a -S[5]-S[11], we want to prove that S[5]+S[11] = RR1a - L1^2. Now the right-hand-side no longer has square-roots inside square-roots. When we again square and compare (S[5]+S[11])^2 with (RR1a-L1^2)^2, we find the difference = 0!

Note that the exact way of extracting the wanted terms may be session-dependent and/or machine-dependent, etc., so success depends on a mix of human and machine processing, with the human determining what terms to group together. Getting a machine to do this unaided might be almost beyond the capabilities of current software.

In principle, all the work above could be done manually, if you have a couple of free days to spare dong algebra.

Of course, since we compared squares with squares, there are still sign considerations to worry about, but those seem comparatively simple to deal with.

20. May 9, 2013

### Dick

That's nice to know. Still be nice to know what the instructor had in mind and what makes that f(x,y) so special. Grrr.