Mascot image.
#Math#Differentiation

Review of Functions, Continued

Lines in the Plane

The AM lesson introduced a straight line through its slope-intercept formula y=mx+by = mx + b and, as an instance of the Linear Function definition, the graph was read off directly. That formula misses one family of lines, the perfectly vertical ones, and until we put them back we cannot say cleanly which equations in two variables describe graphs of functions and which do not. Since the lessons ahead will hand us a line at every point where a function has a derivative, it is worth settling the picture now.

Every line in the xyxy-plane satisfies an equation of the form

cx+dy=e,c x + d y = e,

where cc, dd, ee are real constants and cc and dd are not both zero. When d0d \neq 0, we may divide by dd and solve for yy,

y=mx+b,m=cd,b=ed,y = m x + b, \qquad m = -\frac{c}{d}, \quad b = \frac{e}{d},

so the line is the graph of the linear function already named in the AM lesson. When d=0d = 0, the equation collapses to cx=ecx = e; since cc is then non-zero, dividing by it gives x=ax = a with a=e/ca = e/c. This last equation picks out every point whose xx-coordinate equals aa, and so traces the vertical line through (a,0)(a, 0).

A vertical line meets itself at every point on it, in particular at all heights above x=ax = a. The vertical line test of the AM lesson then rules at once that x=ax = a is the graph of no function of xx: a single input would have to carry infinitely many outputs, contradicting single-valuedness.

The vertical line x = a drawn as a straight vertical segment through (a, 0), with two sample points at different heights on the line both having the same x-coordinate a, illustrating that a single input corresponds to more than one output
Example 23

From a general equation to a sketch. To sketch the line 3xy=23x - y = 2, first solve for yy:

y=3x2.y = 3x - 2.

The equation is now in the form of the AM Linear Function definition, with slope 33 and yy-intercept 2-2. Tabulating at four inputs to verify the slope and give a cleaner sketch,

x-1012
y-5-214

each unit step in xx raises yy by exactly 33, consistent with the slope. The graph is the straight line through these points.

The straight line 3x - y = 2 drawn through the points (-1, -5), (0, -2), (1, 1), (2, 4), with each tabulated point marked
Problem 11

Put the equation x=2y1x = 2y - 1 in the form y=mx+by = mx + b, identify its slope and its yy-intercept, and sketch the resulting line.

Intercepts

The AM Linear Function definition already names the point at which the line meets the vertical axis: if f(x)=mx+bf(x) = mx + b, then f(0)=bf(0) = b, so the yy-intercept is (0,b)(0, b). The corresponding point on the horizontal axis has not yet been named.

Definition 8 (xx-intercept)

An xx-intercept of the graph of a function ff is a point at which the graph meets the horizontal axis. Every point of the horizontal axis has yy-coordinate zero, so an xx-intercept has the form (x0,0)(x_0, 0) where x0x_0 is a real number in the domain of ff satisfying f(x0)=0f(x_0) = 0.

For a non-horizontal linear function f(x)=mx+bf(x) = mx + b with m0m \neq 0, the equation mx+b=0mx + b = 0 has the single solution x0=b/mx_0 = -b/m, so the graph has exactly one xx-intercept, namely (b/m,0)(-b/m, 0). If m=0m = 0 and b0b \neq 0 the graph is a horizontal line at height b0b \neq 0 and has no xx-intercept; if m=0m = 0 and b=0b = 0 the graph is the horizontal axis itself, and every one of its points is an xx-intercept.

Example 24

Both intercepts of f(x)=2x+5f(x) = 2x + 5. Reading off the definition, the yy-intercept is (0,f(0))=(0,5)(0, f(0)) = (0, 5). For the xx-intercept we solve 2x+5=02x + 5 = 0, which gives x0=52x_0 = -\tfrac{5}{2}, so the xx-intercept is (52,0)(-\tfrac{5}{2}, 0). The two intercepts alone pin down the line.

The line f(x) = 2x + 5 drawn with its y-intercept at (0, 5) and its x-intercept at (-5/2, 0) both highlighted and labelled
Example 25

