# Method for solving integrals?

1. Nov 4, 2008

### Ulagatin

Hi All,

I'm in Year 10 (doing pure mathematics one step below pre-tertiary level) at the moment, and I thought I would work myself through a mathematics text to get myself to a good solid position to study higher mathematics (I want to be a physicist). I was inspired by one of Ian Stewart's books (Taming the Infinite: The story of mathematics), and so based on this inspiration, I decided to self-study mathematics. I happened upon a copy of Apostol's "One Variable Calculus".

I am roughly 90 pages through, did well with sets, did reasonably with sequences too I think (and wrote my first proof but not sure if it was right in the end - I was happy though), but once I hit the example problems for solving integrals, I was stuck.

So, I have a few example problems that I have to share, which I will take a stab at, and so any of you willing to help out can show me the correct method in solving integrals (I'll only post the first at the moment).

1. The problem statement, all variables and given/known data

The first problem:

$$\int_{-1}^{3} [x] dx$$

2. Relevant equations

Theorem 1.6: $$\int_{a}^{c} s(x) dx + \int_{c}^{b} s(x) dx + \int_{b}^{a} s(x) dx = 0$$

Theorem 1.2: $$\int_{a}^{b} [s(x) + t(x) dx] = \int_{a}^{b} s(x) dx + \int_{a}^{b} t(x) dx = 0$$

Theorem 1.5: $$\int_{a}^{b} s(x) dx < \int_{a}^{b} t(x) dx$$

3. The attempt at a solution

First problem:

Let s(x) = 0 and t(x) = [x] satisfying the comparison theorem for [x] > 0.
Let -1 be represented by 'a', 1 by 'b' and 3 by 'c'.

So, we then have the following:

$$\int_{a}^{c} t(x) dx + \int_{b}^{c} t(x) dx + \int_{a}^{b} t(x) dx = 0$$

Now, there is a range of 4 in the interval [a, c], or numerically [-1, 3] for the first integral. A range of two in the second integral exists, as the interval is [b, c] represented numerically by [1, 3]. And finally the third integral covers the interval [a, b], numerically [-1, 1].

My idea was that, if [x] = 1 (whatever the square brackets may mean), that as the integral in this problem is from -1 to 3, the solution would be 4, given that it is a step function. The answers in the book tell me that the solution to the integral is actually 2. Would this mean that [x] is equal to 1/2? If I understand correctly, as the integral is telling me the area of the function, that [x] is actually the y-coordinate of the step function?

If this is the case, then to get 2, it must be (if my understanding of the method is correct) that [x] = 1/2, and so over an interval of 4, the function is intersecting the y-axis at [x] = 0.5. This would obviously mean 0.5*4 = 2.

Is this understanding correct in any shape or form? I am sure it is not! I have heard of the "integral of 1/cabin" joke, and so do natural logs come into play here?

Any help whatsoever is greatly appreciated, and so, thanks in advance!!

I know some of you might think I'm crazy to try and learn from Apostol at this stage, but I am sure an understanding of a few key points should allow me to be able to (hopefully) get through this text.

Cheers,
Ulagatin

2. Nov 4, 2008

### Dick

You should really say what [x] is supposed to mean. Usually it's the 'floor' function ([x] is the greatest integer less than or equal to x). In that case just split the integral up into the subintervals [-1,0],[0,1],[1,2] and [2,3]. What do you get for each one? Then just add them up.

3. Nov 4, 2008

### HallsofIvy

Staff Emeritus
This doesn't help you at all. It just says that $\int_a^b f(x)dx= -\int_b^x dx$ and you don't have that situation.

Now, there is a range of 4 in the interval [a, c], or numerically [-1, 3] for the first integral. A range of two in the second integral exists, as the interval is [b, c] represented numerically by [1, 3]. And finally the third integral covers the interval [a, b], numerically [-1, 1].

My idea was that, if [x] = 1 (whatever the square brackets may mean)[/quote]
Excuse me? No matter what rules or theorems you have, the integral of a function depends on what that function is! Am I right that you are using [x] to mean the "floor function", the largest integer less than or equal to x? The standard notation for that function is is similar to [x] but does not have the upper serifs.

4. Nov 4, 2008

### Dick

Hi Halls. I think the limits on the integral are supposed to be -1 to 3. So the floor function does give an integral of 2.

5. Nov 4, 2008

### HallsofIvy

Staff Emeritus
Thanks, Dick, I completely misread that!
The floor function is -1 for -1< x< 0, 0 for 0< x< 1, 1 for 1< x< 2, 2 for 2< x< 3 so
$$\int_{-1}^3 [x]dx= \int_{-1}^0 -1 dx+ \int_{0}^1 0 dx+ \int_1^2 1 dx+ \int_2^3 2 dx$$

Yes, that is totals to 2.

6. Nov 4, 2008

### Ulagatin

Ok, Halls, yes, I believe the [x] implies that it is a "floor function". So here, I gather, it's simply a matter of "-1+0+1+2 = 2", which is of course equivalent to the answer in Apostol.

Also, thanks to both of you, Dick and Halls. That helps a lot!

I want to see if, based on this information, I can solve a slightly different integral:

$$\int_{-1}^3 [x+0.5]dx= \int_{-1}^0 -1 + 0.5 dx+ \int_{0}^1 0+0.5 dx+ \int_1^2 1+0.5 dx+ \int_2^3 2+0.5 dx = 4$$.

When I get home and back to the textbook, I'll continue working on a few of these example problems. If this above integral is correct (based on method) please do inform me - that would be great!

Cheers,
Davin

7. Nov 4, 2008

### Dick

That would be correct if the function were f(x)=[x]+0.5. But it's not. f(x)=[x+0.5] is discontinuous at different points than [x]. You have to split the integral up differently. [x+0.5] has a jump at x=-0.5. Where else??

8. Nov 4, 2008

### Ulagatin

I'll try another variation:

$$\int_{-1}^3 [2x]dx= \int_{-1}^0 -1 + -1 dx+ \int_{0}^1 0+0 dx+ \int_1^2 1+1 dx+ \int_2^3 2+2 dx = 4$$ which happens to be equal to the previous integral.

This help has been very useful! Hope I'm on the right track now. So the key is just subdividing and substituting the values in. Easy!

Cheers,
Davin

9. Nov 4, 2008

### Ulagatin

So how would I split this up? I gather than any variables within the brackets must equal 1 then?

So perhaps multiply the values by -0.5?

Cheers,
Davin

10. Nov 4, 2008

### Dick

You have to carefully draw a graph of the function and figure out where it has discontinuities. Then split the integral at those x values. Go back to [x+0.5] and find them. Hint: [x] makes at jump when x is an integer. [x+0.5] makes a jump when x+0.5 is an integer.

11. Nov 4, 2008

### Ulagatin

I suppose drawing the graph, it would look like upward steps, connecting integers, graphed against the interval [-1, 3]? I haven't tried drawing it (not sure what you mean by discontinuous in this sense). If this idea is correct (sorry, only if you can visualise what I'm thinking!) then would I break it up at the points of which a jump is made?

