Salta al contenuto
Note per Studenti Functions - Domain, Graph, Image and Composition Report

Functions - Domain, Graph, Image and Composition

In questa pagina 8

Next note: Injective, Surjective, Inverse, Monotone and Symmetric FunctionsInjective, surjective and bijective functions, the inverse and its graph, monotone functions and their link with injectivity, and even and odd functions.Injective, Surjective, Inverse, Monotone and Symmetric Functions →. Prerequisites: Sets and Set OperationsWays of describing a set, subsets and equality, the power set, finite and infinite sets, union, intersection, difference, complement, De Morgan laws and the Cartesian product.Sets and Set Operations →.

Definition

Definition (function). Given sets X,Y≠∅X, Y \ne \emptyset, a function f:X→Yf : X \to Y is a rule that associates to every x∈Xx \in X one and only one y∈Yy \in Y.

XX is the domain, YY the codomain; xx is the independent variable, y=f(x)y = f(x) the dependent one. Notations: x↦f(x)x \mapsto f(x), X→fYX \xrightarrow{f} Y. The key words are "every" and "one and only one"; it is not required that every yy be reached, nor reached by a single xx.

For X={1,2,3,4}X = \{1,2,3,4\}, Y={1,2,3}Y = \{1,2,3\}: f(1)=f(2)=f(3)=1f(1) = f(2) = f(3) = 1, f(4)=3f(4) = 3 is a function (several xx may share an image, and 2∈Y2 \in Y may be missed); giving 11 two images is not a function; leaving 44 without an image is not a function.

Examples: f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=2xf(x) = 2x (real functions of a real variable f:X⊆R→Rf : X \subseteq \mathbb{R} \to \mathbb{R} are the object of Calculus 1); f:R2→Rf : \mathbb{R}^2 \to \mathbb{R}, f(x,y)=x2+y2f(x,y) = x^2 + y^2 (several variables); sequences f:N→Rf : \mathbb{N} \to \mathbb{R}, written ana_n instead of f(n)f(n) and denoted (an)n≥n0(a_n)_{n \ge n_0}.

Natural domain

The natural domain of a formula is the largest subset of R\mathbb{R} (or Rn\mathbb{R}^n) where all the operations make sense. Typical conditions: denominators ≠0\ne 0; radicands of even-index roots ≥0\ge 0; arguments of logarithms >0> 0.

Example. f(x)=1x2−1f(x) = \frac{1}{x^2 - 1} needs x2−1≠0x^2 - 1 \ne 0, so Dom(f)=R∖{−1,1}\mathrm{Dom}(f) = \mathbb{R} \setminus \{-1, 1\}. For f(x,y)=1x2+y2−1f(x,y) = \frac{1}{x^2 + y^2 - 1}: Dom(f)={(x,y):x2+y2≠1}\mathrm{Dom}(f) = \{(x,y) : x^2 + y^2 \ne 1\}, the plane minus the unit circle.

Graph

Definition (graph). Γf={(x,f(x)):x∈X}⊆X×Y\Gamma_f = \{(x, f(x)) : x \in X\} \subseteq X \times Y.

For f:X⊆R→Rf : X \subseteq \mathbb{R} \to \mathbb{R}, Γf⊆R2\Gamma_f \subseteq \mathbb{R}^2 is a curve in the plane. Γf\Gamma_f is a set of points, ff is a rule. For f(x)=2xf(x) = 2x, Γf\Gamma_f is the line through the origin with slope 22.

Vertical line test. A curve is the graph of a function y=f(x)y = f(x) iff every vertical line meets it at most once (two points (x0,y1)(x_0,y_1), (x0,y2)(x_0,y_2) with y1≠y2y_1 \ne y_2 would give x0x_0 two images). A circle is not the graph of a function. The domain is the projection of Γf\Gamma_f on the xx-axis.

Image and preimage

Let f:X→Yf : X \to Y.

Image. For A⊆XA \subseteq X, A≠∅A \ne \emptyset: f(A)={f(x):x∈A}⊆Yf(A) = \{f(x) : x \in A\} \subseteq Y. The image of ff is f(X)f(X), which may be strictly smaller than YY.

Preimage. For B⊆YB \subseteq Y: f←(B)={x∈X:f(x)∈B}⊆Xf^{\leftarrow}(B) = \{x \in X : f(x) \in B\} \subseteq X. It can be empty; f←(Y)=Xf^{\leftarrow}(Y) = X.

(The notation f−1(B)f^{-1}(B) is used by many books but is dangerous: it is confused with the inverse function, which may not exist.)

