Shape an expressionLesson 12 of 48 · 7 min

Simplify towards a goal

Select a targeted transformation and verify the relationship between forms.

Maths refresher: Identity versus one example

An identity holds throughout a stated domain. Agreement at one input is weaker evidence.

(x+1)2−(x2+2x+1)=0(x+1)^2-(x^2+2x+1)=0
Worked example

The difference expands to zero for every x. In contrast, x2=xx^2=x happens at x=0x=0 and x=1x=1 but is not an identity.

Maths prerequisite map ↗

There is no single best-looking form of every expression. A factored polynomial, expanded sum and trigonometric identity may each suit a different task. simplify applies broad heuristics; targeted functions express a clearer intention.

See the mathematics
θradius = 1
θradius = 1
cos⁡2θ+sin⁡2θ=1\cos^2\theta+\sin^2\theta=1
Starter reference. On the unit circle, horizontal and vertical coordinates are cosine and sine. The right triangle has hypotenuse 1; angles are in radians.

Use trigsimp for trigonometric identities, factor for polynomial products and cancel for rational factors. Comparing structure with == asks whether objects have the same representation, not whether every algebraically equivalent pair is written identically.

For suitable expressions, simplifying their difference to zero is a useful identity check. Failure to reach zero is not a proof of inequality: symbolic equivalence is difficult in general. Combine the check with assumptions and domain reasoning, and distinguish identity from agreement at a few numerical points.

Can two equivalent polynomial expressions compare unequal with structural ==?

Write a prediction (optional)

Exact symbolic investigation

Select Run Python with the code unchanged.

Tools
About Python

Python and the course packages can load while you read. Each run starts with fresh user variables; imported modules stay loaded. Stop replaces the worker. Runtime details ↗

Ctrl+Enter or ⌘+Enter runs Python.

Compare with the worked example

Executed from the published Python during the site build. Your own run appears above. Build environment ↗

Structural equality
False\text{False}
Polynomial identity check
00
Factored difference
00
Differences at x=0, 1, 2
[0, 0, 0]\left[ 0, \ 0, \ 0\right]
Trigonometric simplification
11
Worked text output
Structural equality: False
Polynomial identity check: 0
Factored difference: 0
Differences at x=0, 1, 2: [0, 0, 0]
Trigonometric simplification: 1

Read the starter result

Structural equality is false for the starter because the expressions have different forms. The zero Polynomial identity check shows their difference vanishes for this polynomial.

Edit and compare

Replace a,b = (x+1)**2,x**2+2*x+1 with a,b = x**2,x. Select Run Python. Compare Differences at x=0, 1, 2 with Factored difference. Which inputs agree, and what does the difference say about an identity?

Return to the editor

Scope. No single simplification or numerical sampling strategy decides equivalence for all possible symbolic expressions.

Try a fresh case

Two formulas match at x=0x=0 and x=1x=1. What does that establish?

Choose an answer
Need a hint?
Hint 1

Consider x² and x.

Hint 2

A claim about all inputs needs a reason covering the domain.

Your notesNotes save in this browser when storage is available.