Tools for Calculus (Functions) ... by Brandon Williams
Main Index...


First grab the "symbol.tff" font here because I use a few Greek letters.

It is kind of weird how some of these tutorials spawn off of each other. I had just sat down to write about kinematics and quickly saw that I should first write something about derivatives and just calculus in general. Once I had started that I saw that I should probably give an introduction to calculus and write about some of the tools used in it. That is what this is. My next two tutorials are going to be on functions and limits ( and continuity). I decided to separate them into two tutorials because I know a lot of my stuff gets really long and it can be a lot to take in at once. So, after I finish these next two tutorials I am going to write about differential calculus (just a scary word...nothing more) and only then will I feel comfortable writing about kinematics. Let's start...

Functions

Introduction
If you are interested in learning calculus then you are most likely comfortable with algebra and functions. A function takes an input and assigns an output to that particular input. The input is called the independent variable because it works independently from everything else. The input is also called the domain of the function. The output is called the dependent variable because it depends on the input, meaning its value is derived from the input where as the input is not derived from anything. The output is also called the range of the function.

Most of the times a function is best represented as an equation. Something like: y = x. In this case x is your independent variable and domain, and y is your dependent variable and range. If you were to input (x = 1) into the function it would output (y = 1). So the function will assign (y = 1) when (x = 1). This can be used to produce a series of ordered pairs: (1, 1) or (2, 2) or (3, 3). Graphically this would be a line.

Another example of a function would be: y = x2. Here if you let (x = 1) you will get (y = 1). But, when you have (x = 2) you will get (y = 4). A few ordered pairs of this function would be: (0, 0) or (1, 1) or (2, 4) or (3, 9). And if you have a graphing calculator handy you will see that the above equation is a parabola.

Another notation to learn.
Along with learning something new (functions) there is a new notation to go with it. Pretty much everyone is familiar with (y = 2x) type of notation. You plug-in a bunch of values of x and you get the corresponding y. However, we are going to start using this most of the time: f (x) = 2x ... read as "f of x equals two times x". The name of the function is f. Its independent variable is x. Those two identifiers (function name and independent variable) can be interchanged with anything really: g (t), h (x) or anything. Usually function names are letters from the middle of the alphabet. Variables are usually from the end of the alphabet and constants from the beginning.

Evaluating Functions.
This is the easiest part, but for some reason confuses people. If you were give a function f of x how would you evaluate this: f (2) ? Simply plug in two for every value of x in the function and solve. Yes, very easy.

An example: you are given this function: f (x) = 3x3 - 2x + 1 ... evaluate f (4). First plug in four for all x's in the function: f (4) = 3(4)3 - 2(4) + 1 ... and then solve: f (4) = 185 .

