# Separately continuous not implies continuous

## Contents

## Statement

### For a function of two variables at a point

It is possible to have the following: a function of two variables and a point in the domain of the function such that is separately continuous in both variables at the point , but is not a continuous function at .

### For a function of two variables overall

It is possible to have the following: a function of two variables that is separately continuous in both variables everywhere on , but is not continuous everywhere on i.e., there is some point in where is not continuous.

### For a function of multiple variables

We can replace functions of two variables by functions of more than two variables in both the above formulations.

## Related facts

- Existence of partial derivatives not implies differentiable
- Continuous along every linear direction not implies continuous

## Proof

### Example

We give a single example that illustrates both versions of the statement.

Consider the function:

It's clear that is continuous, as well as separately continuous, at all points other than . At the point , we calculate the limits along the -direction and -direction:

- The limit along the -direction is . This coincides with the value .
- The limit along the -direction is . This coincides with the value .

Thus, the function is *separately continuous* in both and at the point . Since we already established that it's separately continuous everywhere else, we obtain that it is separately continuous on all of .

On the other hand, is not continuous at . To see this, consider the limit along the line . Setting , we get that the limit is:

Note that if the function were indeed continuous at , the limit along every direction would equal the value at the point, so this shows that the function is not continuous at .

### Idea behind example

The secret behind the example can be better understood using polar coordinates, though this is not necessary to understand the example itself. In polar coordinates, we can rewrite where:

Here's how we get this. Plug in and in the original expression for points other than the origin. We have:

The limit for any fixed value of , is the number . Thus:

- If is a multiple of (this includes the positive -direction, positive -direction, negative -direction, and negative -direction), the limit at the origin along the half-line corresponding to is zero. This explains why the function is continuous along the - and -directions, hence separately continuous in the Cartesian coordinate system.
- If is not a multiple of , the limit at the origin along the half-line corresponding to is , a nonzero number. This limit does not equal the value, hence the function is not continuous in this direction. Hence, the function is not continuous.

### Extending the example

We can generalize the idea behind the example to obtain new examples of functions that are continuous from many directions but still not continuous as functions. For instance, the function that in polar coordinates would read as:

is continuous not just along the - and -directions but also along the and lines. However, it is *still* not continuous from *every* direction, hence is not a continuous function.

It is even possible to construct examples of functions that are continuous in every linear direction but not continuous as functions. See continuous in every linear direction not implies continuous.

### Generalization to functions of more than two variables

We can use the same example as for a function of two variables, with the above functional form in terms of two of the input variables, and with the function independent of the remaining variables.