randRange( 0, 2 ) [randRange( 2, 4 ), randRange( 2, 4 ), randRange( 40, 50 )][INDEX] [randRange( X + 2, 10 ), randRange( X + 2, 10 ), randRange( 30, 50 )][INDEX] randRange( 0, 1 ) randRange( 0, 1 ) [roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), 1][INDEX] [roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), 1][INDEX] roundTo( 8, A1 * X + B1 * Y ) 1 [-1, -1, randRange( -4, -2 )][INDEX] roundTo( 8, A2 * X + B2 * Y ) A1 * C2 > 0 ? "-" : "+" B1 * Y > 0 ? "-" : "+" ["A group of adults and kids went to see a movie", "A few families took a trip to an amusement park together", ""][INDEX] ["Find the number of adults and kids in the group", "Find the number of adults and kids on the trip", ""][INDEX] ["adults", "adults", "home team fans"][INDEX] ["kids", "kids", "away team fans"][INDEX]

PROBLEM_1. Tickets cost \$A1.toFixed( 2 ) each for adults and \$B1.toFixed( 2 ) each for kids, and the group paid \$C1.toFixed( 2 ) in total. There were abs( C2 ) fewer adults than kids in the group.

PROBLEM_2.
C1 people attended a baseball game. Everyone there was a fan of either the home team or the away team. The number of home team fans was abs( C2 ) less than abs( B2 ) times the number of away team fans.

How many home team and away team fans attended the game?

# of UNIT_1 = X

# of UNIT_2 = Y

Let `x` equal the number of UNIT_1 and `y` equal the number of UNIT_2.

The system of equations is then:

`\color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}`
`x = expr(["+", ["*", -B2, "y"], C2])`

Solve for `x` and `y` using substitution.

Since `x` has already been solved for, substitute `expr(["+", ["*", -B2, "y"], C2])` for `x` in the first equation.

`\color{BLUE}{A1-}\color{GREEN}{(expr(["+", ["*", -B2, "y"], C2]))}\color{BLUE}{+ expr(["*", B1, "y"]) = C1}`

Simplify and solve for `y`.

`expr(["+", ["*", roundTo( 8, A1 * -B2 ), "y"], roundTo( 8, A1 * C2 )]) + expr(["*", B1, "y"]) = C1`

`expr(["+", ["*", roundTo( 8, A1 * -B2 + B1 ), "y"], roundTo( 8, A1 * C2 )]) = C1`

`expr(["+", ["*", roundTo( 8, A1 * -B2 + B1 ), "y"], A1 * C2])\color{BLUE}{SIGN_1abs( roundTo( 8, A1 * C2 ) )} = C1\color{BLUE}{SIGN_1abs( roundTo( 8, A1 * C2 ) )}`

`expr(["*", roundTo( 8, A1 * -B2 + B1 ), "y"]) = roundTo( 8, C1 - A1 * C2 )`

`\dfrac{expr(["*", roundTo( 8, A1 * -B2 + B1 ), "y"])}{\color{BLUE}{roundTo( 8, A1 * -B2 + B1 )}} = \dfrac{roundTo( 8, C1 - A1 * C2 )}{\color{BLUE}{roundTo( 8, A1 * -B2 + B1 )}}`

`\color{ORANGE}{y = Y}`

Now that you know `\color{ORANGE}{y = Y}`, plug it back into `\thinspace \color{GREEN}{x = expr(["+", ["*", -B2, "y"], C2])}\thinspace` to find `x`.

`\color{GREEN}{x = -B2-}\color{ORANGE}{(Y)}\color{GREEN}{ + C2}`

`x = -B2 * Y + C2`

`\color{red}{x = X}`

You can also plug `\color{ORANGE}{y = Y}` into `\thinspace \color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}\thinspace` and get the same answer for `x`:

`\color{BLUE}{expr(["*", A1, "x"]) + B1-}\color{ORANGE}{(Y)}\color{BLUE}{= C1}`

`\color{red}{x = X}`

There were X UNIT_1 and Y UNIT_2.