What's a function and what's not?
Now although all the examples above were functions there are many cases that the equation is not a function. Graphically you can tell with the vertical line test. What you do is graph an equation, get some kind of straight object like a pencil and place it vertically along your graph. If the pencil intersects your graph at only one point for any position along your entire graph (for all x's in other words) then it is a function. Else, it is not.

Formally, a function has one output for every input. This is quite obvious since the definition of a function was that it assigns a certain output for every input. What are some graphs that are not functions? Circles. For every x you have two y's reflected over its center. There are plenty of other curves which will do the same, but a circle is simple to see.

Another way of classifying graphs.

The above was one way of classifying graphs: curves that are functions and curves that are not. Here is another called the horizontal line test. This time use the same straight object but instead of placing it vertical along the x's of the graph you are going to place it horizontal along the y's of the graph. If the object intersects the graph at only one point for all y's then the graph is said to be a one-to-one. And even more specific, if the graph is a function and one-to-one then it is (oddly enough) a one-to-one function. Now can a curve be a function but not one-to-one? Yes, a parabola is a good example of this. Can a graph be one-to-one and not a function. Yes, an inverted parabola (x = y2) is a good example. Can a graph be neither or both. Yes and Yes. A circle is neither and a line (with a slope greater than zero) is both.

More classification.
Before we go on there is still one more way of classifying a function (only functions). Just like with numbers you can assign an "odd" or "even" tag to a function. It is determined by the following:

       f(-x) = f(x)  <-- Even function
       f(-x) = -f(x) <-- Odd function

In English, if you were to input a negative value of x into the function f and you got the same output as if you were to input a positive value of x it would be an even function. If you input a negative x and the function outputs the opposite of a positive x then it is an odd function.

The reason this information is relevant is because an even function is symmetrical with the y-axis where as an odd function is symmetrical with the origin. An example of an even function would be (y = x2). An example of an odd function would be (y = x).

Most common types of functions.

The two most common types of functions that everyone needs to be aware of are polynomial functions and rational functions. A polynomial function is in this form:

      f (x) = a0xn + a1xn-1 + a2xn-2 + ... + an-1x + an

        -- or even more mathematical:
n
 
S
a i x i
i=0
 

That big "E" looking symbol is the Greek letter sigma and used to represent a summation or a sum of values. I won't get into the use of this right now and in fact this will hardly come up in differential calculus. If I ever decide to write something on integrals and techniques of integration the above symbol is used a lot.

Anyway, back to functions. Those values a0, a1, a2, and so on are called coefficients and are just constants. In the equation (y = 2x) two is a coefficient, which in this case represents the slope of the line. Also n is a constant which can be any positive integer. In this case since n represents an exponent and it represents the highest exponent value in the function it is called the degree of the function. You are most likely familiar with names of certain degrees. A degree of one would be a linear function (y = ax + b), a degree of two would be a quadratic (y = ax2 + bx + c), degree three cubic (y = ax3 + bx2 + cx + d), and so on.

A rational function is like dividing one polynomial function by another. Generally expressed like this:

              g(x)
      f (x) = ----
              h(x)

Note that since you can not divide anything by zero you must exclude the value of x such that would make h (x) zero. There are two ways a graph will act when approach that value of x which makes the polynomial zero. Either the range will blow up quickly and go to infinity (or negative-infinity) or it will merely "skip" that value of x. The vertical line which goes through the point x when x makes h (x) zero is called an asymptote. It's a line which the function will approach but never equal. The point at which you have a division of zero is called "undefined".

A different kind of function.

There is another kind of function which will come up a lot in calculus problems. The functions we have dealt with so far took an input of x and assigned an output to it. What if we had a function that took an input of another function. These functions are called composite functions. If you had one function, f, and you wanted it to take an input of another function, g, you would write it like this: f (g(x)) or like this: (f º g) (x). Composite functions can be hard to understand at first, but it is as easy as just plugging in numbers (functions in this case). Here is an example:

      f(x) = x2 - x + 2
      g(x) = 3x - 4

         -- all you need to do is plug in g(x) for every value of x
            in function f

      (f º g)(x) = (3x - 4)2 - (3x - 4) + 2

         -- f.o.i.l. out the first term

      (f º g)(x) = (9x2 - 12x + 16) - (3x - 4) + 2

         -- combine like terms and simplify (final answer)

      (f º g)(x) = 9x2 - 15x + 22

Evaluating composite functions is a little bit tricky, but still easy. There are actually two ways to do this so, I'll show you both and you can choose which one you like best. First let's start with a problem:

      f(x) = x2 - 2x + 4
      g(x) = x + 2


         -- evaluate the following

      (f º g)(5)

         -- One way of doing it: first find out what the composite
            function is:

      (f º g)(x) = (x + 2)2 - 2(x + 2) + 4

         -- simplify

      (f º g)(x) = x2 + 2x + 4

         -- now plug in five for all the x's in the above function

      (f º g)(5) = (5)2 + 2(5) + 4
                 = 39

         -- Another way of doing it: first evaluate g(5):

      g(5) = 7

         -- plug the above into f(x) for all values of x:

      f(7) = 72 - 2(7) + 4
           = 39

We came up with the same answer, but used two different ways. Which ever one you like best use. But, sometimes it will be better to use one over the other so make sure you are comfortable with both. Later when we get to the actual calculus work I will be using both ways interchangeably.

Another 'different kind' of function.
Yet another kind of function is called a pricewise-defined function. So far we have had standard functions (the first one I went over), composite functions and now pricewise-defined functions. Think of it as a combination of two or more functions used for certain parts of the domain. Here is an example:

f (x) = ì 2x2 + 4x - 5 for x < 0
í
î -3x - 2 for x ³ 0

This function graphs a quadratic for all values of x less than zero and a line for all values greater than or equal to zero. You can have any amount of functions, but I just used two.

Interval Notation.

This is used constantly in calculus. This is probably obvious, but an interval is merely a set of numbers between two other numbers (endpoints).

You have an open interval which means that you are defining all the numbers between two numbers, but you are not including the two endpoints. An open interval is written like this: (a, b) ... this can be translated as for all values of x so that this remains true: a < x < b . So x is between a and b but never equal to.

You also have a closed interval which means that you are defining all the numbers between two number including the two endpoints. A closed interval is written like this: [a, b] ... and can be translated as for all values of x so that this remains true: a £ x £ b . So x is between a and b including a and b.

You can also have a combination of the two types of intervals. Take for instance: (a, b]. You are defining all numbers between a and b not including a and including b: a < x £ b . And you can create any type of combination you want.

Something that most everybody gets wrong is when trying to define all numbers less than a certain number or all numbers greater than a certain number. An example of this would be: (, a). This defines all numbers less than a but not equal to a. Note that I used an open interval for negative infinity because you can never get to negative infinity.

Pass go and collect $200?
Now it is time to decide what you want to do. You can either stop here and have a really good introduction to what you are going to need for calculus, or continue and go a little bit more in depth. Of course I suggest going more in depth, but the above should be enough for anything I write about calculus or kinematics, but you never know what else may come up. In the next part I am only going to be introducing power functions to add onto your list (polynomial and rational functions are on the list now)...that's all. It will be good experience for when we get to differentiation. If you do not read this next part skip down to the end to my conclusion.

Collect $200...
No money here but you definitely made the right decision if you chose to continue. This part will be pretty short so you do not need to worry about that. In the last part I introduced polynomial functions and rational functions. Now we are going to add power functions to the list. But first...

About inverses and functions.
Every function has an inverse. It is as easy as swapping your independent variable with your dependent variable. If given (y = 2x+3) its inverse would equal (y = x/2 - 3/2). All I did was swap y with x and then solve for y. However, not all inverses of functions are functions. Since we are only interested in functions we need to be able to tell if the inverse of a function is a function. This is what the horizontal line test was for. If a function passes the horizontal line test then its inverse is a function. Very easy. Also it should be noted that the inverse of any graph is always reflected of the line (y = x).

The power function.
Power functions are most commonly used in "money" problems. Example: you put $500 in the bank and it has an interest rate of 2 percent per annum. How much money will you have in three years. Problems like that. The power function is given with the following general form: f(x) = Crt ... where C can be thought of as a "starting" value, r as the growth rate, and t as the amount of time past. So just in case you are curious the answer to the above problem would be $530.60.

Also this is a good time to throw in some properties of exponents because we will be using them a lot later on. And they are as follow:

      1.) ax * ay = ax+y

           ax
      2.) ---- = ax-y
           ay

                 1
      3.) a-x = ----
                 ax

                 m ____
      4.) am/n = \/ an

      5.) (am)n = amn

