## Function Equivalence

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

### Function Equivalence

For an assignment I have in real analysis, I'm given the function f+(x)={f(x) if f(x)>=0, 0 if f(x)<0} where f is a continuous real valued function, and I'm given some things to prove about f+, one of which is that f+ is continuous.

I'd like to start by saying that f+(x) can equivalently be written as (f(x)+|f(x)|)/2, which makes the proof follow quite easily, but my concern is whether or not it's fair game to recognise that that is an equivalent function, or if I'd need to somehow prove that it is in fact equivalent (which I suspect is easy unless theres something subtle to worry about).

So to recap, is saying {f(x) if f(x)>=0, 0 if f(x)<0} = (f(x)+|f(x)|)/2 something that would pass a rigour test without proof, or would rewritting the given function like that anger the analysis gods?

(Apologies if "function equivalence" technically refers to something specific that's different from what I'm asking.)

Dopefish

Posts: 692
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

### Re: Function Equivalence

Given that a proof is two simple cases, why not prove it?
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

jestingrabbit

Posts: 5186
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

### Re: Function Equivalence

That it would be relatively trivial to prove only occured to me in the process of typing it, but I figured I should post anyway just in case someone wanted to jump up and also say "Yes, the functions have equal values, but you're assuming <x> about the version you want to use, which the original definition doesn't have, so they're not equivalent!" or something like that.

I'm just uneasy going from something that is explicitly piecewise to something that isn't explicitly piecewise (granted, implicitly it is via the absolute values I suppose) since I haven't proved that doing so doesn't bring about terrible things. It seems 'obvious' that it's safe since they take on the same values, but I'm still inexperienced enough in in the world of analysis that I could see myself assuming something without realising it. Not to mention, looking at the question further, rewritting the function as I've suggested makes every part of the problem essentially trivial, which makes me extra cautious that I've missed something.

edit: On that note, is it possible for two functions to take on the same value for all x, but have different mathematical properties? I can't think of any examples, but you folks are great at spouting counter intutive examples (non-differentiable continuous functions, functions whose derivatives aren't integrable, etc.).

Dopefish

Posts: 692
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

### Re: Function Equivalence

Writing "f+ is continuous because f+(x) = (f(x)+|f(x)|)/2, which is continuous" wouldn't anger the rigor gods, but they might be angry if you didn't justify that (f(x)+|f(x)|)/2 is continuous. In particular, why is |f(x)| continuous?

Dopefish wrote:On that note, is it possible for two functions to take on the same value for all x, but have different mathematical properties?
Not really. Two functions f and g with the same domain and codomain are the same precisely when f(x) = g(x) for all x in their domain. If f and g are the same function, then obviously the fact that g is continuous implies the fact that f is continuous.

Even if this weren't the case, if you look at the definition of "continuous" it makes no reference to any aspect of the function other than its domain and the values it takes. So if two functions have the same domain, and take on the same values at every point in that domain, either they're both continuous or neither is.

Consider, however, these two functions: f:R->R+ given by f(x) = x2 and g:R->R given by g(x) = x2. Here, by R+ I mean the set of nonnegative real numbers. They have the same domain, and they agree on every element of that domain, but they're different functions, and in particular one is surjective and the other isn't. This is because the definition of "surjective" makes reference to the codomain of the function, as well as its domain and its values.
Jerry Bona wrote:The Axiom of Choice is obviously true; the Well Ordering Principle is obviously false; and who can tell about Zorn's Lemma?

antonfire

Posts: 1768
Joined: Thu Apr 05, 2007 7:31 pm UTC

### Re: Function Equivalence

Dopefish wrote:On that note, is it possible for two functions to take on the same value for all x, but have different mathematical properties?

Yes, for example if I take the function f:{0,1} -> {0} and g: {0,1}-> {0,1} by setting f(x) = g(x) = 0 then the first function is subjective while the second is not, and they agree with every value of x in {0,1}. As Antonfire mentioned though the additional constraint requiring the domain/codomain to be equal resolves this problem.
"Labor is prior to, and independent of, capital. Capital is only the fruit of labor, and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration." - Abraham Lincoln
Cleverbeans

