(Also available in WeScheme)
Students build upon their understanding of Booleans and simple inequalities to compose compound inequalities using the concepts of union and intersection.
Lesson Goals |
Students will be able to:
|
Student-Facing Lesson Goals |
|
Materials |
|
Supplemental Materials |
- compound inequality
-
an inequality that combines two simple inequalities using and or or
- function
-
a relation from a set of inputs to a set of possible outputs, where each input is related to exactly one output
- union
-
the set of values that makes either or both of a set of inequalities true
🔗Introducing Compound Inequalities
Overview
Students consider the need to compose inequalities, and think about how to write them.
Launch
We use inequalities for lots of things:
-
Is it hot out? (๐ก๐๐๐๐๐๐๐กu๐๐ > 80ยฐ)
-
Did I get paid enough for painting that fence? (๐๐๐๐ โฅ $100)
-
Are the cookies finished baking? (๐ก๐๐๐๐ = 0)
What other examples can you come up with?
Many times we need to combine inequalities:
-
Should I go to the beach? (๐ก๐๐๐๐๐๐๐กu๐๐ > 80ยฐ and ๐ค๐๐๐กโ๐๐ = "๐ u๐๐๐ฆ")
-
Was this burrito worth the price? (๐ก๐๐ ๐ก๐ = "๐๐๐๐๐๐ou๐ " and ๐๐๐๐๐ leq $15)
Can you think of examples of when we might want to combine inequalities?
Guide students through other examples of and
and or
with various statements, such as:
-
"I’m wearing a red shirt AND I’m a math teacher, true or false?"
-
"I’m an NBA basketball star OR I’m having pizza for lunch, true or false?"
This can make for a good sit-down, stand-up activity, where students take turns saying compound Boolean statements and everyone stands if that statement is true for them.
Investigate
Both mathematics and programming have ways of combining - or composing - inequalities.
Synthesize
Be really careful to check for understanding here.
-
Expressions using
and
only producetrue
if both of their sub-expressions aretrue
. -
Expressions using
or
producetrue
if either of their sub-expressions aretrue
.
Strategies for English Language Learners When describing compound inequalities, be careful not to use "English shortcuts". For example, we might say "I am holding a marker and an eraser" instead of "I am holding a marker and I am holding an eraser." These sentences mean the same thing, but the first one obscures the fact that "and" joins two complete phrases. For ELL/ESL students, this is unecessarily adds to cognitive load! |
🔗Solutions and Non-Solutions of Compound Inequalities
Launch
Complete Compound Inequality Warmup.
Investigate
-
Open the Compound Inequalities Starter File.
-
Click "Run" to see graphs of the inequalities you’ve just considered.
-
The bottom two graphs are produced by the special functions
and-intersection
andor-union
. -
Read the comments in the Definitions area with your partner to learn how these functions are supposed to work.
-
Then complete Exploring Compound Inequality.
-
Why is the circle on 5 red and the circle on 15 green?
-
The circle on 5 is red because 5 is not part of the solution - it is not bigger than itself.
-
The circle on 15 is green because 15 is part of the solution - it is less than or equal to 15.
-
-
Why isn’t there a solution to ๐ฅ < 5 ๐๐๐ ๐ฅ โฅ 15
-
There aren’t any numbers that are both smaller than 5 and greater than or equal to 15, so there is no solution!
-
or-union
takes in two functions and a list of numbers and produces a graph with the points and the shaded union of values that make either or both of the inequalities true.
In order to make an or
statement true, a value only has to make one of the inequalities true.
x < 5 or x ≥ 15
Sometimes unions are represented by two separate arrows pointing in opposite directions with a gap between their starting points.
x < 1 or x < 3
Sometimes unions overlap and appear as a single arrow pointing in one direction.
x > 5 or x ≤ 15
Sometimes unions overlap and cover the entire number line!
-
Why is the whole graph of ๐ฅ > 5 o๐ ๐ฅ โค 15 shaded blue?
-
Because every number in the universe is either greater than 5 or less than or equal to 15, so there aren’t any non-solutions!
-
Once students are familiar with the starter file, they are ready to use it as they practice identifying solutions and non-solutions for compound inequalities.
-
Explore the compound inequalities listed using the Compound Inequalities Starter File, identifying solutions and non-solutions for each.
Instead of defining two functions as simple inequalities, we can produce an inequality graph by defining one function to be a compound inequality!
In the following activity, we’ll analyze inequality graphs and define a single function that produces the graph.
Walk students through the completed first example before they attempt to write this code on their own.
-
Turn to Compound Inequality Functions.
-
Write code to describe the compound inequalities pictured.
Synthesize
-
How did the graphs of intersections and unions differ?
🔗Additional Exercises
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927).
Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.