6.) a1 = a 7.) a0 = 1

Now some very important things to note about the function I gave before the exponent properties. When I said that r represents the growth rate there are actually two different types of growth rates: growth and decay. When r is on the open interval (0, 1) then the function represents "decay". When r is on the interval (1, ¥) the function represents "growth". Also note that we are not concerned with negative values of r because the graph of that function jumps around and is not continuous (a very important word in calculus). I do not know if I mentioned this already, but calculus is interested in functions that are "smooth" and do not jump all around. For instance if you had the function: f(x) = -1x ... this function jumps from a negative to a positive for every integer value of x and has no defined values of f(x) between integer values of x ... actually now that I think about it, it may not even be a function.

Anyway, some more very important things to note about the above. There are no undefined values in the domain. When r is greater than one and C is one, the range is never negative. As the domain goes towards negative infinity the range will get ever so close to zero, but never equal to or less than. If you just think about it you will see why the range is never negative. When will a positive number raised to a power ever equal a negative number? Then as the domain goes towards positive infinity the range will blow up without bound and go towards infinity. Although it would be impossible to define "how fast" something goes to infinity since it does not matter dealing with such large values, but in any case, the steepness of the curve is determined by r. A high value will result in a steep curve.

When r is less that one and greater than zero and C is one the range is once again never negative. This time however you can think of things a flipped from the previous example. As the domain goes towards negative infinity the range increase without bound towards positive infinity. And as the domain goes towards infinity the range gets ever so close to zero but never equal to or less than.

