`500 x = 4500`

As a second example, suppose that out of each $500 paycheck $100 must go towards paying my bills. Suppose also that I have already begun saving and have an initial amount of $1300 saved already. Then the question of “how many paychecks do I need to save before I can afford to buy a new car can be represented by the following equation, which we’d also like to solve for x:
`500 x + 1300 = 4500 - 100 x`

The goal when solving an equation of this form is to isolate the variable, which in the case of these examples, means to get the x on one side of the equals sign ( = ) by itself and some number on the other side of the equals sign. We can do this by remembering a simple rule, **Whatever you do to change one side of the equation, you must make the same changes on the other side of the equation**. We do this because initially if we have two things being equal, the only way that they can stay equal is if we do the same things to both these things. We decide what to do by looking at what has already been done and performing the inverse operation of that action.

If there was initially addition of some number, we will subtract that same number. |

If there was initially subtraction of some number, we will add that same number. |

If there was initially multiplication by some number, we will divide by that same number. |

If there was initially division by some number, we will multiply by that same number. |

`500 x + 1300 = 4500 - 100 x`

We notice that on the left hand side (LHS), x has been multiplied by 500 and the term 1300 has been added. So as a first step, we could either divide both sides by 500 or subtract 1300 from both sides. Likewise, on the right hand side (RHS), x has been multiplied by (-100) and the number 4500 has been added to it. So we could also divide both sides by by (-100) or subtract 4500 from both sides of the equation. We could also add 100 x or 500 x to both sides of the equation.
Initially there are four terms in this equation and division (by 500 or -100) will keep the number of terms in the equation at 4, whereas subtraction of 1300 or 4500 or 500 x or (-100 x) will reduce the number of terms to three. So we choose to do one of these actions. Lets go with subtraction of 1300 from both sides of the equation.
It can now be represented by
`500 x + 1300 - 1300 = 4500 - 100 x - 1300`

This simplifies to
`500 x = 3200 - 100 x`

Again we are faced with many options regarding what to do next. However, to get all the terms with an x on one side of the equation, we can add 100 x to both sides of this equation, which then becomes
`500 x + 100 x = 3200 - 100 x + 100 x`

This simplifies to
`600 x = 3200`

Now we notice that x is being multiplied by 600. So to solve for x, we only need to divide both sides by 600 which gives us that
`x = 3200 / 600`

Relating this to fraction arithmetic and Euclid’s Algorithm, we can reduce this fraction by noticing that 3200 = 200 * 16 and 600 = 200 * 3, so 3200 / 600 can be reduced to 16 / 3.
`So x = 16 / 3`

Since we’re looking for the number of paychecks I would need to save, this needs to be a whole number. 16 / 3 is greater than 5, so 5 paychecks will not be enough. So in order to make this purchase, I would need 6 paychecks.
The script also gives the option to generate a new problem to gain more practice with these types of problems.
- Learn Duality in Linear Programming (0.961)
- Fraction Arithmetic (0.244)
- The PageRank Algorithm (0.244)
- Sudoku Program Updates (0.244)
- Approximating the Set Cover Problem (0.244)

Cool script.

There’s a little error in your word problem above, though. The -100x should’ve started on the left side of the equation, not the right. As it is, the addition of that term is decreasing x, when accounting for your required costs ought to _increase_ the number of months to get to $4500.

Thanks. I made the changes. Hope you enjoy the scripts.