Welcome back to Modeling and Solving Everyday Systems! This is the second lesson of the course, and it starts where most real problems actually start: with a paragraph, not with equations.
Picture a text from a friend: "Studio A is $30 a month plus $4 a class, Studio B is $54 a month plus $1 a class — which should I join?" There is no brace, no x, no y anywhere in that message. In the first lesson we sized up systems that someone else had already written for us; today we write them ourselves. We will define every variable in plain words, produce one equation per option, and then deliberately stop, because a faithful model is worth far more than fast algebra applied to the wrong equations.
What Makes a Situation a Comparison Situation
An enormous number of everyday offers share one shape: a fixed amount you pay (or earn) no matter what, plus a rate that depends on how much you use, sell, or work. Studio A's $30 monthly fee is the fixed amount; its $4 per class is the rate. In general,
total=(rate)×(amount of usage)+(fixed amount)
A comparison situation appears when two offers of this shape sit side by side and we want to know how they stack up against each other. Each offer contributes one equation, and — this is the crucial part — both equations use the same two variables. That sharing is precisely what turns two separate formulas into a system rather than a pair of unrelated cost rules.
Step 1: Define the Variables Explicitly
Before writing a single equation, we name what is unknown, in a full phrase, with units attached. Vague labels are where most modeling errors begin: "let c = cost" leaves us guessing between per class, per month, and per year, while "let c = total monthly cost in dollars" cannot be misread.
For a rate-plus-fixed comparison, two variables are almost always enough:
One for the quantity that varies — number of classes, texts, miles, or dollars of sales.
One for the total that results — total monthly cost, total weekly pay, total yearly bill.
Written out for the studio question, the two definitions look like this, each on its own line above the equations:
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
Step 2: Write One Equation per Option
Step 3: Assemble the System
A Full Worked Example: Two Subscription Plans
A Second Structure: Flat Pay Versus Base Plus Commission
Checking That the Model Is Faithful
Common Translation Traps
Conclusion and Next Steps
In this lesson, we learned to read a comparison situation as two offers sharing one shape: a rate times a varying quantity, plus a fixed amount. The routine has three moves — define each variable with its units in plain words, write one equation per option by sorting each number into the rate or fixed role, then stack the equations into a system that shares both variables. Along the way we saw that a flat salary is simply a rate of zero, that percentages must become decimals, and that a five-line read-back catches swapped numbers while they are still free to fix.
Now it is your turn to build models from scratch. In the practice ahead, you will match plan descriptions to their equations, complete the variable definitions and equations for a two-plan scenario, catch a system that quietly traded a fee for a rate, and finally write full systems for a subscription choice and a pay decision starting from nothing but a paragraph of text. Resist the urge to solve — the satisfaction of pressing that button arrives in the very next lesson.
With the variables pinned down, each option becomes one equation, and building it is mostly a sorting job: every number in the sentence plays either the rate role or the fixed role. The language of the problem tells us which, and the signal words are remarkably consistent.
Phrase in the sentence
Role
Where it goes
"$4 per class", "$0.50 each", "for every mile"
Rate
Multiplies the varying variable
"$30 monthly fee", "base salary of $400", "one-time $25 charge"
Fixed
Stands alone as a constant
"6%commission on sales"
Rate as a decimal
Multiplies the varying variable, as 0.06s
So Studio A, at $30 a month plus $4 per class, gives c=4x+30: the rate 4 travels with x, and the fee 30 stands alone. Notice that the equation arrives already solved forc. That is typical of comparison situations, and as you may recall from the previous lesson, it is exactly the form cue that will make substitution the cheap choice later on.
Studio B charges a $54 monthly fee plus $1 per class, so it gives c=1x+54. Keeping the same definitions of x and c, we stack the two equations with a brace to declare that they describe one situation at one moment:
{c=4x+30c=1x+54​
The word same is carrying real weight here. One shared x means we are asking about a single class count, and one shared c means we are asking when the two totals agree. We are not solving today, but it is worth knowing the destination: the solution of this system is the number of classes at which both studios cost identical amounts.
Let us run the three steps on a fresh scenario, sentence by sentence.
An audiobook service offers two plans. The Basic plan costs $9 per month and charges $2 for each book downloaded. The Plus plan costs $15 per month and charges $0.50 for each book downloaded.
The varying quantity is the number of downloads, and the total is a monthly bill in dollars:
Let b = number of books downloaded in one month.
Let c = total monthly cost in dollars.
Now one equation per plan. Basic pairs the rate 2 with b and holds 9 as its constant; Plus pairs 0.50 with b and holds 15:
{c=2b+9c=0.5b+15​
That is the finished model, and we stop right there. Note the interesting tension baked into it: the plan with the higher fixed cost has the lower rate, which is the classic sign that neither plan wins at every download count.
Pay decisions follow the same template, with two twists worth naming: sometimes an option has no rate at all, and sometimes the rate arrives as a percentage.
A salesperson chooses between two offers. Job A pays a flat $760 per week. Job B pays $400 per week plus a 6% commission on weekly sales.
Here the quantity that varies is measured in dollars rather than in items, so the definitions read: let s = weekly sales in dollars, and let p = total weekly pay in dollars. Job A's pay never moves, so s does not appear in it, while Job B's 6% becomes the decimal 0.06:
{p=760p=0.06s+400​
A flat amount is not a missing equation — it is an equation whose rate happens to be 0. Writing the first line as p=0s+760 is equally correct, and sometimes it helps us see that both offers really do share the same shape.
Once the system is on the page, a short read-back catches almost every translation error before any algebra begins. We reread the original sentences and confirm that each number landed in the role the words assigned to it.
Check
Question to ask
Red flag
Variable meaning
Does each variable name a quantity and its unit?
"Let x = classes" with no time frame
Rate placement
Is every "per" number multiplying the varying variable?
A per-unit price sitting alone as a constant
Fixed placement
Is every flat charge standing alone?
A monthly fee attached to x
Shared variables
Do both equations use the identical pair of variables?
Using b in one equation and n in the other
Units agreement
Are both totals in the same units and time frame?
One plan monthly, the other yearly
Running this on the audiobook system, every line passes: 2 and 0.5 multiply b, 9 and 15 stand alone, both equations report dollars per month, and both use the pair (b,c).
The mistakes that show up in comparison problems are a small and repeatable set, so naming them is most of the defense.
Swapping rate and fee. Writing c=9b+2 for a $9 monthly fee with a $2 per-book charge. The per-unit number always travels with the variable.
Mixing the two plans. Pairing Basic's rate with Plus's fee produces an equation that describes no real offer at all.
Using separate output variables without the extra condition they require. Writing c1​=2b+9 and c2​=0.5b+15 is not wrong — it becomes a valid three-variable system the moment we add c1​=c2​ to express that we want the two costs to match. The reason this lesson uses a single shared c from the start is that it folds that "costs are equal" condition directly into the structure of the system, keeping the model at two variables and two equations. Either approach works; just be aware that the two-output-variable version is incomplete without that third equation.
Leaving a percentage as a whole number. Writing 6s instead of 0.06s inflates the commission a hundredfold.
Solving too soon. Setting the right sides equal before rereading the sentences. Translation and solving are separate jobs, and keeping them in order is what protects us from confidently wrong answers.