Functions as mappings
Agent-Assisted Engineering Check
Prerequisites
Complete the previous activity and use the listed recovery source if blocked.
Learning Objective
Treat a function as a rule that maps each allowed input in its domain to exactly one output. Build a table and state the domain, range, units, and assumptions before using a formula.
Instructions
1. Read the definition first: a function f from a domain D assigns to every input x in D exactly one output f(x). Write D, the output set and the units (here plain numbers) before touching the formula.
2. Predict before calculating: which input gives the smallest output, and which pairs of inputs share an output?
3. Build the table column by column: x, then x^2, then x^2+1. Squaring before adding 1 is where most slips happen; (-2)^2 is 4, not -4.
4. Read the range from the algebra, not only from the table: x^2 ≥ 0 for every real x, so x^2+1 ≥ 1, and every y ≥ 1 is reached by x = sqrt(y-1).
5. Test the definition on the practice items: a relation stops being a function as soon as one input is paired with two different outputs.
6. Compare your prediction with the table and write one sentence about any mismatch.
Time plan (120 min): reading 30 + exercise 60 + check 30. Reading: OpenStax Calculus Vol. 1 Section 2.1 (definition, domain and range, vertical line test). Exercise: the table and practice items (b) and (c). Check: close the notes, redo the mastery item, and compare line by line with the reference answer.
Practice & Prediction Log
(a) For f(x)=x^2+1, make a table for x=-2,-1,0,1,2. State the domain and range over the real numbers. Then explain why one input cannot have two outputs. (b) For h(x)=sqrt(x-2), state the real domain and range, then compute h(2), h(3) and h(6). (c) Decide whether each is a function of x: the relation {(1,2), (2,3), (1,4)}, and the rule x = y^2.
Write the mapping arrow x -> f(x) and label the input and output columns. Check the square before adding 1. Recovery: OpenStax Calculus Vol. 1, Section 2.1; if unavailable, redraw the five-row table and use the definition above.
(a) Row by row, squaring first:
x = -2: x^2 = 4, f(-2) = 5
x = -1: x^2 = 1, f(-1) = 2
x = 0: x^2 = 0, f(0) = 1
x = 1: x^2 = 1, f(1) = 2
x = 2: x^2 = 4, f(2) = 5
Domain: every real x, because squaring and adding 1 are defined for all reals. Range: y ≥ 1. Reason: x^2 ≥ 0 with equality only at x = 0, so f(x) ≥ 1; and every y ≥ 1 is reached, since x = sqrt(y - 1) gives f(x) = y. The table shows only five outputs; the range claim needs this algebra.
One output per input: a function is a deterministic rule, so evaluating f(2) twice must give 5 both times. Two inputs may share an output (f(-2) = f(2) = 5); that is allowed. One input with two outputs is not.
(b) sqrt needs a non-negative argument, so x - 2 ≥ 0 and the domain is x ≥ 2. h(2) = sqrt(0) = 0, h(3) = sqrt(1) = 1, h(6) = sqrt(4) = 2. Range: y ≥ 0, because the principal square root is never negative and every y ≥ 0 is reached by x = y^2 + 2.
(c) {(1,2), (2,3), (1,4)} is not a function: input 1 is paired with both 2 and 4. x = y^2 does not define y as a function of x: x = 4 gives y = 2 and y = -2. Restricting to y ≥ 0 gives the function y = sqrt(x).
Common errors: writing (-2)^2 + 1 = -3; giving the range as all reals by copying the domain; calling f "not a function" because two inputs give 5.
Without assistance, define domain and range, produce the five correct outputs, and name the one-output-per-input assumption.
Authoritative Source Resources & Provenance
OpenStax Calculus Volume 1
Relevant Section / Range: Sections 2.1-2.3 (Functions, Limits, and the Derivative); Sections 3.1-3.2 (Derivative Rules)
Verified Version & Date: 3rd edition, verified 2026-10-30
Open, systematic treatment of the limit definition and derivative rules with stable section locations.
Algebra, coordinate geometry, and function notation
The authored derivations, tables, and exercises in these three Study Days are complete offline recovery material; use the linked section only for optional comparison.
Compared Candidate Sources & Selection Analysis (3)
Strong exercises and transcripts, but the noncommercial share-alike terms and course navigation make OpenStax the primary stable text.
Useful reference, but rights and redistribution terms are less suitable for embedded recovery material.
A primary API reference for numerical derivative step-size behavior; it complements rather than replaces the hand derivation.
SciPy numerical derivative reference
Relevant Section / Range: derivative API: finite differences, step-size iteration, tolerances
Verified Version & Date: SciPy documentation, verified 2026-10-30
Documents numerical differentiation as an approximation with finite step sizes and stopping criteria.
Python arithmetic and the definition of a derivative
The local Day 18 tables and pure-Python snippets reproduce the relevant finite-difference behavior without SciPy.
Compared Candidate Sources & Selection Analysis (2)
Array-oriented gradient estimation on sampled grids; the SciPy derivative reference matches the pointwise finite-difference helper the exercises implement.
Symbolic rather than numerical differentiation; useful for exact cross-checks but not the finite-difference practice target.