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:


y(x) = mx + c

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 -101 23510
y-4-1 258 11142035



b) y(x) = 2x - 3 (negative intercept)
x-3-2 -101 235
y-9-7 -5-3-1 137





c) y(x) = -4x + 5 (negative slope)
x-3-2 -101 2345 10
y1713 951 -3-7-11 -15-35


d) y = 0x + 6 (zero gradient)

x-3-2 -101 23
y66 666 66




e) y = 4x (zero intercept)
x-3-2 -101 23
y-12-8 -404 812



f) p(n) = 3n - 1
n-3-2 -101 23
p-10-7 -4-12 58



g) φ(λ) = + 1
λ-4-3 -2-101 234
φ-10½1 23


B. Quadratic Equations

These are functions of x2, and are of the general form:


y(x) = ax2 + bx + c

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-10 123
y100 -6-8-6 01024


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).


Next lecture