Calculus/Print version
This is the print version of Calculus You won't see this message or any elements not part of the book's content when you print or preview this page. 
Table of Contents
Precalculus
Limits
2.5 Formal Definition of the Limit
2.6 Proofs of Some Basic Limit Rules
Differentiation
Basics of Differentiation
3.2 Product and Quotient Rules
3.3 Derivatives of Trigonometric Functions
3.5 Higher Order Derivatives: an introduction to second order derivatives
3.7 Derivatives of Exponential and Logarithm Functions
Applications of Derivatives
3.11 Extrema and Points of Inflection
Integration
Basics of Integration
4.2 Fundamental Theorem of Calculus
Integration Techniques
4.6 Derivative Rules and the Substitution Rule
4.8 Trigonometric Substitutions
4.10 Rational Functions by Partial Fraction Decomposition
4.11 Tangent Half Angle Substitution
Applications of Integration
4.18 Volume of solids of revolution
Parametric and Polar Equations
Parametric Equations
 Introduction to Parametric Equations
 Differentiation and Parametric Equations
 Integration and Parametric Equations
 Exercises
Polar Equations
Sequences and Series
Sequences
Series
 Definition of a Series
 Series
 Limit Test for Convergence
 Comparison Test for Convergence
 Integral Test for Convergence
Series and calculus
Exercises
Multivariable and Differential Calculus
 Vectors
 Lines and Planes in Space
 Multivariable Calculus
 Derivatives of multivariate functions
 The chain rule and Clairaut's theorem
 Inverse function theorem, implicit function theorem
 Vector calculus
 Vector calculus identities
 Inverting vector calculus operators
 Helmholtz Decomposition Theorem
 Discrete analog to Vector calculus
 Exercises
Extensions
Advanced Integration Techniques
Further Analysis
Formal Theory of Calculus
Appendix
 Choosing delta
Solutions
 Precalculus/Solutions
 Infinity is not a number/Solutions
 Limits/Solutions
 Differentiation/Differentiation Defined/Solutions
 Chain Rule/Solutions
 Some Important Theorems/Solutions
 Differentiation/Basics of Differentiation/Solutions
 L'Hôpital's rule/Solutions
 Related Rates/Solutions
 Differentiation/Applications of Derivatives/Solutions
 Integration/Solutions
References
Acknowledgements and Further Reading
Introduction
What is calculus?
Calculus is the broad area of mathematics dealing with such topics as instantaneous rates of change, areas under curves, and sequences and series. Underlying all of these topics is the concept of a limit, which consists of analyzing the behavior of a function at points ever closer to a particular point, but without ever actually reaching that point. As a typical application of the methods of calculus, consider a moving car. It is possible to create a function describing the displacement of the car (where it is located in relation to a reference point) at any point in time as well as a function describing the velocity (speed and direction of movement) of the car at any point in time. If the car were traveling at a constant velocity, then algebra would be sufficient to determine the position of the car at any time; if the velocity is unknown but still constant, the position of the car could be used (along with the time) to find the velocity.
However, the velocity of a car cannot jump from zero to 35 miles per hour at the beginning of a trip, stay constant throughout, and then jump back to zero at the end. As the accelerator is pressed down, the velocity rises gradually, and usually not at a constant rate (i.e., the driver may push on the gas pedal harder at the beginning, in order to speed up). Describing such motion and finding velocities and distances at particular times cannot be done using methods taught in precalculus, whereas it is not only possible but straightforward with calculus.
Calculus has two basic applications: differential calculus and integral calculus. The simplest introduction to differential calculus involves an explicit series of numbers. Given the series (42, 43, 3, 18, 34), the differential of this series would be (1, 40, 15, 16). The new series is derived from the difference of successive numbers which gives rise to its name "differential". Rarely, if ever, are differentials used on an explicit series of numbers as done here. Instead, they are derived from a continuous function in a manner which is described later.
Integral calculus, like differential calculus, can also be introduced via series of numbers. Notice that in the previous example, the original series can almost be derived solely from its differential. Instead of taking the difference, however, integration involves taking the sum. Given the first number of the original series, 42 in this case, the rest of the original series can be derived by adding each successive number in its differential (42+1, 4340, 3+15, 18+16). Note that knowledge of the first number in the original series is crucial in deriving the integral. As with differentials, integration is performed on continuous functions rather than explicit series of numbers, but the concept is still the same. Integral calculus allows us to calculate the area under a curve of almost any shape; in the car example, this enables you to find the displacement of the car based on the velocity curve. This is because the area under the curve is the total distance moved, as we will soon see.
Why learn calculus?
Calculus is essential for many areas of science and engineering. Both make heavy use of mathematical functions to describe and predict physical phenomena that are subject to continuous change, and this requires the use of calculus. Take our car example: if you want to design cars, you need to know how to calculate forces, velocities, accelerations, and positions. All require calculus. Calculus is also necessary to study the motion of gases and particles, the interaction of forces, and the transfer of energy. It is also useful in business whenever rates are involved. For example, equations involving interest or supply and demand curves are grounded in the language of calculus.
Calculus also provides important tools in understanding functions and has led to the development of new areas of mathematics including real and complex analysis, topology, and noneuclidean geometry.
Notwithstanding calculus' functional utility (pun intended), many nonscientists and nonengineers have chosen to study calculus just for the challenge of doing so. A smaller number of persons undertake such a challenge and then discover that calculus is beautiful in and of itself.
What is involved in learning calculus?
Learning calculus, like much of mathematics, involves two parts:
 Understanding the concepts: You must be able to explain what it means when you take a derivative rather than merely apply the formulas for finding a derivative. Otherwise, you will have no idea whether or not your solution is correct. Drawing diagrams, for example, can help clarify abstract concepts.
 Symbolic manipulation: Like other branches of mathematics, calculus is written in symbols that represent concepts. You will learn what these symbols mean and how to use them. A good working knowledge of trigonometry and algebra is a must, especially in integral calculus. Sometimes you will need to manipulate expressions into a usable form before it is possible to perform operations in calculus.
