Learning math: relations and functions

Table of contents

These are my solutions to the problems in the book Maths: A Student's Survival Guide.

Direct proportion

A.k.a. "suoraan verrannollisuus".

Remember: \propto means "is proportional to". Another symbol that means the same thing is \sim.

Direct proportion formula: y=kxy = kx, where kk is a constant.

A=πr2Area of a circleAr2When r2 doubles, A also doubles A = \pi r^2 \qquad \text{Area of a circle} \\ A \propto r^2 \qquad \text{When }r^2\text{ doubles, }A\text{ also doubles}

We can also say that A1r12=A2r22=\dfrac{A_1}{r^2_1} = \dfrac{A_2}{r^2_2} = \ldots

f(x)=kxk=πx=r2 f(x) = kx \\ k = \pi \\ x = r^2

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 -1 0 1 2 3 4 5 A r2 f(r2) f(r2)
set xrange [-1:5]
set yrange [-1:10]
set xtics 1
set ytics 1
set ylabel "A"
set xlabel "r^2"

f(x) = pi * x

plot f(x) title "f(r^2)"

Note: if you mistakenly graph ArA \propto r, you'd get this:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -1 0 1 2 3 4 5 A r f(r) f(r)
set xrange [-1:5]
set yrange [-1:15]
set xtics 1
set ytics 1
set ylabel "A"
set xlabel "r"

f(x) = pi * x * x

plot f(x) title "f(r)"

This is wrong, because AA is not proportional to rr, but rather to r2r^2. When r2r^2 doubles, we also expect AA to double, because they're directly proportional.

3.A.(b), example 2

V=πr2hVolume of a cylinderVhV1h1=V2h2V=khk=πr2 V = \pi r^2 h \qquad \text{Volume of a cylinder} \\ V \propto h \\ \frac{V_1}{h_1} = \frac{V_2}{h_2} \\ V = kh \\ k = \pi r^2

3.A.(c), example 3

V=43πr3Volume of a sphereVr3k=43π V = \frac{4}{3} \pi r^3 \qquad \text{Volume of a sphere} \\ V \propto r^3 \\ k = \frac{4}{3} \pi

3.A.(c), example 4

Period, TT, of a simple pendulum of length ll:

T=2πl/g=2πlgTlk=2π1g=2πg T = 2 \pi \sqrt{l/g} = 2 \pi \frac{\sqrt{l}}{\sqrt{g}} \\ T \propto \sqrt{l} \\ k = 2 \pi \frac{1}{\sqrt{g}} = \frac{2 \pi}{\sqrt{g}}

3.A.1

(1)

(a):

Vh V \propto h

VAhA=VBhB \dfrac{V_A}{h_A} = \dfrac{V_B}{h_B}

VA4=VB1 \dfrac{V_A}{4} = \dfrac{V_B}{1}

VAVB=41 \dfrac{V_A}{V_B} = \dfrac{4}{1}

(b):

Vr V \propto r

VCrC2=VDrD2 \dfrac{V_C}{r^2_C} = \dfrac{V_D}{r^2_D}

VC1=VD16 \dfrac{V_C}{1} = \dfrac{V_D}{16}

VCVD=116 \dfrac{V_C}{V_D} = \dfrac{1}{16}

(2)

E=12Mv2Ev2 E = \frac{1}{2}M v^2 \\ E \propto v^2

E1v12=E2v22 \dfrac{E_1}{v^2_1} = \dfrac{E_2}{v^2_2}

E125=E2900 \dfrac{E_1}{25} = \dfrac{E_2}{900}

E2E1=90025=36 \dfrac{E_2}{E_1} = \dfrac{900}{25} = 36

(3)

V=43πr3Vr3 V = \frac{4}{3} \pi r^3 \\ V \propto r^3

V1r13=V2r23 \dfrac{V_1}{r^3_1} = \dfrac{V_2}{r^3_2}

V18=V2512 \dfrac{V_1}{8} = \dfrac{V_2}{512}

V1V2=8512=164 \dfrac{V_1}{V_2} = \dfrac{8}{512} = \dfrac{1}{64}

(4)

T=2πl/gTl T = 2 \pi \sqrt{l/g} \\ T \propto \sqrt{l}

T1l1=T2l2 \dfrac{T_1}{\sqrt{l_1}} = \dfrac{T_2}{\sqrt{l_2}}

T13=T25 \dfrac{T_1}{3} = \dfrac{T_2}{5}

T1T2=35 \dfrac{T_1}{T_2} = \dfrac{3}{5}

Partial direct proportion

Remember: the difference between direct and partial direct proportion is basically this:

  • Direct proportion: y=mxy = mx
    • This line goes through the origin of the graph
  • Partial direct proportion: y=mx+cy = mx + c

For example, if you have a car whose maintenance and other costs are 4000 per year, and you bought the car for 20 000, the cumulative cost at year xx is:

f(x)=4000x+20000 f(x) = 4000x + 20000

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 10000 20000 30000 40000 50000 60000 70000 80000 0 1 2 3 4 5 6 7 8 9 10 Cost Year f(x) f(x)
set xrange [0:10]
set yrange [0:80000]
set xtics 1
set ytics 10000
set ylabel "Cost"
set xlabel "Year"

f(x) = 4000 * x + 20000

plot f(x)

Inverse proportion

A.k.a. "kääntäen verrannollisuus".

xy=k or y=kx xy = k \qquad \text{ or } \qquad y = \frac{k}{x}

x1y x \propto \frac{1}{y}

When xx gets larger, yy gets proportionally smaller, and vice versa.

If xx gets 2 times larger, yy gets 2 times smaller: 2x12y=k2x \frac{1}{2}y = k

If xx gets 10 times smaller, yy gets 10 times larger: 110x10y=k\frac{1}{10}x 10y = k

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 y x 2/x 2/x
set xrange [-4:10]
set yrange [-4:10]
set xtics 1
set ytics 1

f(x) = 2 / x

plot f(x) title "2/x"

xx and yy never reach 0. Therefore both xx and yy is an asymptote, i.e. a line that a curve approaches, but never reaches.

Example: travel time versus speed for a 100 km distance: f(x)=100xf(x) = \frac{100}{x}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 6 7 8 9 10 0 10 20 30 40 50 60 70 80 Travel time (h) Speed (km/h) f(x) f(x)
set xrange [0:80]
set yrange [0:10]
set xtics 10
set ytics 1
set xlabel "Speed (km/h)"
set ylabel "Travel time (h)"

