MAT1051 · Week 1 · Functions, New Functions From Old Ones, Exponential Functions

Functions, transformations and exponential functions

Domain, composition, even/odd functions, graph shifts and exponential equations. Every question for the rest of the semester builds on this language.

functiondomainrangecompositioneven functionodd functiontransformationpiecewise functionexponential functionnatural base e

The first week of Calculus is the one students skip with “I already know this” and then lose points on the midterm. Limit, derivative and integral questions are all asked about some function. A student who finds the domain wrongly, reverses a composition or shifts a graph the wrong way carries the same mistake into later weeks. These five rules will help you most on the exam:

  1. The domain is found with three prohibitions: the radicand cannot be negative, the denominator cannot be zero, and the argument of a logarithm must be positive.
  2. A composition f(g(x))f(g(x)) is read from the inside out. First gg, then ff.
  3. A change inside the parentheses moves the graph horizontally, and a change outside moves it vertically. Inside, the sign works backwards: f(x−3)f(x-3) goes right.
  4. Even/odd test: compute f(−x)f(-x) and compare it with f(x)f(x) or −f(x)-f(x).
  5. In an exponential equation, equalize the bases. If that fails, let u=axu=a^x.

Function, domain, range

A function is a rule that assigns exactly one value yy to every xx in the domain. The domain is the set of xx for which the formula makes sense. The range is the set of yy values the function actually takes.

If the question does not give a domain, it is asking for the “natural domain”. To find it, scan the formula and remove the forbidden points:

What is in the formula?Condition
A\sqrt{A} (even-index root)A≥0A\ge 0
1B\dfrac{1}{B}B≠0B\ne 0
ln⁡C\ln C, log⁡aC\log_a CC>0C>0
1A\dfrac{1}{\sqrt{A}}A>0A>0 (both at once)

Example 1. The domain of f(x)=x+3x2−4f(x)=\dfrac{\sqrt{x+3}}{x^2-4}.

Radicand: x+3≥0⇒x≥−3x+3\ge 0 \Rightarrow x\ge -3. Denominator: x2−4≠0⇒x≠±2x^2-4\ne 0 \Rightarrow x\ne \pm 2. The intersection of the two:

[−3,−2)∪(−2,2)∪(2,∞)[-3,-2)\cup(-2,2)\cup(2,\infty)

x=−3x=-3 is included because 0\sqrt{0} is defined. When writing intervals, a square bracket means “included” and a round parenthesis means “excluded”.

PITFALL · simplifying does not change the domain. x2−1x−1\dfrac{x^2-1}{x-1} simplifies to x+1x+1, but x=1x=1 is still forbidden. Always find the domain from the original formula.

Finding the range

There is no formula for the range; you look at the structure of the function. The two most common techniques:

  • Complete the square. f(x)=x2−4x+7=(x−2)2+3f(x)=x^2-4x+7=(x-2)^2+3. A square is at least 0, so f(x)≥3f(x)\ge 3. The range is [3,∞)[3,\infty), and the minimum occurs at x=2x=2.
  • Build from a known piece. e−xe^{-x} takes every positive number. So 3−2e−x3-2e^{-x} takes (−∞,3)(-\infty,3). Transform the interval at each step: multiplying multiplies the endpoints (multiplying by a negative flips the interval), and adding shifts the endpoints.

The most reliable way to test whether a value y0y_0 is in the range is to try to solve f(x)=y0f(x)=y_0 for xx. If there is a solution, y0y_0 is attained. You will use the same idea in week 2 when finding inverse functions.

Piecewise functions

Functions that use a different formula on different intervals. When evaluating, first check which interval xx lies in, then use the formula of that piece. The absolute value is also piecewise:

∣x∣={x,x≥0−x,x<0|x|=\begin{cases} x, & x\ge 0\\ -x, & x<0\end{cases}

Composite functions (composition)

(f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)). First gg is applied, and the result goes into ff. In general f∘g≠g∘ff\circ g\ne g\circ f.

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