randRange( 0, 2 ) [randRange( 2, 4 ), randRange( 2, 4 ), randRange( 40, 50 )][INDEX] [randRange( X + 2, 10 ), randRange( X + 2, 10 ), randRange( 30, 50 )][INDEX] randRange( 0, 1 ) randRange( 0, 1 ) [roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), 1][INDEX] [roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), 1][INDEX] roundTo( 8, A1 * X + B1 * Y ) 1 [-1, -1, randRange( -4, -2 )][INDEX] roundTo( 8, A2 * X + B2 * Y ) B1 * C2 > 0 ? "-" : "+" A1 * X > 0 ? "-" : "+" ["The drama club sold bags of candy and cookies to raise money for the spring show", "A local gift shop sold bags of candy and cookies for Halloween", ""][INDEX] ["Find the number of bags of candy and cookies sold by the drama club", "Find the number of bags of candy and cookies sold by the gift shop", ""][INDEX] ["bags of candy", "bags of candy", "angle 1"][INDEX] ["bags of cookies", "bags of cookies", "angle 2"][INDEX]

PROBLEM_1. Bags of candy cost \$A1.toFixed( 2 ), and bags of cookies cost \$B1.toFixed( 2 ), and sales equaled \$C1.toFixed( 2 ) in total. There were C2 more bags of cookies than candy sold.

PROBLEM_2.
The sum of two angles' measures is C1 degrees. Angle 2 is abs( C2 ) degrees smaller than abs( A2 ) times angle 1.

What are the measures of the two angles in degrees?

# of UNIT_1 = X

# of UNIT_2 = Y

Let `x` equal the numbermeasure of UNIT_1 and `y` equal the numbermeasure of UNIT_2.

The system of equations is then:

`\color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}`
`y = expr(["+", ["*", -A2, "x"], C2])`

Since we already have solved for `y` in terms of x, we can use substitution to solve for `x` and `y`.

Substitute `expr(["+", ["*", -A2, "x"], C2])` for `y` in the first equation.

`\color{BLUE}{expr(["*", A1, "x"]) + B1-}\color{GREEN}{(expr(["+", ["*", -A2, "x"], C2]))}\color{BLUE}{= C1}`

Simplify and solve for `x`.

`expr(["+", ["*", A1, "x"], ["*", roundTo( 8, B1 * -A2 ), "x"]]) + roundTo( 8, B1 * C2 ) = C1`

`expr(["+", ["*", roundTo( 8, A1 + B1 * -A2 ), "x"], roundTo( 8, B1 * C2 )]) = C1`

`expr(["+", ["*", roundTo( 8, A1 + B1 * -A2 ), "x"], roundTo( 8, B1 * C2 )])\color{BLUE}{SIGN_1abs( roundTo( 8, B1 * C2 ) )} = C1\color{BLUE}{SIGN_1abs( roundTo( 8, B1 * C2 ) )}`

`expr(["*", roundTo( 8, A1 + B1 * -A2 ), "x"]) = roundTo( 8, C1 - B1 * C2 )`

`\dfrac{expr(["*", roundTo( 8, A1 + B1 * -A2 ), "x"])}{\color{BLUE}{roundTo( 8, A1 + B1 * -A2 )}} = \dfrac{roundTo( 8, C1 - B1 * C2 )}{\color{BLUE}{roundTo( 8, A1 + B1 * -A2 )}}`

`\color{red}{x = X}`

Now that you know `\color{red}{x = X}`, plug it back into `\thinspace \color{GREEN}{y = expr(["+", ["*", -A2, "x"], C2])}\thinspace` to find `y`.

`\color{GREEN}{y = -A2-}\color{red}{(X)}\color{GREEN}{ + C2}`

`y = roundTo( 8, -A2 * X ) + C2`

`y = Y`

You can also plug `\color{red}{x = X}` into `\thinspace \color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}\thinspace` and get the same answer for `y`:

`\color{BLUE}{A1-}\color{red}{(X)}\color{BLUE}{ + expr(["*", B1, "y"]) = C1}`

`\color{ORANGE}{y = Y}`

