Take a non-negative continuous bump function with support [0,1] and set it to zero at all the rationals.
Hi, all.
I need to find a function f:R->R which is discontinuous on (0,1) and continuous everywhere else. My big problem is I don't know how to make it continuous at 0 and 1 if it's discontinuous at all values just above 0 and all values just below 1.
Can anyone help? I'd be very appreciative!
Thanks,
Katie
Sorry, I mean a continuous function which is positive on (0,1), 0 elsewhere and is continuous. Googling for "smooth bump function" should produce some examples. I'll post some here in a minute (I've having trouble with an integral).
edit: An example of such a function is f where f is 0 outside (0,1), 2x for 0<x<1/2 and 2-2x for 1/2<x<1.
Correct me if I'm wrong, but this doesn't do it. 2x is a continuous function, so if the function is 2x for x-values between 0 and 1/2, then at all those values, the function will be continuous (except maybe the endpoints, depending on what the other pieces of the function are).
What I need is a function such that
1) f is continuous at x=a if a≤0 or a≥1
2) f is discontinuous at x=a if 0<a<1
Thanks,
Katie
Okay, did yet more reading and searching, and found an idea I was able to adapt. Here it is:
f(x)=
{x if 0<x<1/2 and x is rational
{1-x if 1/2≤x<1 and x is rational
{0 everywhere else
It's continuous outside of [0,1] because it's just a constant function. It's continuous at 0 because the limit as x->0+ for both the rationals and irrationals is 0 (which matches the function value). Same goes for 1. And it's discontinuous within (0,1) because it keeps popping back and forth between x and 0 as x hits rational and then irrational values.