A correct solution can still be improved

A classroom dialogue with AI: the answer is correct, but how do we choose a more economical procedure? Equations, transposition, denominators and reasons for our choices.

Section: Artificial intelligence and thinking Updated:

Articles /correct-solution-can-be-improved-ai
A correct solution can still be improved

18 min

Video

Audio: Italiano. You can change or turn off the subtitles.

A dialogue with AI

Illustration for the Artificial intelligence and thinking section
Section: Artificial intelligence and thinking

I ask an artificial intelligence to solve an equation, showing every step. The result is correct, yet something about the procedure does not convince me: some steps could be organized better. That observation starts a dialogue that I regard as a classroom simulation.

My aim is not to find an arithmetic error. I want to discuss the choices made while solving: which are necessary, which are habits, and which make the work simpler. Correctness is the starting point; the efficiency of the procedure becomes the subject of the lesson.

1/2 + (1/3)x = x − (1/4)x + 7x − 7 + (1/5)x
The proposed equation: the discussion of the procedure starts here.

An essay reconstructed from the author’s conversation. The brief dialogue excerpts are selected and the mathematical steps are organized for teaching. This is neither a complete transcript nor a report of a lesson actually taught in a classroom.

Dialogue contents

1. The AI’s first solution: the answer is correct

Me: Solve it, showing every step.

The initial request is for a complete procedure. The equation is:

1/2 + (1/3)x = x − (1/4)x + 7x − 7 + (1/5)x

1. Clearing denominators

The least common multiple of 2, 3, 4 and 5 is 60. The AI multiplies both sides by 60, distributing it to every term:

60 × (1/2) + 60 × (1/3)x
= 60x − 60 × (1/4)x + 60 × 7x − 60 × 7 + 60 × (1/5)x

Simplifying the products gives:

30 + 20x = 60x − 15x + 420x − 420 + 12x

2. Collecting like terms on the right

60x − 15x + 420x + 12x
= (60 − 15 + 420 + 12)x
= 477x
30 + 20x = 477x − 420

3. Unknown terms on the left, numbers on the right

The AI subtracts 477x and 30 from both sides:

20x − 477x = −420 − 30
−457x = −450

4. Dividing by the coefficient of the unknown

x = (−450)/(−457) = 450/457

Me: Steps 2 and 3 are not optimized.

The answer is correct. My observation concerns the sequence of operations: I want to gather unknown terms and numbers on the appropriate sides first, then perform the additions. This makes the procedure more direct to read.

2. The first revision: gather before adding

The AI accepts the observation and starts again from the equation after clearing denominators:

30 + 20x = 60x − 15x + 420x − 420 + 12x

1. Choosing a side

It gathers unknown terms on the right and numbers on the left, transposing 20x to the right and −420 to the left. For now, it does this without explaining why that side was chosen.

2. The same operations on both sides

It adds 420 and subtracts 20x on both sides:

30 + 20x + 420 − 20x
= 60x − 15x + 420x − 420 + 12x + 420 − 20x

3. Cancelling opposite terms

On the left, 20x − 20x = 0; on the right, −420 + 420 = 0. This leaves:

30 + 420 = 60x − 15x + 420x + 12x − 20x

4. Collecting like terms

450 = (60 − 15 + 420 + 12 − 20)x
450 = 457x

5. Dividing by 457

450/457 = x
x = 450/457

The last step merely swaps the two sides: if a = b, then b = a. No sign changes.

The first solution added the terms on the right, then moved the resulting term to the left. The revision first gathers all x terms on the same side. It works, but we still need to explain why the right side was chosen.

3. Swapping the sides: why does the chosen side change?

I propose the same equation with its sides reversed, to observe how the AI chooses where to gather the unknown terms:

x − (1/4)x + 7x − 7 + (1/5)x = 1/2 + (1/3)x

1. Multiplying every term by 60

60x − 15x + 420x − 420 + 12x = 30 + 20x

2. Transposing 20x left and −420 right

This means subtracting 20x and adding 420 to both sides:

60x − 15x + 420x + 12x − 20x = 30 + 420

3. Collecting like terms

(60 − 15 + 420 + 12 − 20)x = 450
457x = 450

4. Dividing by 457

(457x)/457 = 450/457
x = 450/457

Me: Why on the right one time and on the left the other?

AI: To keep the coefficient of x positive and avoid a step with negative signs.

The reply identifies a positive coefficient as the reason for choosing a side. It sounds plausible, but I want to test it. I propose a new equation, changing only the sign of the 7x term.

4. Changing a sign reveals the criterion

I replace +7x with −7x. The new equation is:

1/2 + (1/3)x = x − (1/4)x − 7x − 7 + (1/5)x
The variant changes only the sign of the 7x term.

1. The AI correctly multiplies by 60

30 + 20x = 60x − 15x − 420x − 420 + 12x

2. The first choice seeks a positive coefficient

To obtain a positive coefficient, the AI puts the unknown terms on the left. In the line before collecting terms, it transposes four x terms and the number 30:

20x − 60x + 15x + 420x − 12x = −420 − 30

3. Adding and dividing

(20 − 60 + 15 + 420 − 12)x = −450
383x = −450
x = −450/383

Me: You fell for it. The choice of left or right is not about the sign but…

AI: …the number of terms to move!

4. The revised solution moves only two terms

It restarts from the same initial line and transposes only 20x to the right and −420 to the left:

30 + 420 = 60x − 15x − 420x + 12x − 20x

450 = (60 − 15 − 420 + 12 − 20)x
450 = −383x