Posts: 878
Joined: Wed Mar 26, 2008 1:16 pm UTC

### Re: Function Equivalence

Cool, thanks for those 'different but the same' examples.

I wouldn't have simply stated (f(x)-|f(x)|)/2 is continuous without further justification, but there are a lot of previously proven things that make that justification easy, namely that |f(x)| is continuous if f(x) is (by way of episilon-N type proof and an inequality proved way back in the course), a sum of two continuous functions is continuous, and a constant times a continuous function is continuous. Like I said, if I can rewrite the function as I proposed (which it seems I can), it all follows reasonably trivially.

I'm generally torn between wanting to cut every corner possible in my proofs to minimise writting (not strictly due to laziness; I write huge and skip lines so I go through a ton of paper), and wanting to be super careful so I can prove to my math major peers that despite the fact I'm not a math student, I could have been. It feels excessive when every other paragraph is a proof by induction (or episilon type proof) of some sub-fact (especially coming from a physics environment of "assume all the mathematical properties you want hold, then..."), but it's somewhat satisfying that I can actually do so.

I'll be most interested to see how much rigour the marker ends up wanting when the problem says "justify" rather then "prove", but for the most part I've erred on the side of caution, as a lot of the proofs are just a few lines anyway.

Anyhow, thanks!

Dopefish

Posts: 692
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

### Re: Function Equivalence

antonfire wrote:Writing "f+ is continuous because f+(x) = (f(x)+|f(x)|)/2, which is continuous" wouldn't anger the rigor gods, but they might be angry if you didn't justify that (f(x)+|f(x)|)/2 is continuous.

The OP should also prove that f+(x) = (f(x)+|f(x)|)/2. (No one seems to have brought this up.)

Proginoskes

Posts: 309
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

### Re: Function Equivalence

Dopefish wrote:Cool, thanks for those 'different but the same' examples.

I wouldn't have simply stated (f(x)-|f(x)|)/2 is continuous without further justification, but there are a lot of previously proven things that make that justification easy, namely that |f(x)| is continuous if f(x) is (by way of episilon-N type proof and an inequality proved way back in the course), a sum of two continuous functions is continuous, and a constant times a continuous function is continuous. Like I said, if I can rewrite the function as I proposed (which it seems I can), it all follows reasonably trivially.

I'm generally torn between wanting to cut every corner possible in my proofs to minimise writting