Sorry for my lack of mathematical rigour, I've only just started calculus at school (and that's differential by the way). So perhaps Apostol is a bit much? However, I am determined to get through it.

So, for me, this is the first real exposure to integrals. Real work with integrals starts next year for me, in Year 11 with pre-tertiary mathematics. But I want to be fully prepared for that.

Cheers,
Davin

12. Nov 4, 2008

### Dick

Yes, you break it up where there are jumps. [x+0.5] has jumps (discontinuities) at -0.5, 0.5, 1.5 and 2.5 and it's constant in between. Go ahead and do it. It isn't that hard.

13. Nov 4, 2008

### Ulagatin

Ok, so I gather that (after graphing the step function) the integral should be as follows:

$$\int_{-1}^3 [x+0.5]dx= \int_{-1}^{-0.5} -1 dx+ \int_{-0.5}^{1.5} -0.5 dx+ \int_{1.5}^{2.5} 1.5 dx+ \int_{2.5}^{3} 2.5 dx = 2.5$$

Is this correct? It appears correct to me, but obviously I am no expert.

Cheers,
Davin

14. Nov 5, 2008

### Dick

If f(x)=[x+0.5], then f(-0.75)=[-0.75+0.25]=[-0.5]=-1. You got the [-1,-0.5] interval right. But f(0)=[0+0.5]=0. You got the [-0.5,1.5] interval wrong. Why??? Are you still not drawing a graph?

15. Nov 5, 2008

### Ulagatin

I must have drawn the graph incorrectly.

Cheers,
Davin

16. Nov 5, 2008

### Ulagatin

D'oh! I put the wrong value into the integral there:

$$\int_{-1}^3 [x+0.5]dx= \int_{-1}^{-0.5} -1 dx+ \int_{-0.5}^{0.5} -0.5 dx+ \int_{0.5}^{1.5} 0.5 dx+ \int_{1.5}^{2.5} 1.5 dx + \int_{2.5}^{3} 2.5 dx = 3$$

But this, I am told is incorrect. I am told the integral equals 4 (disputed by Dick however, see latter part of post), so my thoughts are:

$$\int_{-1}^3 [x+0.5]dx= \int_{-1}^{-0.5} 0.5 dx+ \int_{-0.5}^{0.5} 1 dx+ \int_{0.5}^{1.5} 1 dx+ \int_{1.5}^{2.5} 1 dx + \int_{2.5}^{3} 0.5 dx = 4$$

The variables in the integral being the jump made in that step (as follows):

0.5
1
1
1
0.5

This now looks right, provided that this is in fact the correct method (the difference between the lower and upper limit for integration).

However, with reference to Dick, 4 is incorrect. It is according to a friend doing honours in applied mathematics here in Australia that the integral does equal 4.

Who is right? This is confusing - surely there can't be two solutions for the integral!

Also, everyone please remember that this is the first time I've ever been exposed to integrals. So I am trying my best.

Cheers,
Davin

17. Nov 6, 2008

### Dick

The integral DOES EQUAL 4. But your integrals are still wrong. The values in the integrals are not the widths of the intervals. They are supposed to be the VALUE of f(x)=[x+0.5] on the interval. To go back to your staircase picture they are the HEIGHT of the stair steps, not the width. For example between 2.5 and 3 the value of f(x) is 3, isn't it?

18. Nov 6, 2008

### HallsofIvy

Staff Emeritus
In fact, all of these "step function" problems can be done by drawing the graph and calculating the areas of the rectangles! (Remembering that are below the y-axis is negative.)