(f∘g)(x)=f(x)=(x)2−1=x−1,x≥0(f\circ g)(x)=f(\sqrt{x})=(\sqrt{x})^2-1=x-1,\qquad x\ge 0

(g∘f)(x)=g(x2−1)=x2−1,∣x∣≥1(g\circ f)(x)=g(x^2-1)=\sqrt{x^2-1},\qquad |x|\ge 1

For f∘gf\circ g the formula came out as x−1x-1, but the domain is not R\mathbb{R}. If you plug in x=−4x=-4, you first have to compute −4\sqrt{-4}, which is undefined. The domain of a composition: the xx where gg is defined and g(x)g(x) falls in the domain of ff.

It is also asked in the opposite direction: “Write F(x)=x2+5F(x)=\sqrt{x^2+5} as f∘gf\circ g.” The answer is g(x)=x2+5g(x)=x^2+5, f(x)=xf(x)=\sqrt{x}. This decomposition is the basis of the chain rule in week 6.

Even and odd functions

TypeDefinitionGraphExamples
Evenf(−x)=f(x)f(-x)=f(x)symmetric about the yy-axisx2x^2, x4−3x2x^4-3x^2, cos⁡x\cos x, ∣x∣\lvert x\rvert
Oddf(−x)=−f(x)f(-x)=-f(x)symmetric about the originx3x^3, xx2+1\dfrac{x}{x^2+1}, sin⁡x\sin x

Example 3. Test three functions.

  • f(x)=xx2+1f(x)=\dfrac{x}{x^2+1}: f(−x)=−xx2+1=−f(x)f(-x)=\dfrac{-x}{x^2+1}=-f(x). Odd.
  • g(x)=x4−3x2g(x)=x^4-3x^2: g(−x)=x4−3x2=g(x)g(-x)=x^4-3x^2=g(x). Even.
  • h(x)=x2+xh(x)=x^2+x: h(−1)=0h(-1)=0, h(1)=2h(1)=2. Neither h(−1)=h(1)h(-1)=h(1) nor h(−1)=−h(1)h(-1)=-h(1). Neither odd nor even.

A single counterexample is enough to say “neither odd nor even”. To say “odd” or “even”, you must show the equality for a general xx.

Shortcut: odd × odd = even, even × even = even, odd × even = odd. The same holds for division.

Graph transformations

If you know the graph of y=f(x)y=f(x), you can sketch these from memory (c>0c>0):

FormulaMovement
y=f(x)+cy=f(x)+ccc units up
y=f(x)−cy=f(x)-ccc units down
y=f(x−c)y=f(x-c)cc units to the right
y=f(x+c)y=f(x+c)cc units to the left
y=−f(x)y=-f(x)reflection in the xx-axis
y=f(−x)y=f(-x)reflection in the yy-axis
y=af(x)y=af(x), a>1a>1vertical stretch by a factor of aa
y=f(bx)y=f(bx), b>1b>1horizontal compression by a factor of 1/b1/b

The logic: whatever is inside the parentheses acts on xx. In the graph of f(x−3)f(x-3), the value that used to be at x=0x=0 is now seen at x=3x=3. That is why the minus sign inside takes the graph to the right.

Example 4. Obtain the graph of y=3−2x+1y=3-2^{x+1} from y=2xy=2^x.

y = 2^x          base graph, asymptote y = 0, passes through (0,1)
y = 2^(x+1)      1 unit to the left
y = -2^(x+1)     reflection in the x-axis, the graph drops below the axis
y = 3 - 2^(x+1)  3 units up, asymptote y = 3

yy-intercept: 3−21=13-2^1=1. The range is (−∞,3)(-\infty,3). The asymptote also moved up 3 units: y=3y=3.

PITFALL · order matters. “First stretch by 2, then shift up 1” and “first shift up 1, then stretch by 2” give different graphs: 2f(x)+12f(x)+1 versus 2(f(x)+1)=2f(x)+22(f(x)+1)=2f(x)+2. Apply the steps in the order given in the question.

Exponential functions