X bags of candy and Y bags of cookies were sold.The measure of angle 1 is `X^{\circ}` and the measure of angle 2 is `Y^{\circ}`.

randRange( 2, 4 ) randRange( X + 2, 10 ) 1 randRange( 0, 1 ) randRange( 0, 1 ) roundTo( 8, randRange( 100, 300 ) / 100 ) INDEX === 0 ? -1 * Z1 : randRangeWeighted( -4, 4, -1, 0 ) * Z1 roundTo( 8, randRange( 200, 600 ) / 100 ) roundTo( 8, randRange( 200, 600 ) / 100 ) roundTo( 8, randRange( 200, 600 ) / 100 ) roundTo( 8, randRange( 200, 600 ) / 100 ) roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ) roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ) roundTo( 8, A1 * X + B1 * Y ) A1 * randRange( 2, 4 ) roundTo( 8, randRange( 7, 12 ) + ( CENT_1 + CENT_2 ) * 0.5 ) roundTo( 8, A2 * X + B2 * Y ) [ 1, roundTo( 8, -A2 / A1 ), 1, A2 > 0 && A1 < 0 ? A2 : -A2 ][ INDEX ] [ 1, 1, roundTo( 8, -A1 / A2 ), A2 > 0 && A1 < 0 ? -A1 : A1 ][ INDEX ] B1 * Y > 0 ? "-" : "+" B2 * Y > 0 ? "-" : "+"

All of the {3rd|4th|5th} grade teachers and students from school(1) went on a field trip to an {art|archaeology} museum. Tickets were \$A1.toFixed( 2 ) each for teachers and \$B1.toFixed( 2 ) each for students, and the group paid \$C1.toFixed( 2 ) in total.

{A few weeks later|The next month}, the same group visited a {science|natural history} museum where the tickets cost \$A2.toFixed( 2 ) each for teachers and \$B2.toFixed( 2 ) each for students, and the group paid \$C2.toFixed( 2 ) in total.

Find the number of teachers and students on the field trips.

# of teachers = X

# of students = Y

Let `x` equal the number of teachers and `y` equal the number of students.

The system of equations is:

`\color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}`
`expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) = C2`

Solve for `x` and `y` using elimination.

Multiply the bottomtop equation by `MULT2``MULT1` and the bottom equation by `MULT2`.

`\color{BLUE}{expr(["+", ["*", A1 * MULT1, "x"], ["*", B1 * MULT1, "y"]]) = C1 * MULT1}`
`expr(["+", ["*", A2 * MULT2, "x"], ["*", B2 * MULT2, "y"]]) = C2 * MULT2`

Add the top and bottom equations together.

`expr(["*", roundTo( 8, B1 * MULT1 + B2 * MULT2 ), "y"]) = roundTo( 8, C1 * MULT1 + C2 * MULT2 )`

`\dfrac{expr(["*", roundTo( 8, B1 * MULT1 + B2 * MULT2 ), "y"])}{\color{BLUE}{roundTo( 8, B1 * MULT1 + B2 * MULT2 )}} = \dfrac{roundTo( 8, C1 * MULT1 + C2 * MULT2 )}{\color{BLUE}{roundTo( 8, B1 * MULT1 + B2 * MULT2 )}}`

`\color{ORANGE}{y = Y}`

Now that you know `\color{ORANGE}{y = Y}`, plug it back into `\thinspace \color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}\thinspace` to find `x`.

`\color{BLUE}{expr(["*", A1, "x"]) + B1-}\color{ORANGE}{(Y)}\color{BLUE}{= C1}`

`expr(["+", ["*", A1, "x"], B1 * Y]) = C1`

`expr(["+", ["*", A1, "x"], B1 * Y])\color{BLUE}{SIGN_1abs( B1 * Y )} = C1\color{BLUE}{SIGN_1abs( B1 * Y )}`

`expr(["*", A1, "x"]) = roundTo( 8, C1 - B1 * Y )`

`\dfrac{expr(["*", A1, "x"])}{\color{BLUE}{A1}} = \dfrac{roundTo( 8, C1 - B1 * Y )}{\color{BLUE}{A1}}`

`\color{red}{x = X}`

