Find a function f from R to R such that f is continuous at only one point?

f is a function from R to R such that f(a) is rational when a is irrational and f(a) is irrational when a is rational . prove that f cannot be continuous

To find a function that is continuous at only one point, we can consider the following example:

Let's define a function f(x) as:

f(x) = { 0 for x ≠ 0
1 for x = 0 }

In this example, the function f is continuous only at x = 0 and discontinuous at all other points. At x = 0, f(x) is defined to be 1, and the limit of f(x) as x approaches 0 is also 1. This satisfies the definition of continuity.

However, for all other values of x (x ≠ 0), f(x) is defined to be 0. As a result, the function exhibits a jump discontinuity at all these points, which means it is not continuous.

So, the function f(x) = { 0 for x ≠ 0, 1 for x = 0 } is an example of a function that is continuous at only one point, namely x = 0.

To find a function that is continuous at only one point, we need to construct a function that has a different behavior at every point except one. One way to do this is by defining a function that is constant except at one specific point.

Let's consider the function f(x) = 0 for x ≠ c and f(c) = 1, where c is some arbitrary constant. This function is continuous at x = c because the limit of f(x) as x approaches c is equal to f(c). However, for all other values of x, f(x) is constant and hence continuous.

To prove the continuity at x = c, we can apply the definition of continuity. Let's pick an arbitrary value ε > 0 and find a δ > 0 such that |x - c| < δ implies |f(x) - f(c)| < ε.

Since f(x) = 0 for x ≠ c, we have |f(x) - f(c)| = |0 - 1| = 1 for x ≠ c. Now, let's choose δ = ε. If |x - c| < δ, then |x - c| < ε, which implies |f(x) - f(c)| < ε.

Therefore, we have shown that f(x) = 0 for x ≠ c and f(c) = 1 is continuous only at x = c.