f(x) = 100 / x

plot f(x)

Example: rectangles with constant area: A=xyA = xy, where A=12A = 12

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12 y x f(x) f(x) gnuplot_plot_2 gnuplot_plot_3 gnuplot_plot_4
set xrange [0:12]
set yrange [0:12]
set xtics 1
set ytics 1
set style fill solid 0.1

$data1 << EOD
0 0
0 12
1 12
1 0
EOD

$data2 << EOD
0 0
0 6
2 6
2 0
EOD

$data3 << EOD
0 0
0 3
4 3
4 0
EOD

f(x) = 12 / x

plot f(x), "$data1" with filledcurves notitle, "$data2" with filledcurves notitle, "$data3" with filledcurves notitle

Mixed proportion

Example: Newton's law of gravitation: the force of attraction between two masses m1m_1 and m2m_2 is directly proportional to the product of the masses, but inversely proportional to the distance between them squared.

F=km1m2r2 F = \dfrac{k m_1 m_2}{r^2}

Remember: when modeling physical phenomena with a mathematical model, make sure that your model fits the physical situation, and in which situations the model stops working as intended:

For example, the extension of a spring can be predicted for a known load but, if the load is too great, the spring deforms and the new length can no longer be found.

Functions

3.B.(a)

a) y=2x+3b) y=x22x3c) y=1x2+4d) y=(3x+1)1/2=3x+1=±3x+1 \text{a) } y = 2x + 3 \\ \text{b) } y = x^2 - 2x - 3 \\ \text{c) } y = \frac{1}{x^2 + 4} \\ \text{d) } y = (3x + 1)^{1/2} = \cancel{\sqrt{3x + 1}} = \pm \sqrt{3x + 1}

(1)

Is there only one yy value for a specific xx?

  • a: yes, because this is a straight line
  • b: yes, because this is a quadratic
  • c: yes. This looks like some kind of a normal distribution.
  • d: I think not, because a square root gives two values, e.g. y=4=±4=±2y = \cancel{\sqrt{4}} = \pm \sqrt{4} = \pm 2
    • Remember: the convention is that x\sqrt{x} only means positive square root, whereas x1/2x^{1/2} means both the positive and the negative. With \sqrt{} you need to explicitly say plus-minus: ±x\pm \sqrt{x}

(2)

Can two different xx give the same yy value?

  • a: no
    • More generally, for y=mx+cy = mx + c, yes, if the slope is 0
  • b: yes, because a quadratic gives a symmetric parabola
  • c: yes. This looks like some kind of a normal distribution when graphed.
  • d: not sure. When graphing this, the curve looks like it always changes y-value for each xx. It looks like there exists a line that is an asymptote, i.e. a line that the curve is approaching, but never reaches. Therefore I think "no".
    • Correct, but note that Desmos only shows the positive yy values for 3x+1\sqrt{3x + 1} and (3x+1)1/2(3x + 1)^{1/2}. The correct way to graph it is to have a quadratic parabola that is rotated 90 degrees. The book demonstrates how to get y=5y = -5:
      • y=(3x+1)1/2y = (3x + 1)^{1/2}
      • 5=(3x+1)1/2-5 = (3x + 1)^{1/2}
      • (5)2=((3x+1)1/2)2(-5)^2 = ((3x + 1)^{1/2})^2
      • 25=3x+125 = 3x + 1
      • x=8x = 8

(3)

Can xx be any real number?

  • a: yes
  • b: yes
  • c: yes
  • d: I think yes and no. No, if you want the output to be a real number, because e.g. 2\sqrt{-2} probably requires an imaginary number. Maybe yes, if you allow the output to have imaginary numbers.
    • Correct

(4)

If xx is the largest set of all possible input values (e.g. xx can be any real or imaginary number), what is the complete set of yy values?

Remember: xx is the set of input values (i.e. the domain) of the function. yy is the set of output values (i.e. the codomain).

  • a:
    • xRx \in \R
    • yRy \in \R
      • More generally, for y=mx+cy = mx + c, if the slope 0\neq 0, then yRy \in \R, because this is a straight line. If the slope =0= 0, then y{3}y \in \{3\}, that is, y=3y = 3.
  • b:
    • Looking at the equation, I can see that I can put in any real number, so therefore xRx \in \R. I was wondering if there exist two vertical asymptotes, though, like this:

      But this is probably not the case, since I should be able to put in any real number for xx.
    • As for yy, the vertex gives me the minimum yy value. Therefore yy should not be the full set R\R, but a subset of it, i.e. {yRyk}\{y \in \R \mid y \geq k \}, where kk is the vertex's yy point.
  • c:
    • xRx \in \R I think, like in b above
    • A graph of this curve shows that both the minimum and maximum of yy seem to be restricted: https://www.desmos.com/calculator/3uajczu3kp. When xx is very large (i.e. approaches infinity), yy seems to approach 00. Therefore I'd say {yRy14 and y>0}\{y \in \R \mid y \leq \frac{1}{4} \text{ and } y \gt 0\}.
      • The book uses interval notation here, i.e. (0,14](0, \frac{1}{4}], which means 0 is not inclusive, but 14\frac{1}{4} is inclusive
  • d:
    • If xRx \in \R, then {xRx13}\{x \in \R \mid x \geq -\frac{1}{3}\}, because any smaller xx results in n\sqrt{-n}, which is an imaginary number. But if we allow imaginary number, then I guess xCx \in ℂ.
    • If xRx \in \R, then {yRy0}\{y \in \R \mid y \geq 0\}. If we allow imaginary numbers, then I'm not sure what yy would be.
      • This is incorrect. If xRx \in \R, then yRy \in \R. This is because (3x+1)1/2=±3x+1(3x + 1)^{1/2} = \pm \sqrt{3x + 1}, not 3x+1\sqrt{3x + 1}.

Remember: x\sqrt{x} does not imply negative and positive square roots! x\sqrt{x} is the principal square root of xx, and is always a non-negative value. Every positive number has two square roots: x\sqrt{x} and x-\sqrt{x}. Therefore you need to explicitly say ±x\pm \sqrt{x}.

To graph ±3x+1\pm \sqrt{3x + 1}, we need to graph the positive and negative yy values separately:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -3 -2 -1 0 1 2 3 4 5 6 7 8 -2 -1 0 1 2 3 4 5 6 7 8 9 10 y x sqrt(3*x + 1) sqrt(3*x + 1) -sqrt(3*x + 1) -sqrt(3*x + 1)
set xrange [-2:10]
set yrange [-3:8]
set xtics 1
set ytics 1

