a) Suppose f(x) is defined on 0 ≤x≤1 by the following rule: f(x) is the first digit in the decimal expansion for x. For example, f(1/2) = 5 and f(0.719) = 7. Sketch the graph of y = f(x) on the unit interval with appropriate scales for x and for y. Use a graphical interpretation of the definite integral to compute ∫_0^1▒f(x)dx.

b) Suppose the function g(x) is defined as follows: g(x) is the second digit in the decimal expansion for x. For example, g(0.437) = 3. Compute ∫_0^1▒g(x)dx. Use graph.

3 answers

It is not clear to me what the "first digit in the decimal expansion".
Is the first significant digit, the first digit after the decimal point, or otherwise?

What is f(0.004)? Is it 0, or 4?

Since 1.0 is in the domain, what about f(1.0), is it 1 or zero?
Note that 1 is not the first digit after the decimal point.

For b, the domain is not specified, is it also [0,1]?
I have the same exact workshop problem. Need help. It is written exactly as above.
Oh well, we'll make the best out of it.

I will assume the function is defined as f(x)=floor(x*10), so this will make a step function, something like:
f(x)=
0 0≤x<0.1
1 0.1≤x<0.2
2 0.2≤x<0.3
...
9 0.9≤x<1
10 x=1.0

Your graph should look like steps, but with a full circle on the left of the step (≤) and an empty circle on the right of each step (<). Finally, at x=1, there should be a single full cirlce at (1.0, 10).

To integrate the function, you only have to calculate the area under each step, i.e. height of step multiplied by its width (0.1), and sum them up.

(b)
The function is basically
f(x)=floor(x*100) mod 10
The graph consists of mini-steps from 0 to 9, repeated 10 times.
For the integral, you only have to integrate one set of steps and multiply the results by 10.