You are about to erase your work on this activity. Are you sure you want to do this?
Updated Version Available
There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Mathematical Expression Editor
[?]
A solution to the problem of making radical + value = radical + value style problems
procedurally that remain suitably “nice” for precalc students.
It is surprisingly difficult to random-generate a nice version of the classic style
problems that maintain nice solveability by hand for a student at this level. Austin
Jacobs and Jason Nowell coded this version that abuses the fact that we can force
two parabola to intersect each other on an integer lattice in predictable places,
then generate the radicals by using inverse functions of the parabolas while
inferring the solutions by applying the inverse process to the integer lattice
geometrically.
Apologies that the code is rather opaque - it requires a picture that no longer
exists.
Below is the explanation for the code as per Austin,
The core idea here is that square roots with a linear term as their argument can be
thought of as the ”inverse” of a parabola. So what we are going to do is take two
parabolas and then just draw a horizontal line at the y value we want to be our
solution. The first parabola will be . As long as we choose a1, b1, and c1 to be
integers, we know that putting in integers for x will force F(x) to be an integer (eg if
then . So we choose three integers and then pick a value for x-b1, which we’ll call
p1w. This will give us the point with a guarantee of both coordinates being
integers.
Now we draw our horizontal line which we know goes through that point (indeed,
this will end up being our solution). We pick a horizontal distance to travel along this
path, say C, and we specifically choose it to be an integer. This will be our ”+C” in
the initial problem statement.
We now have another integer point . This is our jumping point for the second
parabola, G(x). The only thing we need to do now is pick a2, b2, c2, and d2, however
we don’t need to pick all of these. Once we make some choices the rest will be
fixed. For simplicity, choose a2 and d2. This will let us know that our second
parabola will have its vertext at and we only need to sort out from here
what the appropriate b2 and c2 need to be. Since we have the vertex of the
parabola, we know that b2 is the x value of that point and c2 is just the y
value.
Finally, we get the display expressions by taking the function inverses of F and
G.
1 The Finished Product
What is the sum of the answers to the following equality? The sum of solutions is:
.
2 The magic
Here is the sage code that generates the problem... as mentioned it is currently rather
opaque.
\begin{sagesilent}
def RandInt(a,b):
""" Returns a random integer in [‘a‘,‘b‘]. Note that ‘a‘ and ‘b‘ should be integers themselves to avoid unexpected behavior.
"""
return QQ(randint(int(a),int(b)))
# return choice(range(a,b+1))
def NonZeroInt(b,c, avoid = [0]):
""" Returns a random integer in [‘b‘,‘c‘] which is not in ‘av‘.
If ‘av‘ is not specified, defaults to a non-zero integer.
"""
while True:
a = RandInt(b,c)
if a not in avoid:
return a
p1ans1 = 100
p1ans2 = 200
while p1ans1>50 or p1ans2>50:
# Make p(x)
p1c1 = NonZeroInt(1,5)# a
p1c2 = RandInt(1,5)# b
p1c3 = RandInt(1,5)# c