You can also plug `\color{ORANGE}{y = Y}` into `\thinspace \color{GREEN}{expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) = C2}\thinspace` and get the same answer for `x`:

`\color{GREEN}{expr(["*", A2, "x"]) + B2-}\color{ORANGE}{(Y)}\color{GREEN}{= C2}`

`\color{red}{x = X}`

There were X teachers and Y students on the field trips.

randRange( 11, 99 ) randRange( 10, X - 1 ) 0 roundTo( 8, randRange( 100, 300 ) / 100 ) INDEX === 0 ? -1 * Z1 : randRangeWeighted( -4, 4, -1, 0 ) * Z1 roundTo( 8, randRange( 200, 600 ) / 100 ) roundTo( 8, randRange( 200, 600 ) / 100 ) roundTo( 8, randRange( 200, 600 ) / 100 ) roundTo( 8, randRange( 200, 600 ) / 100 ) 1 [ 1, Z1, Z2, Z5 ][ INDEX ] roundTo( 8, A1 * X + B1 * Y ) 1 [ -1, Z2, Z1, Z6 ][ INDEX ] roundTo( 8, A2 * X + B2 * Y ) [ 1, roundTo( 8, -B2 / B1 ), 1, B2 > 0 && B1 < 0 ? B2 : -B2 ][ INDEX ] [ 1, 1, roundTo( 8, -B1 / B2 ), B2 > 0 && B1 < 0 ? -B1 : B1 ][ INDEX ] A1 * X > 0 ? "-" : "+" A2 * X > 0 ? "-" : "+"

The sum of two numbers is C1, and their difference is C2. What are the two numbers?

X
Y

`x` =

`y` =

Let `x` be the first number, and let `y` be the second number.

The system of equations is:

`\color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}`
`expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) = C2`

Solve for `x` and `y` using elimination.

Multiply the bottomtop equation by `MULT2``MULT1` and the bottom equation by `MULT2`.

`\color{BLUE}{expr(["+", ["*", A1 * MULT1, "x"], ["*", B1 * MULT1, "y"]]) = C1 * MULT1}`
`expr(["+", ["*", A2 * MULT2, "x"], ["*", B2 * MULT2, "y"]]) = C2 * MULT2`

Add the top and bottom equations together.

`expr(["*", roundTo( 8, A1 * MULT1 + A2 * MULT2 ), "x"]) = roundTo( 8, C1 * MULT1 + C2 * MULT2 )`

`\dfrac{expr(["*", roundTo( 8, A1 * MULT1 + A2 * MULT2 ), "x"])}{\color{BLUE}{roundTo( 8, A1 * MULT1 + A2 * MULT2 )}} = \dfrac{roundTo( 8, C1 * MULT1 + C2 * MULT2 )}{\color{BLUE}{roundTo( 8, A1 * MULT1 + A2 * MULT2 )}}`

`\color{red}{x = X}`

Now that you know `\color{red}{x = X}`, plug it back into `\thinspace \color{BLUE}{expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) = C1}\thinspace` to find `y`.

`\color{BLUE}{A1-}\color{red}{(X)}\color{BLUE}{ + expr(["*", B1, "y"]) = C1}`

`expr(["+", A1 * X, ["*", B1, "y"]]) = C1`

`A1 * X\color{BLUE}{SIGN_1abs( A1 * X )} + expr(["*", B1, "y"]) = C1\color{BLUE}{SIGN_1abs( A1 * X )}`

`expr(["*", B1, "y"]) = roundTo( 8, C1 - A1 * X )`

`\dfrac{expr(["*", B1, "y"])}{\color{BLUE}{B1}} = \dfrac{roundTo( 8, C1 - A1 * X )}{\color{BLUE}{B1}}`

`\color{ORANGE}{y = Y}`

You can also plug `\color{red}{x = X}` into `\thinspace \color{GREEN}{expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) = C2}\thinspace` and get the same answer for `y`:

`\color{GREEN}{A2-}\color{red}{(X)}\color{GREEN}{ + expr(["*", B2, "y"]) = C2}`

`\color{ORANGE}{y = Y}`