It honestly honestly depends on what they expect from you. For instance, in any vaguely advanced paper you could just say (f(x)-|f(x)|)/2 is continuous (it's rather trivial) and indeed that f+(x) = (f(x)+|f(x)|)/2 (also rather trivial). I'd personally prove the latter and take the former for granted, but maybe they expect something different. As for proving the latter, remember to go back to basics. "Piecewise" and that stuff doesn't really matter; all that matters is that two functions agree iff they agree at every point (and I guess stuff like domain and codomain if you define it like that). It's then easy enough to take an arbitrary point and verify equality in both cases.
lalop

Posts: 120
Joined: Mon May 23, 2011 5:29 pm UTC

### Re: Function Equivalence

Ehm... I don't think that f+(x) = [f(x) + |f(x)|]/2... Take for example the function f(x) = x2, then |f(x)| = f(x) for every x and your definition is not true...
You could maybe say that f+(x) = [f(x) + sgn(x)|f(x)|]/2, where sgn(x) = x/|x|

EDIT: added the subscript + to some f's
Last edited by Giallo on Mon Feb 13, 2012 4:08 pm UTC, edited 1 time in total.
"Ich bin ein Teil von jener Kraft, die stets das Böse will und stets das Gute schafft."
Giallo

Posts: 223
Joined: Sat Jan 01, 2011 11:31 pm UTC
Location: ETH, Zürich, Switzerland

### Re: Function Equivalence

Giallo wrote:Ehm... I don't think that f(x) = [f(x) + |f(x)|]/2... Take for example the function f(x) = x2, then |f(x)| = f(x) for every x and your definition is not true...

Yes it is: (x2+|x2|)/2 = (x2+x2)/2 = (2x2)/2 = x2

jaap

Posts: 1719
Joined: Fri Jul 06, 2007 7:06 am UTC

### Re: Function Equivalence

jaap wrote:
Giallo wrote:Ehm... I don't think that f(x) = [f(x) + |f(x)|]/2... Take for example the function f(x) = x2, then |f(x)| = f(x) for every x and your definition is not true...

Yes it is: (x2+|x2|)/2 = (x2+x2)/2 = (2x2)/2 = x2

Yeah, sorry, i meant f+(x), not f(x). The fact is that for x < 0 we also have [f(x) + |f(x)|]/2 = x^2, which is obviously not 0, while for example f(x) = -x^3 gives you 0 for x > 0...
"Ich bin ein Teil von jener Kraft, die stets das Böse will und stets das Gute schafft."
Giallo

Posts: 223
Joined: Sat Jan 01, 2011 11:31 pm UTC
Location: ETH, Zürich, Switzerland

### Re: Function Equivalence

Giallo wrote:
jaap wrote:
Giallo wrote:Ehm... I don't think that f(x) = [f(x) + |f(x)|]/2... Take for example the function f(x) = x2, then |f(x)| = f(x) for every x and your definition is not true...

Yes it is: (x2+|x2|)/2 = (x2+x2)/2 = (2x2)/2 = x2

Yeah, sorry, i meant f+(x), not f(x). The fact is that for x < 0 we also have [f(x) + |f(x)|]/2 = x^2, which is obviously not 0, while for example f(x) = -x^3 gives you 0 for x > 0...

Note that the conditions on the piecewise thing depend on the sign of f(x), not on the sign of x. Things would be far less trivial if it depended on the sign of x (and we probably couldn't actually get anywhere at all since theres all sorts of real valued continuous functions f that could do all sorts of crazy things).
Last edited by Dopefish on Mon Feb 13, 2012 4:19 pm UTC, edited 1 time in total.

Dopefish

Posts: 692
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

### Re: Function Equivalence

Giallo wrote:
jaap wrote:Yes it is: (x2+|x2|)/2 = (x2+x2)/2 = (2x2)/2 = x2

Yeah, sorry, i meant f+(x), not f(x). The fact is that for x < 0 we also have [f(x) + |f(x)|]/2 = x^2, which is obviously not 0, while for example f(x) = -x^3 gives you 0 for x > 0...

I think see where you're coming from. The mistake is that it doesn't matter whether x is negative or not. The cases in the definition of f+(x) depend on the nonnegativity of f(x), not x. Since f(x)=x^2 >= 0 for all real x, as you say, then it is clear that the "if f(x) is negative" case of f+(x)'s definition never comes into play.

Edit: Ninja'd.
jobriath

Posts: 202
Joined: Wed Apr 04, 2007 2:11 pm UTC
Location: The North

### Re: Function Equivalence

Why even bother bringing |f(x)| into this at all? It seems pretty simple to prove f+ is continuous from the definition.

When f(x) is positive, by continuity of f there’s a neighborhood (x-h, x+h) where f(x) is positive, on which f+ = f which is continuous by definition.

When f(x) is negative, by continuity of f there’s a neighborhood (x-h, x+h) where f(x) is negative, on which f+ = 0 which is continuous since it is constant.

When f(x)=0, by continuity of f we know for every ε>0 there is a δ>0 such that on the neighborhood (x-δ, x+δ) we have -ε<f(x)<ε. By definition of f+, we see that on this same neighborhood, -ε<0≤f+(x)<ε. So f+ is continuous there and the same δ(ε) works for f+ as for f.
Small Government Liberal

Qaanol

Posts: 2239
Joined: Sat May 09, 2009 11:55 pm UTC

### Re: Function Equivalence

The why comes from having truckload of of stuff proven about the properties of absolute value that makes the other parts of the question (there was roughly 4 parts, continuity of f+ was just the first part) somewhat more trivial when I don't need to consider seperate cases.

That said, it's good for me to see the epsilon-delta version using the original definition, so thanks for that.

Dopefish

Posts: 692
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

### Re: Function Equivalence

This looks like an introductory real analysis course of some kind. As such, I'd advise being relatively anal about things. Your approach is good, but don't skip steps.

As a general rule, don't skip any step that you haven't written out before, and then checked that what you wrote out was valid.

So, for the proof via (f+|f|)/2 route, you might do:
1) Two functions are equal if they agree at all points, and have the same domain and codomain.
2) g(x) := (f(x) + |f(x)|)/2 is continuous (do you have a+b is continuous if a and b are continuous? a(b) is continuous if a and b are continuous? (alternatively, is lambda f continuous for real lambda and function f?) |.| is continuous?)
3) Show that f+(x) = g(x) for all x.
4) Show that domain(g) = domain(f+), and the same for codomain.