f(x) = sqrt(3*x + 1)
g(x) = -sqrt(3*x + 1)

plot f(x) title "sqrt(3*x + 1)", g(x) title "-sqrt(3*x + 1)"

Important definitions of functions

A function is a particular form of relationship.

  • If the relationship y=f(x)y = f(x) is a function, then, for a specific value of xx, there is only one value of yy
    • y=3x+1y = \sqrt{3x + 1} is a function, because yy can only have a single value per xx
    • y=(3x+1)1/2y = (3x + 1)^{1/2} is not a function, because yy can have multiple values per xx
    • The "raindrop test": a vertical line on a graph must not cut the curve more than once, if the curve is of a function. (See vertical line test.)
  • The function y=f(x)y = f(x) is one-to-one if, for each value of yy, there is only one possible xx, and vice versa
    • y=2x+3y = 2x + 3 is one-to-one
    • y=x22x3y = x^2 - 2x - 3 is not one-to-one. I guess you could test this with a "horizontal raindrop test". (See horizontal line test.)
  • The domain of the function is the set of numbers for the possible values of xx
    • For example, R\R
    • In some cases you will want to restrict the possible input values. For example, if xx represents a physical size, then a domain of x>0x \gt 0 is often suitable.
  • The codomain of the function is the set of numbers for the possible values of yy
    • For example, R\R
  • The range of the function is the set of numbers for the actual possible output values of yy

Transforming functions

Remember: horizontal and vertical shifting is also called translating (e.g. translate() in CSS).

Shift vertically

Add a value aa to the function's output:

y=f(x)+a y = f(x) + a

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 y x f(x) f(x) f(x) + 1 f(x) + 1 f(x) - 1 f(x) - 1
set xrange [-4:8]
set yrange [-2:6]
set xtics 1
set ytics 1

f(x) = x*x - x
g(x) = x*x - x + 1
h(x) = x*x - x - 1

plot f(x) title "f(x)", g(x) title "f(x) + 1", h(x) title "f(x) - 1"

Shift horizontally

Add a value aa to the function's input:

y=f(x+a) y = f(x + a)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 y x f(x) f(x) f(x + 1) f(x + 1) f(x - 1) f(x - 1)
set xrange [-4:8]
set yrange [-2:6]
set xtics 1
set ytics 1

f(x) = x*x - x
g(x) = (x + 1)*(x + 1) - (x + 1)
h(x) = (x - 1)*(x - 1) - (x - 1)

plot f(x) title "f(x)", g(x) title "f(x + 1)", h(x) title "f(x - 1)"

Scale vertically

Multiply/divide the function's output by aa:

y=f(x)ay=f(x)/a y = f(x) * a \\ y = f(x) / a

The scaling is applied through the origin.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 y x f(x) f(x) f(x) * 2 f(x) * 2 f(x) / 2 f(x) / 2
set xrange [-4:8]
set yrange [-2:6]
set xtics 1
set ytics 1

f(x) = x*x - x
g(x) = (x*x - x) * 2
h(x) = (x*x - x) / 2

plot f(x) title "f(x)", g(x) title "f(x) * 2", h(x) title "f(x) / 2"

Scale horizontally

Multiply/divide the function's input by aa:

y=f(xa)y=f(x/a) y = f(x * a) \\ y = f(x / a)

The scaling is applied through the origin.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 y x f(x) f(x) f(x * 2) f(x * 2) f(x / 2) f(x / 2)
set xrange [-4:8]
set yrange [-2:6]
set xtics 1
set ytics 1

f(x) = x*x - x
g(x) = (x * 2)*(x * 2) - (x * 2)
h(x) = (x / 2)*(x / 2) - (x / 2)

plot f(x) title "f(x)", g(x) title "f(x * 2)", h(x) title "f(x / 2)"

3.B.1

(1)

  • b: f(x)+2f(x) + 2
  • c: f(x)2f(x) - 2

(2)

  • b: g(x+2)g(x + 2)
  • c: g(x2)g(x - 2)

(3)

  • b: h(x)2h(x) * 2
  • c: h(x2)h(x * 2)

(4)

  • b: p(x)+2p(x) + 2
  • c: p(x+2)p(x + 2)

3.B.2

Functions of functions.

(1)

f(x)=3x5g(x)=2xf(g(x))=3(2x)5=6x5g(f(x))=2(3x5)=6x10 f(x) = 3x - 5 \\ g(x) = 2x \\ f(g(x)) = 3(2x) - 5 = 6x - 5 \\ g(f(x)) = 2(3x - 5) = 6x - 10

(2)

f(x)=x2g(x)=4xf(g(x))=(4x)2=x28x+16g(f(x))=4x2 f(x) = x^2 \\ g(x) = 4 - x \\ f(g(x)) = (4 - x)^2 = x^2 - 8x + 16 \\ g(f(x)) = 4 - x^2

(3)

f(x)=1xg(x)=x4f(g(x))=1x4g(f(x))=1x4 f(x) = \frac{1}{x} \\ g(x) = x - 4 \\ f(g(x)) = \frac{1}{x - 4} \\ g(f(x)) = \frac{1}{x} - 4

Example 1

g(x)=2x2+3g(g(x))=2(2x2+3)2+3=2(4x4+12x2+9)+3=8x4+24x2+21g(g(1))=8+24+21=53 g(x) = 2x^2 + 3 \\ g(g(x)) = 2(2x^2 + 3)^2 + 3 = 2(4x^4 + 12x^2 + 9) + 3 = 8x^4 + 24x^2 + 21 \\ g(g(1)) = 8 + 24 + 21 = 53

Example 1

f(x)=2x54x+1 f(x) = \frac{2x - 5}{4x + 1}

f(3)=2(3)54(3)+1=113 f(3) = \frac{2(3) - 5}{4(3) + 1} = \frac{1}{13}

f(x2)=2x254x2+1 f(x^2) = \frac{2x^2 - 5}{4x^2 + 1}

f(2x+1)=2(2x+1)54(2x+1)+1=4x38x+5 f(2x + 1) = \frac{2(2x + 1) - 5}{4(2x + 1) + 1} = \frac{4x - 3}{8x + 5}