f(x)=axf(x)=a^x, where a>0a>0 and a≠1a\ne 1. Properties:

  • The domain is R\mathbb{R} and the range is (0,∞)(0,\infty). It is never zero or negative.
  • It passes through (0,1)(0,1), because a0=1a^0=1.
  • It is increasing if a>1a>1 and decreasing if 0<a<10<a<1. y=0y=0 is a horizontal asymptote.

Exponent rules:

ax+y=axay,ax−y=axay,(ax)y=axy,(ab)x=axbx,a−x=1axa^{x+y}=a^x a^y,\qquad a^{x-y}=\frac{a^x}{a^y},\qquad (a^x)^y=a^{xy},\qquad (ab)^x=a^x b^x,\qquad a^{-x}=\frac{1}{a^x}

The natural base e

The number ee is the following limit:

e=lim⁡n→∞(1+1n)n≈2.71828e=\lim_{n\to\infty}\left(1+\frac{1}{n}\right)^n\approx 2.71828

For n=100n=100, (1.01)100≈2.7048(1.01)^{100}\approx 2.7048; as nn grows, it settles at 2.718282.71828. In calculus almost every exponential function is written with exe^x, because, as you will see in week 7, the derivative of exe^x is itself.

Solving exponential equations

Method 1: equalize the bases. aA=aB⇒A=Ba^{A}=a^{B} \Rightarrow A=B.

Example 5. 9x=27x−29^x=27^{x-2}.

32x=33(x−2)⇒2x=3x−6⇒x=63^{2x}=3^{3(x-2)} \Rightarrow 2x=3x-6 \Rightarrow x=6

Method 2: substitution. If the equation contains both a2xa^{2x} and axa^x, let u=axu=a^x and a quadratic equation appears. Since u>0u>0, discard negative roots.

Example 6. 22x−6⋅2x+8=02^{2x}-6\cdot 2^x+8=0. u=2xu=2^x: u2−6u+8=0u^2-6u+8=0, (u−2)(u−4)=0(u-2)(u-4)=0. 2x=2⇒x=12^x=2 \Rightarrow x=1, 2x=4⇒x=22^x=4 \Rightarrow x=2.

If the bases cannot be equalized (like 5x=2x+15^x=2^{x+1}), you need logarithms. That is the topic of week 2.

Growth model

The sentence “it doubles every TT hours, starting at N0N_0” translates to the model:

N(t)=N0⋅2t/TN(t)=N_0\cdot 2^{t/T}

For half-life, write 12\tfrac12 instead of 22.

Common mistakes

Wrong thinkingCorrect
x2−1x−1=x+1\dfrac{x^2-1}{x-1}=x+1, domain R\mathbb{R}x=1x=1 is still excluded, look at the original formula
f(x−3)f(x-3) shifts leftIt shifts right, the sign inside works backwards
(f∘g)(x)=g(f(x))(f\circ g)(x)=g(f(x))f(g(x))f(g(x)): first gg
f∘gf\circ g simplified, so the domain can be read from the formulagg must be defined first: (x)2(\sqrt{x})^2 needs x≥0x\ge 0
2x⋅2y=4xy2^{x}\cdot 2^{y}=4^{xy}2x+y2^{x+y}, the bases are not multiplied, the exponents are added
Accepting the root u<0u<0 in u2−6u+8=0u^2-6u+8=0 as wellu=ax>0u=a^x>0, discard the negative root
hh is odd because h(1)≠h(−1)h(1)\ne h(-1)To be odd, h(−x)=−h(x)h(-x)=-h(x) is required; if neither holds, it is neither odd nor even
The graph of axa^x crosses the xx-axisIt never does, ax>0a^x>0

Test yourself

Exam-style questions. Solve them on paper first, then reveal the answer.

Question 1easy

Find the domain of f(x)=6−2xx+1f(x)=\dfrac{\sqrt{6-2x}}{x+1}.

Show answer
(−∞,−1)∪(−1,3](-\infty,-1)\cup(-1,3]

