# Derivative of the function

1. Oct 5, 2006

### Karlisbad

let be the function f(x) so

f(x)=1 for every integer or rational.

f(x)=0 otherwise..

my questions are, what's the value of $$\int_{a}^{b}f(x)dx$$ and f'(x) (i think the second value is 0 for every x, but i'm not sure)

2. Oct 5, 2006

### matt grime

The function is neither Riemann integrable, nor differentiable. It is not even continuous os has no chance of being differentiable. It is Lebesgue integrable and the integral is identically zero.

3. Oct 5, 2006

### Karlisbad

Oh..sorry, i saw a similar example, they defined the function:

g(x)= f(x)+a(x) iff x is an integer

g(x)=f(x) otherwise.

where a(x) is the function (i don't know its name) that is 1 iff x is a rational and 0 otherwise. :shy: :shy: then you had the question of defining g'(x)

4. Oct 5, 2006

### HallsofIvy

Staff Emeritus
Obviously, g(x)= f(x) for all non-integer x so g'(x)= f'(x) for non-integer x. Since g is not continuous at integer x, g is not differentiable there.

5. Oct 5, 2006

### arildno

As a completely unnecessary addition to the previous posts, the function you started with is famous enough to have gained its own name: it is called the Dirichlet function.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook