-
Notifications
You must be signed in to change notification settings - Fork 1
/
001_introduction.Rmd
1681 lines (1191 loc) · 86.3 KB
/
001_introduction.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Introduction
```{r echo=FALSE, warning=FALSE, message=FALSE}
library(tidyverse)
library(latex2exp)
library(patchwork)
```
## Historical Introduction
### Exercises I 1.4 {#exr1.4}
**1.a** Modify the region in Figure I.3 by assuming that the ordinate at each $x$ is $2x^2$ instead of $x^2$. Draw the new figure. Check through the principal steps in the foregoing section and find what effect this has on the calculation of the area.
```{r echo=FALSE, warning=FALSE, fig.height=6, fig.width=7, fig.align='center'}
plot_integral_approx <- function(fun,
approx_type = c("below", "above"),
y_labels = NULL,
y_brake_init = 2,
y_limit_inf = 0,
fill_bars) {
limit_inf <- 0
limit_sup <- 1
n_breaks <- 6
# Specify the type of approximation to apply
approx_type <- switch(approx_type[[1]],
"below" = 1,
"above" = -1)
# Specify bin width
bin_width <- (limit_sup - limit_inf) / (n_breaks - 1)
# Data
tbl_data <- tibble::tibble(x = seq(from = {{limit_inf}},
to = {{limit_sup}},
length.out = {{n_breaks}})) %>%
# Define y-axis using the function fun
dplyr::mutate(y = fun(x))
# Plot
ggplot2::ggplot() +
ggplot2::geom_col(data = tbl_data, aes(x, y),
width = bin_width,
# Approximation
## from below: 1*bin_width
## from above: -1*bin_width
position = position_nudge(x = (approx_type*bin_width) / 2),
color = "black",
fill = fill_bars) +
# Plot the continuous function fun
ggplot2::geom_function(fun = fun) +
ggplot2::scale_x_continuous(breaks = seq(from = limit_inf,
to = limit_sup,
by = bin_width),
labels = c(latex2exp::TeX("$0$"),
latex2exp::TeX("$\\frac{b}{n}$"),
latex2exp::TeX("$\\frac{2b}{n}$"),
latex2exp::TeX("$\\cdots$"),
latex2exp::TeX("$\\frac{b(n-1)}{n}$"),
latex2exp::TeX("$b")),
limits = c(limit_inf, limit_sup),
expand = c(0, 0)) +
ggplot2::scale_y_continuous(breaks = tbl_data$y[y_brake_init:length(tbl_data$y)],
labels = y_labels,
expand = c(0, 0),
limits = c(y_limit_inf, NA)) +
ggplot2::theme(axis.text.y = element_text(hjust = 1),
axis.text.x = element_text(vjust = 0.5),
axis.title = element_blank(),
axis.line = element_line(color = "black"),
panel.background = element_blank())
}
parabola_2x2 <- function(x) {
return(2*x^2)
}
approx_below_2x2 <- plot_integral_approx(fun = parabola_2x2,
approx_type = "below",
y_labels = c(expression(paste(2,bgroup("(", frac(b,n), ")")^2)),
expression(paste(2,bgroup("(", frac(paste("2b"),n), ")")^2)),
TeX("$\\cdots$"),
expression(paste(2,bgroup("(", frac(paste("b(n-1)"),n), ")")^2)),
TeX("$2b^2$")),
y_brake_init = 2,
fill_bars = "#a1d76a")
approx_above_2x2 <- plot_integral_approx(fun = parabola_2x2,
approx_type = "above",
y_labels = c(expression(paste(2,bgroup("(", frac(b,n), ")")^2)),
expression(paste(2,bgroup("(", frac(paste("2b"),n), ")")^2)),
TeX("$\\cdots$"),
expression(paste(2,bgroup("(", frac(paste("b(n-1)"),n), ")")^2)),
TeX("$2b^2$")),
y_brake_init = 2,
fill_bars = "#d8b365")
approx_below_2x2 + approx_above_2x2
```
First we need to calculate the area of each rectangle:
$$\frac{b}{n} \mathbf{2}\left[\frac{kb}{n}\right]^2 = \mathbf{2}\frac{k^2b^3}{n^3}$$
Second we need to calculate $s_n$
$$\begin{split}
s_n & = \sum_{k=1}^{n-1} \mathbf{2}\frac{k^2b^3}{n^3} \\
& = \mathbf{2}\frac{b^3}{n^3} \sum_{k=1}^{n-1} k^2 \\
& = \mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} \right]
\end{split}$$
Third we need to calculate $S_n$
$$\begin{split}
S_n & = \sum_{k=1}^{n} \mathbf{2}\frac{k^2b^3}{n^3} \\
& = \mathbf{2}\frac{b^3}{n^3} \sum_{k=1}^{n} k^2 \\
& = \mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} \right]
\end{split}$$
Fourth we use the following inequalities where $n \geq 1$
$$\begin{split}
\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} & < \frac{n^3}{3} & < \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} \\
\mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6}\right] & < \mathbf{2}\frac{b^3}{3} & < \mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}\right] \\
s_n & < \mathbf{2}\frac{b^3}{3} & < S_n
\end{split}$$
Fifth we assume that there is some $A$ such that $s_n < A < S_n$ and prove that $A = \mathbf{2}\frac{b^3}{3}$ using the following inequalities: $\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} < \frac{n^3}{3}$ and $\frac{n^3}{3} < \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}$
$$\begin{split}
\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} < \frac{n^3}{3} & \iff \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} < \frac{n^3}{3} + n^2 \\
& \iff \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}\right] < \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} + n^2\right] \\
& \iff S_n < \mathbf{2}\left[\frac{b^3}{3} + \frac{b^3}{n}\right]
\end{split}$$
$$\begin{split}
\frac{n^3}{3} < \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} & \iff \frac{n^3}{3} - n^2 < \frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} \\
& \iff \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} - n^2\right] < \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6}\right] \\
& \iff \mathbf{2}\left[\frac{b^3}{3} - \frac{b^3}{n}\right] < s_n \\
\end{split}$$
Therefore we have also that $\mathbf{2}\left[\frac{b^3}{3} - \frac{b^3}{n}\right] < A < \mathbf{2}\left[\frac{b^3}{3} + \frac{b^3}{n}\right]$. If $A > \mathbf{2}\frac{b^3}{3}$ then $A - \mathbf{2}\frac{b^3}{3} > 0$ so using $A < \mathbf{2}\left[\frac{b^3}{3} + \frac{b^3}{n}\right]$ we can conclude that $n < \frac{\mathbf{2}b^3}{A - \mathbf{2}\frac{b^3}{3}}$ but $n \geq 1$ so there are some values of $n$ where $n < \frac{\mathbf{2}b^3}{A - \mathbf{2}\frac{b^3}{3}}$ is false. If $A < \mathbf{2}\frac{b^3}{3}$ then $0 < \mathbf{2}\frac{b^3}{3} - A$ so using $\mathbf{2}\left[\frac{b^3}{3} - \frac{b^3}{n}\right] < A$ we can also conclude that $n < \frac{\mathbf{2}b^3}{\mathbf{2}\frac{b^3}{3} - A}$ and again this is false. The only possibility is that $A = \mathbf{2}\frac{b^3}{3}$ so there is a unique value $A$ such that $s_n < A < S_n$.
**1.b** Do the same if the ordinate at each $x$ is $3x^2$
```{r echo=FALSE, warning=FALSE, fig.height=6, fig.width=7, fig.align='center'}
parabola_3x2 <- function(x) {
return(3*x^2)
}
approx_below_3x2 <- plot_integral_approx(fun = parabola_3x2,
approx_type = "below",
y_labels = c(expression(paste(3,bgroup("(", frac(b,n), ")")^2)),
expression(paste(3,bgroup("(", frac(paste("2b"),n), ")")^2)),
TeX("$\\cdots$"),
expression(paste(3,bgroup("(", frac(paste("b(n-1)"),n), ")")^2)),
TeX("$3b^2$")),
y_brake_init = 2,
fill_bars = "#a1d76a")
approx_above_3x2 <- plot_integral_approx(fun = parabola_3x2,
approx_type = "above",
y_labels = c(expression(paste(3,bgroup("(", frac(b,n), ")")^2)),
expression(paste(3,bgroup("(", frac(paste("2b"),n), ")")^2)),
TeX("$\\cdots$"),
expression(paste(3,bgroup("(", frac(paste("b(n-1)"),n), ")")^2)),
TeX("$3b^2$")),
y_brake_init = 2,
fill_bars = "#d8b365")
approx_below_3x2 + approx_above_3x2
```
The process is similar as in **1.a** where we only need to change $\mathbf{2}$ with $\mathbf{3}$.
**1.c** Do the same if the ordinate at each $x$ is $\frac{1}{4}x^2$
```{r echo=FALSE, warning=FALSE, fig.height=6, fig.width=7, fig.align='center'}
parabola_1_4x2 <- function(x) {
return((1/4)*x^2)
}
approx_below_1_4x2 <- plot_integral_approx(fun = parabola_1_4x2,
approx_type = "below",
y_labels = c(expression(paste(frac(paste("1"),paste("4")),bgroup("(", frac(b,n), ")")^2)),
expression(paste(frac(paste("1"),paste("4")),bgroup("(", frac(paste("2b"),n), ")")^2)),
TeX("$\\cdots$"),
expression(paste(frac(paste("1"),paste("4")),bgroup("(", frac(paste("b(n-1)"),n), ")")^2)),
TeX("$\\frac{1}{4}b^2$")),
y_brake_init = 2,
fill_bars = "#a1d76a")
approx_above_1_4x2 <- plot_integral_approx(fun = parabola_1_4x2,
approx_type = "above",
y_labels = c(expression(paste(frac(paste("1"),paste("4")),bgroup("(", frac(b,n), ")")^2)),
expression(paste(frac(paste("1"),paste("4")),bgroup("(", frac(paste("2b"),n), ")")^2)),
TeX("$\\cdots$"),
expression(paste(frac(paste("1"),paste("4")),bgroup("(", frac(paste("b(n-1)"),n), ")")^2)),
TeX("$\\frac{1}{4}b^2$")),
y_brake_init = 2,
fill_bars = "#d8b365")
approx_below_1_4x2 + approx_above_1_4x2
```
The process is similar as in **1.a** where you only need to change $\mathbf{2}$ with $\mathbf{\frac{1}{4}}$.
**1.d** Do the same if the ordinate at each $x$ is $2x^2 + 1$
```{r echo=FALSE, warning=FALSE, fig.height=6, fig.width=7, fig.align='center'}
parabola_2x2_1 <- function(x) {
return(2*x^2 + 1)
}
approx_below_2x2_1 <- plot_integral_approx(fun = parabola_2x2_1,
approx_type = "below",
y_labels = c(TeX("$1$"),
expression(paste(2,bgroup("(", frac(b,n), ")")^2) + 1),
expression(paste(2,bgroup("(", frac(paste("2b"),n), ")")^2) + 1),
TeX("$\\cdots$"),
expression(paste(2,bgroup("(", frac(paste("b(n-1)"),n), ")")^2) + 1),
TeX("$2b^2 + 1$")),
y_brake_init = 1,
y_limit_inf = 0,
fill_bars = "#a1d76a")
approx_above_2x2_1 <- plot_integral_approx(fun = parabola_2x2_1,
approx_type = "above",
y_labels = c(TeX("$1$"),
expression(paste(2,bgroup("(", frac(b,n), ")")^2) + 1),
expression(paste(2,bgroup("(", frac(paste("2b"),n), ")")^2) + 1),
TeX("$\\cdots$"),
expression(paste(2,bgroup("(", frac(paste("b(n-1)"),n), ")")^2) + 1),
TeX("$2b^2 + 1$")),
y_brake_init = 1,
y_limit_inf = 0,
fill_bars = "#d8b365")
approx_below_2x2_1 + approx_above_2x2_1
```
First we need to calculate the area of each rectangle:
$$\frac{b}{n} \left[\mathbf{2}\left[\frac{kb}{n}\right]^2 + \mathbf{1}\right] = \mathbf{2}\frac{k^2b^3}{n^3} + \mathbf{1}\frac{b}{n}$$
Second we need to calculate $s_n$
$$\begin{split}
s_n & = \sum_{k=1}^{n-1} \left[\mathbf{2}\frac{k^2b^3}{n^3} + \mathbf{1}\frac{b}{n}\right] \\
& = \mathbf{2}\frac{b^3}{n^3} \sum_{k=1}^{n-1} k^2 + \mathbf{1}\frac{b(n-1)}{n} \\
& = \mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} \right] + \mathbf{1}\frac{b(n-1)}{n}
\end{split}$$
Third we need to calculate $S_n$
$$\begin{split}
S_n & = \sum_{k=1}^{n} \left[\mathbf{2}\frac{k^2b^3}{n^3} + \mathbf{1}\frac{b}{n}\right] \\
& = \mathbf{2}\frac{b^3}{n^3} \sum_{k=1}^{n} k^2 + \mathbf{1}b \\
& = \mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} \right] + \mathbf{1}b
\end{split}$$
Fourth we use the following inequalities where $n \geq 1$
$$\begin{split}
\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} & < \frac{n^3}{3} < \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} \\
\mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6}\right] + \mathbf{1}b & < \mathbf{2}\frac{b^3}{3} + \mathbf{1}b < \mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}\right] + \mathbf{1}b \\
\mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6}\right] + \mathbf{1}\frac{b(n-1)}{n} & < \mathbf{2}\frac{b^3}{3} + \mathbf{1}b < \mathbf{2}\frac{b^3}{n^3} \left[\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}\right] + \mathbf{1}b
s_n & < \mathbf{2}\frac{b^3}{3} + \mathbf{1}b < S_n
\end{split}$$
Fifth we assume that there is some $A$ such that $s_n < A < S_n$ and prove that $A = \mathbf{2}\frac{b^3}{3} + \mathbf{1}b$ using the following inequalities: $\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} < \frac{n^3}{3}$ and $\frac{n^3}{3} < \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}$
$$\begin{split}
\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} < \frac{n^3}{3} & \iff \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} < \frac{n^3}{3} + n^2 \\
& \iff \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6}\right] + \mathbf{1}b < \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} + n^2\right] + \mathbf{1}b \\
& \iff S_n < \mathbf{2}\left[\frac{b^3}{3} + \frac{b^3}{n}\right] + \mathbf{1}b
\end{split}$$
$$\begin{split}
\frac{n^3}{3} < \frac{n^3}{3} + \frac{n^2}{2} + \frac{n}{6} & \iff \frac{n^3}{3} - n^2 < \frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6} \\
& \iff \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} - n^2\right] + \mathbf{1}b < \mathbf{2}\frac{b^3}{n^3}\left[\frac{n^3}{3} - \frac{n^2}{2} + \frac{n}{6}\right] + \mathbf{1}b \\
& \iff \mathbf{2}\left[\frac{b^3}{3} - \frac{b^3}{n}\right] + \mathbf{1}b < s_n \\
\end{split}$$
Therefore we have also that $\mathbf{2}\left[\frac{b^3}{3} - \frac{b^3}{n}\right] + \mathbf{1}b < A < \mathbf{2}\left[\frac{b^3}{3} + \frac{b^3}{n}\right] + \mathbf{1}b$. If $A > \mathbf{2}\frac{b^3}{3} + \mathbf{1}b$ then $A - \mathbf{2}\frac{b^3}{3} - \mathbf{1}b > 0$ so using $A < \mathbf{2}\left[\frac{b^3}{3} + \frac{b^3}{n}\right] + \mathbf{1}b$ we can conclude that $n < \frac{\mathbf{2}b^3}{A - \mathbf{2}\frac{b^3}{3} - \mathbf{1}b}$ but $n \geq 1$ so there are some values of $n$ where $n < \frac{\mathbf{2}b^3}{A - \mathbf{2}\frac{b^3}{3} - \mathbf{1}b}$ is false. If $A < \mathbf{2}\frac{b^3}{3} + \mathbf{1}b$ then $0 < \mathbf{2}\frac{b^3}{3} + \mathbf{1}b - A$ so using $\mathbf{2}\left[\frac{b^3}{3} - \frac{b^3}{n}\right] + \mathbf{1}b < A$ we can also conclude that $n < \frac{\mathbf{2}b^3}{\mathbf{2}\frac{b^3}{3} + \mathbf{1}b - A}$ and again this is false. The only possibility is that $A = \mathbf{2}\frac{b^3}{3} + \mathbf{1}b$ so there is a unique value $A$ such that $s_n < A < S_n$.
**1.e** Do the same if the ordinate at each $x$ is $ax^2 + c$
In this part we are going to assume that $a > 0$ and $c > 0$. If $a = 0$ then it is not possible to calculate the area of the rectangles and if $a < 0$ we would need to define the concept of a negative area. Also if $c = 0$ it is a case we already cover and if $c < 0$ we would need again to define the concept of a negative area.
```{r echo=FALSE, warning=FALSE, fig.height=6, fig.width=7, fig.align='center'}
parabola_ax2_c <- function(x) {
return(2*x^2 + 1)
}
approx_below_ax2_c <- plot_integral_approx(fun = parabola_ax2_c,
approx_type = "below",
y_labels = c(TeX("$c$"),
expression(paste(a,bgroup("(", frac(b,n), ")")^2) + c),
expression(paste(a,bgroup("(", frac(paste("2b"),n), ")")^2) + c),
TeX("$\\cdots$"),
expression(paste(a,bgroup("(", frac(paste("b(n-1)"),n), ")")^2) + c),
TeX("$ab^2 + c$")),
y_brake_init = 1,
y_limit_inf = 0,
fill_bars = "#a1d76a")
approx_above_ax2_c <- plot_integral_approx(fun = parabola_ax2_c,
approx_type = "above",
y_labels = c(TeX("$c$"),
expression(paste(a,bgroup("(", frac(b,n), ")")^2) + c),
expression(paste(a,bgroup("(", frac(paste("2b"),n), ")")^2) + c),
TeX("$\\cdots$"),
expression(paste(a,bgroup("(", frac(paste("b(n-1)"),n), ")")^2) + c),
TeX("$ab^2 + c$")),
y_brake_init = 1,
y_limit_inf = 0,
fill_bars = "#d8b365")
approx_below_ax2_c + approx_above_ax2_c
```
The process is similar as in **1.d** where we only need to change $\mathbf{2}$ with $\mathbf{a}$ and $\mathbf{1}$ with $\mathbf{c}$.
**2** Modify the region in Figure I.3 by assuming that the ordinate at each $x$ is $x^3$ instead of $x^2$. Draw a new figure.
```{r echo=FALSE, warning=FALSE, fig.height=8, fig.width=7, fig.align='center'}
x3 <- function(x) {
return(x^3)
}
approx_below_x3 <- plot_integral_approx(fun = x3,
approx_type = "below",
y_labels = c(expression(bgroup("(", frac(b,n), ")")^3),
expression(bgroup("(", frac(paste("2b"),n), ")")^3),
TeX("$\\cdots$"),
expression(bgroup("(", frac(paste("b(n-1)"),n), ")")^3),
TeX("$b^3$")),
y_brake_init = 2,
y_limit_inf = 0,
fill_bars = "#a1d76a")
approx_above_x3 <- plot_integral_approx(fun = x3,
approx_type = "above",
y_labels = c(expression(bgroup("(", frac(b,n), ")")^3),
expression(bgroup("(", frac(paste("2b"),n), ")")^3),
TeX("$\\cdots$"),
expression(bgroup("(", frac(paste("b(n-1)"),n), ")")^3),
TeX("$b^3$")),
y_brake_init = 2,
y_limit_inf = 0,
fill_bars = "#d8b365")
approx_below_x3 + approx_above_x3
```
**2a** Use a construction similar to that illustrated in Figure I.3 and show that the outer and inner sums $S_n$ and $s_n$ are given by
$$S_n = \frac{b^4}{n^4}\left[1^3 + 2^3 + \cdots + n^3\right] \; , \; s_n = \frac{b^4}{n^4}\left[1^3 + 2^3 + \cdots + (n-1)^3\right]$$
First we need to calculate the area of each rectangle:
$$\frac{b}{n} \left[\frac{kb}{n}\right]^3 = \frac{k^3b^4}{n^4}$$
Second we need to calculate $s_n$
$$\begin{split}
s_n & = \sum_{k=1}^{n-1} \frac{k^3b^4}{n^4} \\
& = \frac{b^4}{n^4} \sum_{k=1}^{n-1} k^3
\end{split}$$
Third we need to calculate $S_n$
$$\begin{split}
S_n & = \sum_{k=1}^{n} \frac{k^3b^4}{n^4} \\
& = \frac{b^4}{n^4} \sum_{k=1}^{n} k^3
\end{split}$$
**2b** Use the inequalities (which can be proved by mathematical induction; see Section I4.2)
$$1^3 + 2^3 + \cdots + (n-1)^3 < \frac{n^4}{4} < 1^3 + 2^3 + \cdots + n^3$$
to show that $s_n < \frac{b^4}{4} < S_n$ for every $n$, and prove that $\frac{b^4}{4}$ is the only number which lies between $s_n$ and $S_n$ for every $n$
First we use the following inequality where $n \geq 1$
$$\begin{split}
1^3 + 2^3 + \cdots + (n-1)^3 & < \frac{n^4}{4} & < 1^3 + 2^3 + \cdots + n^3 \\
\frac{b^4}{n^4} \sum_{k=1}^{n-1} k^3 & < \frac{b^4}{4} & < \frac{b^4}{n^4} \sum_{k=1}^{n} k^3 \\
s_n & < \frac{b^4}{4} & < S_n
\end{split}$$
Second we assume that there is some $A$ such that $s_n < A < S_n$ and prove that $A = \frac{b^4}{4}$ using the following inequalities: $s_n < \frac{b^4}{4}$ and $\frac{b^4}{4} < S_n$
If $A > \frac{b^4}{4}$ and $s_n < \frac{b^4}{4}$ then $S_n > \frac{b^4}{4}$ and $0 < \frac{b^4}{4} - s_n$. Therefore because $S_n - s_n > \frac{b^4}{4} - s_n$ this implies that $\frac{b^4}{\frac{b^4}{4} - s_n} > n$ but $n \geq 1$ so there are some values of $n$ where $\frac{b^4}{\frac{b^4}{4} - s_n} > n$ is false.
If $A < \frac{b^4}{4}$ and $\frac{b^4}{4} < S_n$ then $\frac{b^4}{4} > s_n$ and $0 < S_n - \frac{b^4}{4}$. Therefore because $S_n - \frac{b^4}{4} < S_n - s_n$ this implies that $n < \frac{b^4}{S_n - \frac{b^4}{4}}$ but $n \geq 1$ so there are some values of $n$ where $n < \frac{b^4}{S_n - \frac{b^4}{4}}$ is false.
**2c** What numbers takes the place of $\frac{b^4}{4}$ if the ordinate at each $x$ is $ax^3 + c$?
The process to answer this question is similar to the answer in **2b** and **2a**
First we need to calculate the area of each rectangle:
$$\frac{b}{n} \left[ a\left[\frac{kb}{n}\right]^{\mathbf{3}} + c\right] = a\frac{k^{\mathbf{3}}b^{\mathbf{4}}}{n^{\mathbf{4}}} + c \frac{b}{n}$$
Second we need to calculate $s_n$
$$\begin{split}
s_n & = \sum_{k=1}^{n-1} \left[a\frac{k^{\mathbf{3}}b^{\mathbf{4}}}{n^{\mathbf{4}}} + c \frac{b}{n}\right] \\
& = a\frac{b^{\mathbf{4}}}{n^{\mathbf{4}}} \sum_{k=1}^{n-1} k^{\mathbf{3}} + c\frac{b(n-1)}{n}
\end{split}$$
Third we need to calculate $S_n$
$$\begin{split}
S_n & = \sum_{k=1}^{n} \left[a\frac{k^{\mathbf{3}}b^{\mathbf{4}}}{n^{\mathbf{4}}} + c \frac{b}{n}\right] \\
& = a\frac{b^{\mathbf{4}}}{n^{\mathbf{4}}} \sum_{k=1}^{n} k^{\mathbf{3}} + cb
\end{split}$$
Fourth we use the following inequality where $n \geq 1$
$$\begin{split}
1^{\mathbf{3}} + 2^{\mathbf{3}} + \cdots + (n-1)^{\mathbf{3}} & < \frac{n^{\mathbf{4}}}{{\mathbf{4}}} < 1^{\mathbf{3}} + 2^{\mathbf{3}} + \cdots + n^{\mathbf{3}} \\
a\frac{b^{\mathbf{4}}}{n^{\mathbf{4}}} \sum_{k=1}^{n-1} k^{\mathbf{3}} + cb & < a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb < a\frac{b^{\mathbf{4}}}{n^{\mathbf{4}}} \sum_{k=1}^{n} k^{\mathbf{3}} + cb \\
a\frac{b^{\mathbf{4}}}{n^{\mathbf{4}}} \sum_{k=1}^{n-1} k^{\mathbf{3}} + c\frac{b(n-1)}{n} & < a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb < a\frac{b^{\mathbf{4}}}{n^{\mathbf{4}}} \sum_{k=1}^{n} k^{\mathbf{3}} + cb \\
s_n & < a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb < S_n
\end{split}$$
Sixth we assume that there is some $A$ such that $s_n < A < S_n$ and prove that $A = a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb$ using the following inequalities: $s_n < a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb$ and $a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb < S_n$
If $A > a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb$ and $s_n < a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb$ then $S_n > a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb$ and $0 < a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb - s_n$. Therefore because $S_n - s_n > a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb - s_n$ this implies that $\frac{ab^{\mathbf{4}} + cb}{a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb - s_n} > n$ but $n \geq 1$ so there are some values of $n$ where $\frac{ab^{\mathbf{4}} + cb}{a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb - s_n} > n$ is false.
If $A < a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb$ and $a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb < S_n$ then $a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} + cb > s_n$ and $0 < S_n - a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} - cb$. Therefore because $S_n - a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} - cb < S_n - s_n$ this implies that $n < \frac{ab^4 + cb}{S_n - a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} - cb}$ but $n \geq 1$ so there are some values of $n$ where $n < \frac{ab^{\mathbf{4}} + cb}{S_n - a\frac{b^{\mathbf{4}}}{{\mathbf{4}}} - cb}$ is false.
**3** The inequalities (I.5) and (I.12) are special cases of the more general inequalities
$$1^{\mathbf{m}} + 2^{\mathbf{m}} + \cdots + (n-1)^{\mathbf{m}} < \frac{n^{\mathbf{m + 1}}}{\mathbf{m + 1}} < 1^{\mathbf{m}} + 2^{\mathbf{m}} + \cdots + n^{\mathbf{m}}$$
that are valid for every integer $n \geq 1$ and every integer ${\mathbf{m}} \geq 1$. Asumme the validity of (I.13) and generalize the results of Exercise 2.
We can generalize this result to $ax^{\mathbf{m}} + c$ where the process is similar as in **2.c**. We only need to change $\mathbf{3}$ with $\mathbf{m}$ and $\mathbf{4}$ with $\mathbf{m + 1}$.
## Some Basic Concepts of the Theory of Sets
### Exercises I 2.5 {#exrI2.5}
**1** Use the roster notation to designate the following sets of real numbers.
$$A = \{x | x^2 - 1 = 0 \} = \{ -1, 1 \}$$
$$B = \{x | (x - 1)^2 = 0 \} = \{ 1 \}$$
$$C = \{x | x + 8 = 9 \} = \{ 1 \}$$
In this part $x^3 - 2x^2 + x = 2 \Longleftrightarrow (x^2 + 1)(x - 2) = 0$. In that sense there are also 2 complex roots $x = -i$ and $x = i$ but they are not real numbers (Remember that $S = \mathbb{R}$)
$$D = \{x | x^3 - 2x^2 + x = 2 \} = \{ 2 \}$$
$$E = \{x | (x + 8)^2 = 9^2 \} = \{ -17, 1 \}$$
$$F = \{x | (x^2 + 16x)^2 = 17^2 \} = \{ -17, -8 - \sqrt{47}, 1, \sqrt{47} - 8 \}$$
**2** For the sets in Exercise 1, note that $B \subseteq A$. List all the inclusion relations $\subseteq$ that hold among the sets $A$, $B$, $C$, $D$, $E$, $F$.
$B \subseteq A$, $C \subseteq A$, $C \subseteq B$, $B \subseteq C$, $E \subseteq B$, $E \subseteq C$, $E \subseteq F$
**3** Let $A = \{ 1 \}$, $B = \{ 1, 2 \}$. Discuss the validity of the following statements (prove the ones that are true and explain why the others are not true).
**3a** $A \subset B$
It is true because $1 \in A$ and $1 \in B$ but $2 \notin A$ and $2 \in B$ so $A \subseteq B$ and $A \neq B$
**3b** $A \subseteq B$
It is true because $1 \in A$ and $1 \in B$ but $2 \notin A$ and $2 \in B$ so $A \subset B$ or $A = B$ is true
**3c** $A \in B$
It is false because ${1}$ is not an element of $B$. Remember that $1$ is not the same as $\{ 1 \}$
**3d** $1 \in A$
It is true because $1$ is an element of $A$.
**3e** $1 \subseteq A$
It is false because the subsets of $A$ are $\emptyset$ and $\{ 1 \}$
**3f** $1 \subset B$
It is false because the proper subsets of $B$ are $\emptyset$, $\{ 1 \}$ and $\{ 2 \}$
**4** Solve Exercise 3 if $A = \{ 1 \}$ and $B = \{ \{ 1 \}, 1 \}$.
**4a** $A \subset B$
It is true because $1 \in A$ and $1 \in B$ but $\{ 1 \} \notin A$ and $\{ 1 \} \in B$ so $A \subseteq B$ and $A \neq B$
**4b** $A \subseteq B$
It is true because $1 \in A$ and $1 \in B$ but $\{ 1 \} \notin A$ and $\{ 1 \} \in B$ so $A \subset B$ or $A = B$ is true
**4c** $A \in B$
It is true because $\{ 1 \} \in B$ and $A = \{ 1 \}$ so $A \in B$
**4d** $1 \in A$
It is true because $1$ is an element of $A$.
**4e** $1 \subseteq A$
It is false because the subsets of $A$ are $\emptyset$ and $\{ 1 \}$
**4f** $1 \subset B$
It is false because the proper subsets of $B$ are $\emptyset$, $\{ \{1 \} \}$ and $\{ 1 \}$
**5** Given the set $S = \{ 1, 2, 3, 4 \}$. Display all subsets of $S$. There are 16 altogether, counting $\emptyset$ and $S$.
$\emptyset$, $\{ 1 \}$, $\{ 2 \}$, $\{ 3 \}$, $\{ 4 \}$, $\{ 1, 2 \}$, $\{ 1, 3 \}$, $\{ 1, 4 \}$, $\{ 2, 3 \}$, $\{ 2, 4 \}$, $\{ 3, 4 \}$, $\{ 1, 2, 3 \}$, $\{ 1, 2, 4 \}$, $\{ 1, 3, 4 \}$, $\{ 2, 3, 4 \}$, $\{ 1, 2, 3, 4 \}$
**6** Given the following four sets
$$A = \{ 1, 2 \}, \;\; B = \{ \{ 1 \}, \{ 2 \} \}, \;\; C = \{ \{ 1 \}, \{ 1, 2 \} \}, \;\; D = \{ \{ 1 \}, \{ 2 \}, \{ 1, 2 \} \}$$
discuss the validity of the following statements (prove the ones that are true and explain why the others are not true).
**6a** $A = B$
It is false because $1 \in A$ and $1 \notin B$
**6b** $A \subseteq B$
It is false because $1 \in A$ and $1 \notin B$
**6c** $A \subset C$
It is false because $1 \in A$ and $1 \notin C$
**6d** $A \in C$
It is true because $\{ 1, 2 \} \in C$ and $A = \{ 1, 2 \}$ so $A \in C$
**6e** $A \subset D$
It is false because $1 \in A$ and $1 \notin D$
**6f** $B \subset C$
It is false because $\{ 2 \} \in B$ and $\{ 2 \} \notin C$
**6g** $B \subset D$
It is true because $\{ 1 \} \in B$, $\{ 2 \} \in B$ and $\{ 1 \} \in D$, $\{ 2 \} \in D$ but $\{ 1, 2 \} \notin B$ and $\{ 1, 2 \} \in D$
**6h** $B \in D$
It is not true because the elements of $D$ are $\{ 1 \}$, $\{ 2 \}$ and $\{ 1, 2 \}$ so $\{ \{ 1 \}, \{ 2 \} \}$ is not an element of $D$
**6i** $A \in D$
It is true because $\{ 1, 2 \} \in D$ and $A = \{ 1, 2 \}$ so $A \in D$
**7** Prove the following properties of set equality.
**7a** $\{ a, a \} = \{ a \}$
$$\begin{split}
a \in \{ a, a \} & \Longleftrightarrow a \in \{ a \}
\end{split}$$
**7b** $\{ a, b \} = \{ b, a \}$
$$\begin{split}
a \in \{ a, b \} \land b \in \{ a, b \} & \Longleftrightarrow b \in \{ a, b \} \land a \in \{ a, b \} \\
& \Longleftrightarrow b \in \{ b, a \} \land a \in \{ b, a \}
\end{split}$$
**7c** $\{ a \} = \{ b, c \}$ if and only if $a = b = c$
$$\begin{split}
\{ a \} = \{ b, c \} & \Longleftrightarrow a \in \{ b, c \} \land (b \in \{ a \} \land c \in \{ a \}) \\
& \Longleftrightarrow (a = b \lor a = c) \land (b = a \land c = a) \\
& \Longleftrightarrow (a = b \lor a = c) \land (a = b = c) \\
& \Longleftrightarrow a = b = c
\end{split}$$
Prove the set relations in Exercises 8 through 19. (Sample proofs are given at the end of this section)
**8** *Commutative laws:* $A \cup B = B \cup A$, $A \cap B = B \cap A$
$$\begin{split}
x \in A \cup B & \Longleftrightarrow x \in A \lor x \in B \\
& \Longleftrightarrow x \in B \lor x \in A \\
& \Longleftrightarrow \in B \cup A
\end{split}$$
$$\begin{split}
x \in A \cap B & \Longleftrightarrow x \in A \land x \in B \\
& \Longleftrightarrow x \in B \land x \in A \\
& \Longleftrightarrow \in B \cap A
\end{split}$$
**9** *Associative laws:* $A \cup (B \cup C) = (A \cup B) \cup C$, $A \cap (B \cap C) = (A \cap B) \cap C$
$$\begin{split}
x \in A \cup (B \cup C) & \Longleftrightarrow x \in A \lor x \in (B \cup C) \\
& \Longleftrightarrow x \in A \lor (x \in B \lor x \in C) \\
& \Longleftrightarrow (x \in A \lor x \in B) \lor x \in C \\
& \Longleftrightarrow x \in A \cup B \lor x \in C \\
& \Longleftrightarrow x \in (A \cup B) \cup C \\
\end{split}$$
$$\begin{split}
x \in A \cap (B \cap C) & \Longleftrightarrow x \in A \land x \in (B \cap C) \\
& \Longleftrightarrow x \in A \land (x \in B \land x \in C) \\
& \Longleftrightarrow (x \in A \land x \in B) \land x \in C \\
& \Longleftrightarrow x \in A \cap B \land x \in C \\
& \Longleftrightarrow x \in (A \cap B) \cap C \\
\end{split}$$
**10** *Distributive laws:* $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$, $A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$
$$\begin{split}
x \in A \cap (B \cup C) & \Longleftrightarrow x \in A \land x \in (B \cup C) \\
& \Longleftrightarrow x \in A \land (x \in B \lor x \in C) \\
& \Longleftrightarrow (x \in A \land x \in B) \lor (x \in A \land x \in C) \\
& \Longleftrightarrow x \in A \cap B \lor x \in A \cap C \\
& \Longleftrightarrow x \in (A \cap B) \cup (A \cap C) \\
\end{split}$$
$$\begin{split}
x \in A \cup (B \cap C) & \Longleftrightarrow x \in A \lor x \in (B \cap C) \\
& \Longleftrightarrow x \in A \lor (x \in B \land x \in C) \\
& \Longleftrightarrow (x \in A \lor x \in B) \land (x \in A \lor x \in C) \\
& \Longleftrightarrow x \in A \cup B \land x \in A \cup C \\
& \Longleftrightarrow x \in (A \cup B) \cap (A \cup C) \\
\end{split}$$
**11** $A \cup A = A$, $A \cap A = A$
$$\begin{split}
x \in A \cup A & \Longleftrightarrow x \in A \lor x \in A \\
& \Longleftrightarrow x \in A
\end{split}$$
$$\begin{split}
x \in A \cap A & \Longleftrightarrow x \in A \land x \in A \\
& \Longleftrightarrow x \in A
\end{split}$$
**12** $A \subseteq A \cup B$, $A \cap B \subseteq A$
$$\begin{split}
x \in A & \Longrightarrow x \in A \lor x \in B \\
& \Longrightarrow x \in A \cup B
\end{split}$$
In this part we also have $A \cap B \subseteq B$ but because $A$ and $B$ are arbitrary sets the proof related to $A \cap B \subseteq A$ include this case.
$$\begin{split}
x \in A \cap B & \Longrightarrow x \in A \land x \in B \\
& \Longrightarrow x \in A
\end{split}$$
**13** $A \cup \emptyset = A$, $A \cap \emptyset = \emptyset$
In this part remember that $x \in \emptyset$ is false but $x \in A \lor x \in \emptyset$ is true if and only if $x \in A$
$$\begin{split}
x \in A \cup \emptyset & \Longleftrightarrow x \in A \lor x \in \emptyset \\
& \Longleftrightarrow x \in A
\end{split}$$
In this part remember that $\emptyset$ is always a subset of every set and that $\emptyset$ is a set containing no elements whatsoever. Taking into account these true statements we can prove that $A \cap \emptyset = \emptyset$.
First, $A \cap \emptyset \supseteq \emptyset$ is true because $\emptyset$ is always a subset of every set.
Second, if $x \in A \cap \emptyset$ then $x \in A \land x \in \emptyset$ but $x \notin \emptyset$ so $x \in A \cap \emptyset$ is false. Therefore for any $x$ we have that $x \notin A \cap \emptyset$ must be true. Also let's assume that $A \cap \emptyset \nsubseteq \emptyset$ where this would mean that there is some $y$ such that $y \in A \cap \emptyset \land y \notin \emptyset$ but this is false because $A \cap \emptyset$ is a set containing no elements whatsoever. Therefore $A \cap \emptyset \nsubseteq \emptyset$ is false and $A \cap \emptyset \subseteq \emptyset$ must be true.
Third, because $A \cap \emptyset \supseteq \emptyset$ and $A \cap \emptyset \subseteq \emptyset$ are true we have that $A \cap \emptyset = \emptyset$.
**14** $A \cup (A \cap B) = A$, $A \cap (A \cup B) = A$
First we prove $A \cup (A \cap B) = A$ in 2 parts:
$$\begin{split}
x \in A \cup (A \cap B) & \Longleftrightarrow x \in A \lor x \in A \cap B \\
& \Longleftrightarrow x \in A \lor (x \in A \land x \in B) \\
& \Longleftrightarrow (x \in A \lor x \in A) \land (x \in A \lor x \in B) \\
& \Longleftrightarrow x \in A \land x \in (A \cup B) \\
& \Longrightarrow x \in A \\
x \in A & \Longrightarrow x \in A \lor x \in A \cap B \\
& \Longleftrightarrow x \in A \cup (A \cap B)
\end{split}$$
$$\begin{split}
x \in A & \Longrightarrow x \in A \lor x \in A \cap B \\
& \Longleftrightarrow x \in A \cup (A \cap B)
\end{split}$$
Second we prove $A \cap (A \cup B) = A$ using $A \cup (A \cap B) = A$:
$$\begin{split}
A \cap (A \cup B) & = (A \cap A) \cup (A \cap B) \\
& = A \cup (A \cap B) \\
& = A
\end{split}$$
**15** If $A \subseteq C$ and $B \subseteq C$, then $A \cup B \subseteq C$
$$\begin{split}
(A \subseteq C \land B \subseteq C) \land x \in A \cup B & \Longleftrightarrow (A \subseteq C \land B \subseteq C) \land (x \in A \lor x \in B) \\
& \Longrightarrow (A \subseteq C \land x \in A) \lor (B \subseteq C \land x \in B) \\
& \Longrightarrow x \in C
\end{split}$$
**16** If $C \subseteq A$ and $C \subseteq B$, then $C \subseteq A \cap B$
$$\begin{split}
(C \subseteq A \land C \subseteq B) \land x \in C & \Longrightarrow (C \subseteq A \land x \in C) \land (C \subseteq B \land x \in C) \\
& \Longrightarrow x \in A \land x \in B \\
& \Longrightarrow x \in A \cap B
\end{split}$$
**17a** If $A \subset B$ and $B \subset C$, prove that $A \subset C$
$$\begin{split}
(A \subset B \land B \subset C) \land x \in A & \Longrightarrow (x \in B \land B \subset C) \land \exists y: y \notin A \land y \in B \\
& \Longrightarrow x \in C \land \exists y: y \notin A \land y \in C
\end{split}$$
**17b** If $A \subseteq B$ and $B \subseteq C$, prove that $A \subseteq C$
$$\begin{split}
(A \subseteq B \land B \subseteq C) \land x \in A & \Longrightarrow x \in B \land B \subseteq C \\
& \Longrightarrow x \in C
\end{split}$$
**17c** What can you conclude if $A \subset B$ and $B \subseteq C$?
First, if $B = C$ we can conclude that $A \subset C$.
Second, if $B \subset C$ using the proof in **17a** we can conclude again that $A \subset C$.
**17d** If $x \in A$ and $A \subseteq B$, is it necessarily true that $x \in B$?
Yes, because $A \subseteq B$ means that $\forall y: y \in A \Longrightarrow y \in B$ and if $x \in A$ is true also $x \in B$ must be true.
**17e** If $x \in A$ and $A \in B$ is it necessarily true that $x \in B$?
No, for example in **6** a counterexample was presented where $A = \{ 1, 2 \}$ and $C = \{ \{ 1\}, \{ 1, 2 \} \}$. In this case we have that $1 \in A$, $A \in C$ and $1 \notin C$.
**18** $A - (B \cap C) = (A - B) \cup (A - C)$
$$\begin{split}
x \in A - (B \cap C) & \Longleftrightarrow x \in A \land x \notin B \cap C \\
& \Longleftrightarrow x \in A \land (x \notin B \lor x \notin C) \\
& \Longleftrightarrow (x \in A \land x \notin B) \lor (x \in A \land x \notin C) \\
& \Longleftrightarrow x \in A - B \lor x \in A - C \\
& \Longleftrightarrow x \in A - B \cup A - C
\end{split}$$
**19** Let $\mathscr{F}$ be a class of sets. Then
$$B - \bigcup_{A \in \mathscr{F}} A = \bigcap_{A \in \mathscr{F}} (B - A) \text{ and } B - \bigcap_{A \in \mathscr{F}} A = \bigcup_{A \in \mathscr{F}} (B - A)$$
$$\begin{split}
x \in B - \bigcup_{A \in \mathscr{F}} A & \Longleftrightarrow x \in B \land x \notin \bigcup_{A \in \mathscr{F}} A \\
& \Longleftrightarrow x \in B \land \forall A: A \in \mathscr{F} \land x \notin A \\
& \Longleftrightarrow (\forall A: A \in \mathscr{F} \land x \in B) \land (\forall A: A \in \mathscr{F} \land x \notin A) \\
& \Longleftrightarrow \forall A: A \in \mathscr{F} \land (x \in B \land x \notin A) \\
& \Longleftrightarrow \forall A: A \in \mathscr{F} \land x \in B - A \\
& \Longleftrightarrow x \in \bigcap_{A \in \mathscr{F}} B - A
\end{split}$$
$$\begin{split}
x \in B - \bigcap_{A \in \mathscr{F}} A & \Longleftrightarrow x \in B \land x \notin \bigcap_{A \in \mathscr{F}} A \\
& \Longleftrightarrow x \in B \land \exists A: A \in \mathscr{F} \land x \notin A \\
& \Longleftrightarrow (\exists A: A \in \mathscr{F} \land x \in B) \land (\exists A: A \in \mathscr{F} \land x \notin A) \\
& \Longleftrightarrow \exists A: A \in \mathscr{F} \land (x \in B \land x \notin A) \\
& \Longleftrightarrow \exists A: A \in \mathscr{F} \land x \in B - A \\
& \Longleftrightarrow x \in \bigcup_{A \in \mathscr{F}} B - A
\end{split}$$
**20a** Prove that one of the following two formulas is always right and the other one is sometimes wrong:
$$\text{(i) } A - (B - C) = (A - B) \cup C$$
$\text{(i)}$ is false because $A \cap C = C$ is not always true:
$$\begin{split}
x \in A - (B - C) & \Longleftrightarrow x \in A \land x \notin B - C \\
& \Longleftrightarrow x \in A \land (x \notin B \lor x \in C) \\
& \Longleftrightarrow (x \in A \land x \notin B) \lor (x \in A \land x \in C) \\
& \Longleftrightarrow x \in A - B \lor x \in A \cap C \\
& \Longleftrightarrow x \in (A - B) \cup (A \cap C)
\end{split}$$
$$\text{(ii) } A - (B \cup C) = (A - B) - C$$
$\text{(ii) }$ is true because:
$$\begin{split}
x \in A - (B \cup C) & \Longleftrightarrow x \in A \land x \notin B \cup C \\
& \Longleftrightarrow x \in A \land (x \notin B \land x \notin C) \\
& \Longleftrightarrow (x \in A \land x \notin B) \land x \notin C \\
& \Longleftrightarrow x \in A - B \land x \notin C \\
& \Longleftrightarrow x \in (A - B) - C
\end{split}$$
**20b** State an additional necessary and sufficient condition for the formula which is sometimes incorrect to be always right.
For $\text{(i)}$ to be true we need that $A \cap C = C$. Also because $A \cap C = C \Longleftrightarrow C \subseteq A$ another alternative is to point out that $C \subseteq A$ is a necessary and sufficient condition for $\text{(i)}$ to be true.
## A Set of Axioms for the Real-Number System
### Exercises I 3.3 {#exrI3.3}
**1** Prove Theorems I.5 through I.15, using Axioms 1 through 6 and Theorems I.1 through I.4.
**Theorem I.5** $a(b - c) = ab - ac$
$$\begin{split}
a(b - c) & = a(b + (-c)) & \text{ Theorem I.3} \\
& = ab + a(-c) & \text{ Axiom 3} \\
& = (ab + a(-c)) + 0 & \text{ Axiom 4} \\
& = (ab + a(-c)) + (ac + (-ac)) & \text{ Theorem I.2} \\
& = ab + (a(-c) + (ac + (-ac))) & \text{ Axiom 2} \\
& = ab + ((a(-c) + ac) + (-ac)) & \text{ Axiom 2} \\
& = ab + (a((-c) + c) + (-ac)) & \text{ Axiom 3} \\
& = ab + (a( c + (-c)) + (-ac)) & \text{ Axiom 1} \\
& = ab + (a0 + (-ac)) & \text{ Theorem I.2} \\
& = (ab + a0) + (-ac) & \text{ Axiom 2} \\
& = a(b + 0) + (-ac) & \text{ Axiom 3} \\
& = ab + (-ac) & \text{ Axiom 4} \\
& = ab -ac & \text{ Theorem I.3}
\end{split}$$
**Theorem I.6** $0a = a0 = 0$
First
$$0a = a0 \text{ Axiom 1}$$
Second
$$\begin{split}
a0 & = a(0 + 0) & \text{ Axiom 4} \\
& = a0 + a0 & \text{ Axiom 3}
\end{split}$$
Third
$$\begin{split}
a0 & = a0 + 0 \text{ Axiom 4}
\end{split}$$
Fourth
$$\begin{split}
a0 + a0 & = a0 + 0 \Longrightarrow a0 = 0 \text{ Theorem I.1}
\end{split}$$
Therefore $0a = a0 = 0$
**Theorem I.7** CANCELLATION LAW OF MULTIPLICATION. If $ab = ac$ and $a \neq 0$, then $b = c$. (In particular, this shows that the number $1$ of Axiom 4 is unique)
First
$$\begin{split}
a \neq 0 \Longrightarrow \exists y: y \in \mathbb{R} \land ay = 1 \text{ Axiom 6}
\end{split}$$
Second
$$\begin{split}
b & = 1b & \text{ Axiom 4} \\
& = (ay)b \\
& = (ya)b & \text{ Axiom 1} \\
& = y(ab) & \text{ Axiom 2} \\
& = y(ac) \\
& = c & \text{ Axioms 2, 1, 4} \\
\end{split}$$
**Theorem I.8** POSSIBILITY OF DIVISION. Given $a$ and $b$ with $a \neq 0$, there is exactly one $x$ such that $ax = b$. This $x$ is denoted by $b/a$ or $\frac{a}{b}$ and is called the quotient of $b$ and $a$. In particular, $1/a$ is also written $a^{-1}$ and is called the reciprocal of a.
First
$$\begin{split}
a \neq 0 \Longrightarrow \exists y: y \in \mathbb{R} \land ay = 1 \text{ Theorem I.3}
\end{split}$$
Second
$$\begin{split}
b & = 1b & \text{ Axiom 4} \\
& = (ay)b \\
& = a(yb) & \text{ Axiom 2} \\
& = ax & \text{ where } x = yb
\end{split}$$
Third, if $ax = b$ and $az = b$ then by **Theorem I.7** $x = z$ so $x$ is unique.
**Theorem I.9** If $a \neq 0$, then $b/a = ba^{-1}$
First
$$\begin{split}
a \neq 0 \land 1 \in \mathbb{R} \Longrightarrow \exists! a^{-1}: a^{-1} \in \mathbb{R} \land aa^{-1} = 1 \text{ Theorem I.8}
\end{split}$$
Second
$$\begin{split}
a \neq 0 \land b \in \mathbb{R} \Longrightarrow \exists! b/a: b/a \in \mathbb{R} \land ab/a = b \text{ Theorem I.8}
\end{split}$$
Third
$$\begin{split}
b & = 1b & \text{ Axiom 4} \\
& = (aa^{-1})b \\
& = a(a^{-1}b) & \text{ Axiom 2} \\
& = a(ba^{-1}) & \text{ Axiom 1} \\
\end{split}$$
Fourth
$$\begin{split}
ab/a = b \land b = a(ba^{-1}) \Longrightarrow b/a = ba^{-1} \text{ Theorem I.7}
\end{split}$$
**Theorem I.10** If $a \neq 0$, then $(a^{-1})^{{-1}} = a$
First, if $a \neq 0$ we can use **Theorem I.8**
Second
$$\begin{split}
1 & = a^{-1}(a^{-1})^{{-1}} \text{ Theorem I.8} \\
\end{split}$$
Third
$$\begin{split}
1 & = aa^{-1} & \text{ Theorem I.8} \\
& = a^{-1}a & \text{ Axiom 1}
\end{split}$$
Fourth
$$\begin{split}
1 = a^{-1}(a^{-1})^{{-1}} \land 1 = a^{-1}a \Longrightarrow (a^{-1})^{{-1}} = a \text{ Theorem I.7}
\end{split}$$
**Theorem I.11** If $ab = 0$, then $a = 0$ or $b = 0$
To prove this statement we are going to use the method of *reductio ad absurdum* and the equivalence between the statements $A \Longrightarrow B$ and $\neg(A \land (\neg B))$. Please check out [@mendelson_number_2008, Chapter 1, p 7, Exercises 2 and 5]
First
$$\begin{split}
(ab = 0 \Longrightarrow (a = 0 \lor b = 0)) & \Longleftrightarrow \neg(ab = 0 \land \neg(a = 0 \lor b = 0)) \\
& \Longleftrightarrow \neg(ab = 0 \land (a \neq 0 \land b \neq 0))
\end{split}$$
Second, we are going to assume $(ab = 0 \land (a \neq 0 \land b \neq 0)$, find a contradiction and conclude that $\neg(ab = 0 \land (a \neq 0 \land b \neq 0)$ is true where this means that the original statement is true: $ab = 0 \Longrightarrow (a = 0 \lor b = 0)$
Third
$$\begin{split}
a0 = 0 \text{ Theorem I.6}
\end{split}$$
Fourth
$$\begin{split}
a0 = 0 \land ab = 0 \Longrightarrow b = 0 \text{ Theorem I.7}
\end{split}$$
Fifth, there is a contradiction because we assume initially that $b \neq 0$ so $\neg(ab = 0 \land (a \neq 0 \land b \neq 0)$ is true by the method of *reductio ad absurdum*. Therefore the original statement is true: $ab = 0 \Longrightarrow (a = 0 \lor b = 0)$
**Theorem I.12** $(-a)b = -(ab)$ and $(-a)(-b) = ab$
In the case of $(-a)b = -(ab)$:
First