There are two conditions. The radicand cannot be negative: 6−2x≥0⇒x≤36-2x\ge 0 \Rightarrow x\le 3. The denominator cannot be zero: x≠−1x\ne -1. Combine them: x≤3x\le 3 and x≠−1x\ne -1, so (−∞,−1)∪(−1,3](-\infty,-1)\cup(-1,3]. x=3x=3 is included, because 0=0\sqrt{0}=0 is defined.

Question 2medium

Let f(x)=x2+1f(x)=x^2+1 and g(x)=x−2g(x)=\sqrt{x-2}. Find (f∘g)(x)(f\circ g)(x) and its domain.

Show answer
(f∘g)(x)=x−1(f\circ g)(x)=x-1, domain [2,∞)[2,\infty)

f(g(x))=(x−2)2+1=x−2+1=x−1f(g(x))=(\sqrt{x-2})^2+1=x-2+1=x-1. The simplified formula looks like it works for every xx, but g(x)g(x) must be computed first: x−2≥0x-2\ge 0, so x≥2x\ge 2. The domain is [2,∞)[2,\infty).

Question 3easy

Determine whether f(x)=x3−4xx2+1f(x)=\dfrac{x^3-4x}{x^2+1} is even, odd, or neither.

Show answer
odd

f(−x)=(−x)3−4(−x)(−x)2+1=−x3+4xx2+1=−x3−4xx2+1=−f(x)f(-x)=\dfrac{(-x)^3-4(-x)}{(-x)^2+1}=\dfrac{-x^3+4x}{x^2+1}=-\dfrac{x^3-4x}{x^2+1}=-f(x). The numerator is odd and the denominator is even, so their quotient is odd. The function is odd, and its graph is symmetric about the origin.

Question 4easy