Examples. For f(x)=x2f(x) = x^2: f([−1,2])=[0,4]f([-1,2]) = [0,4] (minimum 00 at x=0x=0, maximum 44 at x=2x=2). For f(x)=2xf(x) = 2x: f(R)=Rf(\mathbb{R}) = \mathbb{R}, f([−1,3])=[−2,6]f([-1,3]) = [-2,6], f←([−1,3])=[−12,32]f^{\leftarrow}([-1,3]) = [-\frac12, \frac32].

On the graph: f(X)f(X) is the projection of Γf\Gamma_f on the yy-axis; f←(B)f^{\leftarrow}(B) is the projection on the xx-axis of the part of the graph with y∈By \in B.

Graphical method for equations and inequalities. Preimages of intervals are solution sets:

Preimage Set On the graph
f←([a,b])f^{\leftarrow}([a,b]) a≤f(x)≤ba \le f(x) \le b graph between the lines y=ay = a, y=by = b
f←([a,+∞))f^{\leftarrow}([a,+\infty)) f(x)≥af(x) \ge a graph above y=ay = a
f←((−∞,a])f^{\leftarrow}((-\infty,a]) f(x)≤af(x) \le a graph below y=ay = a
f←({a})f^{\leftarrow}(\{a\}) f(x)=af(x) = a graph meets y=ay = a
f←([0,+∞))f^{\leftarrow}([0,+\infty)) f(x)≥0f(x) \ge 0 the sign of ff

Example: the line y=r>0y = r > 0 cuts the V-shaped graph of ∣x∣|x| at x=±rx = \pm r and the V lies above it for x≤−rx \le -r or x≥rx \ge r, which is ∣x∣≥r  ⟺  x≤−r∨x≥r|x| \ge r \iff x \le -r \vee x \ge r.

For f:X→Rf : X \to \mathbb{R}, boundedness, inf⁡f\inf f, sup⁡f\sup f, min⁡f\min f, max⁡f\max f are those of the set f(X)f(X) (see Completeness of the Reals - Supremum and InfimumUpper and lower bounds, maximum and minimum, supremum and infimum with their epsilon characterization, the completeness axiom of the reals (continuity, separation, existence of the sup), density of the rationals, the Archimedean property and a method for sup and inf of a set.Completeness of the Reals - Supremum and Infimum →): sup⁡f=sup⁡f(X)\sup f = \sup f(X).

Composition

Definition (composite). Let f:X→Yf : X \to Y, g:V→Wg : V \to W. If f(X)⊆Vf(X) \subseteq V (all values of ff lie in the domain of gg), then g∘f:X→W,x↦g(f(x))g \circ f : X \to W, \qquad x \mapsto g(f(x)) First ff, then gg.

Words. ff = "square", gg = "add 11": g∘fg \circ f is x↦x2+1x \mapsto x^2 + 1, while f∘gf \circ g is x↦(x+1)2x \mapsto (x+1)^2: order matters.

Domain of a composite, in practice: (1) write the formula g(f(x))g(f(x)) and find where it makes sense; (2) intersect with the domain of ff.

Example. f(x)=xf(x) = \sqrt x, g(x)=x2−1g(x) = x^2 - 1.

  • f∘g(x)=x2−1f \circ g (x) = \sqrt{x^2 - 1}, defined for x≤−1x \le -1 or x≥1x \ge 1: Dom=(−∞,−1]∪[1,+∞)\mathrm{Dom} = (-\infty,-1] \cup [1,+\infty).
  • g∘f(x)=(x)2−1=x−1g \circ f(x) = (\sqrt x)^2 - 1 = x - 1, but its domain is Dom(f)=[0,+∞)\mathrm{Dom}(f) = [0,+\infty), not R\mathbb{R}: g(f(−4))g(f(-4)) does not exist. Simplifying a formula does not enlarge the domain.

Hence Dom(g∘f)⊆Dom(f)\mathrm{Dom}(g \circ f) \subseteq \mathrm{Dom}(f) and in general g∘f≠f∘gg \circ f \ne f \circ g.

Operations between real functions

For f,g:X→Rf, g : X \to \mathbb{R}, defined pointwise: (f±g)(x)=f(x)±g(x)(f \pm g)(x) = f(x) \pm g(x), (f⋅g)(x)=f(x) g(x)(f \cdot g)(x) = f(x)\,g(x), fg(x)=f(x)g(x)\frac fg (x) = \frac{f(x)}{g(x)} where g(x)≠0g(x) \ne 0, ∣f∣(x)=∣f(x)∣|f|(x) = |f(x)|. E.g. f=x2f = x^2, g=x−1g = x - 1: (f⋅g)(x)=x3−x2(f \cdot g)(x) = x^3 - x^2, fg=x2x−1\frac fg = \frac{x^2}{x-1} for x≠1x \ne 1.

Graphs obtained from the graph of ff

