Lesson 05

Expressions as mathematical objects

What can a program learn by keeping variables instead of replacing them with numbers?

Symbolic computation preserves the structure of an expression. One exact transformation can then describe a whole family of numerical cases.

After this lesson, you should be able to

  • Distinguish symbolic computation from numerical evaluation.
  • Explain why simplification depends on a chosen form and stated domain.
  • Check exact differentiation and integration results by reversing or recomputing the operation.

5.1

Symbols preserve general structure

Evaluating x² + 2x + 1 at x = 3 gives 16. Factoring the expression as (x + 1)² states a relationship for every value where the operations are defined. The factored form also makes the repeated root x = −1 visible.

Exact arithmetic matters because symbolic algorithms ask whether coefficients are exactly equal or exactly zero. A rounded decimal can hide that distinction.

5.2

Simpler depends on the next task

Expanded form makes coefficients easy to compare. Factored form exposes zeros. A rational expression may become shorter after cancellation, but the canceled factor can carry a domain restriction.

For example, (x² − 1)/(x − 1) agrees with x + 1 when x is not 1. The original expression is undefined at x = 1, so a global equality without that condition is false.

5.3

Some operations have direct checks

Differentiation follows local rules, so a second implementation can recompute a derivative. An antiderivative can often be checked by differentiation. Factorization can be checked by exact expansion.

The checker must state its domain. Differentiating an antiderivative does not automatically prove convergence of an improper integral or justify behavior at a singular endpoint.

Worked example

Differentiate a composite polynomial

Find and check the derivative of f(x) = (x² + 1)³.

  1. Identify the composition

    The outer function is u³ and the inner function is u = x² + 1.

  2. Differentiate the outer function

    The derivative of u³ in u is 3u².

  3. Differentiate the inner function

    The derivative of x² + 1 is 2x.

  4. Apply the chain rule

    Multiply the two results to obtain 6x(x² + 1)².

  5. Cross-check

    Expand f to x⁶ + 3x⁴ + 3x² + 1 and differentiate to 6x⁵ + 12x³ + 6x, which is the expansion of the factored result.

Result. Two independent forms agree on f′(x) = 6x(x² + 1)².

5.4

Check your understanding

Answer each question before opening the explanation.

1 Why is (x² − 1)/(x − 1) = x + 1 incomplete as a global statement?

The left side is undefined at x = 1, so the equality needs the condition x ≠ 1.

2 How can you check a proposed antiderivative?

Differentiate it and compare the result with the original integrand, while retaining required domain and endpoint conditions.

Concept wiki

Terms in this lesson

All concepts