Another approach that you might find interesting would be to define:
h(x) := 0 if x<0, x otherwise
and prove that h is continuous. Then, note that f+(x) = h(f(x)), and that the composition of continuous functions is continuous.

Amusingly, you might prove h(x) is continuous via the (x+|x|)/2 method.

On the other hand, one of the standard (and easy) ways to prove |.| is continuous is to use the fact that f+ is continuous (|f| := f+[/[sup] + (-f)[sup]+). So possibly using it in a proof of f+'s continuity might be rude.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Yakk

Posts: 10039
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

### Re: Function Equivalence

Yakk wrote:This looks like an introductory real analysis course of some kind.

Yup, the course in question is called "Introductory Analysis" (with the fact it's real being specified in the course description).

So, for the proof via (f+|f|)/2 route, you might do:
1) Two functions are equal if they agree at all points, and have the same domain and codomain.
2) g(x) := (f(x) + |f(x)|)/2 is continuous (do you have a+b is continuous if a and b are continuous? a(b) is continuous if a and b are continuous? (alternatively, is lambda f continuous for real lambda and function f?) |.| is continuous?)
3) Show that f+(x) = g(x) for all x.
4) Show that domain(g) = domain(f+), and the same for codomain.

I have all the results mentioned in 2), which is what inspired me to take this route, and I've since done 3). With regards to 4), is there a rigorous way to do that?