New function What happens to Γf\Gamma_f
f(x+a)f(x + a) horizontal translation by −a-a (to the left if a>0a > 0)
f(x)+af(x) + a vertical translation by aa (up if a>0a > 0)
f(∣x∣)f(\lvert x \rvert) keep the part x≥0x \ge 0 and reflect it across the yy-axis (the part x<0x < 0 is discarded); the result is always even
∣f(x)∣\lvert f(x) \rvert the part above the xx-axis stays, the part below is reflected upwards

Why the sign is "reversed": the value that ff takes at x0x_0, f(x+a)f(x+a) takes where x+a=x0x + a = x_0, i.e. at x=x0−ax = x_0 - a. So ex−1e^{x-1} is exe^x shifted right by 11 and cosh⁡(x+a)\cosh(x+a) has its minimum at x=−ax = -a. For y=x2−1y = x^2 - 1 (negative for −1<x<1-1 < x < 1), y=∣x2−1∣y = |x^2 - 1| reflects that arc above the axis.

Starting from a few elementary functions (powers, exponential, logarithm, trigonometric) and using operations and composition one builds all the functions studied in the course, such as e3sin⁡2x−8x3+1+sin⁡(3x)\sqrt{e^{3\sin^2 x - 8x^3} + 1 + \sin(3x)}: to study a complicated function, recognise how it is assembled.

Common mistakes

  • Thinking a function must reach the whole codomain (that is surjectivity).
  • Confusing image (starts from xx, lands in YY) with preimage (starts from a set of yy, lands in XX).
  • Not finding the domain before working with a formula; finding the domain of a composite only from the simplified formula.
  • Reversing the order in g∘fg \circ f; thinking g∘f=f∘gg \circ f = f \circ g.

Versione ripasso

Function f:X→Yf : X \to Y: to every x∈Xx \in X one and only one y∈Yy \in Y. XX domain, YY codomain. Need not reach all of YY. Sequences are functions N→R\mathbb{N} \to \mathbb{R}, written ana_n.

Natural domain: largest set where the formula makes sense: denominator ≠0\ne 0, even-root radicand ≥0\ge 0, log argument >0> 0. Example: 1x2−1\frac{1}{x^2-1} has Dom=R∖{−1,1}\mathrm{Dom} = \mathbb{R} \setminus \{-1,1\}.

Graph Γf={(x,f(x))}⊆R2\Gamma_f = \{(x,f(x))\} \subseteq \mathbb{R}^2. Vertical line test: a curve is a graph iff every vertical line meets it at most once. Domain = projection on xx-axis.

Image / preimage: f(A)={f(x):x∈A}f(A) = \{f(x) : x \in A\}, f←(B)={x:f(x)∈B}f^{\leftarrow}(B) = \{x : f(x) \in B\}. f(X)f(X) = projection on the yy-axis. Example f(x)=2xf(x) = 2x: f([−1,3])=[−2,6]f([-1,3]) = [-2,6], f←([−1,3])=[−12,32]f^{\leftarrow}([-1,3]) = [-\frac12,\frac32]. For x2x^2: f([−1,2])=[0,4]f([-1,2]) = [0,4].

Graphical method: f(x)≥af(x) \ge a where the graph is above y=ay = a; f(x)=af(x) = a at the intersections; sign of ff = f←([0,+∞))f^{\leftarrow}([0,+\infty)). sup⁡f=sup⁡f(X)\sup f = \sup f(X), similarly inf⁡,max⁡,min⁡\inf, \max, \min.

Composition g∘f(x)=g(f(x))g \circ f(x) = g(f(x)) (first ff), requires f(X)⊆Dom(g)f(X) \subseteq \mathrm{Dom}(g). Domain: find where g(f(x))g(f(x)) makes sense, then intersect with Dom(f)\mathrm{Dom}(f).

  • f=xf = \sqrt x, g=x2−1g = x^2-1: f∘g=x2−1f \circ g = \sqrt{x^2-1} on (−∞,−1]∪[1,+∞)(-\infty,-1] \cup [1,+\infty); g∘f=x−1g \circ f = x - 1 but only on [0,+∞)[0,+\infty).
  • g∘f≠f∘gg \circ f \ne f \circ g in general.

Operations are pointwise: f±gf \pm g, fgfg, f/gf/g (where g≠0g \ne 0), ∣f∣|f|.

Graph transformations:

  • f(x+a)f(x+a): shift by −a-a horizontally (left for a>0a > 0); ex−1e^{x-1} is exe^x shifted right by 11.
  • f(x)+af(x) + a: shift up by aa.
  • f(∣x∣)f(|x|): keep x≥0x \ge 0, reflect across the yy-axis (even).
  • ∣f(x)∣|f(x)|: reflect the negative part upwards.

Mistakes: image vs preimage; forgetting the domain; wrong order of composition; using the simplified formula for the domain of a composite.

Teoria collegata