Let f(x)={x2,x<13−x,x≥1f(x)=\begin{cases} x^2, & x<1 \\ 3-x, & x\ge 1 \end{cases}. Compute f(f(−2))f(f(-2)).

Show answer
-1

Start from the inside. Since −2<1-2<1, f(−2)=(−2)2=4f(-2)=(-2)^2=4. Then f(4)f(4): 4≥14\ge 1, so use the second piece: 3−4=−13-4=-1.

Question 5easy

Solve 4x+1=8x−14^{x+1}=8^{x-1}.

Show answer
x = 5

Write both sides with base 2: 4x+1=22x+24^{x+1}=2^{2x+2}, 8x−1=23x−38^{x-1}=2^{3x-3}. The bases are equal, so the exponents must be equal: 2x+2=3x−3⇒x=52x+2=3x-3 \Rightarrow x=5. Check: 46=4096=844^6=4096=8^4.

Question 6medium

Solve 32x−10⋅3x+9=03^{2x}-10\cdot 3^{x}+9=0.

Show answer
x = 0 or x = 2

Let u=3xu=3^x. Since 32x=(3x)2=u23^{2x}=(3^x)^2=u^2, the equation becomes u2−10u+9=0u^2-10u+9=0, that is (u−1)(u−9)=0(u-1)(u-9)=0. u=1⇒3x=1⇒x=0u=1 \Rightarrow 3^x=1 \Rightarrow x=0. u=9⇒x=2u=9 \Rightarrow x=2. Since u=3x>0u=3^x>0, we would discard any negative root.

Question 7medium

Find the range of f(x)=3−2e−xf(x)=3-2e^{-x}.

Show answer
(−∞,3)(-\infty,3)

e−xe^{-x} is positive for every xx and takes every value in (0,∞)(0,\infty). So −2e−x-2e^{-x} sweeps (−∞,0)(-\infty,0). Adding 3 gives (−∞,3)(-\infty,3). The value 3 is never reached: y=3y=3 is a horizontal asymptote.

Question 8medium

If f(x)=2x+3f(x)=2x+3 and (f∘g)(x)=6x−1(f\circ g)(x)=6x-1, find g(x)g(x).

Show answer
g(x) = 3x - 2

f(g(x))=2g(x)+3f(g(x))=2g(x)+3. Set it equal to 6x−16x-1: 2g(x)+3=6x−1⇒g(x)=6x−42=3x−22g(x)+3=6x-1 \Rightarrow g(x)=\dfrac{6x-4}{2}=3x-2. Check: 2(3x−2)+3=6x−12(3x-2)+3=6x-1.

Question 9medium

The graph of y=2xy=2^x is shifted 3 units to the right, reflected in the xx-axis, and then shifted 4 units up. Write the new equation and give its horizontal asymptote and range.

Show answer
y=4−2x−3y=4-2^{x-3}, asymptote y=4y=4, range (−∞,4)(-\infty,4)

Apply the steps in order. Right 3: x→x−3x\to x-3, so y=2x−3y=2^{x-3}. Reflection in the xx-axis: y=−2x−3y=-2^{x-3}. Up 4: y=−2x−3+4y=-2^{x-3}+4. Since 2x−3>02^{x-3}>0, we get y<4y<4; the asymptote is y=4y=4 and the range is (−∞,4)(-\infty,4).

Question 10easy

A bacteria culture starts with 500 cells and doubles every 3 hours. After how many hours will it contain 8000 cells?

Show answer
12 hours

Model: N(t)=500⋅2t/3N(t)=500\cdot 2^{t/3}. 500⋅2t/3=8000⇒2t/3=16=24⇒t/3=4⇒t=12500\cdot 2^{t/3}=8000 \Rightarrow 2^{t/3}=16=2^4 \Rightarrow t/3=4 \Rightarrow t=12 hours.

Question 11medium

Prove that f(x)=ex−e−x2f(x)=\dfrac{e^{x}-e^{-x}}{2} is an odd function.

Show answer
f(−x)=−f(x)f(-x)=-f(x) for all xx

f(−x)=e−x−e−(−x)2=e−x−ex2=−ex−e−x2=−f(x)f(-x)=\dfrac{e^{-x}-e^{-(-x)}}{2}=\dfrac{e^{-x}-e^{x}}{2}=-\dfrac{e^{x}-e^{-x}}{2}=-f(x). The domain is R\mathbb{R} (symmetric about the origin) and the equality holds for every xx, so ff is odd. This function is called sinh⁡x\sinh x.

Question 12hard

Find the domain of f(x)=x−1x+2f(x)=\sqrt{\dfrac{x-1}{x+2}}.

Show answer
(−∞,−2)∪[1,∞)(-\infty,-2)\cup[1,\infty)

Condition: x−1x+2≥0\dfrac{x-1}{x+2}\ge 0 and x≠−2x\ne -2. The critical points are x=1x=1 (numerator zero) and x=−2x=-2 (denominator zero). Sign table: for x<−2x<-2 both factors are negative, so the quotient is positive. For −2<x<1-2<x<1 the quotient is negative. For x>1x>1 it is positive. x=1x=1 is included (the quotient is 0) and x=−2x=-2 is excluded. The result is (−∞,−2)∪[1,∞)(-\infty,-2)\cup[1,\infty).

Verification: All answers were checked with node (verify/MAT1051/01.mjs): domains by evaluating at the boundary points, composition and parity by comparing at several points, exponential equation roots by substitution.

Review card

Domain: radicand >= 0, denominator != 0, log argument > 0 (f o g)(x) = f(g(x)); domain: g must be defined first, then f(g) must be defined Even: f(-x) = f(x) (symmetric about the y-axis) Odd: f(-x) = -f(x) (symmetric about the origin) y = f(x - c): right c y = f(x + c): left c y = f(x) + c: up c y = -f(x): reflect in the x-axis y = f(-x): reflect in the y-axis y = a f(x): vertical stretch by a y = f(bx): horizontal compression by 1/b a^x: a > 0, domain R, range (0, inf), asymptote y = 0, passes through (0,1) a^(x+y) = a^x a^y (a^x)^y = a^(xy) a^(-x) = 1/a^x Exponential equation: equalize the bases or let u = a^x, and remember u > 0 e = lim (1 + 1/n)^n ≈ 2.71828