f(f(x))=2(2x54x+1)54(2x54x+1)+1=2(2x5)4x+154(2x5)4x+1+1=2(2x5)(4x+1)54(2x5)+(4x+1)1=16x1512x19 f(f(x)) = \dfrac{2(\frac{2x - 5}{4x + 1}) - 5}{4(\frac{2x - 5}{4x + 1}) + 1} = \dfrac{\frac{2(2x - 5)}{4x + 1} - 5}{\frac{4(2x - 5)}{4x + 1} + 1} = \frac{2(2x - 5) - (4x + 1)5}{4(2x - 5) + (4x + 1)1} = \frac{-16x - 15}{12x - 19}

Inverse functions

If we know a value of f(x)f(x) for a particular function can we work out from this what the original value of xx must have been?

So far I understand that:

  • A function is a mapping from an input value to a single output value
    • Raindrop test: if the same input (i.e. xx) gives more than one output (i.e. yy, e.g. ±7\pm 7), then it's not a function
    • E.g. Map<x, y> in a programming language
  • If a specific output value (yy) is only achievable with a specific input value (xx), and no other input value (xx) gives the same yy, then the function is called "one-to-one"
    • I.e. a one-to-one mapping from an input value to a unique output value
    • In other words, if f(a)=f(b)f(a) = f(b), then a=ba = b. If aa and bb give the same yy value on a graph, then aa must be the same as bb.
    • E.g. Map<y, x> in a programming language

Therefore I'd say that we can find the original value of xx if the function is one-to-one. If it's not, then we can't find a single value of xx from the function's output.


Remember: a function that undoes the effects of f(x)f(x) is called the inverse function of xx, and is written as f1(x)f^{-1}(x).

  • Only a one-to-one function can have an inverse function
    • A function is only one-to-one if f(a)=f(b)f(a) = f(b) and a=ba = b
  • f1(f(x))=f(f1(x))=xf^{-1}(f(x)) = f(f^{-1}(x)) = x
    • f1(x)f^{-1}(x) undoes f(x)f(x)
    • f(x)f(x) undoes f1(x)f^{-1}(x)

           

Remember: a self-inverse function is an inverse of itself:

f(f(x))=xf1(x)=f(x) f(f(x)) = x \\ f^{-1}(x) = f(x)

Remember: another way to write a function is arrow notation:

  • f:xx3f : x \mapsto x - 3
  • f1:xx+3f^{-1} : x \mapsto x + 3

f(x)=x2f1(x)=x+2 f(x) = x - 2 \\ f^{-1}(x) = x + 2

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -3 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 y x f(x) f(x) f-1(x) f-1(x) Line of symmetry, y = x Line of symmetry, y = x
set xrange [-4:10]
set yrange [-3:6]
set xtics 1
set ytics 1

f(x) = x - 2
g(x) = x + 2
s(x) = x

plot f(x) title "f(x)", g(x) title "f^{-1}(x)", s(x) title "Line of symmetry, y = x

g(x)=2xg1(x)=12x=x2 g(x) = 2x \\ g^{-1}(x) = \frac{1}{2}x = \frac{x}{2}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -3 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 y x g(x) g(x) g-1(x) g-1(x) Line of symmetry, y = x Line of symmetry, y = x
set xrange [-4:10]
set yrange [-3:6]
set xtics 1
set ytics 1

f(x) = 2 * x
g(x) = x / 2
s(x) = x

plot f(x) title "g(x)", g(x) title "g^{-1}(x)", s(x) title "Line of symmetry, y = x

p(x)=6x=p1(x)Self-inverse function p(x) = 6 - x = p^{-1}(x) \qquad \text{Self-inverse function}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 y x p(x) = p-1(x) p(x) = p-1(x) Line of symmetry, y = x Line of symmetry, y = x
set xrange [-6:12]
set yrange [-3:10]
set xtics 1
set ytics 1

f(x) = 6 - x
s(x) = x

plot f(x) title "p(x) = p^{-1}(x)", s(x) title "Line of symmetry, y = x

q(x)=12/x=q1(x)Self-inverse function q(x) = 12 / x = q^{-1}(x) \qquad \text{Self-inverse function}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -10 -5 0 5 10 15 -20 -15 -10 -5 0 5 10 15 20 25 y x q(x) = q-1(x) q(x) = q-1(x) Line of symmetry, y = x Line of symmetry, y = x
set xrange [-20:25]
set yrange [-12:18]
set xtics 5
set ytics 5

f(x) = 12 / x
s(x) = x

plot f(x) title "q(x) = q^{-1}(x)", s(x) title "Line of symmetry, y = x"

Remember:

  • A function and its inverse function are mirror images of each other when graphed
  • The line y=xy = x is the mirror. The function and its inverse are reflected across this line.
  • Because of this symmetry, the domain of the function is the same as the range (or codomain?) of the inverse function
  • Because of this symmetry, the range (or codomain?) of the function is the same as the domain of the inverse function

Finding inverse functions

y=f(x)=3x+2x=y23=13(y2)Rearrange the subject of the formula from y to xy=13(x2)Swap x and yf1(x)=13(x2)Done y = f(x) = 3x + 2 \\ x = \frac{y - 2}{3} = \frac{1}{3}(y - 2) \qquad \text{Rearrange the subject of the formula from y to x} \\ y = \frac{1}{3}(x - 2) \qquad \text{Swap x and y} \\ f^{-1}(x) = \frac{1}{3}(x - 2) \qquad \text{Done}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -5 -4 -3 -2 -1 0 1 2 3 4 5 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 y x f(x) f(x) f-1(x) f-1(x) Line of symmetry, y = x Line of symmetry, y = x
set xrange [-6:8]
set yrange [-5:5]
set xtics 1
set ytics 1

f(x) = 3*x + 2
g(x) = (x - 2) / 3
s(x) = x

plot f(x) title "f(x)", g(x) title "f^{-1}(x)", s(x) title "Line of symmetry, y = x"

Where do the two functions cross? From the graph I can see (1,1)(1, 1), but how can I get this point algebraically?

Because of the mirroring, it must be that y=xy = x.

It should be enough to find where one of the functions crosses the "mirror" line, y=xy = x.

Trying a system of equations:

{y=xy=3x+2 \begin{cases} y = x \\ y = 3x + 2 \end{cases}

{3y=3xy=3x+2 \begin{cases} 3y = 3x \\ y = 3x + 2 \end{cases}

Subtract the two equations:

{2y=2 \begin{cases} 2y = -2 \end{cases}

Therefore:

y=1 y = -1

Therefore the functions cross at (1,1)(-1, -1) (because at the crossing point x=yx = y).


The book says that the crossing point is where f(x)=f1(x)f(x) = f^{-1}(x). TODO: play with this a bit more for better intuition.

3.B.3

(1)

f(x)=5xf1(x)=15x f(x) = 5x \\ f^{-1}(x) = \frac{1}{5}x

(2)

f(x)=x9f1(x)=x+9 f(x) = x - 9 \\ f^{-1}(x) = x + 9

(3)

f(x)=5x9f1(x)=15(x+9) f(x) = 5x - 9 \\ f^{-1}(x) = \frac{1}{5}(x + 9)

(4)

f(x)=y=8xx=8yf1(x)=8x=f(x) f(x) = y = 8 - x \\ x = 8 - y \\ f^{-1}(x) = 8 - x = f(x)

(5)

f(x)=x/4f1(x)=4x f(x) = x/4 \\ f^{-1}(x) = 4x

(6)

f(x)=4/xf1(x)=4/x=f(x) f(x) = 4/x \\ f^{-1}(x) = 4/x = f(x)

(7)

f(x)=y=32x2x=3yx=12(3y)f1(x)=12(3x) f(x) = y = 3 - 2x \\ 2x = 3 - y \\ x = \frac{1}{2}(3 - y) \\ f^{-1}(x) = \frac{1}{2}(3 - x)

(8)

f(x)=y=x3x+2y(x+2)=x3yx+2y+3=x2y+3=xxy2y+3=x(1y)x=2y+31yf1(x)=2x+31x f(x) = y = \frac{x - 3}{x + 2} \\ y(x + 2) = x - 3 \\ yx + 2y + 3 = x \\ 2y + 3 = x - xy \\ 2y + 3 = x(1 - y) \\ x = \frac{2y + 3}{1 - y} \\ f^{-1}(x) = \frac{2x + 3}{1 - x} \\

(9)

f(x)=2x+3x2y(x2)=2x+32xxy=2y3x(2y)=2y3x=2y32y=2y+3y2f1(x)=2x+3x2=f(x) f(x) = \frac{2x + 3}{x - 2} \\ y(x - 2) = 2x + 3 \\ 2x - xy = -2y - 3 \\ x(2 - y) = -2y - 3 \\ x = \frac{-2y - 3}{2 - y} = \frac{2y + 3}{y - 2} \\ f^{-1}(x) = \frac{2x + 3}{x - 2} = f(x)

3.B.(i)

f(x)=x+3x2 f(x) = \frac{x + 3}{x - 2}

f1(x)=2x+3x1 f^{-1}(x) = \frac{2x + 3}{x - 1}

Hover over this graph to see how swapping xx and yy mirrors the functions, i.e. f(x)f(x) becomes f1(x)f^{-1}(x) and vice versa. This can be achieved by e.g. rotating the graph 90 degrees and then flipping it vertically — or by simply flipping the graph diagonally along the line of symmetry.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 y x f(x) f(x) f-1(x) f-1(x) Line of symmetry, y = x Line of symmetry, y = x Asymptotes for f(x) Asymptotes for f(x) Asymptotes for f-1(x) Asymptotes for f-1(x)
set terminal svg size 500,500 enhanced font 'Verdana,10'
set xrange [-14:16]
set yrange [-14:16]
set xtics 2
set ytics 2

f(x) = (x + 3) / (x - 2)
g(x) = (2*x + 3) / (x - 1)
s(x) = x
h(x) = 1
i(x) = 2
set arrow from 2,16 to 2,-14 nohead dt 2 lc 1
set arrow from 1,16 to 1,-14 nohead dt 2 lc 2

plot f(x) title "f(x)", g(x) title "f^{-1}(x)", s(x) title "Line of symmetry, y = x", h(x) dt 2 lc 1 title "Asymptotes for f(x)", i(x) dt 2 lc 2 title "Asymptotes for f^{-1}(x)"
  • (a) f(x)=0f(x) = 0 when x=3x = -3
  • (b) When x=0x = 0, f(x)=32f(x) = \frac{3}{-2}
  • (c) xx cannot be 22, because that would result in dividing by zero. When xx is approcing 22, f(x)f(x) flips from -\infty to \infty (or vice versa, if approaching from the right).
    • Therefore the line x=2x = 2 is a vertical asymptote. The curve approaches it but never reaches it.
  • (d) As xx approaches \infty, f(x)f(x) approaches 11
    • Therefore the line y=1y = 1 is a horizontal asymptote. The curve approaches it but never reaches it.

The domain of f(x)f(x) is Rx2\R \mid x \neq 2, because we need to exclude 22 to prevent division by zero. The range of f(x)f(x) is the same as the domain of f1(x)f^{-1}(x), i.e. f(x)=yf(x) = y cannot be 11.

The domain of f1(x)f^{-1}(x) is Rx1\R \mid x \neq 1, because we need to exclude 11 to prevent division by zero. The range of f1(x)f^{-1}(x) is the same as the domain of f(x)f(x), i.e. f1(x)=yf^{-1}(x) = y cannot be 22.

3.B.4

(1)

g(x)=x2x+4 g(x) = \frac{x - 2}{x + 4}

  • The x-intercept is at (2,0)(2, 0)
  • The y-intercept is at (0,12)(0, -\frac{1}{2})
  • The vertical asymptote is x=4x = -4
  • The horizontal asymptote is y=1y = 1
  • The domain is Rx4\R \mid x \neq -4
  • The range is Ry1\R \mid y \neq 1

g1(x)=x=y2y+4Swapped x and yx(y+4)=y2xy+4x+2=y4x+2=yxy4x+2=y(1x)g1(x)=y=4x+21x g^{-1}(x) = x = \frac{y - 2}{y + 4} \qquad \text{Swapped x and y} \\ x(y + 4) = y - 2 \\ xy + 4x + 2 = y \\ 4x + 2 = y - xy \\ 4x + 2 = y(1 - x) \\ g^{-1}(x) = y = \frac{4x + 2}{1 - x}

(2)

h(x)=2x5x+1 h(x) = \frac{2x - 5}{x + 1}

  • The x-intercept is at 2x5=02x - 5 = 0, so x=52x = \frac{5}{2}, so (52,0)(\frac{5}{2}, 0)
  • The y-intercept is at (0,5)(0, -5)
  • The vertical asymptote is x=1x = -1
  • The horizontal asymptote is y=2y = 2
  • The domain is Rx1\R \mid x \neq -1
  • The range is Ry2\R \mid y \neq 2

h1(x)=x=2y5y+1Swapped x and yx(y+1)+5=2yx+5=2yxy=y(2x)h1(x)=y=x+52x h^{-1}(x) = x = \frac{2y - 5}{y + 1} \qquad \text{Swapped x and y} \\ x(y + 1) + 5 = 2y \\ x + 5 = 2y - xy = y(2 - x) \\ h^{-1}(x) = y = \frac{x + 5}{2 - x}

(3)

f(x)=2x+3x2 f(x) = \frac{2x + 3}{x - 2}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 y x f(x) f(x) g(x) g(x)
set xrange [-14:22]
set yrange [-10:18]
set xtics 2
set ytics 2

f(x) = (2*x + 3) / (x - 2)
g(x) = x

plot f(x) title "f(x)", g(x)

How do you center this function, so that the vertical asymptote is the y axis, and the horizontal asymptote is the x axis?

Graphically I can see that I need to shift the function left by 22 and down by 22.

Algebraically I can see the function's current asymptotes:

  • Vertical asymptote is 22 (because x=2x = 2 would result in division by zero)
  • Horizontal asymptote is 22 (because very large values of xx will approach 21\frac{2}{1})

To shift a function to the left, I need a new function g(x)=x+asymptotevertical=x+2g(x) = x + asymptote_{vertical} = x + 2.

To shift a function down, I need a new function h(x)=xasymptotehorizontal=x2h(x) = x - asymptote_{horizontal} = x - 2.

Therefore this set of transformations should work:

h(f(g(x))=(2(x+2)+3(x+2)2)2=2x+7x2=2+7x2=7x h(f(g(x)) = (\frac{2(x + 2) + 3}{(x + 2) - 2}) - 2 = \frac{2x + 7}{x} - 2 = 2 + \frac{7}{x} - 2 = \frac{7}{x}

The result is a new, simpler function, where the x and y axis are asymptotes:

p(x)=7x p(x) = \frac{7}{x}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 y x f(x) f(x)
set xrange [-14:22]
set yrange [-10:18]
set xtics 2
set ytics 2

f(x) = 7/x

plot f(x)

3.B.(j)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -8 -6 -4 -2 0 2 4 6 8 10 12 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 y x y = x y = x y = x2 y = x2 y = x3 y = x3 y = |x| y = |x|
set xrange [-8:20]
set yrange [-8:12]
set xtics 2
set ytics 2

f(x) = x
g(x) = x*x
h(x) = x*x*x
p(x) = abs(x)

plot f(x) title "y = x", g(x) title "y = x^2", h(x) title "y = x^3", p(x) title "y = |x|" dt 3 lw 4

Allow of these functions are centered on the origin. y=xy = x and y=x3y = x^3 are symmetric along the x and y axis, but y=x2y = x^2 and y=xy = |x| are only symmetric along the y axis.

The book says that these are examples of even and odd functions.

Remember:

  • An even function is symmetrical about the y axis. For them f(x)f(x) = f(x)f(-x).
  • An odd function is unchanged when it is rotated 180 degrees. And if you flip it along the y axis, only the signs change, and therefore f(x)=f(x)f(x) = -f(-x).

Which of the above four functions can have inverse functions?

Graphically I can see that only y=xy = x and y=x3y = x^3 should have inverse functions, since only they are reflected along the line of symmetry, x=yx = y.

Algebraically I remember that:

  • Only one-to-one functions have inverse functions
  • A one-to-one function has only a single possible xx for a specific yy. This can be tested with the horizontal line test.

y=xy = x (odd) passes the horizontal line test.

y=x2y = x^2 (even) doesn't pass the horizontal line test. The inverse function would be x=y2x = y^2, i.e., y=±xy = \pm \sqrt{x}, giving two xx values for a specific yy.

y=x3y = x^3 (odd) passes the horizontal line test.

y=xy = |x| (even) doesn't pass the horizontal line test.

The book raises an interesting point: y=x2y = x^2 can be made to be one-to-one if you restrict its domain (i.e. set of input values) to x0x \geq 0:

f(x)=y=x2f1(x)=y=x f(x) = y = x^2 \\ f^{-1}(x) = y = \sqrt{x}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 9 10 11 12 y x y = x2 y = x2 y = sqrt(x) y = sqrt(x) Line of symmetry Line of symmetry
set xrange [0:12]
set yrange [0:8]
set xtics 1
set ytics 1

f(x) = abs(x*x)
g(x) = sqrt(x)
s(x) = x

plot f(x) title "y = x^2", g(x) title "y = sqrt(x)", s(x) title "Line of symmetry"

These two functions don't look odd, though. TODO: can a function be one-to-one without being odd?

3.C.(a)

At t=0t = 0 there are 10001000 cells. The number of cells doubles every hour.
x=Thousands of cellsx = \text{Thousands of cells}.

f(t)=x=2t f(t) = x = 2^t

f(0)=1f(1)=2f(2)=4f(3)=8f(4)=16f(5)=32f(1)=12f(2)=122=14f(12)=2f(32)=23/2=21/221/221/2=222=(2)22=22 f(0) = 1 \\ f(1) = 2 \\ f(2) = 4 \\ f(3) = 8 \\ f(4) = 16 \\ f(5) = 32 \\ f(-1) = \frac{1}{2} \\ f(-2) = \frac{1}{2^2} = \frac{1}{4} \\ f(\frac{1}{2}) = \sqrt{2} \\ f(\frac{3}{2}) = 2^{3/2} = 2^{1/2}2^{1/2}2^{1/2} = \sqrt{2}\sqrt{2}\sqrt{2} = (\sqrt{2})^2\sqrt{2} = 2\sqrt{2}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 0 1 2 3 4 5 6 7 8 x t f(x) f(x)
set xrange [0:8]
set yrange [0:64]
set xtics 1
set ytics 4
set xlabel "t"
set ylabel "x"

f(x) = 2**x

plot f(x)

If I know xx (e.g. 1616), how do I get the tt?

16=2t16t=2161/t=2..? 16 = 2^t \qquad \sqrt[t]{16} = 2 \qquad 16^{1/t} = 2 \qquad \text{..?}

How do I bring down the tt and make it the subject? I'll try with a simpler example — is there a pp, that when multiplied with ama^m, will result in mm?

pam=mp=mam p a^m = m \qquad p = \frac{m}{a^m}

Doesn't help me, as tt remains as a power in the denominator. Instead I probably need a function for this.

p(am)=m p(a^m) = m

At this point I realize I can probably use an inverse function (the inverse of f(t)=2tf(t) = 2^t), since that involves swapping xx and tt. That's probably a logarithmic function.

I want time (tt) to be a function of number of cells (xx).

I want a graph like this, where the axis are swapped (compared to the earlier graph):

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 6 7 8 0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 t x f-1(x) = ? f-1(x) = ?
set xrange [0:64]
set yrange [0:8]
set xtics 4
set ytics 1
set xlabel "x"
set ylabel "t"

f(x) = -1

plot f(x) title "f^{-1}(x) = ?"

Log functions

Indeed, a log function undoes exponentiation. Remember: the inverse of a growth function is a log function.

f(t)=2tf1(t)=log2(t)f1(f(t))=t=logb(bt) f(t) = 2^t \\ f^{-1}(t) = \log_2(t) \\ f^{-1}(f(t)) = t = \log_b(b^t)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -4 -2 0 2 4 6 8 10 12 14 16 18 20 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24 t x f(t) f(t) f-1(t) f-1(t) Line of symmetry Line of symmetry
set xrange [-6:24]
set yrange [-4:20]
set xtics 2
set ytics 2
set xlabel "x"
set ylabel "t"

f(x) = 2.0**x
g(x) = log(x) / log(2)
h(x) = x

plot f(x) title "f(t)", g(x) title "f^{-1}(t)", h(x) title "Line of symmetry"

Remember these:

  • If x=atx = a^t, then logax=t\log_a x = t
  • If t=logaxt = \log_a x, then at=xa^t = x
  • logaa=1because a is implicitly a1\log_a a = 1 \qquad \text{because }a\text{ is implicitly }a^{1}
  • loga1=0because 1 is implicitly a0\log_a 1 = 0 \qquad \text{because }1\text{ is implicitly }a^{0}

When you see logbx\log_b x, ask yourself: what power do I need to raise bb to, so that I get xx? E.g. log28=3\log_2 8 = 3.

Also remember the buttons on calculators:

  • log\log and lg\lg usually mean log10\log_{10}, a.k.a. log to base 10
    • In some calculators log\log means logelog_e, so always make sure which base log\log uses
  • ln\ln and loge\log_e mean natural log

3.C.1

(1)

log24=log222=2log28=log223=3log21=log220=0log212=log221=1log214=log222=2 \log_2 4 = \log_2 2^2 = 2 \\ \log_2 8 = \log_2 2^3 = 3 \\ \log_2 1 = \log_2 2^0 = 0 \\ \log_2 \frac{1}{2} = \log_2 2^{-1} = -1 \\ \log_2 \frac{1}{4} = \log_2 2^{-2} = -2

(2)

log39=log332=2log381=log334=4log3127=log333=3log313=log33=1log31=log330=0log33=log33=1log319=log332=2log327=log333=3log33=log331/2=12 \log_3 9 = \log_3 3^2 = 2 \\ \log_3 81 = \log_3 3^4 = 4 \\ \log_3 \frac{1}{27} = \log_3 3^{-3} = -3 \\ \log_3 \frac{1}{3} = \log_3 3 = -1 \\ \log_3 1 = \log_3 3^0 = 0 \\ \log_3 3 = \log_3 3 = 1 \\ \log_3 \frac{1}{9} = \log_3 3^{-2} = -2 \\ \log_3 27 = \log_3 3^3 = 3 \\ \log_3 \sqrt{3} = \log_3 3^{1/2} = \frac{1}{2}

(3)

log10100=log10102=2log101000=log10103=3log1010=log1010=1log101=log10100=0log10110=log10101=1log100.01=log10102=2 \log_{10} 100 = \log_{10} 10^{2} = 2 \\ \log_{10} 1000 = \log_{10} 10^{3} = 3 \\ \log_{10} 10 = \log_{10} 10 = 1 \\ \log_{10} 1 = \log_{10} 10^0 = 0 \\ \log_{10} \frac{1}{10} = \log_{10} 10^{-1} = -1 \\ \log_{10} 0.01 = \log_{10} 10^{-2} = -2

Rules for logs

The rules for working with logarithms are related to the rules for powers.

Rule Logs Powers
Rule 1 loga(xy)=loga(x)+loga(y)log_a(xy) = log_a(x) + log_a(y) aman=am+na^m * a^n = a^{m+n}
Rule 2 loga(x/y)=loga(x)loga(y)log_a(x/y) = log_a(x) - log_a(y) am/an=amna^m / a^n = a^{m-n}
Rule 3 loga(xn)=nloga(x)log_a(x^n) = n * log_a(x) (am)n=amn(a^m)^n = a^{mn}

Remember these, as they are apparently very important when solving physical problems. They allow you to split expressions, or to combine multiple logs.

It's most important to remember rules 1 and 2. Rule 3 is basically rule 1, because: loga(x2)=loga(xx)=logax+logax=2logax\log_a(x^2) = \log_a(xx) = \log_a x + \log_a x = 2 \log_a x


The compound interest formula is a good example to play with. For example, compounding 100€ once per year at 5% for 10 years:

f(x)=100(1.05x)f(10)=100(1.0510)163 f(x) = 100(1.05^x) \\ f(10) = 100(1.05^{10}) \approx 163

How long would it take for 100€ to compound to 200€? Find the inverse function by swapping xx and yy, and solving for yy:

f1(x)=x=100(1.05y)1.05y=x100How to isolate y? f^{-1}(x) = x = 100(1.05^y) \\ 1.05^y = \frac{x}{100} \qquad \text{How to isolate }y\text{?}

Now I need to isolate the yy, so that it's the subject of the equation. I could do that with log1.05(1.05y)\log_{1.05}(1.05^y), but that's a bit silly, since I want to use base 10, not base 1.05.

I can use rule 3 above and say:

log10(1.05y)=log10(1.05)y \log_{10}(1.05^y) = \log_{10}(1.05) * y

That allows me to isolate yy.

Apparently it's also possible to apply the logarithm to both sides of an equation, or to pretty much do anything to both sides of an equation — like raising both sides to a power — as long as you're careful about domains/codomains/ranges/etc.. After all, it's an equation, with the same value on both sides.

Therefore:

1.05y=x100How to isolate y? Take log of both sides.log10(1.05y)=log10(x100)log10(1.05)y=log10(x100)Rule 3 1.05^y = \frac{x}{100} \qquad \text{How to isolate }y\text{? Take log of both sides.} \\ \log_{10}(1.05^y) = \log_{10}(\frac{x}{100}) \\ \log_{10}(1.05) * y = \log_{10}(\frac{x}{100}) \qquad \text{Rule 3}

f1(x)=y=log10(x/100)log10(1.05) f^{-1}(x) = y = \frac{\log_{10}(x / 100)}{\log_{10}(1.05)}

f1(200)=log10(200/100)log10(1.05)14.2 years f^{-1}(200) = \frac{\log_{10}(200 / 100)}{\log_{10}(1.05)} \approx 14.2 \text{ years}

f1(163)=log10(163/100)log10(1.05)10 years f^{-1}(163) = \frac{\log_{10}(163 / 100)}{\log_{10}(1.05)} \approx 10 \text{ years}


3.C.2

(1)

log33x=log33+log3x=1+log3xlog327x2=log327+log3x2=3+log3x2=3+log3x+log3x=3+2log3xlog3(x/y)=log3xlog3ylog3(x2/a2)=log3x2log3a2=2log3x2log3alog3(axn)=log3a+log3xn=log3a+nlog3xlog3(9ax)=2+xlog3alog3(2x+3y)=log3(2x+3y) \log_3 3x = \log_3 3 + \log_3 x = 1 + \log_3 x \\ \log_3 27x^2 = \log_3 27 + \log_3 x^2 = 3 + \log_3 x^2 = 3 + \log_3 x + \log_3 x = 3 + 2 \log_3 x \\ \log_3(x/y) = \log_3 x - \log_3 y \\ \log_3(x^2 / a^2) = \log_3 x^2 - \log_3 a^2 = 2 \log_3 x - 2 \log_3 a \\ \log_3(ax^n) = \log_3 a + \log_3 x^n = \log_3 a + n \log_3 x \\ \log_3(9a^x) = 2 + x \log_3 a \\ \log_3(2x + 3y) = \log_3(2x + 3y)

(2)

log10x+log10(x1)=log10(x(x1))=log10(x2x)2log10xlog10y=log10x2log10y=log10(x2/y)log10(x+1)log10(x1)=log10(x+1x1)3log10x+2log10y=log10(x3y2) \log_{10} x + \log_{10}(x - 1) = \log_{10}(x(x - 1)) = \log_{10}(x^2 - x) \\ 2 \log_{10} x - \log_{10} y = \log_{10} x^2 - \log_{10} y = \log_{10}(x^2 / y) \\ \log_{10}(x + 1) - \log_{10}(x - 1) = \log_{10}(\frac{x + 1}{x - 1}) \\ 3 \log_{10} x + 2 \log_{10} y = \log_{10}(x^3 y^2)

e and exp

A.k.a. Euler's number. This apparently comes up a lot in modeling physical processes.

e2.71828ex is sometimes written as exp(x)exp(1)=e e \approx 2.71828 \\ e^x \text{ is sometimes written as } \exp(x) \\ exp(1) = e

(Note: some calculators show "exp" for very large or very small numbers, e.g. 3.14 EXP 5. In that context exp doesn't refer to e, but rather to powers of 10. Don't confuse the two.)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -3 -2 -1 0 1 2 3 4 5 6 -3 -2 -1 0 1 2 3 4 5 6 y x ex ex loge(x) loge(x)
set xrange [-3:6]
set yrange [-3:6]
set xtics 1
set ytics 1

f(x) = exp(1)**x
g(x) = log(x)

plot f(x) title "e^x", g(x) title "log_e(x)"

Exponential decay

E.g. population decay or radioactive decay.

The graph of y=2xy = 2^{-x} could represent the radioactive decay of 1 tonne of a substance with a half-life of one hour.

f(x)=nx f(x) = n^{-x}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 -3 -2 -1 0 1 2 3 4 y x 2-x 2-x 2x 2x
set xrange [-3:4]
set yrange [-1:4]
set xtics 1
set ytics 1

f(x) = 2**(-x)
g(x) = 2**x

plot f(x) title "2^{-x}", g(x) title "2^x"

Inverse of exponent: root or logarithm?

Answer: both. One gives you the base, the other gives you the exponent.


Solve for aa. Take the b-th root of both sides:

ab=cabb=a=cb a^b = c \\ \sqrt[b]{a^b} = a = \sqrt[b]{c}

(Remember that \sqrt{} only gives you positive values when bb is even, so you would need to explicitly say ±\pm\sqrt{}. Therefore it's probably safer to usually say a=c1/ba = c^{1/b}.)


Solve for bb with loga\log_a. Take the log of both sides:

ab=cloga(ab)=b=logac a^b = c \\ \log_a(a^b) = b = \log_a c

Alternatively, solve for bb with log10\log_{10}. Take the log of both sides:

ab=clog10(ab)=log10cblog10a=log10cb=log10clog10a a^b = c \\ \log_{10}(a^b) = \log_{10} c \\ b \log_{10} a = \log_{10} c \\ b = \frac{\log_{10} c}{\log_{10} a}


Remember: don't confuse x2x^2 and 2x2^x. The former is a quadratic function, the latter is an exponential function.

Also, be aware of what you mean by inverse exactly — there's multiplicative inverse and inverse function, which are different things.

Converting a nonlinear curve into a line

It's often possible to turn a nonlinear relationship into a straight line on a graph. For example, converting y=axny = ax^n to y=mx+cy = mx + c:

y=cxmlog10(y)=log10(cxm)=log10(c)+log10(xm)=log10(c)+mlog10(x)log10(y)=mlog10(x)+log10(c)Y=MX+CY=log10yM=mX=log10xC=log10c y = cx^m \\ log_{10}(y) = \log_{10}(cx^m) = \log_{10}(c) + \log_{10}(x^m) = \log_{10}(c) + m \log_{10}(x) \\ log_{10}(y) = m \log_{10}(x) + \log_{10}(c) \\ Y = MX + C \\ Y = \log_{10} y \\ M = m \\ X = \log_{10} x \\ C = \log_{10} c

It's useful to be able to do this for different kinds of curves. You can also do this for a+bx2a + bx^2:

y=a+bx2X=x2f(X)=bX+a y = a + bx^2 \\ X = x^2 \\ f(X) = bX + a