What you should know before using this text
There are some basic skills that you need before you can use this text. Continuing with our example of a moving car:
 You will need to describe the motion of the car in symbols. This involves understanding functions.
 You need to manipulate these functions. This involves algebra.
 You need to translate symbols into graphs and vice versa. This involves understanding the graphing of functions.
 It also helps (although it isn't necessarily essential) if you understand the functions used in trigonometry since these functions appear frequently in science.
Scope
The first four chapters of this textbook cover the topics taught in a typical high school or first year college course. The first chapter, Precalculus, reviews those aspects of functions most essential to the mastery of calculus. The second, Limits, introduces the concept of the limit process. It also discusses some applications of limits and proposes using limits to examine slope and area of functions. The next two chapters, Differentiation and Integration, apply limits to calculate derivatives and integrals. The Fundamental Theorem of Calculus is used, as are the essential formulas for computation of derivatives and integrals without resorting to the limit process. The third and fourth chapters include articles that apply the concepts previously learned to calculating volumes, and as other important formulas.
The remainder of the central calculus chapters cover topics taught in higherlevel calculus topics: parametric and polar equations, sequences and series, multivariable calculus, and differential equations.
The final chapters cover the same material, using formal notation. They introduce the material at a much faster pace, and cover many more theorems than the other two sections. They assume knowledge of some set theory and set notation.
Precalculus
<h1> 1.1 Algebra</h1>
This section is intended to review algebraic manipulation. It is important to understand algebra in order to do calculus. If you have a good knowledge of algebra, you should probably just skim this section to be sure you are familiar with the ideas.
Rules of arithmetic and algebra
The following laws are true for all whether these are numbers, variables, functions, or more complex expressions involving numbers, variable and/or functions.
Addition
 Commutative Law: .
 Associative Law: .
 Additive Identity: .
 Additive Inverse: .
Subtraction
 Definition: .
Multiplication
 Commutative law: .
 Associative law: .
 Multiplicative identity: .
 Multiplicative inverse: , whenever
 Distributive law: .
Division
 Definition: , whenever .
Let's look at an example to see how these rules are used in practice.
(from the definition of division)  
(from the associative law of multiplication)  
(from multiplicative inverse)  
(from multiplicative identity) 
Of course, the above is much longer than simply cancelling out in both the numerator and denominator. But, when you are cancelling, you are really just doing the above steps, so it is important to know what the rules are so as to know when you are allowed to cancel. Occasionally people do the following, for instance, which is incorrect:
 .
The correct simplification is
 ,
where the number cancels out in both the numerator and the denominator.
Interval notation
There are a few different ways that one can express with symbols a specific interval (all the numbers between two numbers). One way is with inequalities. If we wanted to denote the set of all numbers between, say, 2 and 4, we could write "all satisfying ." This excludes the endpoints 2 and 4 because we use instead of . If we wanted to include the endpoints, we would write "all satisfying ." This includes the endpoints.
Another way to write these intervals would be with interval notation. If we wished to convey "all satisfying " we would write . This does not include the endpoints 2 and 4. If we wanted to include the endpoints we would write . If we wanted to include 2 and not 4 we would write ; if we wanted to exclude 2 and include 4, we would write .
Thus, we have the following table:
Endpoint conditions  Inequality notation  Interval notation 

Including both 2 and 4  all satisfying 

Not including 2 nor 4  all satisfying 

Including 2 not 4  all satisfying 

Including 4 not 2  all satisfying 

In general, we have the following table:
Meaning  Interval Notation  Set Notation 

All values greater than or equal to and less than or equal to  
All values greater than and less than  
All values greater than or equal to and less than  
All values greater than and less than or equal to  
All values greater than or equal to  
All values greater than  
All values less than or equal to  
All values less than  
All values 
Note that and must always have an exclusive parenthesis rather than an inclusive bracket. This is because is not a number, and therefore cannot be in our set. is really just a symbol that makes things easier to write, like the intervals above.
The interval is called an open interval, and the interval is called a closed interval.
Intervals are sets and we can use set notation to show relations between values and intervals. If we want to say that a certain value is contained in an interval, we can use the symbol to denote this. For example, . Likewise, the symbol denotes that a certain element is not in an interval. For example .
Exponents and radicals
There are a few rules and properties involving exponents and radicals that you'd do well to remember. As a definition we have that if is a positive integer then denotes factors of . That is,
If then we say that .
If is a negative integer then we say that .
If we have an exponent that is a fraction then we say that . In the expression , is called the index of the radical, the symbol is called the radical sign, and is called the radicand.
In addition to the previous definitions, the following rules apply:
Rule  Example 

Simplifying expressions involving radicals
We will use the following conventions for simplifying expressions involving radicals:
 Given the expression , write this as
 No fractions under the radical sign
 No radicals in the denominator
 The radicand has no exponentiated factors with exponent greater than or equal to the index of the radical
Example: Simplify the expression
Using convention 1, we rewrite the given expression as
The expression now violates convention 2. To get rid of the fraction in the radical, apply the rule and simplify the result:
The resulting expression violates convention 3. To get rid of the radical in the denominator, multiply by :
Notice that . Since the index of the radical is 2, our expression violates convention 4. We can reduce the exponent of the expression under the radical as follows:

Exercise
Logarithms
Consider the equation
(5)
is called the base and is called the exponent. Suppose we would like to solve for . We would like to apply an operation to both sides of the equation that will get rid of the base on the righthand side of the equation. The operation we want is called the logarithm, or log for short, and it is defined as follows:
is the number such that
The result of applying the operation to both sides of the equation is
(6)
Logarithms are taken with respect to some base. What equation 6 is saying is that is the exponent of that will give you .
Example
Example: Calculate
is the number such that . Well , so 
Common bases for logarithms
When the base is not specified, is taken to mean the base 10 logarithm. Later on in our study of calculus we will commonly work with logarithms with base . In fact, the base logarithm comes up so often that it has its own name and symbol. It is called the natural logarithm, and its symbol is . In computer science the base 2 logarithm often comes up.
Properties of logarithms
Logarithms have the property that . To see why this is true, suppose that , , and . These assumptions imply that , , and . Then by substitution, . By the property of exponents, we know that , so . The equation will only hold if the exponents on each side are equal, so . Applying our assumptions, we have what we wanted to show, namely, .
Historically, the development of logarithms was motivated by the usefulness of this fact for simplifying hand calculations by replacing tedious multiplication by table lookups and addition.
Another useful property of logarithms is that . To see why, consider the expression . Let us represent the value of this expression with . Then we have . If we make each side of the equation the exponent of , then after simplification we have . Now raise each side of the equation to the power and simplify to get . Now if you take the base log of both sides, you get . Solving for shows that , which is what we wanted to show.
Converting between bases
Most scientific calculators have the and functions built in. But what if you want to compute a logarithm for a different base? For example, suppose you want to compute . To answer this specific question, let's first come up with a general formula and then apply it to our specific problem. Consider how one might compute , where and are given known numbers, when we can only compute logarithms in some base . Let the value of be . Then the definition of logarithm implies that . If we take the base log of each side, we get . Solving for , we find that . So for our example, if we use base 10, we get .
Factoring and roots
Given the expression , one may ask "what are the values of that make this expression 0?" If we factor we obtain
.
If , then one of the factors on the right becomes zero. Therefore, the whole must be zero. So, by factoring we have discovered the values of that render the expression zero. These values are termed "roots." In general, given a quadratic polynomial that factors as
then we have that and are roots of the original polynomial.
A special case to be on the look out for is the difference of two squares, . In this case, we are always able to factor as
.
For example, consider . On initial inspection we would see that both and are squares ( and ) . Applying the previous rule we have
.
The following is a general result of great utility.
The quadratic formula
Given any quadratic equation , all solutions of the equation are given by the quadratic formula:
Example: Find all the roots of
Finding the roots is equivalent to solving the equation . Applying the quadratic formula with , we have:

The quadratic formula can also help with factoring, as the next example demonstrates.
Example: Factor the polynomial
We already know from the previous example that the polynomial has roots and . Our factorization will take the form
You can see that solves the equation. So the factorization is 
Note that if then the roots will not be real numbers.
Simplifying rational expressions
Consider the two polynomials
and
When we take the quotient of the two we obtain
The ratio of two polynomials is called a rational expression. Many times we would like to simplify such a beast. For example, say we are given . We may simplify this in the following way:
This is nice because we have obtained something we understand quite well, , from something we didn't.
Formulas of multiplication of polynomials
Here are some formulas that can be quite useful for solving polynomial problems:
Polynomial Long Division
Suppose we would like to divide one polynomial by another. The procedure is similar to long division of numbers and is illustrated in the following example:
Example
Divide (the dividend or numerator) by (the divisor or denominator)
Similar to long division of numbers, we set up our problem as follows: First we have to answer the question, how many times does go into ? To find out, divide the leading term of the dividend by leading term of the divisor. So it goes in times. We record this above the leading term of the dividend: , and we multiply by and write this below the dividend as follows: Now we perform the subtraction, bringing down any terms in the dividend that aren't matched in our subtrahend: Now we repeat, treating the bottom line as our new dividend: In this case we have no remainder. 
Application: Factoring Polynomials
We can use polynomial long division to factor a polynomial if we know one of the factors in advance. For example, suppose we have a polynomial and we know that is a root of . If we perform polynomial long division using P(x) as the dividend and as the divisor, we will obtain a polynomial such that , where the degree of is one less than the degree of .
Exercise
Application: Breaking up a rational function
Similar to the way one can convert an improper fraction into an integer plus a proper fraction, one can convert a rational function whose numerator has degree and whose denominator has degree with into a polynomial plus a rational function whose numerator has degree and denominator has degree with .
Suppose that divided by has quotient and remainder . That is
Dividing both sides by gives
will have degree less than .
Example
Write as a polynomial plus a rational function with numerator having degree less than the denominator.
so 
<h1> 1.3 Functions</h1>
What functions are and how are they described
Note: This is an attempt at a rewrite of "Classical understanding of functions". If others approve, consider deleting that section.
Whenever one quantity uniquely determines the value of another quantity, we have a function.
{  comments 
ie X uniquely determines Y but Y is not uniquely determined by X
Let set X consists of x's and set Y consists of y's
two x's can have same y ie one y can be determined by two x's
but one x cannot have two y's
 end of comments 
}
You can think of a function as a kind of machine. You feed the machine raw materials, and the machine changes the raw materials into a finished product.
A function in everyday life
Think about dropping a ball from a bridge. At each moment in time, the ball is a height above the ground. The height of the ball is a function of time. It was the job of physicists to come up with a formula for this function. This type of function is called realvalued since the "finished product" is a number (or, more specifically, a real number). 
A function in everyday life (Preview of Multivariable Calculus)
Think about a wind storm. At different places, the wind can be blowing in different directions with different intensities. The direction and intensity of the wind can be thought of as a function of position. This is a function of two real variables (a location is described by two values  an and a ) which results in a vector (which is something that can be used to hold a direction and an intensity). These functions are studied in multivariable calculus (which is usually studied after a one year college level calculus course). This a vectorvalued function of two real variables. 
We will be looking at realvalued functions until studying multivariable calculus. Think of a realvalued function as an inputoutput machine; you give the function an input, and it gives you an output which is a number (more specifically, a real number). For example, the squaring function takes the input 4 and gives the output value 16. The same squaring function takes the input 1 and gives the output value 1.
There are many ways which people describe functions. In the examples above, a verbal descriptions is given (the height of the ball above the earth as a function of time). Here is a list of ways to describe functions. The top three listed approaches to describing functions are the most popular and you could skip the rest if you like.
 A function is given a name (such as ) and a formula for the function is also given. For example, describes a function. We refer to the input as the argument of the function (or the independent variable), and to the output as the value of the function at the given argument.
 A function is described using an equation and two variables. One variable is for the input of the function and one is for the output of the function. The variable for the input is called the independent variable. The variable for the output is called the dependent variable. For example, describes a function. The dependent variable appears by itself on the left hand side of equal sign.
 A verbal description of the function.
When a function is given a name (like in number 1 above), the name of the function is usually a single letter of the alphabet (such as or ). Some functions whose names are multiple letters (like the sine function .
Plugging a value into a function
If we write , then we know that
How would we know the value of the function at 3? We would have the following three thoughts: and we would write . The value of at 3 is 11. Note that means the value of the dependent variable when takes on the value of 3. So we see that the number 11 is the output of the function when we give the number 3 as the input. People often summarize the work above by writing "the value of at three is eleven", or simply " of three equals eleven". 
Classical understanding of functions
To provide the classical understanding of functions, think of a function as a kind of machine. You feed the machine raw materials, and the machine changes the raw materials into a finished product based on a specific set of instructions. The kinds of functions we consider here, for the most part, take in a real number, change it in a formulaic way, and give out a real number (possibly the same as the one it took in). Think of this as an inputoutput machine; you give the function an input, and it gives you an output. For example, the squaring function takes the input 4 and gives the output value 16. The same squaring function takes the input and gives the output value 1.
A function is usually written as , , or something similar  although it doesn't have to be. A function is always defined as "of a variable" which tells us what to replace in the formula for the function.
For example, tells us:
 The function is a function of .
 To evaluate the function at a certain number, replace the with that number.
 Replacing with that number in the right side of the function will produce the function's output for that certain input.
 In English, the definition of is interpreted, "Given a number, will return two more than the triple of that number."
Thus, if we want to know the value (or output) of the function at 3:
 We evaluate the function at .
 The value of at 3 is 11.
See? It's easy!
Note that means the value of the dependent variable when takes on the value of 3. So we see that the number 11 is the output of the function when we give the number 3 as the input. We refer to the input as the argument of the function (or the independent variable), and to the output as the value of the function at the given argument (or the dependent variable). A good way to think of it is the dependent variable 'depends' on the value of the independent variable . This is read as "the value of at three is eleven", or simply " of three equals eleven".
Notation
Functions are used so much that there is a special notation for them. The notation is somewhat ambiguous, so familiarity with it is important in order to understand the intention of an equation or formula.
Though there are no strict rules for naming a function, it is standard practice to use the letters , , and to denote functions, and the variable to denote an independent variable. is used for both dependent and independent variables.
When discussing or working with a function , it's important to know not only the function, but also its independent variable . Thus, when referring to a function , you usually do not write , but instead . The function is now referred to as " of ". The name of the function is adjacent to the independent variable (in parentheses). This is useful for indicating the value of the function at a particular value of the independent variable. For instance, if
 ,
and if we want to use the value of for equal to , then we would substitute 2 for on both sides of the definition above and write
This notation is more informative than leaving off the independent variable and writing simply '' , but can be ambiguous since the parentheses can be misinterpreted as multiplication.
Modern understanding of functions
The formal definition of a function states that a function is actually a rule that associates elements of one set called the domain of the function, with the elements of another set called the range of the function. For each value we select from the domain of the function, there exists exactly one corresponding element in the range of the function. The definition of the function tells us which element in the range corresponds to the element we picked from the domain. Classically, the element picked from the domain is pictured as something that is fed into the function and the corresponding element in the range is pictured as the output. Since we "pick" the element in the domain whose corresponding element in the range we want to find, we have control over what element we pick and hence this element is also known as the "independent variable". The element mapped in the range is beyond our control and is "mapped to" by the function. This element is hence also known as the "dependent variable", for it depends on which independent variable we pick. Since the elementary idea of functions is better understood from the classical viewpoint, we shall use it hereafter. However, it is still important to remember the correct definition of functions at all times.
To make it simple, for the function , all of the possible values constitute the domain, and all of the values ( on the xy plane) constitute the range.
Remarks
The following arise as a direct consequence of the definition of functions:
 By definition, for each "input" a function returns only one "output", corresponding to that input. While the same output may correspond to more than one input, one input cannot correspond to more than one output. This is expressed graphically as the vertical line test: a line drawn parallel to the axis of the dependent variable (normally vertical) will intersect the graph of a function only once. However, a line drawn parallel to the axis of the independent variable (normally horizontal) may intersect the graph of a function as many times as it likes. Equivalently, this has an algebraic (or formulabased) interpretation. We can always say if , then , but if we only know that then we can't be sure that .
 Each function has a set of values, the function's domain, which it can accept as input. Perhaps this set is all positive real numbers; perhaps it is the set {pork, mutton, beef}. This set must be implicitly/explicitly defined in the definition of the function. You cannot feed the function an element that isn't in the domain, as the function is not defined for that input element.
 Each function has a set of values, the function's range, which it can output. This may be the set of real numbers. It may be the set of positive integers or even the set {0,1}. This set, too, must be implicitly/explicitly defined in the definition of the function.
The vertical line test
The vertical line test, mentioned in the preceding paragraph, is a systematic test to find out if an equation involving and can serve as a function (with the independent variable and the dependent variable). Simply graph the equation and draw a vertical line through each point of the axis. If any vertical line ever touches the graph at more than one point, then the equation is not a function; if the line always touches at most one point of the graph, then the equation is a function.
(There are a lot of useful curves, like circles, that aren't functions (see picture). Some people call these graphs with multiple intercepts, like our circle, "multivalued functions"; they would refer to our "functions" as "singlevalued functions".)
Important functions
Constant function 
It disregards the input and always outputs the constant , and is a polynomial of the zeroth degree where . Its graph is a horizontal line. 

Linear function 
Takes an input, multiplies by and adds . It is a polynomial of the first degree. Its graph is a line (slanted, except ). 

Identity function 
Takes an input and outputs it unchanged. A polynomial of the first degree, . Special case of a linear function. 

Quadratic function 
A polynomial of the second degree. Its graph is a parabola, unless . (Don't worry if you don't know what this is.) 

Polynomial function 
The number is called the degree. 

Signum function 
Example functions
Some more simple examples of functions have been listed below.



It is possible to replace the independent variable with any mathematical expression, not just a number. For instance, if the independent variable is itself a function of another variable, then it could be replaced with that function. This is called composition, and is discussed later.
Manipulating functions
Addition, Subtraction, Multiplication and Division of functions
For two realvalued functions, we can add the functions, multiply the functions, raised to a power, etc.
Example: Adding, subtracting, multiplying and dividing functions which do not have a name
If we add the functions and , we obtain . If we subtract from , we obtain . We can also write this as . If we multiply the function and the function , we obtain . We can also write this as . If we divide the function by the function , we obtain . 
If a math problem wants you to add two functions and , there are two ways that the problem will likely be worded:
 If you are told that , that , that and asked about , then you are being asked to add two functions. Your answer would be .
 If you are told that , that and you are asked about , then you are being asked to add two functions. The addition of and is called . Your answer would be .
Similar statements can be made for subtraction, multiplication and division.
Example: Adding, subtracting, multiplying and dividing functions which do have a name
Let and: . Let's add, subtract, multiply and divide.

Composition of functions
We begin with a fun (and not too complicated) application of composition of functions before we talk about what composition of functions is.
Example: Dropping a ball
If we drop a ball from a bridge which is 20 meters above the ground, then the height of our ball above the earth is a function of time. The physicists tell us that if we measure time in seconds and distance in meters, then the formula for height in terms of time is . Suppose we are tracking the ball with a camera and always want the ball to be in the center of our picture. Suppose we have The angle will depend upon the height of the ball above the ground and the height above the ground depends upon time. So the angle will depend upon time. This can be written as . We replace with what it is equal to. This is the essence of composition. 
Composition of functions is another way to combine functions which is different from addition, subtraction, multiplication or division.
The value of a function depends upon the value of another variable ; however, that variable could be equal to another function , so its value depends on the value of a third variable. If this is the case, then the first variable is a function of the third variable; this function () is called the composition of the other two functions ( and ).
Example: Composing two functions
Let and: . The composition of with is read as either "f composed with g" or "f of g of x." Let Then
Sometimes a math problem asks you compute when they want you to compute , Here, is the composition of and and we write . Note that composition is not commutative:

Composition of functions is very common, mainly because functions themselves are common. For instance, squaring and sine are both functions:
Thus, the expression is a composition of functions:
(Note that this is not the same as .) Since the function sine equals if ,
 .
Since the function square equals if ,
 .
Transformations
Transformations are a type of function manipulation that are very common. They consist of multiplying, dividing, adding or subtracting constants to either the input or the output. Multiplying by a constant is called dilation and adding a constant is called translation. Here are a few examples:
 Dilation
 Translation
 Dilation
 Translation
Translations and dilations can be either horizontal or vertical. Examples of both vertical and horizontal translations can be seen at right. The red graphs represent functions in their 'original' state, the solid blue graphs have been translated (shifted) horizontally, and the dashed graphs have been translated vertically.
Dilations are demonstrated in a similar fashion. The function
has had its input doubled. One way to think about this is that now any change in the input will be doubled. If I add one to , I add two to the input of , so it will now change twice as quickly. Thus, this is a horizontal dilation by because the distance to the axis has been halved. A vertical dilation, such as
is slightly more straightforward. In this case, you double the output of the function. The output represents the distance from the axis, so in effect, you have made the graph of the function 'taller'. Here are a few basic examples where is any positive constant:
Original graph  Rotation about origin  
Horizontal translation by units left  Horizontal translation by units right  
Horizontal dilation by a factor of  Vertical dilation by a factor of  
Vertical translation by units down  Vertical translation by units up  
Reflection about axis  Reflection about axis 
Domain and Range
Domain
The domain of a function is the set of all points over which it is defined. More simply, it represents the set of xvalues which the function can accept as input. For instance, if
then is only defined for values of between and , because the square root function is not defined (in real numbers) for negative values. Thus, the domain, in interval notation, is . In other words,
 .
Range
The range of a function is the set of all values which it attains (i.e. the yvalues). For instance, if:
then can only equal values in the interval from to . Thus, the range of is .
Onetoone Functions
A function is onetoone (or less commonly injective) if, for every value of , there is only one value of that corresponds to that value of . For instance, the function is not onetoone, because both and result in . However, the function is onetoone, because, for every possible value of , there is exactly one corresponding value of . Other examples of onetoone functions are , where . Note that if you have a onetoone function and translate or dilate it, it remains onetoone. (Of course you can't multiply or by a zero factor).
Horizontal Line Test
If you know what the graph of a function looks like, it is easy to determine whether or not the function is onetoone. If every horizontal line intersects the graph in at most one point, then the function is onetoone. This is known as the Horizontal Line Test.
Algebraic 11 Test
You can also show onetooneness algebraically by assuming that two inputs give the same output and then showing that the two inputs must have been equal. For example, Is a 1:1 function?
Therefore by the algebraic 1:1 test, the function is 1:1.
You can show that a function is not onetoone by finding two distinct inputs that give the same output. For example, is not onetoone because but .
Inverse functions
We call the inverse function of if, for all :
A function has an inverse function if and only if is onetoone. For example, the inverse of is . The function has no inverse.
Notation
The inverse function of is denoted as . Thus, is defined as the function that follows this rule
To determine when given a function , substitute for and substitute for . Then solve for , provided that it is also a function.
Example: Given , find .
Substitute for and substitute for . Then solve for :
To check your work, confirm that :
If isn't onetoone, then, as we said before, it doesn't have an inverse. Then this method will fail.
Example: Given , find .
Substitute for and substitute for . Then solve for :
Since there are two possibilities for , it's not a function. Thus doesn't have an inverse. Of course, we could also have found this out from the graph by applying the Horizontal Line Test. It's useful, though, to have lots of ways to solve a problem, since in a specific case some of them might be very difficult while others might be easy. For example, we might only know an algebraic expression for but not a graph.
External links
<h1> 1.4 Graphing linear functions</h1>
It is sometimes difficult to understand the behavior of a function given only its definition; a visual representation or graph can be very helpful. A graph is a set of points in the Cartesian plane, where each point indicates that . In other words, a graph uses the position of a point in one direction (the verticalaxis or axis) to indicate the value of for a position of the point in the other direction (the horizontalaxis or axis).
Functions may be graphed by finding the value of for various and plotting the points in a Cartesian plane. For the functions that you will deal with, the parts of the function between the points can generally be approximated by drawing a line or curve between the points. Extending the function beyond the set of points is also possible, but becomes increasingly inaccurate.
Example
Plotting points like this is laborious. Fortunately, many functions' graphs fall into general patterns. For a simple case, consider functions of the form
The graph of is a single line, passing through the point with slope 3. Thus, after plotting the point, a straightedge may be used to draw the graph. This type of function is called linear and there are a few different ways to present a function of this type.
Slopeintercept form
When we see a function presented as
we call this presentation the slopeintercept form. This is because, not surprisingly, this way of writing a linear function involves the slope, , and the intercept, .
Pointslope form
If someone walks up to you and gives you one point and a slope, you can draw one line and only one line that goes through that point and has that slope. Said differently, a point and a slope uniquely determine a line. So, if given a point and a slope , we present the graph as
We call this presentation the pointslope form. The pointslope and slopeintercept form are essentially the same. In the pointslope form we can use any point the graph passes through. Where as, in the slopeintercept form, we use the intercept, that is the point .
Calculating slope
If given two points, and , we may then compute the slope of the line that passes through these two points. Remember, the slope is determined as "rise over run." That is, the slope is the change in values divided by the change in values. In symbols,
So now the question is, "what's and ?" We have that and . Thus,
Twopoint form
Two points also uniquely determine a line. Given points and , we have the equation
This presentation is in the twopoint form. It is essentially the same as the pointslope form except we substitute the expression for .
<h1> 1.5 Precalculus Cumulative Exercises</h1>
Algebra
Convert to interval notation
State the following intervals using set notation
Which one of the following is a true statement?
Hint: the true statement is often referred to as the triangle inequality. Give examples where the other two are false.
Evaluate the following expressions
Simplify the following
Find the roots of the following polynomials
Factor the following expressions
Simplify the following
Functions
52. Let .
53. Let , .
 a. Give formulae for
55. Consider the following function
56. Consider the following function
57. Consider the following function
58. Consider the following function
Graphing
Limits
<h1> 2.1 An Introduction to Limits</h1>
Intuitive Look
The limit? Yeah! This is one of the greatest tools in the hands of any mathematician. We will give the limit an approach. Because mathematics came only due to approaches... remember!!
We designate limit in the form:
This is read as "The limit of of as approaches ". This is a must remember, a basic notation which is accepted by the world (you are in the world!)
We'll take up later the question of how we can determine whether a limit exists for at and, if so, what it is. For now, we'll look at it from an intuitive standpoint.
Let's say that the function that we're interested in is , and that we're interested in its limit as approaches . Using the above notation, we can write the limit that we're interested in as follows:
One way to try to evaluate what this limit is would be to choose values near 2, compute for each, and see what happens as they get closer to 2. This is implemented as follows:
1.7  1.8  1.9  1.95  1.99  1.999  
2.89  3.24  3.61  3.8025  3.9601  3.996001 
Here we chose numbers smaller than 2, and approached 2 from below. We can also choose numbers larger than 2, and approach 2 from above:
2.3  2.2  2.1  2.05  2.01  2.001  
5.29  4.84  4.41  4.2025  4.0401  4.004001 
We can see from the tables that as grows closer and closer to 2, seems to get closer and closer to 4, regardless of whether approaches 2 from above or from below. For this reason, we feel reasonably confident that the limit of as approaches 2 is 4, or, written in limit notation,
We could have also just substituted 2 into and evaluated: . However, this will not work with all limits. Because limits are far more! Way to go...
Now let's look at another example. Suppose we're interested in the behavior of the function as approaches 2. Here's the limit in limit notation:
Just as before, we can compute function values as approaches 2 from below and from above. Here's a table, approaching from below:
1.7  1.8  1.9  1.95  1.99  1.999  
3.333  5  10  20  100  1000 
And here from above:
2.3  2.2  2.1  2.05  2.01  2.001  
3.333  5  10  20  100  1000 
In this case, the function doesn't seem to be approaching a single value as approaches 2, but instead becomes an extremely large positive or negative number (depending on the direction of approach). Well, one says such a limit does not exist because no finite number is approached. This arises the concept of infinity: an undefined quantity and the limit is also called infinite limit or limit without a bound.
Note that we cannot just substitute 2 into and evaluate as we could with the first example, since we would be dividing by 0.
Both of these examples may seem trivial, but consider the following function:
This function is the same as
Note that these functions are really completely identical; not just "almost the same," but actually, in terms of the definition of a function, completely the same; they give exactly the same output for every input.
In elementary algebra, a typical approach is to simply say that we can cancel the term , and then we have the function . However, that would be inaccurate; the function that we have now is not really the same as the one we started with, because it is defined when , and our original function was specifically not defined when . This may seem like a minor point, but from making this kind of assumptions we can easily derive absurd results, such that (see Mathematical Fallacy § All numbers equal all other numbers in Wikipedia for a complete example). Even without calculus we can avoid this error by stating that:
In calculus, we can introduce a more intuitive and also correct way of looking at this type of function. What we want is to be able to say that, although the function isn't defined when , it works almost as if it was. It may not get there, but it gets really, really close. For instance, . The only question that we have is: what do we mean by "close"? Well. We are here for what
Informal Definition of a Limit
As the precise definition of a limit is a bit technical, it is easier to start with an informal definition; we'll explain the formal definition later.
We suppose that a function is defined for near (but we do not require that it be defined when ).
We call the limit of as approaches if becomes close to when is close (but not equal) to , and if there is no other value with the same property..
When this holds we write
or
Notice that the definition of a limit is not concerned with the value of when (which may exist or may not). All we care about are the values of when is close to , on either the left or the right (i.e. less or greater).
Limit Rules
Now that we have defined, informally, what a limit is, we will list some rules that are useful for working with and computing limits. You will be able to prove all these once we formally define the fundamental concept of the limit of a function.
First, the constant rule states that if (that is, is constant for all ) then the limit as approaches must be equal to . In other words
Constant Rule for Limits
 If and are constants then .
 Example:
Second, the identity rule states that if (that is, just gives back whatever number you put in) then the limit of as approaches is equal to . That is,
Identity Rule for Limits
 If is a constant then .
 Example:
The next few rules tell us how, given the values of some limits, to compute others.
Operational Identities for Limits
Suppose that and and that is constant. Then
Notice that in the last rule we need to require that is not equal to 0 (otherwise we would be dividing by zero which is an undefined operation).
These rules are known as identities; they are the scalar product, sum, difference, product, and quotient rules for limits. (A scalar is a constant, and, when you multiply a function by a constant, we say that you are performing scalar multiplication.)
Using these rules we can deduce another. Namely, using the rule for products many times we get that
 for a positive integer .
This is called the power rule.
Examples
 Example 1
Find the limit .
We need to simplify the problem, since we have no rules about this expression by itself. We know from the identity rule above that . By the power rule, . Lastly, by the scalar multiplication rule, we get .
 Example 2
Find the limit .
To do this informally, we split up the expression, once again, into its components. As above, .
Also