5. Dividing by −383

450/(−383) = x
x = −450/383

A negative coefficient does not prevent finishing: divide both sides by the same nonzero number. This solution is correct too.

5. What exactly are we optimizing?

In the form already written, seeking a positive coefficient requires five transpositions; the other choice requires two. The result is identical.

Two choices in the −7x variant, before collecting like terms
ChoiceTerms transposedAfter adding
Unknown terms on the left for a positive coefficientFour x terms from the right and 30 from the left: 5 transpositions.383x = −450
Unknown terms on the right, where four already are20x from the left and −420 from the right: 2 transpositions.450 = −383x

Here, “more economical” means fewer transpositions before adding like terms. A transposition is counted as a writing shortcut; in terms of the underlying principle, it is the same addition or subtraction on both sides.

This is not a universal rule for every equation. Collecting like terms first changes the operation comparison. In these examples the constants have the same distribution, so keeping x terms on the side that already contains more of them reduces rewriting.

Preferring a positive coefficient may be useful in teaching, but it is not a mathematical obligation. To compare procedures, we need to state the objective we are measuring.

6. The principles that justify the moves

The dialogue suggests distinguishing properties of equality from principles for equivalent equations. Two equations are equivalent when they have the same solution set. Transposing terms and clearing denominators are operational consequences of these principles.

First equivalence principle

Adding or subtracting the same expression, defined throughout the chosen domain, on both sides produces an equivalent equation:

A(x) = B(x) ⇔ A(x) + C(x) = B(x) + C(x)

A term does not physically cross the equals sign: its opposite is added to both sides. For example:

30 + 20x = R(x)
30 + 20x − 20x = R(x) − 20x
30 = R(x) − 20x

The transposition rule is a shorthand. The principle justifies the operation; choosing where to gather unknown terms is a matter of strategy.

Second equivalence principle

Multiplying or dividing both sides by the same nonzero number produces an equivalent equation:

A(x) = B(x) ⇔ kA(x) = kB(x)
k ≠ 0

If a factor or divisor depends on the unknown, it must be defined and nonzero throughout the chosen domain to guarantee equivalence on that domain. Multiplication by zero destroys the equation’s information; division by zero is not allowed.

With numerical denominators, we can multiply every term directly by their least common multiple. At the end, we can isolate x by dividing by its coefficient, provided it is nonzero. It need not be positive.

The mathematical principles do not change: we make their conditions more explicit and distinguish what they permit from how best to apply them.

7. Denominators: comparing with textbook procedures

At this point I acknowledge a step where the AI has already chosen the direct route: it multiplied every term by 60 without first writing both sides as fractions with a common denominator.

Me: You did handle the elimination of the denominator well.

The common-denominator procedure

This is the step I mean when referring to many textbooks and many teachers. I add it here for comparison: the AI did not use it in the initial solution. I am not saying it is incorrect.

1/2 + (1/3)x = x − (1/4)x + 7x − 7 + (1/5)x

1. Write every term with denominator 60:

30/60 + (20x)/60
= (60x)/60 − (15x)/60 + (420x)/60 − 420/60 + (12x)/60

2. Combine the terms on each side into one fraction:

(30 + 20x)/60
= (60x − 15x + 420x − 420 + 12x)/60

3. Multiply both sides by 60:

60 × [(30 + 20x)/60]
= 60 × [(60x − 15x + 420x − 420 + 12x)/60]

30 + 20x = 60x − 15x + 420x − 420 + 12x

The direct route used by the AI

The second principle lets us multiply every term of the original equation by 60 immediately and obtain the same final line. Writing common denominators first is correct but unnecessary for solving this equation.

That intermediate step can help practise fractions. If the aim is to solve the equation, it can be omitted. Saying that “the denominator is eliminated” summarizes multiplication of both sides; this operation must remain clear even when not written in full.

8. The value of the classroom simulation

Showing every step does not mean adding every possible line. It means making the operations and their justifications recognizable. A shorter solution can be fully rigorous if its user understands what they are doing.

In this conversation I do more than receive an explanation. I challenge a choice, ask for its reason, then construct a variant that tests it. The AI solves the problem well, but initially attributes its choice to a criterion that the new example challenges. Through dialogue, we formulate the intended criterion more precisely.

  • Is the result correct?
  • Are the transformations justified?
  • Is the procedure economical for the chosen objective?

Answering yes to the first two does not settle the third. I recognize an efficient choice in clearing denominators and question another in arranging terms. The exchange becomes a reasoned assessment of individual steps even when the answer is already correct.

The lesson is not “the textbook is wrong” or “always contradict AI”. It is learning to justify a preference, test it and recognize what works well. The fraction step makes sense when practising fractions; the shorter method makes sense when it solves more directly without hiding its reasons.

A correct answer opens the discussion but does not exhaust it. Even a correct solution can be questioned, compared and improved.

Questions to discuss in class

These prompts accompany the reading. Try answering before opening the comment.

1. Does the negative coefficient make the second solution less valid?

Show the comment

No. The second principle allows division by any nonzero number, including a negative one. From 450 = −383x we obtain x = −450/383 without adding or losing solutions.

2. Do five transpositions versus two prove one method is always best?

Show the comment

No. The comparison concerns the line before collecting terms and the stated criterion: counting transposed terms. Collecting like terms first, or choosing another teaching objective, changes the comparison.

3. Is using a common denominator a mistake?

Show the comment

No. It is correct and may help practise fractions. It is unnecessary here because multiplying every term directly by 60 is already justified by the equivalence principle.

Keep exploring