In the material up to the point when this assignment [which I'm 'done' at this stage] would be due, the extent of reference to domain is that it is the set of values for which a function is defined, and doesn't actually do anything with that except warn that things will go wrong if you try to use values outside that domain. Codomain hasn't been mentioned at all (although it's something I'm aware by virtue of spending time in these forums). So basicly I'd be inclined to simply say that if dom(f)=D, then dom(g)=D=dom(f+) as well, but that doesn't seem especially rigourous and I'm curious how it would be done 'right'. (Although I suspect I won't be altering my assignment at this stage, on the assumption that since the book/notes don't worry about it, I don't need to either.)

Also, the proof that |f| is continuous if f is was done without any usage of f+ (|f| was defined piecewise as f for postive f, -f for negative f) so I reckon that stuff is fair game.

Dopefish

Posts: 692
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes

### Re: Function Equivalence

Dopefish wrote:I have all the results mentioned in 2), which is what inspired me to take this route, and I've since done 3). With regards to 4), is there a rigorous way to do that?

Technically, I think it's true by definition (you sort of choose the domain and codomain when you create a function); the only possible issue is whether or not the function is well-defined in that chosen domain. For example, it makes no sense to define 1/x on the whole real line; the domain has to be R - {0}.

Personally, I think it self-evident that f+ and g are both well-defined on all R. I'm not even sure how one would prove it: for any arbitrary x, g(x) = (f(x) + |f(x)|)/2, which is well-defined? I think that's getting slightly too anal.
lalop

Posts: 120
Joined: Mon May 23, 2011 5:29 pm UTC

### Re: Function Equivalence

To show that a function f is well defined, you have to show that for all x in the domain, there exists a y in the codomain such that f(x)=y, and if f(x)=y and f(x)=y', then y=y' (ie the function is single-valued). For the given function, these properties are pretty obvious given that g is defined in terms of other functions (f, addition, abs, division - which are all well-defined functions on their respective domains).

Talith
Proved the Goldbach Conjecture

Posts: 844
Joined: Sat Nov 29, 2008 1:28 am UTC
Location: Manchester - UK

### Re: Function Equivalence

There are a few foundational results that let you do talk about derived topologies and the like.

Are you using epsilon-delta continuity, open set preimage continuity, or neighborhood continuity? They are all equivalent (on R and subsets), but they might require different technical things to deal with.

Ie, if f:A->B where A and B are topological spaces, showing that if X is a subset of A, then f|X: X->B is continuous on the derived topology might take a technical result.

Similarly, if Image(f) is a subset of B, which is a subset of C, showing that f:A->C is continuous if f:A->B is continuous would be another technical result. (I originally wrote "iff", which I think is false -- let the image of f be a set of separate points in C. Then all sets in Im(f) are open. Which requires that the inverse image of each point in Im(f) be open, which would mean that f is continuous... ok, that doesn't disprove it. Thinking again: The derived topology of B from C results in more subsets of B being open -- so the inverse image requirement is more strict, so "only if" is going to be true. Why is "if" true? Is "if" true? It should be -- it would be nasty if it isn't. The open sets in B are exactly the open sets in C intersect B. The inverse image of an open set in C is equivalent to the inverse image of the open set restricted to B, as Im(f) is a subset of B, and inverse image is a pointwise concept whose "kernel" in a sense is Im(f)c. So "if" also works. Ok, it is an "iff", which is nicer than the alternative.)

Ahum.

Make that: Similarly, Image(f) is a subset of C, which is a subset of B, showing that f:A->C is continuous iff f:A->B is continuous would be another technical result.

With those two, showing that h:= 1/2 (f + |f|) : R->R is pointwise equal to f+:R->R+, and image(h) is a subset of R+, lets you say that h's continuity implies f+'s continuity.

However, I do not think that that level of rigor is all that common in introductory analysis courses, and isn't necessary beyond introductory analysis courses because the proof is merely a technical issue. This isn't a bad thing -- at some point, you really got to stop it with the rigor, or you end up with spending 100 pages building a foundation so you can define what 1+1 is, and why it equals 2 (which is an interesting result and all, but it probably doesn't belong in an intro to analysis course!) And it could easily be the case that you have proven this result already.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Yakk

Posts: 10039
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

### Re: Function Equivalence

Yakk wrote:There are a few foundational results that let you do talk about derived topologies and the like.

Are you using epsilon-delta continuity, open set preimage continuity, or neighborhood continuity? They are all equivalent (on R and subsets), but they might require different technical things to deal with.

Ie, if f:A->B where A and B are topological spaces, showing that if X is a subset of A, then f|X: X->B is continuous on the derived topology might take a technical result.

Similarly, if Image(f) is a subset of B, which is a subset of C, showing that f:A->C is continuous iff f:A->B is continuous would be another technical result.

Since it's pretty easily proven that the three are the same, you could just use open set preimage continuity, under which the two results follow quickly from the definition of subspace topology.

But meh.
lalop

Posts: 120
Joined: Mon May 23, 2011 5:29 pm UTC

### Re: Function Equivalence

*nod* -- they are just technical results, and not all that interesting.

Outside of an intro to analysis course, you wouldn't be expected to prove them. I could easily see them hand-waved and/or ignored in most intro to analysis courses.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Yakk

Posts: 10039
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

### Re: Function Equivalence

The two definitions of continuity being used are that f is continous at x_0 if for all sequences x_n that converge to x_0, lim f(x_n)=f(x_0), and f is continuous if it is continuous for every point in its domain, since the course (up to now at least) has been pretty big on sequences and hence this is supposed to be the 'intuitive' one.

The other definition is the episilon delta one (which I'll type out from memory more for the practice then anything): f is continuous at x_0 if for every epsilon>0, there exists delta>0 such that |x-x_0|<delta implies |f(x)-f(x_0)|<epsilon (x belonging to dom(f)). (Yell at me if one or both of those definitions aren't quite right, since I'm spouting both from memory and I ouaght to know them both for my midterm in a couple days.)

Most of what you said I follow, but not by virtue of the course I'm in, so it's either more rigourous then expected from my course or at the very least is going at things via a different approach. (I'm slightly disappointed that I won't get to take follow-up analysis courses that may or may not use all these nifty concepts you folk have mentioned since I'll be graduating this year. Thankfully [the internet/wiki/xkcd math forum dwellers] exists.)

Dopefish

Posts: 692
Joined: Sun Sep 20, 2009 5:46 am UTC
Location: The Well of Wishes