Piecewise Function Integration

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 2K views
wany
Messages
72
Reaction score
0

Homework Statement


Find formulas for the upper and lower sums of [itex]f[/itex] on [itex]P_n[/itex], and use them to compute the value of [itex]\int_0^1f(x)dx[/itex].
[itex]P_n:=\{\frac{j}{n}:j=0,1,...,n\}[/itex] (a partition of [0,1])
[itex]\[<br /> f(x) = \left\{ \begin{array}{ccc} 0 & 0 \le x < 1/2 \\ 1 & 1/2 \le x \le 1 \end{array} \right. \][/itex]

Homework Equations


[itex]U(f,P)=\sum\limits_{j=1}^{n} M_j(f)\Delta x_j[/itex] and
[itex]L(f,P)=\sum\limits_{j=1}^{n} M_j(f)\Delta x_j[/itex]
where [itex]M_j=sup f([x_{j-1},x_j])[/itex] and [itex]m_j=inf f([x_{j-1},x_j])[/itex]
if [itex]\lim_{n \rightarrow \infty} L(f,P_n)=\lim_{n \rightarrow \infty} U(f,P_n)[/itex] then this equals [itex]\int_0^1f(x)dx[/itex]

The Attempt at a Solution


So it is easy to see that this function is bounded on [0,1]. So now we can break this up into the different partitions, but now is where I run into a problem. It is finding the inf and the sup of each interval:
so obviously if both [itex]x_j, x_{j-1}[/itex] are < 1/2 then both inf and sup are 0;
if both [itex]x_j, x_{j-1}[/itex] are >= 1/2 then both inf and sup are 1;
so now it is possible for one case to be [itex]x_j \ge 1/2, x_{j-1} < 1/2[/itex]
in which case sup =1/2 and inf =0.

I am stuck from this point. Any help would be appreciated.
 
Physics news on Phys.org
Can you tell us how exactly you are stuck?
It seems that you have found the good expression for the [tex]M_j(f)[/tex], i.e.

[tex]M_j(f)=\left\{\begin{array}{ccc}<br /> 0 & \text{if} & j< n/2\\<br /> 1 & \text{if} & j\geq n/2<br /> \end{array}\right.[/tex]

and something analogous for [tex]m_j(f)[/tex]. Now you just need to plug those things in in U(f,P) and L(f,P)...
 
so [itex] m_j(f)=\left\{\begin{array}{ccc}<br /> 0 & \text{if} & j \leq n/2\\<br /> 1 & \text{if} & j > n/2<br /> \end{array}\right.[/itex]
So now
[itex]U(f,P)=\left\{\begin{array}{ccc}<br /> \sum\limits_{j=1}^{n} (0)(j/n)=0 & \text{if} & j< n/2\\<br /> \sum\limits_{j=1}^{n} (1)(j/n)= & \text{if} & j\geq n/2<br /> \end{array}\right.[/itex]
and
[itex]L(f,P)=\left\{\begin{array}{ccc}<br /> \sum\limits_{j=1}^{n} (0)(j/n)=0 & \text{if} & j \le n/2\\<br /> \sum\limits_{j=1}^{n} (1)(j/n)= & \text{if} & j > n/2<br /> \end{array}\right.[/itex]

So now solving I am not sure if I am correct. Are the sums not supposed to be taken from j=1 to n in such cases?
 
wait so would it actually be:
[itex] U(f,P)=\left\{\begin{array}{ccc}<br /> \sum\limits_{j=1}^{n} (0)(1/n)=0 & \text{if} & j< n/2\\<br /> \sum\limits_{j=1}^{n} (1)(1/2n)= & \text{if} & j\geq n/2<br /> \end{array}\right.[/itex]
and
[itex] L(f,P)=\left\{\begin{array}{ccc}<br /> \sum\limits_{j=1}^{n} (0)(1/n)=0 & \text{if} & j \le n/2\\<br /> \sum\limits_{j=1}^{n} (1)(1/2n+1)= & \text{if} & j > n/2<br /> \end{array}\right.[/itex]
So now viewing as the limit goes to infinity, [itex]\lim_{n \rightarrow \infty}\sum\limits_{j=1}^{n} (1)(1/2n+1)=0[/itex]
and [itex]\lim_{n \rightarrow \infty}\sum\limits_{j=1}^{n} (1)(1/2n)=0[/itex]
 
No, what you wrote is incorrect.
You have the sum

[tex]\sum_{j=1}^n{M_j(f)\Delta x_j[/tex]

and you are supposed to plug in the values for [tex]M_j(f)[/tex]. But for every [tex]M_j(f)[/tex] you have a different value.

Lets take the example with n=3, then we got

[tex]M_1(f)\Delta x_1+M_2(f)\Delta x_2+M_3(f)\Delta x_3[/tex]

We got that [tex]M_1(f)=0[/tex] and [tex]M_2(f)=M_3(f)=1[/tex], thus the above expression yields:

[tex]\Delta x_2+\Delta x_3=2/3[/tex]

Now you just need to do the same thing with n arbitrary (I strongly suggest you do the cases n=4 and n=5 first, then you will see the general case).
 
Ok so I think I got the general case, but I am not certain. So I did it for n=4,n=5,n=6, and got 3/4,3/5, and 2/3 respectively. So basically I think that depending on n, there will be
[itex]\lceil \frac{n+1}{2} \rceil[/itex] values that have the sup of 1.

So case 1: n is odd: so we have [itex]\frac{n+1}{2}*\frac{1}{n}=\frac{n+1}{2n}=\frac{1}{2}+\frac{1}{2n}[/itex]
so taking this limit as n goes to infinity we get that it is 1/2.
So case 2: n is even: so we have that [itex]\frac{n+1+1}{2}*\frac{1}{n}=\frac{n+2}{2n}=\frac{1}{2}+\frac{2}{2n}[/itex]
so taking this limit as n goes to infinity we get that it is 1/2.

Now for the lower bound, it is [itex]\lfloor \frac{n-1}{2} \rfloor[/itex]

So case 1: n is odd: so we have [itex]\frac{n-1}{2}*\frac{1}{n}=\frac{n-1}{2n}=\frac{1}{2}-\frac{1}{2n}[/itex]
so taking this limit as n goes to infinity we get that it is 1/2.
So case 2: n is even: so we have that [itex]\frac{n-1-1}{2}*\frac{1}{n}=\frac{n-2}{2n}=\frac{1}{2}-\frac{2}{2n}[/itex]
so taking this limit as n goes to infinity we get that it is 1/2.

Is this correct?
 
Thanks a lot, this was very helpful.