Reconstructing a line from two intercepts. Suppose a line is known to pass through (0,4)(0, -4) and (3,0)(3, 0). These are, respectively, its yy-intercept and an xx-intercept, so b=4b = -4 and the slope is the rise 0(4)=40 - (-4) = 4 divided by the run 30=33 - 0 = 3, that is m=43m = \tfrac{4}{3}. The line is f(x)=43x4f(x) = \tfrac{4}{3} x - 4.

Problem 12

Find both intercepts of the line 4x+3y=124x + 3y = 12 and sketch it using only those two points.

Linear Models

Linear functions earn their prominence from the many real-world quantities that depend on one another by a constant rate plus a fixed offset. The derivative, which the lessons ahead will introduce, generalises the idea of a rate to curved graphs; the linear case is the template.

Example 26

A monthly cost. A small publisher prints a bound booklet at a reproduction cost of £25\pounds 25 per copy and pays fixed overheads of £10,000\pounds 10{,}000 each month for premises, licences, and staff retainers that do not depend on the run size. Writing xx for the number of copies produced in a month and C(x)C(x) for the total cost in pounds,

C(x)=10,000+25x.C(x) = 10{,}000 + 25 x.

The fixed overheads supply the yy-intercept (0,10,000)(0, 10{,}000), while the £25\pounds 25 per-copy charge supplies the slope. At a run of 500500 copies,

C(500)=10,000+25500=22,500 pounds.C(500) = 10{,}000 + 25 \cdot 500 = 22{,}500 \text{ pounds}.

Since xx counts physical copies, the admissible inputs are the non-negative integers; the formula is nevertheless defined on the full ray [0,)[0, \infty), and we draw the graph there for readability.

The graph of the linear cost function C(x) = 10000 + 25x, rising from (0, 10000) through the marked sample point (500, 22500), with dashed lines dropped from that sample point to both axes
Problem 13

A courier has a fixed daily charge of £12\pounds 12 and a per-kilometre rate of £0.40\pounds 0.40. Write the total daily charge D(x)D(x) for a route of xx kilometres as a linear function, state its slope and yy-intercept, and compute D(80)D(80).

Piecewise Linear Functions

The piecewise construction introduced in the AM lesson, combined with the linear functions just revisited, gives a flexible class of graphs: straight on each piece of the domain and potentially bending or jumping at the boundaries. Such functions arise whenever one linear rule is replaced by another past a threshold, as in tariffs, tax brackets, and shipping charges.

Example 27

A piecewise linear function with a jump. Define

