Solving Integrals with Step Functions: A Visual Approach

In summary: 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).In summary, I am struggling with solving integrals. I was hoping someone would be willing to help me out.
  • #1
Ulagatin
70
0
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).

Homework Statement



The first problem:

[tex]

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

[/tex]

Homework Equations



Theorem 1.6: [tex]

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

[/tex]

Theorem 1.2: [tex]

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

[/tex]

Theorem 1.5: [tex]

\int_{a}^{b} s(x) dx < \int_{a}^{b} t(x) dx

[/tex]

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:

[tex]

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

[/tex]

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! :smile:

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
 
Physics news on Phys.org
  • #2
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
Ulagatin said:
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).

Homework Statement



The first problem:

[tex]

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

[/tex]

Homework Equations



Theorem 1.6: [tex]

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

[/tex]

Theorem 1.2: [tex]

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

[/tex]

Theorem 1.5: [tex]

\int_{a}^{b} s(x) dx < \int_{a}^{b} t(x) dx

[/tex]



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:

[tex]

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

[/tex]
This doesn't help you at all. It just says that [itex]\int_a^b f(x)dx= -\int_b^x dx[/itex] 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.

, 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?
Knowing [itex]\int_a^b f(x)dx[/tex] can tell you the average value of f between a and b, not f itself. Given any number Y, there exist an infinite number of functions such that [itex]\int_a^b f(x)dx= Y[/itex], even step functions.

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.
No, that's completely wrong. I must conclude that your understanding of whatever method you are talking about is incorrect.

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?
Since there is no 1/anything involved here, I cannot see how you would think so.

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

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
You are asked to find [itex]\int_1^3 f(x) dx[/itex]. You can't possibly do that without knowing WHAT "f(x)" is. If I am right that you mean the "greatest integer function", then the theorem you need is
[tex]\int_a^b f(x)dx+ \int_b^c f(x)dx= \int_a^c f(x)dx[/tex]

If I am right that you are using [x] to mean the greatest integer function, [x]= 1 for [itex]1< x\le 2[/itex] and [x]= 2 for [itex]2< x\le 3[/itex]

[tex]\int_1^3 [x]dx= \int_1^2 [x]dx+ \int_1^2 [x]dx= \int_1^2 1 dx+ \int_2^3 dx[/tex]

Hmm, that gives an integral of 3, not 2 so I may be wrong about [x] means!

Perhaps [x] is the "Heaviside step function" which is simply 0 for x< 0, 1 for [itex]0\le x[/itex], normally represented by H(x) so that doesn't seem likely. Because both 1 and 3, and all numbers between, are positive, [x]= 1 for all x between 1 and 3 and [itex]\int_1^3 [x]dx= \int_1^3 1 dx[/itex]

Surely your textbook somewhere defines that function! You can't do this without knowing what [x] means!
 
  • #4
HallsofIvy said:
Hmm, that gives an integral of 3, not 2 so I may be wrong about [x] means!

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
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
[tex]\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[/tex]

Yes, that is totals to 2.
 
  • #6
HallsofIvy said:
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
[tex]\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[/tex]

Yes, that is totals to 2.

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:

[tex]\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[/tex].

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! :biggrin:

Cheers,
Davin
 
  • #7
Ulagatin said:
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:

[tex]\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[/tex].

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! :biggrin:

Cheers,
Davin

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
I'll try another variation:

[tex]\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[/tex] 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
Dick said:
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??

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
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
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
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
Ok, so I gather that (after graphing the step function) the integral should be as follows:

[tex]\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[/tex]

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

Cheers,
Davin
 
  • #14
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
I must have drawn the graph incorrectly.

Cheers,
Davin
 
  • #16
D'oh! I put the wrong value into the integral there:

[tex]\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[/tex]

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:

[tex]\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[/tex]

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! :confused:

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
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
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.)
 

1. What is a method for solving integrals?

A method for solving integrals is a set of steps or rules used to find the antiderivative of a function. This allows us to evaluate definite integrals and solve a wide variety of mathematical problems.

2. What are the different methods for solving integrals?

There are several methods for solving integrals, including substitution, integration by parts, partial fractions, and trigonometric substitution. Each method is useful for different types of integrals and can be applied depending on the form of the integrand.

3. How do I know which method to use for a given integral?

Choosing the right method for solving an integral can be challenging, but it is often based on the form of the integrand. For instance, if the integrand contains a product of two functions, integration by parts is a good method to use. If the integrand contains a fraction, partial fractions can be helpful.

4. Can I use more than one method to solve an integral?

Yes, it is possible to use more than one method to solve an integral. In some cases, using multiple methods can simplify the integral and make it easier to solve. However, it is important to be careful and make sure the methods are compatible with each other.

5. Are there any tips for solving integrals more efficiently?

One tip for solving integrals more efficiently is to simplify the integrand before applying a method. This can involve factoring, rearranging terms, or using trigonometric identities. Additionally, practicing and becoming familiar with different methods can help speed up the process of solving integrals.

Similar threads

  • Calculus and Beyond Homework Help
Replies
10
Views
287
  • Calculus and Beyond Homework Help
Replies
3
Views
116
  • Calculus and Beyond Homework Help
Replies
13
Views
401
  • Calculus and Beyond Homework Help
Replies
2
Views
479
  • Calculus and Beyond Homework Help
Replies
3
Views
538
  • Calculus and Beyond Homework Help
Replies
7
Views
901
  • Calculus and Beyond Homework Help
Replies
9
Views
462
  • Calculus and Beyond Homework Help
Replies
23
Views
863
  • Calculus and Beyond Homework Help
Replies
15
Views
745
  • Calculus and Beyond Homework Help
Replies
19
Views
760
Back
Top