3. Some Simple Functions - Graph Plotting
We'll use y and x for these examples.
A. Linear (straight line) Equations
This is one of the most important types of equation in science,
and we often try to reduce complicated equations to a linear one
to simplify them.
The general equation for a linear function is:
The value of c is a constant and is the intercept on the y axis, since when x = 0, y(x) = c.
The value of m is the slope or gradient of the line. A +ve value of m means the slope is increasing with increasing x, a -ve value means it's decreasing. A zero-value m indicates a horizontal line, an infinite value m indicates a vertical line.
Examples
a) y(x) = 3x + 5
x | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 5 | 10 |
y | -4 | -1 | 2 | 5 | 8 | 11 | 14 | 20 | 35 |
b) y(x) = 2x - 3 (negative intercept)
x | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 5 |
y | -9 | -7 | -5 | -3 | -1 | 1 | 3 | 7 |
c) y(x) = -4x + 5 (negative slope)
x | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 10 |
y | 17 | 13 | 9 | 5 | 1 | -3 | -7 | -11 | -15 | -35 |
d) y = 0x + 6 (zero gradient)
x | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
y | 6 | 6 | 6 | 6 | 6 | 6 | 6 |
e) y = 4x (zero intercept)
x | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
y | -12 | -8 | -4 | 0 | 4 | 8 | 12 |
f) p(n) = 3n - 1
n | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
p | -10 | -7 | -4 | -1 | 2 | 5 | 8 |
g) φ(λ) = + 1
λ | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 |
φ | -1 | -½ | 0 | ½ | 1 | 1½ | 2 | 2½ | 3 |
B. Quadratic Equations
These are functions of x2, and are
of the general form:
where a,b and c are constants
The general shape of a quadratic is a parabola. The values
of a and b determine the 'sharpness' of the parabola.
The sign of a determines the orientation (up or down) of the
parabola. The value of c is still the intercept on the
y axis.
Examples
Numerical Example
y(x) = 2x2 + 4x - 6
x | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
y | 10 | 0 | -6 | -8 | -6 | 0 | 10 | 24 |
Note that in quadratics, two values of x exist for
every value of y (except at the turning point, see later).
For a function like this, we often want to know the important
features of the curve: where does it cross the x axis?
and y axis? Where does the minimum (or maximum) occur?
What is the slope of the curve at any value of x? We'll
show how to deal with these questions later on.
C. Higher Polynomials
Functions with x3, x4,
x5, etc., also exist, and are
generally more complicated.
Examples
i) cubic equations
y(x) = ax3 + bx2 + cx + d
ii) quartic equations
y(x) = ax4 + bx3 + cx2 + dx + e
D. Rational Functions
e.g. y(x) =
Note: when x = 1 the function becomes undefined (i.e.
y = infinity)
E. Trigonometric Functions (see later)
e.g. y(x) = sin x
F. Exponential and Logarithmic Functions (see later)
e.g. y(x) = ex, k(T) = A exp{-E/RT) Arrhenius
equation
e.g. y(x) = ln x , y(x) = ln (1-x2).