f(x)={3,x<2,2x+1,x2.f(x) = \begin{cases} 3, & x < 2, \\ 2x + 1, & x \geq 2. \end{cases}

For xx strictly less than 22 the top clause applies and the function is constantly 33, so the graph is the horizontal ray at height 33 approaching but not reaching the point (2,3)(2, 3); the endpoint is drawn with an unfilled circle by the convention of the AM lesson. For x2x \geq 2 the bottom clause applies; at the boundary f(2)=22+1=5f(2) = 2 \cdot 2 + 1 = 5, drawn as a filled circle, and the graph continues to the right as the linear ray of slope 22 through (2,5)(2, 5). Three sample values,

f(0)=3,f(2)=5,f(4)=9,f(0) = 3, \qquad f(2) = 5, \qquad f(4) = 9,

confirm the switchover.

A piecewise graph: the horizontal line y = 3 for x less than 2 with an unfilled circle at (2, 3), and the line y = 2x + 1 for x greater than or equal to 2 with a filled circle at (2, 5); a visible vertical gap separates the two pieces at x = 2
Remark

The visible gap between the two pieces at x=2x = 2 is a jump. The idea will return in the lessons ahead as the simplest way a function can fail to be continuous, and in turn to be differentiable. Piecewise linear functions are therefore our first and cleanest laboratory for the questions differentiation will ask.

Problem 14

Let

g(x)={x+4,x0,x+4,x>0.g(x) = \begin{cases} -x + 4, & x \leq 0, \\ x + 4, & x > 0. \end{cases}

Sketch the graph of gg, state its natural domain, and compute g(3)g(-3), g(0)g(0), and g(5)g(5). Does the graph have a jump at x=0x = 0?

Problem 15

A phone plan charges £15\pounds 15 per month for up to 100100 minutes of calls, and £0.10\pounds 0.10 for each additional minute beyond the first hundred. Writing M(t)M(t) for the monthly charge in pounds as a function of the total call minutes t0t \geq 0, express MM as a piecewise function on [0,)[0, \infty) and compute M(60)M(60) and M(250)M(250).

Quadratic Functions

The parabola y=x2y = x^2 of the AM lesson is the simplest instance of a broader family. Quadratic functions arise as the first curved graphs for which the vertex, the intercepts, and the direction of opening are recoverable from the formula alone, and they will be the first curved graphs whose tangent lines the derivative will compute.

Definition 9 (Quadratic Function)

A quadratic function is a function of the form f(x)=ax2+bx+cf(x) = ax^2 + bx + c, where aa, bb, cc are real constants and a0a \neq 0. Its natural domain is the whole number line. The graph of a quadratic function is called a parabola; it opens upward when a>0a > 0 and downward when a<0a < 0.

Every parabola has a single point at which the graph reverses direction, the highest point when the parabola opens downward and the lowest when it opens upward. Completing the square locates that point exactly.

Theorem 1 (Vertex of a Parabola)

Let f(x)=ax2+bx+cf(x) = ax^2 + bx + c with a0a \neq 0. Then ff attains its extreme value at

x0=b2a,f(x0)=cb24a.x_0 = -\frac{b}{2a}, \qquad f(x_0) = c - \frac{b^2}{4a}.

The point

(b2a,  cb24a)\left( -\frac{b}{2a},\; c - \frac{b^2}{4a} \right)

is called the vertex of the parabola.

Proof

Completing the square on the leading two terms of ff,

f(x)=a(x2+bax)+c=a(x+b2a)2ab24a2+c=a(x+b2a)2+cb24a.f(x) = a \left( x^2 + \frac{b}{a} x \right) + c = a \left( x + \frac{b}{2a} \right)^{2} - a \cdot \frac{b^2}{4a^2} + c = a \left( x + \frac{b}{2a} \right)^{2} + c - \frac{b^2}{4a}.

The squared factor is non-negative and vanishes precisely when x=b/(2a)x = -b/(2a). If a>0a > 0, the first summand is non-negative and so f(x)cb2/(4a)f(x) \geq c - b^2/(4a) for every xx, with equality at x=b/(2a)x = -b/(2a); the extreme value is therefore a minimum. If a<0a < 0, the first summand is non-positive and the same calculation yields a maximum at the same xx. In either case f(b/(2a))=cb2/(4a)f(-b/(2a)) = c - b^2/(4a), which is the claim.

Two parabolas side by side: on the left y = 2x squared minus 8x plus 3 opening upward with its vertex at (2, -5) marked, on the right y = negative x squared plus 6x minus 5 opening downward with its vertex at (3, 4) marked
Example 28

Vertex of f(x)=2x28x+3f(x) = 2x^2 - 8x + 3. Here a=2a = 2, b=8b = -8, c=3c = 3, and the vertex formula gives

x0=822=2,f(2)=2416+3=5.x_0 = -\frac{-8}{2 \cdot 2} = 2, \qquad f(2) = 2 \cdot 4 - 16 + 3 = -5.

So the vertex is (2,5)(2, -5). Since a=2>0a = 2 > 0, the parabola opens upward and 5-5 is the minimum value of ff.

Example 29

A downward-opening parabola. For f(x)=x2+6x5f(x) = -x^2 + 6x - 5, we have a=1a = -1, b=6b = 6, c=5c = -5, so

x0=62=3,f(3)=9+185=4.x_0 = -\frac{6}{-2} = 3, \qquad f(3) = -9 + 18 - 5 = 4.

The vertex is (3,4)(3, 4), and because a<0a < 0 this is a maximum.

Problem 16

Find the vertex of f(x)=3x2+12x+7f(x) = 3x^2 + 12x + 7 and state whether it is a maximum or a minimum. Compute the yy-intercept as well.

Remark

Techniques for sketching a parabola from more general data will follow at once from the first derivative. Until then, the vertex together with the yy-intercept (0,c)(0, c) is usually enough to fix the shape by eye, provided the two points are distinct; when the vertex happens to lie on the yy-axis the two points coincide and one further value of ff is needed.

Polynomial and Rational Functions

Linear and quadratic functions share a single template: a finite sum of non-negative integer powers of xx weighted by constants. Isolating the template gives the family within which most of the functions in this course will live.

Definition 10 (Polynomial Function)

A polynomial function is a function of the form

f(x)=anxn+an1xn1++a1x+a0,f(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0,

where nn is a non-negative integer and a0,a1,,ana_0, a_1, \ldots, a_n are real constants. Its natural domain is the whole number line, since every operation in the formula is addition or multiplication of real numbers.

The AM linear functions are the polynomial functions with n1n \leq 1, and the quadratic functions of the previous section are the polynomial functions with n=2n = 2 and a20a_2 \neq 0.

Example 30

Each of

f(x)=5x33x22x+4,g(x)=x4x+1f(x) = 5x^3 - 3x^2 - 2x + 4, \qquad g(x) = x^4 - x + 1

is a polynomial function. Each is defined at every real number and is built from powers of xx by the permitted arithmetic.

Taking quotients of polynomial functions produces the first systematic exclusions from the natural domain.

Definition 11 (Rational Function)

A rational function is a function expressible as a quotient p(x)/q(x)p(x)/q(x) of polynomial functions pp and qq, where qq is not the zero polynomial. By the natural domain convention of the AM lesson, its admissible inputs are exactly those real xx at which q(x)0q(x) \neq 0.

Example 31

For

h(x)=x2+1x,k(x)=x+3x24,h(x) = \frac{x^2 + 1}{x}, \qquad k(x) = \frac{x + 3}{x^2 - 4},

the respective denominators vanish at x=0x = 0 and at x=±2x = \pm 2. The natural domain of hh is therefore every real x0x \neq 0, and the natural domain of kk is every real xx with x2x \neq 2 and x2x \neq -2.

Example 32

A cost-benefit model. Atmospheric scrubbers that remove a pollutant become disproportionately expensive as the residual fraction falls towards zero. A standard rational model for the cumulative cost is

f(x)=50x105x,0x100,f(x) = \frac{50 x}{105 - x}, \qquad 0 \leq x \leq 100,

where xx is the percentage of pollutant removed and f(x)f(x) the cost in millions of dollars. The denominator vanishes only at x=105x = 105, outside the stated domain, so every admissible xx is genuinely assigned a real value. Direct substitution gives

f(70)=507035=100,f(95)=509510=475,f(100)=501005=1000.f(70) = \frac{50 \cdot 70}{35} = 100, \qquad f(95) = \frac{50 \cdot 95}{10} = 475, \qquad f(100) = \frac{50 \cdot 100}{5} = 1000.

Thus removing 70%70\% of the pollutant costs 100 million dollars. The cost of removing the final 5%5\%, from 95%95\% to 100%100\%, is

f(100)f(95)=1000475=525 million dollars,f(100) - f(95) = 1000 - 475 = 525 \text{ million dollars},

over five times the cost of removing the first 70%70\%.

The graph of the cost-benefit function f(x) = 50x over 105 minus x on the domain from 0 to 100, curving gently upward near the origin and rising steeply as x approaches 100, with the sample points (70, 100), (95, 475), and (100, 1000) marked on the curve
Problem 17

With f(x)=50x/(105x)f(x) = 50x/(105 - x) on [0,100][0, 100] as in the example, compute the additional cost of raising the removal percentage from 70%70\% to 75%75\%, and compare the result with the cost of removing the final 5%5\% from 95%95\% to 100%100\%.

Power Functions

A further family sits between the polynomial and the rational: functions given by a single power of the variable.

Definition 12 (Power Function)

A power function is a function of the form f(x)=xrf(x) = x^r, where rr is a fixed real constant called the exponent.

When rr is a positive integer, xrx^r denotes the product of xx with itself rr times and is defined for every real xx, so the power function is a polynomial function and its natural domain is the whole number line. When rr is a negative integer, xrx^r means 1/xr1/x^{|r|}, and the natural domain excludes x=0x = 0. The meaning of xrx^r for non-integer rr, together with the resulting natural domain, will be recovered in a later lesson.

The Absolute Value Function

One function of this lesson is neither polynomial nor rational nor a single power, but it fits the piecewise construction of the AM lesson exactly.

Definition 13 (Absolute Value)

The absolute value of a real number xx is the real number

x={x,x0,x,x<0,|x| = \begin{cases} x, & x \geq 0, \\ -x, & x < 0, \end{cases}

and is non-negative for every xx.

Thus 5=5|5| = 5, 0=0|0| = 0, and 3=(3)=3|-3| = -(-3) = 3. Regarding x|x| as a rule assigning each real xx a single real output gives a function in the sense of the AM Function definition.

Definition 14 (Absolute Value Function)

The absolute value function is the function f(x)=xf(x) = |x|, with natural domain the whole number line. Its graph is the piecewise combination of the line y=xy = x on [0,)[0, \infty) with the line y=xy = -x on (,0)(-\infty, 0), the two pieces meeting at the origin.

The graph of y = |x|, a V-shape meeting at the origin, with the left arm following the line y = -x and the right arm following the line y = x

The two pieces agree in value at x=0x = 0, so the graph does not jump in the sense introduced in the piecewise-linear section above; instead it has a sharp corner. This corner will reappear in a coming lesson as the first example of a function that is everywhere continuous but fails to be differentiable at a point.

Example 33

Evaluating at three inputs, f(7)=7f(-7) = 7, f(0)=0f(0) = 0, and f(2.5)=2.5f(2.5) = 2.5. The non-negativity x0|x| \geq 0 for every xx follows directly from the two cases: when x0x \geq 0 the output is x0x \geq 0; when x<0x < 0 the output is x>0-x > 0.

Problem 18

Sketch the graph of f(x)=x2f(x) = |x - 2| by applying a horizontal shift from the AM lesson to the absolute value function, and state its xx- and yy-intercepts.

Combining Functions

Many functions of practical interest are assembled from simpler ones by arithmetic. The prototype is a firm’s profit: if R(x)R(x) is the revenue from selling xx units of a commodity and C(x)C(x) is the cost of producing those xx units, the profit on the sale is

P(x)=R(x)C(x).P(x) = R(x) - C(x).

Writing PP in this form turns questions about profit into questions about the comparison of RR and CC. The firm runs at a profit on exactly those inputs xx at which R(x)>C(x)R(x) > C(x), and the graph of PP lies above the horizontal axis precisely where the graph of RR lies above the graph of CC.

Two straight lines on the same axes: revenue R(x) rising steeply from the origin and cost C(x) rising less steeply from a positive y-intercept; the two lines cross at a break-even point, with the region beyond it where R exceeds C shaded to represent the profit

The construction generalises to the other three arithmetic operations.

Definition 15 (Sum, Difference, Product, Quotient of Functions)

Let ff and gg be functions. Their sum, difference, product, and quotient are the functions defined pointwise by

(f+g)(x)=f(x)+g(x),(fg)(x)=f(x)g(x),(f + g)(x) = f(x) + g(x), \qquad (f - g)(x) = f(x) - g(x),(fg)(x)=f(x)g(x),(fg)(x)=f(x)g(x).(f g)(x) = f(x) g(x), \qquad \left( \frac{f}{g} \right)(x) = \frac{f(x)}{g(x)}.

The natural domain of each of f+gf + g, fgf - g, and fgfg is the intersection of the natural domains of ff and gg. The natural domain of f/gf/g is that same intersection, with the additional exclusion of every xx at which g(x)=0g(x) = 0.

Addition, subtraction, and multiplication of functions are nothing but the corresponding operations on their values, admissible wherever both values are admissible. The quotient brings back the exclusion already familiar from the rational function section: the divisor must not vanish.

Fraction arithmetic

Before working examples, the five rules of fraction arithmetic needed in the sequel are worth stating in one place. Every letter appearing in a denominator is understood to be non-zero throughout.

Theorem 2 (Rules for Fractions)

For real numbers a,b,c,da, b, c, d with b,c,db, c, d non-zero as required,

(i)abc=abc,(ii)abcd=acbd,\text{(i)} \quad a \cdot \frac{b}{c} = \frac{ab}{c}, \qquad \text{(ii)} \quad \frac{a}{b} \cdot \frac{c}{d} = \frac{ac}{bd},(iii)acbc=ab,(iv)a/bc/d=abdc=adbc,\text{(iii)} \quad \frac{ac}{bc} = \frac{a}{b}, \qquad \text{(iv)} \quad \frac{a/b}{c/d} = \frac{a}{b} \cdot \frac{d}{c} = \frac{ad}{bc},(v)ab+cd=ad+bcbd.\text{(v)} \quad \frac{a}{b} + \frac{c}{d} = \frac{ad + bc}{bd}.

Rule (iii) is most often applied in reverse: cancellation of a factor common to numerator and denominator. Rule (v) is the addition rule via a common denominator and is the single rule required for combining rational functions with different denominators.

A worked example: linear combinations

Example 34

Let f(x)=2x+4f(x) = 2x + 4 and g(x)=2x6g(x) = 2x - 6. We compute the sum, difference, product, and quotient in their simplest forms.

For the sum and difference, corresponding terms are added or subtracted:

(f+g)(x)=(2x+4)+(2x6)=4x2,(f + g)(x) = (2x + 4) + (2x - 6) = 4x - 2,(fg)(x)=(2x+4)(2x6)=10.(f - g)(x) = (2x + 4) - (2x - 6) = 10.

The difference is a constant: the graphs of ff and gg are parallel lines, each of slope 22, separated by 1010 units vertically.

For the product, expand by distributing each term of the first factor across each term of the second:

(fg)(x)=(2x+4)(2x6)=4x212x+8x24=4x24x24.(f g)(x) = (2x + 4)(2x - 6) = 4x^2 - 12x + 8x - 24 = 4x^2 - 4x - 24.

The four summands are, in order, the product of the First terms, the Outer terms, the Inner terms, and the Last terms; this order is commonly remembered by the acronym FOIL.

For the quotient, substitute the formulas and then factorise numerator and denominator before cancelling:

f(x)g(x)=2x+42x6=2(x+2)2(x3)=x+2x3,\frac{f(x)}{g(x)} = \frac{2x + 4}{2x - 6} = \frac{2(x + 2)}{2(x - 3)} = \frac{x + 2}{x - 3},

using rule (iii) to cancel the common factor of 22. Cancellation is legitimate here only because 22 is a genuine factor of every term in both numerator and denominator; the tempting move of cancelling the 2x2x that appears in both is invalid, because 2x2x is not a factor of either expression but merely one term in a sum. The natural domain of the quotient is every real xx with g(x)0g(x) \neq 0, that is, every x3x \neq 3.

Problem 19

Let f(x)=x2+1f(x) = x^2 + 1, g(x)=9xg(x) = 9x, and h(x)=52x2h(x) = 5 - 2x^2. Compute each of the following, simplified to standard form, and state the natural domain in each case.

  1. (f+g)(x)(f + g)(x)
  2. (fh)(x)(f - h)(x)
  3. (fg)(x)(f g)(x)
  4. g(x)f(x)\dfrac{g(x)}{f(x)}

Adding rational functions

Rule (v) says that two fractions are added by passing to a common denominator. For rational functions the procedure is identical, with xx in place of the real letters.

Example 35

Let

g(x)=2x,h(x)=3x1.g(x) = \frac{2}{x}, \qquad h(x) = \frac{3}{x - 1}.

The natural domain of gg excludes x=0x = 0 and the natural domain of hh excludes x=1x = 1, so the previous definition gives the natural domain of g+hg + h as the real line with both of these points removed. On that common domain, multiply each fraction by whatever unit fraction is needed to reach the common denominator x(x1)x(x - 1):

g(x)+h(x)=2xx1x1+3x1xx=2(x1)x(x1)+3xx(x1).g(x) + h(x) = \frac{2}{x} \cdot \frac{x - 1}{x - 1} + \frac{3}{x - 1} \cdot \frac{x}{x} = \frac{2(x - 1)}{x(x - 1)} + \frac{3x}{x(x - 1)}.

The two fractions now share the denominator x(x1)x(x - 1) and combine directly:

g(x)+h(x)=2(x1)+3xx(x1)=5x2x(x1).g(x) + h(x) = \frac{2(x - 1) + 3x}{x(x - 1)} = \frac{5x - 2}{x(x - 1)}.

The result is a rational function in the sense of the previous section, defined at every real xx distinct from 00 and from 11.

Problem 20

Let f(x)=xx8f(x) = \dfrac{x}{x - 8} and g(x)=xx4g(x) = \dfrac{-x}{x - 4}. Express f(x)+g(x)f(x) + g(x) as a single rational function in simplest form, state its natural domain, and find the real xx at which the numerator vanishes.

Problem 21

A firm selling xx units of a commodity earns revenue R(x)=40xR(x) = 40x pounds and incurs cost C(x)=5x+200C(x) = 5x + 200 pounds, valid for x0x \geq 0. Write the profit P(x)=R(x)C(x)P(x) = R(x) - C(x) as a linear function, determine the break-even quantity at which P(x)=0P(x) = 0, and state the collection of xx for which the firm makes a strictly positive profit.

Multiplying and dividing rational functions

The remaining two operations on rational functions follow rules (ii) and (iv) directly.

Example 36

Multiplying. For

f(t)=tt1,g(t)=t+2t+1,f(t) = \frac{t}{t - 1}, \qquad g(t) = \frac{t + 2}{t + 1},

rule (ii) gives the product as numerator times numerator over denominator times denominator:

f(t)g(t)=t(t+2)(t1)(t+1).f(t) g(t) = \frac{t(t + 2)}{(t - 1)(t + 1)}.

Expanding both numerator and denominator produces an equivalent expression:

f(t)g(t)=t2+2tt21.f(t) g(t) = \frac{t^2 + 2t}{t^2 - 1}.

The two forms are the same function; whichever one is used depends on the purpose. The factored form makes the excluded inputs visible at a glance, namely t1t \neq 1 and t1t \neq -1, while the expanded form is occasionally more convenient for comparing coefficients.

Example 37

Dividing. For

f(x)=xx3,g(x)=x+1x5,f(x) = \frac{x}{x - 3}, \qquad g(x) = \frac{x + 1}{x - 5},

the natural domain of ff excludes x=3x = 3 and the natural domain of gg excludes x=5x = 5. For the quotient f/gf/g we must additionally exclude every xx at which g(x)=0g(x) = 0, which occurs exactly when x+1=0x + 1 = 0, that is, x=1x = -1. The natural domain of f/gf/g therefore consists of every real xx with x1x \neq -1, 33, 55.

On that domain, rule (iv) turns division into multiplication by the reciprocal:

f(x)g(x)=xx3x5x+1=x(x5)(x3)(x+1).\frac{f(x)}{g(x)} = \frac{x}{x - 3} \cdot \frac{x - 5}{x + 1} = \frac{x(x - 5)}{(x - 3)(x + 1)}.

Expanding gives the equivalent expression

f(x)g(x)=x25xx22x3.\frac{f(x)}{g(x)} = \frac{x^2 - 5x}{x^2 - 2x - 3}.

Composition of Functions

The AM lesson already noted that any expression whose value is a real number may serve as the input of a function, and that most of the course’s functions are assembled by evaluating one inside another. Naming this construction cleanly is overdue.

Definition 16 (Composition)

Let ff and gg be functions. The composition of ff with gg, written fgf \circ g or f(g(x))f(g(x)), is the function defined by

(fg)(x)=f(g(x)).(f \circ g)(x) = f(g(x)).

Its natural domain consists of every real xx in the natural domain of gg for which the value g(x)g(x) lies in the natural domain of ff.

The value g(x)g(x) of the inner function must be an admissible input of the outer function, so the natural domain of fgf \circ g is in general smaller than that of gg. Order matters: fgf \circ g and gfg \circ f are different functions in most cases, and the example below demonstrates the point.

Example 38

Let f(x)=x2+3x+1f(x) = x^2 + 3x + 1 and g(x)=x5g(x) = x - 5. Substituting g(x)=x5g(x) = x - 5 for every occurrence of xx in the formula for ff,

f(g(x))=(x5)2+3(x5)+1=(x210x+25)+(3x15)+1=x27x+11.\begin{aligned} f(g(x)) &= (x - 5)^2 + 3(x - 5) + 1 \\ &= (x^2 - 10x + 25) + (3x - 15) + 1 \\ &= x^2 - 7x + 11. \end{aligned}

Substituting f(x)=x2+3x+1f(x) = x^2 + 3x + 1 for every occurrence of xx in the formula for gg,

g(f(x))=(x2+3x+1)5=x2+3x4.g(f(x)) = (x^2 + 3x + 1) - 5 = x^2 + 3x - 4.

The two outputs are different polynomial functions, confirming that composition is not commutative in general.

Problem 22

Let f(x)=xf(x) = \sqrt{x} and g(x)=1x2g(x) = 1 - x^2. Compute f(g(x))f(g(x)) and g(f(x))g(f(x)), and state the natural domain of each.

The difference quotient

A particularly important composition takes the inner function to be a horizontal shift of the variable, g(x)=x+hg(x) = x + h for a fixed real hh. Then (fg)(x)=f(x+h)(f \circ g)(x) = f(x + h), the quantity that already drove the horizontal shift construction of the AM lesson. Combining this composition with the subtraction and division of the previous section produces the single expression in which the derivative, the object of the lessons ahead, will be born.

Definition 17 (Difference Quotient)

Let ff be a function and let hh be a non-zero real number. The difference quotient of ff at xx with increment hh is

f(x+h)f(x)h.\frac{f(x + h) - f(x)}{h}.

It is defined at every xx for which both xx and x+hx + h lie in the natural domain of ff.

The numerator is the change in the value of ff as the input moves from xx to x+hx + h. Dividing by hh converts that change into a rate per unit increment. The derivative will be recovered by driving hh to zero.

Example 39

Difference quotient of f(x)=x3f(x) = x^3. Using the cube expansion, obtained by two applications of FOIL,

f(x+h)=(x+h)3=x3+3x2h+3xh2+h3.f(x + h) = (x + h)^3 = x^3 + 3 x^2 h + 3 x h^2 + h^3.

Subtracting f(x)=x3f(x) = x^3,

f(x+h)f(x)=3x2h+3xh2+h3.f(x + h) - f(x) = 3 x^2 h + 3 x h^2 + h^3.

Every summand carries a factor of hh, so factoring it out and applying rule (iii) under the assumption h0h \neq 0,

f(x+h)f(x)h=h(3x2+3xh+h2)h=3x2+3xh+h2.\frac{f(x + h) - f(x)}{h} = \frac{h(3 x^2 + 3 x h + h^2)}{h} = 3 x^2 + 3 x h + h^2.

Cancellation is legitimate because h0h \neq 0; at h=0h = 0 the original quotient is undefined, but the simplified expression remains meaningful and equals 3x23 x^2.

Remark

The value 3x23 x^2 left over after the cancellation will turn out, in a coming lesson, to be the derivative of x3x^3. The algebra of this section therefore already delivers the derivative of the cube, pending only the limit argument that makes the passage from h0h \neq 0 to h=0h = 0 rigorous. The pattern repeats for every polynomial: the difference quotient factors, hh cancels, and what remains is the derivative. The whole of differentiation lives in that cancellation.

Problem 23

Let f(x)=x2f(x) = x^2. Form the difference quotient f(x+h)f(x)h\dfrac{f(x + h) - f(x)}{h}, simplify it using h0h \neq 0, and state the value of the simplified expression at h=0h = 0.

Problem 24

Let f(x)=1xf(x) = \dfrac{1}{x} with x0x \neq 0, and suppose also that x+h0x + h \neq 0. Express the difference quotient

f(x+h)f(x)h\frac{f(x + h) - f(x)}{h}

as a single rational function of xx and hh in simplest form, and state the value of the simplified expression at h=0h = 0.