The formula
(a + b)² = a² + 2ab + b² · 3x + 2x = 5x · (x² − 1)/(x − 1) = x + 1
Why it works
Simplifying is writing the same thing with less: it changes the value of the expression at no point, only its shape. The calculator does it in two steps. First it expands, which means multiplying out everything that multiplies — each term of one bracket by each term of the other, and a power as a repeated product — until no bracket is left. Then it collects: terms with the same letters to the same exponents are added, whatever order they were written in, because x·y and y·x are the same monomial. If the expression is a fraction, the same is done on top and bottom and then a factor common to both is looked for, which is what gets cancelled. Whatever is not a polynomial — a sine, the root of a sum — is treated as a block that is carried along untouched.
How to solve it by hand
- Expand the products: each term of one bracket by each term of the other
- Expand powers of a bracket as repeated products, or with the binomial theorem
- Collect like terms: same letters with the same exponents
- Order from highest to lowest degree and, in a fraction, look for a factor common to top and bottom
What is worth knowing
The most frequent mistake is (a + b)² = a² + b²: the cross term is missing, and expanding it as (a + b)(a + b) makes it appear by itself. The second is cancelling summands in a fraction: in (x² + 1)/x the x cannot be crossed out, because only what multiplies the whole numerator and the whole denominator cancels. The calculator only cancels a genuine common factor, which it finds by dividing the two polynomials, and if there is none it leaves the fraction with both parts expanded. The numerical check at the end — evaluating the original and the simplified form at several points — is the one to do by hand when an exercise will not come out: if the values disagree, something was lost along the way.