Note that if C is equal to one the range will never be equal to zero and will never go less than it. You can think of the x-axis as the asymptote for the curve. However when you change the value of C your asymptote changes to as we will see...

The constant C has little effect on the curve. It is best just to think of it as the point the curve intercepts the y-axis. C will also change the point at which the range approaches but never crosses (the asymptote).

Now like I mentioned before, all functions have an inverse and so do power functions. The inverse of a power function is called a logarithm. Hopefully logarithms have already been introduced to you because this will be pretty brief.

If you were given the following equation (y = 2x) you could write the inverse with logarithms like this (log2y = x). Before we go any further let me make sure you are familiar with common terminology. If give the general function (y = ax) you would call a the base of the exponent and x is the exponent. I know that was simple but I had to make sure everyone is on the same level. Now let's change that general equation into its inverse: logay = x . So you can see that the "base" of a logarithm is the subscript right after the word "log" and the exponent is what you get after evaluating the logarithm. Some examples:

      log525 = 2  , because 52 = 25

      log327 = 3  , because 33 = 27

      log1010 = 1  , because 101 = 10

So, in general, think of logarithms as another way of writing exponents. In fact, logarithms are exponents. You know how to go from a logarithm to an exponent, but can you do the opposite? Here are some examples:

     y = ax  -->  logay = x


     y = 5x  -->  log5y = x
So we are comfortable with logarithms, hopefully. But, like I said before, most of this stuff is just for your own reference so do not worry if you do not fully get it.

There are two bases of logarithms which have been given special names: the common and natural logarithm. The common logarithm is with base ten. If you ever see a logarithm written like (log 2) it is assumed to be a base of ten. The natural logarithm is with a base of 2.7182818 (...etc.). It may seem kind of weird to have a number like that for the base, but later we will see what an interesting number it is (much more interesting than p). The base of the natural logarithm goes on forever so it has been given the symbol of the Greek letter epsilon e. However, pretty much every book, article, paper, or text book related to math just uses the English letter e, and so will we. The natural logarithm has also been given a special notation, "ln" instead of "log".

Since a logarithm is the inverse of a power function everything is flipped around. Where as before the range could never go below zero and the domain could be any real number, this time the domain never goes below zero and range can be any real number. Why's that? If you examine what a logarithm is you should see. The input of a logarithm is really what the "base" raised to the output should equal right? Well since there will never be a number such that a positive number raised to that power will result in a negative number you can never take the logarithm of a negative number. The graph of a logarithm is similar to that of a power function. Your asymptote for a logarithm (in the form: f(x) = logax) is at (x = 0). The domain is never less than zero nor is it ever equal to. Once again the base determines the type of slope you have. If the a is on the open interval (0, 1) the range will start in the positives and go down into the negatives. If the base is greater than one it will do just the opposite.

Now for the part I like the best: properties of logarithms:
      loga1 = 0  , because a0 = 1


      logaa = 1  , because a1 = a


      logaax = x


      alogax = x

      loga(x*y) = logax + logay

      loga(x/y) = logax - logay

      // base conversion -- you can change the base of any logarithm, a,
         to another base, b:

              logbX
      logaX = -----
              logba

Most of those properties are similar to those of exponents so I do not need to clarify them...except for the last one. Calculators can only computer two kinds of logarithms: natural and common. You can use the last property of logarithms to change the base of any arbitrary based logarithm to anything you want.

A pretty good introduction...
I'm not saying it is the best introduction, but it should be enough. If you understand about 80% of the above consider yourself lucky (luckier than I was). Everything else will come together as we carry on. This was also pretty short. Enjoy it while it lasts because you will not see anything this short for a long time. Next up are limits and continuity. That could get really long. After that an introduction to derivatives and techniques of differentiation. That will get really long. I could go on all day about derivatives and differentiation. But, after all of that it will all tie back into kinematics. Not sure what to do after that though. Possibly dynamics.

Anyway, I hope you enjoyed this as much as I did. (That was a joke. The truth is that the above is very boring. But, calculus is fun so as long as something good comes out it).

Good luck.

- Brandon Williams