Calculus/Print version

From Wikibooks, open books for an open world
< Calculus
Jump to: navigation, search

Table of Contents

Precalculus

1.1 Algebra 25% developed

1.2 Functions 50% developed

1.3 Graphing linear functions 25% developed

1.4 Exercises

Limits

Limit-at-infinity-graph.png

2.1 An Introduction to Limits 75% developed

2.2 Finite Limits 50% developed

2.3 Infinite Limits 50% developed

2.4 Continuity 25% developed

2.5 Formal Definition of the Limit 25% developed

2.6 Proofs of Some Basic Limit Rules

2.7 Exercises

Differentiation

Basics of Differentiation 75% developed

Derivative1.png

3.1 Differentiation Defined

3.2 Product and Quotient Rules

3.3 Derivatives of Trigonometric Functions

3.4 Chain Rule

3.5 Higher Order Derivatives - An introduction to second order derivatives

3.6 Implicit Differentiation

3.7 Derivatives of Exponential and Logarithm Functions

3.8 Some Important Theorems

3.9 Exercises

Applications of Derivatives 50% developed

3.10 L'Hôpital's Rule 75% developed

3.11 Extrema and Points of Inflection

3.12 Newton's Method

3.13 Related Rates

3.14 Optimization

3.15 Euler's Method

3.16 Exercises


Integration

The definite integral of a function f(x) from x=0 to x=a is equal to the area under the curve from 0 to a.

Basics of Integration

4.1 Definite integral 25% developed

4.2 Fundamental Theorem of Calculus 25% developed

4.3 Indefinite integral 25% developed

4.4 Improper Integrals

Integration Techniques

From bottom to top:
  • an acceleration function a(t);
  • the integral of the acceleration is the velocity function v(t);
  • and the integral of the velocity is the distance function s(t).

4.5 Infinite Sums

4.6 Derivative Rules and the Substitution Rule

4.7 Integration by Parts

4.8 Trigonometric Substitutions

4.9 Trigonometric Integrals

4.10 Rational Functions by Partial Fraction Decomposition

4.11 Tangent Half Angle Substitution

4.12 Reduction Formula

4.13 Irrational Functions

4.14 Numerical Approximations

4.15 Exercises

Applications of Integration

4.16 Area

4.17 Volume

4.18 Volume of solids of revolution

4.19 Arc length

Parametric and Polar Equations

HuggingRoseStarconstructionJohnManuel.png

Parametric Equations

Polar Equations

Sequences and Series

Basics

Series and calculus

Multivariable and Differential Calculus

Triple Integral Example 2.svg

Extensions

Advanced Integration Techniques

Further Analysis

Formal Theory of Calculus

Appendix

  • Choosing delta

Solutions


References

Acknowledgements and Further Reading

Introduction

Calculus Contributing →
Print version

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 pre-calculus, 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, 43-40, 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. Let's understand this section very carefully. Suppose we have to add the numbers in series which is continuously "on" like 23,25,24,25,34,45,46,47, and so on...at this type integral calculation is very useful instead of the typical mathematical formulas.

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 continual 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 non-euclidean geometry.

Notwithstanding calculus' functional utility (pun intended), many non-scientists and non-engineers 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 formulae 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 so on as well as other important formulae.

The remainder of the central Calculus chapters cover topics taught in higher-level calculus topics: multivariable calculus, vectors, and series (Taylor, convergent, divergent).

Finally, the other 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.

Calculus Contributing →
Print version

Precalculus

<h1> 1.1 Algebra</h1>

← Precalculus Calculus Functions →
Print version

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 a, b, and c, whether a, b, and c are numbers, variables, functions, or more complex expressions involving numbers, variable and/or functions.

Addition

  • Commutative Law: a+b=b+a \,.
  • Associative Law: (a+b)+c=a+(b+c)\,.
  • Additive Identity: a+0=a\,.
  • Additive Inverse: a+(-a)=0\,.

Subtraction

  • Definition: a-b = a+(-b)\,.

Multiplication

  • Commutative law: a\times b=b\times a.
  • Associative law: (a\times b)\times c=a\times (b\times c)\,.
  • Multiplicative identity: a\times 1=a\,.
  • Multiplicative inverse: a\times \frac{1}{a}=1, whenever a \neq 0\,
  • Distributive law: a\times (b+c)=(a\times b)+(a\times c)\,.

Division

  • Definition: \frac{a}{b}=a\times \frac{1}{b}, whenever b \neq 0\,.

Let's look at an example to see how these rules are used in practice.

\frac{(x+2)(x+3)}{x+3} = \left[(x+2)\times (x+3)\right]\times \left( \frac{1}{x+3}\right) (from the definition of division)
= (x+2)\times \left[(x+3)\times \left(\frac{1}{x+3} \right) \right] (from the associative law of multiplication)
= ((x+2)\times (1)),\qquad x \neq -3 \, (from multiplicative inverse)
= x+2, \qquad x \neq -3. (from multiplicative identity)

Of course, the above is much longer than simply cancelling x+3 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:


\frac{2\times (x + 2)}{2}= \frac{2}{2} \times \frac{x+2}{2}=1 \times \frac{x+2}{2}= \frac{x+2}{2}.


The correct simplification is


\frac{2\times (x + 2)}{2}= \left( 2 \times \frac{1}{2} \right) \times (x+2)=1 \times (x+2)=x+2,


where the number 2 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 x satisfying 2<x<4." This excludes the endpoints 2 and 4 because we use < instead of  \leq . If we wanted to include the endpoints, we would write "all x satisfying 2 \leq x \leq 4 ." This includes the endpoints.

Another way to write these intervals would be with interval notation. If we wished to convey "all x satisfying 2<x<4" we would write (2,4). This does not include the endpoints 2 and 4. If we wanted to include the endpoints we would write [2,4]. If we wanted to include 2 and not 4 we would write [2,4); if we wanted to exclude 2 and include 4, we would write (2,4].

Thus, we have the following table:

Endpoint conditions Inequality notation Interval notation
Including both 2 and 4 all x satisfying  2 \leq x \leq 4
 [2,4] \,\!
Not including 2 nor 4 all x satisfying  2<x<4 \,
 (2,4) \,\!
Including 2 not 4 all x satisfying  2 \leq x < 4
 [2,4) \,\!
Including 4 not 2 all x satisfying  2 < x \leq 4
 (2,4] \,\!

In general, we have the following table:

Meaning Interval Notation Set Notation
All values greater than or equal to a and less than or equal to b \left[a,b\right] \left\{x:a\le x\le b\right\}
All values greater than a and less than b \left(a,b\right) \left\{x:a < x < b\right\}
All values greater than or equal to a and less than b \left[a,b\right) \left\{x:a\le x < b\right\}
All values greater than a and less than or equal to b \left(a,b\right] \left\{x:a < x\le b\right\}
All values greater than or equal to a. \left[a,\infty\right) \left\{x:x\ge a\right\}
All values greater than a. \left(a,\infty\right) \left\{x:x > a\right\}
All values less than or equal to a. \left(-\infty,a\right] \left\{x:x\le a\right\}
All values less than a. \left(-\infty,a\right) \left\{x:x < a\right\}
All values. \left(-\infty,\infty\right) \left\{x: x\in\mathbb{R}\right\}

Note that \infty and -\infty must always have an exclusive parenthesis rather than an inclusive bracket. This is because \infty is not a number, and therefore cannot be in our set. \infty is really just a symbol that makes things easier to write, like the intervals above.

The interval (a,b) is called an open interval, and the interval [a,b] 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 \in to denote this. For example, 2\in[1,3]. Likewise, the symbol \notin denotes that a certain element is not in an interval. For example 0\notin(0,1).

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 n is a positive integer then  a^n denotes n factors of a. That is,

 a^n = a\cdot a \cdot a \cdots a \qquad (n~ \mbox{times}).

If  a \not= 0 then we say that a^0 =1 \, .

If n is a negative integer then we say that  a^{-n} = \frac{1}{a^n} .

If we have an exponent that is a fraction then we say that  a^{m/n} = \sqrt[n]{a^m} = (\sqrt[n]{a})^m .

In addition to the previous definitions, the following rules apply:

Rule Example
 a^n \cdot a^m = a^{n+m}  3^6 \cdot 3^9 = 3^{15}
 \frac{a^n}{a^m} = a^{n-m}  \frac{x^3}{x^2} = x^{1} = x
 (a^n)^m = a^{n\cdot m}  (x^4)^5 = x^{20} \,\!
 (ab)^n = a^n b^n \,\!  (3x)^5 = 3^5 x^5 \,\!
 \bigg(\frac{a}{b}\bigg)^n = \frac{a^n}{b^n}  \bigg(\frac{7}{3}\bigg)^3 = \frac{7^3}{3^3}.

Factoring and roots

Given the expression  x^2 + 3x + 2 , one may ask "what are the values of x that make this expression 0?" If we factor we obtain

 x^2 + 3x + 2 = (x + 2)(x + 1). \,\!

If x=-1 or -2, 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 x that render the expression zero. These values are termed "roots." In general, given a quadratic polynomial  px^2 + qx + r that factors as

 px^2 + qx + r = (ax + c)(bx + d) \,\!

then we have that x = -c/a and x = -d/b are roots of the original polynomial.

A special case to be on the look out for is the difference of two squares,  a^2 - b^2. In this case, we are always able to factor as

 a^2 - b^2 = (a+b)(a-b). \,\!

For example, consider  4x^2 - 9 . On initial inspection we would see that both  4x^2 and  9 are squares ((2x)^2 = 4x^2 and  3^2 = 9 ). Applying the previous rule we have

 4x^2 - 9 = (2x+3)(2x-3). \,\!

The following is a general result of great utility.

The quadratic formula
Given any quadratic equation ax^2+bx+c=0, a\neq0, all solutions of the equation are given by the quadratic formula:

x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.
Example: Find all the roots of 4x^2+7x-2

Finding the roots is equivalent to solving the equation 4x^2+7x-2=0. Applying the quadratic formula with a=4, b=7, c=-2, we have:
x=\frac{-7\pm\sqrt{7^2-4(4)(-2)}}{2(4)}

x=\frac{-7\pm\sqrt{49+32}}{8}

x=\frac{-7\pm\sqrt{81}}{8}

x=\frac{-7\pm9}{8}

x=\frac{2}{8}, x=\frac{-16}{8}

x=\frac{1}{4}, x=-2

The quadratic formula can also help with factoring, as the next example demonstrates.

Example: Factor the polynomial 4x^2+7x-2

We already know from the previous example that the polynomial has roots x=\frac{1}{4} and x=-2. Our factorization will take the form
 C(x+2)(x-\frac{1}{4})
All we have to do is set this expression equal to our polynomial and solve for the unknown constant C:
 C(x+2)(x-\frac{1}{4})=4x^2+7x-2
 C(x^2+(-\frac{1}{4}+2)x-\frac{2}{4})=4x^2+7x-2
 C(x^2+\frac{7}{4}x-\frac{1}{2})=4x^2+7x-2
You can see that C=4 solves the equation. So the factorization is
4x^2+7x-2=4(x+2)(x-\frac{1}{4})=(x+2)(4x-1)

Note that if 4ac>b^2 then the roots will not be real numbers.

Simplifying rational expressions

Consider the two polynomials

p(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0

and

 q(x) = b_m x^m + b_{m-1}x^{m-1} + \cdots + b_1x + b_0.

When we take the quotient of the two we obtain

\frac{p(x)}{q(x)} = \frac{a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0}{b_m x^m + b_{m-1}x^{m-1} + \cdots + b_1x + b_0}.

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 \frac{x^2-1}{x+1}. We may simplify this in the following way:

\frac{x^2-1}{x+1} = \frac{(x+1)(x-1)}{x+1} = x-1, \qquad x \neq -1 \,\!

This is nice because we have obtained something we understand quite well, x-1 , from something we didn't.

Formulas of multiplication of polynomials

Here are some formulas that can be quite useful for solving polynomial problems:

(a+b)^2=a^2+2ab+b^2
(a-b)^2=a^2-2ab+b^2
(a-b)(a+b)=a^2-b^2
(a\pm b)^3=a^3\pm 3a^2b+3ab^2\pm b^3
a^3\pm b^3=(a\pm b)(a^2\mp ab+b^2)

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 x^2-2x-15 (the dividend or numerator) by x+3 (the divisor or denominator)

Similar to long division of numbers, we set up our problem as follows:

\begin{array}{rl}\\
x+3\!\!\!\!&\big)\!\!\!\begin{array}{lll}
\hline
\,x^2-2x-15
\end{array}\end{array}

First we have to answer the question, how many times does x+3 go into x^2? To find out, divide the leading term of the dividend by leading term of the divisor. So it goes in x times. We record this above the leading term of the dividend:

\begin{array}{rl}&~~\,x\\
x+3\!\!\!\!&\big)\!\!\!\begin{array}{lll}
\hline
\,x^2-2x-15
\end{array}\\
\end{array}

, and we multiply x+3 by x and write this below the dividend as follows:

\begin{array}{rl}&~~\,x\\
x+3\!\!\!\!&\big)\!\!\!\begin{array}{lll}
\hline
\,x^2-2x-15
\end{array}\\
&\!\!\!\!-\underline{(x^2+3x)~~~}\\
\end{array}

Now we perform the subtraction, bringing down any terms in the dividend that aren't matched in our subtrahend:

\begin{array}{rl}&~~\,x\\
x+3\!\!\!\!&\big)\!\!\!\begin{array}{lll}
\hline
\,x^2-2x-15
\end{array}\\
&\!\!\!\!-\underline{(x^2+3x)~~~}\\
&\!\!\!\!~~~~~~-5x-15~~~\\
\end{array}

Now we repeat, treating the bottom line as our new dividend:

\begin{array}{rl}&~~\,x-5\\
x+3\!\!\!\!&\big)\!\!\!\begin{array}{lll}
\hline
\,x^2-2x-15
\end{array}\\
&\!\!\!\!-\underline{(x^2+3x)~~~}\\
&\!\!\!\!~~~~~~-5x-15~~~\\
&\!\!\!\!~~~-\underline{(-5x-15)~~~}\\
&\!\!\!\!~~~~~~~~~~~~~~~~~~~0~~~\\
\end{array}

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 P(x) and we know that r is a root of P. If we perform polynomial long division using P(x) as the dividend and (x-r) as the divisor, we will obtain a polynomial Q(x) such that P(x)=(x-r)Q(x), where the degree of Q is one less than the degree of P.

Exercise

1. Factor x-1 out of 6x^3-4x^2+3x-5.

(x-1)(6x^2+2x+5)

Solution

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 P(x) whose numerator N(x) has degree n and whose denominator D(x) has degree d with n\geq d into a polynomial plus a rational function whose numerator has degree \nu and denominator has degree \delta with \nu<\delta.

Suppose that N(x) divided by D(x) has quotient Q(x) and remainder R(x). That is

N(x)=D(x)Q(x)+R(x)

Dividing both sides by D(x) gives

\frac{N(x)}{D(x)}=Q(x)+\frac{R(x)}{D(x)}

R(x) will have degree less than D(x).

Example

Write \frac{x-1}{x-3} as a polynomial plus a rational function with numerator having degree less than the denominator.
\begin{array}{rl}&~~\,1\\
x-3\!\!\!\!&\big)\!\!\!\begin{array}{lll}
\hline
\,x-1
\end{array}\\
&\!\!\!\!-\underline{(x-3)~~~}\\
&\!\!\!\!~~~~~~~~~2~~~\\
\end{array}

so

\frac{x-1}{x-3}=1+\frac{2}{x-3}
← Precalculus Calculus Functions →
Print version

<h1> 1.2 Functions</h1>

← Algebra Calculus Graphing linear functions →
Print version

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 is uniquely determined by the value of another quantity, we have a function. 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 real-valued 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 x and a y) 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 vector-valued function of two real variables.

We will be looking at real-valued functions until studying multivariable calculus. Think of a real-valued function as an input-output 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.

  1. A function is given a name (such as f) and a formula for the function is also given. For example, f(x) = 3 x + 2 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.
  2. 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,  y = 3 x + 2 describes a function. The dependent variable appears by itself on the left hand side of equal sign.
  3. 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 f or g). Some functions whose names are multiple letters (like the sine function y=sin(x).

Plugging a value into a function

If we write f(x) = 3x+2 \ , then we know that

  • The function f is a function of x.
  • To evaluate the function at a certain number, replace the x with that number.
  • Replacing x 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 f \ is interpreted, "Given a number, f will return two more than the triple of that number."

How would we know the value of the function f at 3? We would have the following three thoughts:

  1. f(3) = 3(3) + 2
  2.  3(3) + 2 = 9 + 2
  3. 9+2=11

and we would write

f(3) = 3(3)+2 = 9+2 = 11.

The value of f \ at 3 is 11.

Note that f(3) \ means the value of the dependent variable when x \ 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 f at three is eleven", or simply "f 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 input-output 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 -1 and gives the output value 1.

A function is usually written as f, g, 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, f(x) = 3x+2 \ tells us:

  • The function f is a function of x.
  • To evaluate the function at a certain number, replace the x with that number.
  • Replacing x 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 f \ is interpreted, "Given a number, f 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:

f(x) = 3x+2 \
f(3) = 3(3)+2 \ We evaluate the function at x = 3.
f(3) = 9+2 = 11 \ The value of f \ at 3 is 11.

See? It's easy!

Note that f(3) \ means the value of the dependent variable when x \ 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 f(x) \ 'depends' on the value of the independent variable x \ . This is read as "the value of f at three is eleven", or simply "f 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 f, g, and h to denote functions, and the variable x to denote an independent variable. y is used for both dependent and independent variables.

When discussing or working with a function f, it's important to know not only the function, but also its independent variable x. Thus, when referring to a function f, you usually do not write f, but instead f(x). The function is now referred to as "f of x". 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

f(x)=7x+1\,,

and if we want to use the value of f for x equal to 2, then we would substitute 2 for x on both sides of the definition above and write

f(2)=7(2)+1=14+1=15\,

This notation is more informative than leaving off the independent variable and writing simply 'f', 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 f(x), all of the possible x values constitute the domain, and all of the values f(x) (y on the x-y plane) constitute the range.

Remarks

The following arise as a direct consequence of the definition of functions:

  1. 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 formula-based) interpretation. We can always say if  a = b, then f(a) = f(b), but if we only know that f(a) = f(b) then we can't be sure that a= b.
  2. 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.
  3. 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.
This is an example of an expression which fails the vertical line test.

The vertical line test

The vertical line test, mentioned in the preceding paragraph, is a systematic test to find out if an equation involving x and y can serve as a function (with x the independent variable and y the dependent variable). Simply graph the equation and draw a vertical line through each point of the x-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, "multi-valued functions"; they would refer to our "functions" as "single-valued functions".)

Important functions

Constant function f(x)=c\,

It disregards the input and always outputs the constant c, and is a polynomial of the zeroth degree where f(x) = cx0= c(1) = c. Its graph is a horizontal line.

Linear function f(x)=mx+c\,

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

Identity function f(x)=x\,

Takes an input and outputs it unchanged. A polynomial of the first degree, f(x) = x1 = x. Special case of a linear function.

Quadratic function f(x)=ax^2+bx+c \,

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

Polynomial function f(x)=a_n x^n + a_{n-1}x^{n-1} + \cdots + a_2 x^2 + a_1 x + a_0

The number n is called the degree.

Signum function  \operatorname{sgn}(x) = \left\{ \begin{matrix}
-1 & \text{if} &  x < 0 \\
0 & \text{if} &  x = 0 \\
1 & \text{if} &  x > 0. \end{matrix} \right.

Determines the sign of the argument x.

Example functions

Some more simple examples of functions have been listed below.

h(x)=\left\{\begin{matrix}1,&\mbox{if }x>0\\-1,&\mbox{if }x<0\end{matrix}\right.
Gives 1 if input is positive, -1 if input is negative. Note that the function only accepts negative and positive numbers, not 0. Mathematics describes this condition by saying 0 is not in the domain of the function.
g(y)=y^2\,
Takes an input and squares it.

g(z)=z^2\,

Exactly the same function, rewritten with a different independent variable. This is perfectly legal and sometimes done to prevent confusion (e.g. when there are already too many uses of x or y in the same paragraph.)
f(x)=\left\{\begin{matrix}5^{x^2},&\mbox{if }x>0\\0,&\mbox{if }x\le0\end{matrix}\right.
Note that we can define a function by a totally arbitrary rule. Such functions are called piecewise functions.

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 real-valued 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 y = 3 x + 2 and y = x^2, we obtain y = x^2 + 3 x + 2.


If we subtract y = 3 x + 2 from y = x^2, we obtain y =x^2 - (3 x + 2). We can also write this as y=x^2-3x-2.


If we multiply the function y = 3 x + 2 and the function y = x^2, we obtain y = (3 x + 2) x^2. We can also write this as y=3x^3 + 2 x^2.


If we divide the function y = 3 x + 2 by the function y = x^2, we obtain y = (3 x + 2)/ x^2.


If a math problem wants you to add two functions f and g, there are two ways that the problem will likely be worded:

  1. If you are told that f(x) = 3 x + 2, that g(x)  = x^2, that h(x) = f(x)+g(x) and asked about h, then you are being asked to add two functions. Your answer would be h(x) = x^2 + 3 x + 2.
  2. If you are told that f(x) = 3 x + 2, that g(x)  = x^2 and you are asked about f+g, then you are being asked to add two functions. The addition of f and g is called f+g. Your answer would be (f+g)(x) = x^2 + 3 x + 2.

Similar statements can be made for subtraction, multiplication and division.

Example: Adding, subtracting, multiplying and dividing functions which do have a name

Let f(x)=3x+2\, and:g(x)=x^2\,. Let's add, subtract, multiply and divide.


\begin{align}
(f+g)(x)
    &= f(x)+g(x)\\
    &= (3x+2)+(x^2)\\
    &= x^2+3x+2\,
\end{align},


\begin{align}
(f-g)(x)
    &= f(x)-g(x)\\
    &= (3x+2)-(x^2)\\
    &= -x^2+3x+2\,
\end{align},


\begin{align}
 (f\times g)(x)
          &= f(x)\times g(x)\\
          &= (3x+2)\times(x^2)\\
          &= 3x^3+2x^2\,
\end{align},


\begin{align}
\left(\frac{f}{g}\right)(x)
            &= \frac{f(x)}{g(x)}\\
            &= \frac{3x+2}{x^2}\\
            &= \frac{3}{x}+\frac{2}{x^2}
\end{align}.

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 h = -4.9t^2 + 20. 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 \theta=f(h) 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 \theta = f(-4.9t^2 + 20). We replace h 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 f depends upon the value of another variable x; however, that variable could be equal to another function g, so its value depends on the value of a third variable. If this is the case, then the first variable is a function h of the third variable; this function (h) is called the composition of the other two functions (f and g).

Example: Composing two functions

Let f(x)=3x+2\, and:g(x)=x^2\,. The composition of f with g is read as either "f composed with g" or "f of g of x."

Let

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

Then

\begin{align}
h(x) &= f(g(x))\\
     &= f(x^2)\\
     &= 3(x^2)+2\\
     &= 3x^2+2\,
\end{align}.

Sometimes a math problem asks you compute (f \circ g)(x) when they want you to compute f(g(x)),

Here, h is the composition of f and g and we write h=f\circ g. Note that composition is not commutative:

f(g(x))=3x^2+2\,, and
\begin{align}
g(f(x)) &= g(3x + 2)\\
        &= (3x + 2)^2\\
        &= 9x^2+12x+4\, .
\end{align}
so f(g(x))\ne g(f(x))\,.

Composition of functions is very common, mainly because functions themselves are common. For instance, squaring and sine are both functions:


\operatorname{square}(x)=x^2,
\operatorname{sine}(x)=\sin x


Thus, the expression \sin^2x is a composition of functions:

\sin^2x = \operatorname{square}(\sin x)
= \operatorname{square}( \operatorname{sine}(x)).

(Note that this is not the same as \operatorname{sine}(\operatorname{square}(x))=\sin x^2.) Since the function sine equals 1/2 if x=\pi/6,


\operatorname{square}(\operatorname{sine}(\pi/6))= \operatorname{square}(1/2).


Since the function square equals 1/4 if x=\pi/6,

\sin^2 \pi/6=\operatorname{square}(\operatorname{sine}(\pi/6))=\operatorname{square}(1/2)
=1/4.

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:

f(2\times x) \, Dilation
f(x+2)\, Translation
2\times f(x) \, Dilation
2+f(x)\, Translation
Examples of horizontal and vertical translations
Examples of horizontal and vertical dilations

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

f(2\times x) \,

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 x, I add two to the input of f, so it will now change twice as quickly. Thus, this is a horizontal dilation by \frac{1}{2} because the distance to the y-axis has been halved. A vertical dilation, such as

2\times f(x) \,

is slightly more straightforward. In this case, you double the output of the function. The output represents the distance from the x-axis, so in effect, you have made the graph of the function 'taller'. Here are a few basic examples where a is any positive constant:

Original graph f(x)\, Rotation about origin -f(-x)\,
Horizontal translation by a units left f(x+a)\, Horizontal translation by a units right f(x-a)\,
Horizontal dilation by a factor of a f(x\times \frac{1}{a}) \, Vertical dilation by a factor of a a\times f(x) \,
Vertical translation by a units down f(x)-a\, Vertical translation by a units up f(x)+a\,
Reflection about x-axis -f(x)\, Reflection about y-axis f(-x)\,

Domain and Range

Domain

The domain of the function is the interval from -1 to 1

The domain of a function is the set of all points over which it is defined. More simply, it represents the set of x-values which the function can accept as input. For instance, if

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

then f(x) is only defined for values of x between -1 and 1, because the square root function is not defined (in real numbers) for negative values. Thus, the domain, in interval notation, is \left[-1,1\right]. In other words,

f(x) \mbox{is defined for } x\in [-1,1], \operatorname{ or } \{x:-1\le x\le 1\}.


The range of the function is the interval from 0 to 1

Range

The range of a function is the set of all values which it attains (i.e. the y-values). For instance, if:

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

then f(x) can only equal values in the interval from 0 to 1. Thus, the range of f is \left[0,1\right].

One-to-one Functions

A function f(x) is one-to-one (or less commonly injective) if, for every value of f, there is only one value of x that corresponds to that value of f. For instance, the function f(x)=\sqrt{1-x^2} is not one-to-one, because both x=1 and x=-1 result in f(x)=0. However, the function f(x)=x+2 is one-to-one, because, for every possible value of f(x), there is exactly one corresponding value of x. Other examples of one-to-one functions are f(x)=x^3+ax, where a\in \left[0,\infty\right). Note that if you have a one-to-one function and translate or dilate it, it remains one-to-one. (Of course you can't multiply x or f 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 one-to-one. If every horizontal line intersects the graph in at most one point, then the function is one-to-one. This is known as the Horizontal Line Test.

Algebraic 1-1 Test

You can also show one-to-oneness algebraically by assuming that two inputs give the same output and then showing that the two inputs must have been equal. For example, Is f(x)=\frac{1-2x}{1+x}\, a 1-1 function?

f(a)=f(b)\,

\frac{1-2a}{1+a}=\frac{1-2b}{1+b} \,

(1+b)(1-2a)=(1+a)(1-2b) \,

1-2a+b-2ab=1-2b+a-2ab \,

1-2a+b=1-2b+a \,

1-2a+3b=1+a \,

1+3b=1+3a \,

a=b \,

Therefore by the algebraic 1-1 test, the function f(x)\, is 1-1.

You can show that a function is not one-to-one by finding two distinct inputs that give the same output. For example, f(x)=x^2 is not one-to-one because f(-1)=f(1) but -1\neq1.

Inverse functions

We call g(x) the inverse function of f(x) if, for all x:

g(f(x)) = f(g(x)) = x\ .

A function f(x) has an inverse function if and only if f(x) is one-to-one. For example, the inverse of f(x)=x+2 is g(x)=x-2. The function f(x)=\sqrt{1-x^2} has no inverse.

Notation

The inverse function of f is denoted as f^{-1}(x). Thus, f^{-1}(x) is defined as the function that follows this rule

f(f^{-1}(x))=f^{-1}(f(x)) = x:

To determine f^{-1}(x) when given a function f, substitute f^{-1}(x) for x and substitute x for f(x). Then solve for f^{-1}(x), provided that it is also a function.

Example: Given f(x) = 2x - 7, find f^{-1}(x).

Substitute f^{-1}(x) for x and substitute x for f(x). Then solve for f^{-1}(x):

f(x) = 2x - 7\,
  x  = 2[f^{-1}(x)] - 7\,
x + 7  = 2[f^{-1}(x)]\,
\frac{x + 7}{2} = f^{-1}(x)\,

To check your work, confirm that f^{-1}(f(x)) = x:

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

f^{-1}(2x - 7) = {}

\frac{(2x - 7) + 7}{2} = \frac{2x}{2} = x

If f isn't one-to-one, then, as we said before, it doesn't have an inverse. Then this method will fail.

Example: Given f(x)=x^2, find f^{-1}(x).

Substitute f^{-1}(x) for x and substitute x for f(x). Then solve for f^{-1}(x):

f(x) = x^2\,
x = (f^{-1}(x))^2\,
f^{-1}(x) = \pm\sqrt{x}\,

Since there are two possibilities for f^{-1}(x), it's not a function. Thus f(x)=x^2 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 f(x) but not a graph.

← Algebra Calculus Graphing linear functions →
Print version

<h1> 1.3 Graphing linear functions</h1>

← Functions Calculus Precalculus/Exercises →
Print version
Graph of y=2x

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 (x,y) indicates that f(x)=y. In other words, a graph uses the position of a point in one direction (the vertical-axis or y-axis) to indicate the value of f for a position of the point in the other direction (the horizontal-axis or x-axis).

Functions may be graphed by finding the value of f for various x and plotting the points (x, f(x)) 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

f(x)=3x + 2\,\!

The graph of f is a single line, passing through the point (0,2) 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.

Slope-intercept form

When we see a function presented as

 y = mx + b \,\!

we call this presentation the slope-intercept form. This is because, not surprisingly, this way of writing a linear function involves the slope, m, and the y-intercept, b.

Point-slope 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 (x_0,y_0) and a slope m, we present the graph as

 y - y_0 = m(x - x_0). \,\!

We call this presentation the point-slope form. The point-slope and slope-intercept form are essentially the same. In the point-slope form we can use any point the graph passes through. Where as, in the slope-intercept form, we use the y-intercept, that is the point (0,b).

Calculating slope

If given two points,  (x_1,y_1) and  (x_2,y_2) , 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 y-values divided by the change in x-values. In symbols,

 \mbox{slope}~ = \frac{\mbox{change in}~y}{\mbox{change in}~x} = \frac{\Delta y}{\Delta x}.

So now the question is, "what's \Delta y and \Delta x?" We have that \Delta y = y_2-y_1 and \Delta x = x_2 - x_1. Thus,

 \mbox{slope}~ = \frac{y_2-y_1}{x_2-x_1}.

Two-point form

Two points also uniquely determine a line. Given points (x_1,y_1) and (x_2,y_2), we have the equation

 y - y_1 = \frac{y_2-y_1}{x_2-x_1}(x-x_1).

This presentation is in the two-point form. It is essentially the same as the point-slope form except we substitute the expression \frac{y_2-y_1}{x_2-x_1} for m.

← Functions Calculus Precalculus/Exercises →
Print version

<h1> 1.4 Precalculus Cumulative Exercises</h1>

← Graphing linear functions Calculus Limits →
Print version

Algebra

Convert to interval notation

1.  \{x:-4<x<2\} \,

(-4,2)

2.  \{x:-\frac{7}{3} \leq x \leq -\frac{1}{3}\}

[-\frac{7}{3},-\frac{1}{3}]

3.  \{x:-\pi \leq x < \pi\}

[-\pi,\pi)

4.  \{x:x \leq \frac{17}{9}\}

(-\infty, \frac{17}{9}]

5.  \{x:5 \leq x+1 \leq 6\}

[4, 5]

6.  \{x:x - \frac{1}{4} < 1\} \,

(-\infty, \frac{5}{4})

7.  \{x:3 > 3x\} \,

(-\infty, 1)

8.  \{x:0 \leq 2x+1 < 3\}

[-\frac{1}{2}, 1)

9.  \{x:5<x \mbox{ and } x<6\} \,

(5,6)

10.  \{x:5<x \mbox{ or } x<6\} \,

(-\infty,\infty)

State the following intervals using set notation

11.  [3,4] \,

\{x:3\leq x\leq 4\}

12.  [3,4) \,

\{x:3\leq x<4\}

13.  (3,\infty)

\{x:x>3\}

14.  (-\frac{1}{3}, \frac{1}{3}) \,

\{x:-\frac{1}{3}<x<\frac{1}{3}\}

15.  (-\pi, \frac{15}{16}) \,

\{x:-\pi<x<\frac{15}{16}\}

16.  (-\infty,\infty)

\{x:x\in\Re\}

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.

17.  |x+y| = |x| + |y| \,

false

18.  |x+y| \geq |x| + |y|

false

19.  |x+y| \leq |x| + |y|

true

Evaluate the following expressions

20.  8^{1/3} \,

2

21.  (-8)^{1/3} \,

-2

22.  \bigg(\frac{1}{8}\bigg)^{1/3} \,

\frac{1}{2}

23.  (8^{2/3}) (8^{3/2}) (8^0) \,

8^{13/6}

24.  \bigg( \bigg(\frac{1}{8}\bigg)^{1/3} \bigg)^7

\frac{1}{128}

25.  \sqrt[3]{\frac{27}{8}}

\frac{3}{2}

26.  \frac{4^5 \cdot 4^{-2}}{4^3}

1

27.  \bigg(\sqrt{27}\bigg)^{2/3}

3

28.  \frac{\sqrt{27}}{\sqrt[3]{9}}

3^{5/6}

Simplify the following

29.  x^3 + 3x^3 \,

4x^3

30.  \frac{x^3 + 3x^3}{x^2}

4x

31.  (x^3+3x^3)^3 \,

64x^9

32.  \frac{x^{15} + x^3}{x}

x^{14}+x^2

33.  (2x^2)(3x^{-2}) \,

6

34.  \frac{x^2y^{-3}}{x^3y^2}

\frac{1}{xy^5}

35.  \sqrt{x^2y^4}

xy^2

36.  \bigg(\frac{8x^6}{y^4}\bigg)^{1/3}

\frac{2x^2}{y^{4/3}}

Find the roots of the following polynomials

37.  x^2 - 1 \,

x=\pm1

38.  x^2 +2x +1 \,

x=-1

39.  x^2 + 7x + 12 \,

x=-3, x=-4

40.  3x^2 - 5x -2 \,

x=2, x=-\frac{1}{3}

41.  x^2 + 5/6x + 1/6 \,

x=-\frac{1}{3}, x=-\frac{1}{2}

42.  4x^3 + 4x^2 + x \,

x=0,x=-\frac{1}{2}

43.  x^4 - 1 \,

x=\pm i, x=\pm 1

44.  x^3 + 2x^2 - 4x - 8 \,

x=\pm2

Factor the following expressions

45.  4a^2 - ab - 3b^2 \,

(4a+3b)(a-b)

46.  (c+d)^2 - 4 \,

(c+d+2)(c+d-2)

47.  4x^2 - 9y^2 \,

(2x+3y)(2x-3y)

Simplify the following

48.  \frac{x^2 -1}{x+1} \,

x-1, x\neq-1

49.  \frac{3x^2 + 4x + 1}{x+1} \,

3x+1, x\neq-1

50.  \frac{4x^2 - 9}{4x^2 + 12x + 9} \,

\frac{2x-3}{2x+3}

51.  \frac{x^2 + y^2 +2xy}{x(x+y)} \,

\frac{x+y}{x}, x\neq-y

Functions

52. Let f(x)=x^2.

a. Compute f(0) and f(2).

{0,4}

b. What are the domain and range of f?

{(-\infty,\infty)}

c. Does f have an inverse? If so, find a formula for it.

{x^{1/2}}

53. Let f(x)=x+2, g(x)=1/x.

a. Give formulae for
i. f+g

(f + g)(x) = x + 2 + \frac{1}{x}

ii. f-g

(f - g)(x) = x + 2 - \frac{1}{x}

iii. g-f

(g - f)(x) = \frac{1}{x} - x - 2

iv. f\times g

(f \times g)(x) = 1 + \frac{2}{x}

v. f/g

(f / g)(x) = x^2 + 2x

vi. g/f

(g / f)(x) = \frac{1}{x^2 + 2x}

vii. f\circ g

(f \circ g)(x) = \frac{1}{x} + 2

viii. g\circ f

(g \circ f)(x) = \frac{1}{x + 2}

b. Compute f(g(2)) and g(f(2)).

f(g(2))=5/2, g(f(2))=1/4

c. Do f and g have inverses? If so, find formulae for them.

f^{-1}(x)=x-2, g^{-1}(x)=\frac{1}{x}

54. Does this graph represent a function? Sinx over x.svg

Yes.

55. Consider the following function

f(x) = \begin{cases} -\frac{1}{9} & \mbox{if } x<-1 \\ 2 & \mbox{if } -1\leq x \leq 0 \\ x + 3 & \mbox{if } x>0. \end{cases}
a. What is the domain?

{(-\infty,\infty)}

b. What is the range?

{(-\infty,\infty)}

c. Where is f continuous?

{x>0}

56. Consider the following function

f(x) = \begin{cases} x^2 & \mbox{if } x>0 \\ -1 & \mbox{if } x\leq 0. \end{cases}
a. What is the domain?
b. What is the range?
c. Where is f continuous?

57. Consider the following function

f(x) = \frac{\sqrt{2x-3}}{x-10}
a. What is the domain?

When you find the answer, you can add it here by clicking "edit".

b. What is the range?

When you find the answer, you can add it here by clicking "edit".

c. Where is f continuous?

When you find the answer, you can add it here by clicking "edit".

58. Consider the following function

f(x) = \frac{x-7}{x^2-49}
a. What is the domain?

When you find the answer, you can add it here by clicking "edit".

b. What is the range?

When you find the answer, you can add it here by clicking "edit".

c. Where is f continuous?

When you find the answer, you can add it here by clicking "edit".

Graphing

59. Find the equation of the line that passes through the point (1,-1) and has slope 3.

3x-y=4

60. Find the equation of the line that passes through the origin and the point (2,3).

3x-2y=0

Solutions

← Graphing linear functions Calculus Limits →
Print version

Limits

<h1> 2.1 An Introduction to Limits</h1>

← Limits/Contents Calculus Finite Limits →
Print version

Intuitive Look

A limit looks at what happens to a function when the input approaches a certain value. The general notation for a limit is as follows:

\quad\lim_{x\to a} f(x)

This is read as "The limit of f of x as x approaches a". We'll take up later the question of how we can determine whether a limit exists for f(x) at a 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 f(x)=x^2, and that we're interested in its limit as x approaches 2. Using the above notation, we can write the limit that we're interested in as follows:

\quad\lim_{x\to 2} x^2

One way to try to evaluate what this limit is would be to choose values near 2, compute f(x) for each, and see what happens as they get closer to 2. This is implemented as follows:

x 1.7 1.8 1.9 1.95 1.99 1.999
f(x)=x^2 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:

x 2.3 2.2 2.1 2.05 2.01 2.001
f(x)=x^2 5.29 4.84 4.41 4.2025 4.0401 4.004001

We can see from the tables that as x grows closer and closer to 2, f(x) seems to get closer and closer to 4, regardless of whether x approaches 2 from above or from below. For this reason, we feel reasonably confident that the limit of x^2 as x approaches 2 is 4, or, written in limit notation,

\quad\lim_{x\to 2} x^2=4.

We could have also just substituted 2 into x^2 and evaluated: (2)^2=4. However, this will not work with all limits.

Now let's look at another example. Suppose we're interested in the behavior of the function f(x)=\frac{1}{x-2} as x approaches 2. Here's the limit in limit notation:

\quad\lim_{x\to 2} \frac{1}{x-2}

Just as before, we can compute function values as x approaches 2 from below and from above. Here's a table, approaching from below:

x 1.7 1.8 1.9 1.95 1.99 1.999
f(x)=\frac{1}{x-2} -3.333 -5 -10 -20 -100 -1000

And here from above:

x 2.3 2.2 2.1 2.05 2.01 2.001
f(x)=\frac{1}{x-2} 3.333 5 10 20 100 1000

In this case, the function doesn't seem to be approaching a single value as x approaches 2, but instead becomes an extremely large positive or negative number (depending on the direction of approach). This is known as an infinite limit. Note that we cannot just substitute 2 into \frac{1}{x-2} 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:

f(x) = \frac{x^2(x-2)}{x-2}

This function is the same as


f(x) =\left\{\begin{matrix} x^2 & \mbox{if }  x\neq 2 \\
\mbox{undefined} & \mbox{if } x=2\end{matrix}\right.

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 algebra, we would simply say that we can cancel the term (x-2), and then we have the function f(x)=x^2. This, however, would be a bit dishonest; the function that we have now is not really the same as the one we started with, because it is defined when x=2, and our original function was specifically not defined when x=2. In algebra we were willing to ignore this difficulty because we had no better way of dealing with this type of function. Now, however, in calculus, we can introduce a better, more correct way of looking at this type of function. What we want is to be able to say that, although the function doesn't exist when x=2, it works almost as though it does. It may not get there, but it gets really, really close. That is, f(1.99999)=3.99996. The only question that we have is: what do we mean by "close"?

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 f is defined for x near c (but we do not require that it be defined when x=c).

Definition: (Informal definition of a limit)

We call L the limit of f(x) as x approaches c if f(x) becomes close to L when x is close (but not equal) to c, and if there is no other value L' with the same property..

When this holds we write

 \lim_{x \to c} f(x) = L

or

 f(x) \to L \quad \mbox{as} \quad x \to c.

Notice that the definition of a limit is not concerned with the value of f(x) when x=c (which may exist or may not). All we care about are the values of f(x) when x is close to c, 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 f(x)=b (that is, f is constant for all x) then the limit as x approaches c must be equal to b. In other words

Constant Rule for Limits

If b and c are constants then  \lim_{x\to c} b = b.
Example: \lim_{x\to 6} 5=5

Second, the identity rule states that if f(x)=x (that is, f just gives back whatever number you put in) then the limit of f as x approaches c is equal to c. That is,

Identity Rule for Limits

If c is a constant then  \lim_{x\to c} x = c.
Example: \lim_{x\to 6} x=6

The next few rules tell us how, given the values of some limits, to compute others.

Operational Identities for Limits
Suppose that \lim_{x\to c} f(x) =L and \lim_{x\to c} g(x) =M and that k is constant. Then

  •  \lim_{x\to c} k f(x) = k \cdot \lim_{x\to c} f(x) =  k L
  •  \lim_{x\to c} [f(x) + g(x)] = \lim_{x\to c} f(x) +  \lim_{x\to c} g(x) =  L + M
  •  \lim_{x\to c} [f(x) - g(x)] = \lim_{x\to c} f(x) -  \lim_{x\to c} g(x) =  L - M
  •  \lim_{x\to c} [f(x) g(x)] = \lim_{x\to c} f(x) \lim_{x\to c} g(x) = L M
  •  \lim_{x\to c} \frac{f(x)}{g(x)} = \frac{\lim_{x\to c} f(x)}{\lim_{x\to c} g(x)} = \frac{L}{M} \,\,\, \mbox{ provided } M\neq 0

Notice that in the last rule we need to require that M is not equal to zero (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

 \lim_{x\to c} f(x)^n = \left(\lim_{x\to c} f(x) \right)^n = L^n for a positive integer n.

This is called the power rule.

Examples

Example 1

Find the limit \lim_{x\to 2} {4x^3}.

We need to simplify the problem, since we have no rules about this expression by itself. We know from the identity rule above that \lim_{x\to 2} {x} = 2. By the power rule, \lim_{x\to 2} {x^3} = \left(\lim_{x\to 2} x\right)^3 = 2^3 = 8. Lastly, by the scalar multiplication rule, we get \lim_{x\to 2} {4x^3} = 4\lim_{x\to 2} x^3=4 \cdot 8=32.

Example 2

Find the limit \lim_{x\to 2} [4x^3 + 5x +7].

To do this informally, we split up the expression, once again, into its components. As above,\lim_{x\to 2} 4x^3=32.

Also \lim_{x\to 2} 5x = 5\cdot\lim_{x\to 2} x = 5\cdot2=10 and \lim_{x\to 2} 7 =7. Adding these together gives

\lim_{x\to 2} 4x^3 + 5x +7 = \lim_{x\to 2} 4x^3 + \lim_{x\to 2} 5x + \lim_{x\to 2} 7 = 32 + 10 +7 =49.
Example 3

Find the limit \lim_{x\to 2}\frac{4x^3 + 5x +7}{(x-4)(x+10)}.

From the previous example the limit of the numerator is \lim_{x\to 2} 4x^3 + 5x +7 =49. The limit of the denominator is

\lim_{x\to 2} (x-4)(x+10) = \lim_{x\to 2} (x-4) \cdot \lim_{x\to 2} (x+10) = (2-4)\cdot(2+10)=-24.

As the limit of the denominator is not equal to zero we can divide. This gives

\lim_{x\to 2}\frac{4x^3 + 5x +7}{(x-4)(x+10)} = -\frac{49}{24}.
Example 4

Find the limit \lim_{x\to 4}\frac{x^4 - 16x + 7}{4x-5}.

We apply the same process here as we did in the previous set of examples;

\lim_{x\to 4}\frac{x^4 - 16x + 7}{4x-5} = \frac{\lim_{x\to 4} (x^4 - 16x + 7)} {\lim_{x\to 4} (4x-5)} = \frac{\lim_{x\to 4} (x^4) - \lim_{x\to 4} (16x) + \lim_{x\to 4} (7)} {\lim_{x\to 4} (4x) - \lim_{x\to 4} 5}.

We can evaluate each of these; 
\lim_{x\to 4} (x^4) = 256,

\lim_{x\to 4} (16x) = 64,

\lim_{x\to 4} (7) = 7,

 \lim_{x\to 4} (4x) = 16
and  \lim_{x\to 4} (5) = 5. Thus, the answer is \frac{199}{11}.

Example 5

Find the limit \lim_{x\to 2}\frac{x^2 - 3x + 2}{x-2}.

In this example, evaluating the result directly will result in a division by zero. While you can determine the answer experimentally, a mathematical solution is possible as well.

First, the numerator is a polynomial that may be factored: \lim_{x\to 2}\frac{(x-2)(x-1)}{x-2}

Now, you can divide both the numerator and denominator by (x-2): \lim_{x\to 2} (x-1) = (2-1) = 1


Example 6

Find the limit \lim_{x\to 0}\frac{1-\cos x}{x}.

To evaluate this seemingly complex limit, we will need to recall some sine and cosine identities. We will also have to use two new facts. First, if f(x) is a trigonometric function (that is, one of sine, cosine, tangent, cotangent, secant or cosecant) and is defined at a, then  \lim_{x\to a} f(x) = f(a) .

Second, \lim_{x\to 0}\frac{\sin x}{x} = 1. This may be determined experimentally, or by applying L'Hôpital's rule, described later in the book.

To evaluate the limit, recognize that  1 - \cos x can be multiplied by  1+\cos x to obtain  (1-\cos^2 x) which, by our trig identities, is  \sin^2 x. So, multiply the top and bottom by  1+\cos x. (This is allowed because it is identical to multiplying by one.) This is a standard trick for evaluating limits of fractions; multiply the numerator and the denominator by a carefully chosen expression which will make the expression simplify somehow. In this case, we should end up with:

\begin{align}\lim_{x\to 0} \frac{1-\cos x}{x} &=& \lim_{x\to 0} \left(\frac{1-\cos x}{x} \cdot \frac{1}{1}\right) \\
&=& \lim_{x\to 0} \left(\frac{1-\cos x}{x} \cdot \frac{1 + \cos x} {1+ \cos x}\right) \\
&=& \lim_{x\to 0}\frac{(1 - \cos x) \cdot 1 + (1 - \cos x) \cdot \cos x} {x \cdot (1+ \cos x)} \\
&=& \lim_{x\to 0}\frac{1 - \cos x + \cos x - \cos^2 x}{x \cdot (1+ \cos x)} \\
&=& \lim_{x\to 0}\frac{1 - \cos^2 x} {x \cdot (1+ \cos x)} \\
&=& \lim_{x\to 0}\frac{\sin^2 x} {x \cdot (1+ \cos x)} \\
&=& \lim_{x\to 0} \left(\frac{\sin x} {x} \cdot \frac{\sin x} {1+ \cos x}\right)\end{align}.

Our next step should be to break this up into \lim_{x\to 0}\frac{\sin x}{x} \cdot \lim_{x\to 0} \frac{\sin x}{1+\cos x} by the product rule. As mentioned above, \lim_{x\to 0} \frac{\sin x} {x} = 1.

Next,  \lim_{x\to 0} \frac{\sin x} {1+\cos x} = \frac{\lim_{x\to 0}\sin x} {\lim_{x\to 0} (1+\cos x)} = \frac{0} {1 + \cos 0} = 0.

Thus, by multiplying these two results, we obtain 0.


We will now present an amazingly useful result, even though we cannot prove it yet. We can find the limit at c of any polynomial or rational function, as long as that rational function is defined at c (so we are not dividing by zero). That is, c must be in the domain of the function.

Limits of Polynomials and Rational functions

If f is a polynomial or rational function that is defined at c then

\lim_{x \rightarrow c} f(x) = f(c)


We already learned this for trigonometric functions, so we see that it is easy to find limits of polynomial, rational or trigonometric functions wherever they are defined. In fact, this is true even for combinations of these functions; thus, for example,  \lim_{x\to 1} (\sin x^2 + 4\cos^3(3x-1)) = \sin 1^2 + 4\cos^3 (3(1)-1) .

The Squeeze Theorem

Graph showing f being squeezed between g and h

The Squeeze Theorem is very important in calculus, where it is typically used to find the limit of a function by comparison with two other functions whose limits are known.

It is called the Squeeze Theorem because it refers to a function f whose values are squeezed between the values of two other functions g and h, both of which have the same limit L. If the value of f is trapped between the values of the two functions g and h, the values of f must also approach L.

Expressed more precisely:

Theorem: (Squeeze Theorem)
Suppose that g(x) \le f(x) \le h(x) holds for all x in some open interval containing c, except possibly at x=c itself. Suppose also that \lim_{x\to c}g(x)=\lim_{x\to c}h(x)=L. Then \lim_{x\to c}f(x)=L also.
Plot of x*sin(1/x) for -0.5 < x <0.5

Example: Compute \lim_{x\to 0} x\sin(1/x). Note that the sine of any real number is in the interval [-1,1]. That is, -1 \le \sin x \le 1 for all x, and -1 \le \sin(1/x) \le 1 for all x. If x is positive, we can multiply these inequalities by x and get -x \le x\sin(1/x) \le x. If x is negative, we can similarly multiply the inequalities by the positive number -x and get x \le x\sin(1/x) \le -x. Putting these together, we can see that, for all nonzero x, -\left|x\right| \le x\sin(1/x) \le \left|x\right|. But it's easy to see that \lim_{x\to 0} -\left|x\right| = \lim_{x\to 0} \left|x\right| = 0. So, by the Squeeze Theorem, \lim_{x\to 0} x\sin(1/x) = 0.

Finding Limits

Now, we will discuss how, in practice, to find limits. First, if the function can be built out of rational, trigonometric, logarithmic and exponential functions, then if a number c is in the domain of the function, then the limit at c is simply the value of the function at c.

If c is not in the domain of the function, then in many cases (as with rational functions) the domain of the function includes all the points near c, but not c itself. An example would be if we wanted to find \lim_{x\to 0} \frac{x}{x}, where the domain includes all numbers besides 0.

In that case, in order to find \lim_{x\to c}f(x) we want to find a function g(x) similar to f(x), except with the hole at c filled in. The limits of f and g will be the same, as can be seen from the definition of a limit. By definition, the limit depends on f(x) only at the points where x is close to c but not equal to it, so the limit at c does not depend on the value of the function at c. Therefore, if \lim_{x\to c} g(x)=L, \lim_{x\to c} f(x) = L also. And since the domain of our new function g includes c, we can now (assuming g is still built out of rational, trigonometric, logarithmic and exponential functions) just evaluate it at c as before. Thus we have \lim_{x\to c} f(x) = g(c).

In our example, this is easy; canceling the x's gives g(x)=1, which equals f(x)=x/x at all points except 0. Thus, we have \lim_{x\to 0}\frac{x}{x} = \lim_{x\to 0} 1 = 1. In general, when computing limits of rational functions, it's a good idea to look for common factors in the numerator and denominator.

Lastly, note that the limit might not exist at all. There are a number of ways in which this can occur:


f(x) = \sqrt{x^2 - 16}
"Gap"
There is a gap (not just a single point) where the function is not defined. As an example, in
f(x) = \sqrt{x^2 - 16}
\lim_{x\to c}f(x) does not exist when -4\le c\le4. There is no way to "approach" the middle of the graph. Note that the function also has no limit at the endpoints of the two curves generated (at c=-4 and c=4). For the limit to exist, the point must be approachable from both the left and the right.
Note also that there is no limit at a totally isolated point on a graph.
"Jump"
If the graph suddenly jumps to a different level, there is no limit at the point of the jump. For example, let f(x) be the greatest integer \le x. Then, if c is an integer, when x approaches c from the right f(x)=c, while when x approaches c from the left f(x)=c-1. Thus \lim_{x\to c} f(x) will not exist.
A graph of 1/(x2) on the interval [-2,2].
Vertical asymptote
In
f(x) = {1 \over x^2}
the graph gets arbitrarily high as it approaches 0, so there is no limit. (In this case we sometimes say the limit is infinite; see the next section.)
A graph of sin(1/x) on the interval (0,1/π].
Infinite oscillation
These next two can be tricky to visualize. In this one, we mean that a graph continually rises above and falls below a horizontal line. In fact, it does this infinitely often as you approach a certain x-value. This often means that there is no limit, as the graph never approaches a particular value. However, if the height (and depth) of each oscillation diminishes as the graph approaches the x-value, so that the oscillations get arbitrarily smaller, then there might actually be a limit.
The use of oscillation naturally calls to mind the trigonometric functions. An example of a trigonometric function that does not have a limit as x approaches 0 is
f(x) = \sin {1 \over x}.
As x gets closer to 0 the function keeps oscillating between -1 and 1. In fact, \sin(1/x) oscillates an infinite number of times on the interval between 0 and any positive value of x. The sine function is equal to zero whenever x=k\pi, where k is a positive integer. Between every two integers k, \sin x goes back and forth between 0 and -1 or 0 and 1. Hence, \sin(1/x)=0 for every x=1/(k\pi). In between consecutive pairs of these values, 1/(k\pi) and 1/[(k+1)\pi], \sin(1/x) goes back and forth from 0, to either -1 or 1 and back to 0. We may also observe that there are an infinite number of such pairs, and they are all between 0 and 1/\pi. There are a finite number of such pairs between any positive value of x and 1/\pi, so there must be infinitely many between any positive value of x and 0. From our reasoning we may conclude that, as x approaches 0 from the right, the function \sin(1/x) does not approach any specific value. Thus, \lim_{x\to 0} \sin(1/x) does not exist.

Using Limit Notation to Describe Asymptotes

Now consider the function

 g(x) = \frac{1}{x^2}.

What is the limit as x approaches zero? The value of g(0) does not exist; it is not defined.

Notice, also, that we can make g(x) as large as we like, by choosing a small x, as long as x\ne0. For example, to make g(x) equal to 10^{12}, we choose x to be 10^{-6}. Thus, \lim_{x\to 0} \frac{1}{x^2} does not exist.

However, we do know something about what happens to g(x) when x gets close to 0 without reaching it. We want to say we can make g(x) arbitrarily large (as large as we like) by taking x to be sufficiently close to zero, but not equal to zero. We express this symbolically as follows:

\lim_{x\to 0} g(x) = \lim_{x\to 0} \frac{1}{x^2} = \infty

Note that the limit does not exist at 0; for a limit, being \infty is a special kind of not existing. In general, we make the following definition.

Definition: Informal definition of a limit being \pm\infty

We say the limit of f(x) as x approaches c is infinity if f(x) becomes very big (as big as we like) when x is close (but not equal) to c.

In this case we write

\lim_{x\to c} f(x) = \infty

or

f(x)\to\infty\quad\mbox{as}\quad x\to c.

Similarly, we say the limit of f(x) as x approaches c is negative infinity if f(x) becomes very negative when x is close (but not equal) to c.

In this case we write

\lim_{x\to c} f(x) = -\infty

or

f(x)\to-\infty\quad\mbox{as}\quad x\to c.

An example of the second half of the definition would be that \lim_{x\to 0} -\frac{1}{x^2} = -\infty.

Key Application of Limits

To see the power of the concept of the limit, let's consider a moving car. Suppose we have a car whose position is linear with respect to time (that is, a graph plotting the position with respect to time will show a straight line). We want to find the velocity. This is easy to do from algebra; we just take the slope, and that's our velocity.

But unfortunately, things in the real world don't always travel in nice straight lines. Cars speed up, slow down, and generally behave in ways that make it difficult to calculate their velocities.

Now what we really want to do is to find the velocity at a given moment (the instantaneous velocity). The trouble is that in order to find the velocity we need two points, while at any given time, we only have one point. We can, of course, always find the average speed of the car, given two points in time, but we want to find the speed of the car at one precise moment.

This is the basic trick of differential calculus, the first of the two main subjects of this book. We take the average speed at two moments in time, and then make those two moments in time closer and closer together. We then see what the limit of the slope is as these two moments in time are closer and closer, and say that this limit is the slope at a single instant.

We will study this process in much greater depth later in the book. First, however, we will need to study limits more carefully.

External Links

← Limits/Contents Calculus Finite Limits →
Print version

<h1> 2.2 Finite Limits</h1>

← Limits/An Introduction to Limits Calculus Infinite Limits →
Print version

Informal Finite Limits

Now, we will try to more carefully restate the ideas of the last chapter. We said then that the equation \lim_{x\to 2} f(x) = 4 meant that, when x gets close to 2, f(x) gets close to 4. What exactly does this mean? How close is "close"? The first way we can approach the problem is to say that, at x=1.99, f(x)=3.9601, which is pretty close to 4.

Sometimes however, the function might do something completely different. For instance, suppose f(x)=x^4-2x^2-3.77, so f(1.99)=3.99219201. Next, if you take a value even closer to 2, f(1.999)=4.20602, in this case you actually move further from 4. The reason for this is that substitution gives us 4.23 as x approaches 2.

The solution is to find out what happens arbitrarily close to the point. In particular, we want to say that, no matter how close we want the function to get to 4, if we make x close enough to 2 then it will get there. In this case, we will write

\quad\lim_{x\to 2} f(x) = 4

and say "The limit of f(x), as x approaches 2, equals 4" or "As x approaches 2, f(x) approaches 4." In general:

Definition: (New definition of a limit)

We call L the limit of f(x) as x approaches c if f(x) becomes arbitrarily close to L whenever x is sufficiently close (and not equal) to c.

When this holds we write

 \lim_{x \to c} f(x) = L

or

 f(x) \to L \quad \mbox{as} \quad x \to c.

One-Sided Limits

Sometimes, it is necessary to consider what happens when we approach an x value from one particular direction. To account for this, we have one-sided limits. In a left-handed limit, x approaches a from the left-hand side. Likewise, in a right-handed limit, x approaches a from the right-hand side.

For example, if we consider \quad\lim_{x\to 2} \sqrt{x-2}, there is a problem because there is no way for x to approach 2 from the left hand side (the function is undefined here). But, if x approaches 2 only from the right-hand side, we want to say that \sqrt{x-2} approaches 0.

Definition: (Informal definition of a one-sided limit)

We call L the limit of f(x) as x approaches c from the right if f(x) becomes arbitrarily close to L whenever x is sufficiently close to and greater than c.

When this holds we write

 \lim_{x \to c^+} f(x) = L.

Similarly, we call L the limit of f(x) as x approaches c from the left if f(x) becomes arbitrarily close to L whenever x is sufficiently close to and less than c.

When this holds we write

 \lim_{x \to c^-} f(x) = L.

In our example, the left-handed limit \quad\lim_{x\to 2^{-}} \sqrt{x-2} does not exist.

The right-handed limit, however, \quad\lim_{x\to 2^{+}} \sqrt{x-2} = 0.

It is a fact that \lim_{x\to c} f(x) exists if and only if \lim_{x\to c^+} f(x) and \lim_{x\to c^-} f(x) exist and are equal to each other. In this case, \lim_{x\to c} f(x) will be equal to the same number.

In our example, one limit does not even exist. Thus \lim_{x\to 2} \sqrt{x-2} does not exist either.

← Limits/An Introduction to Limits Calculus Infinite Limits →
Print version

<h1> 2.3 Infinite Limits</h1>

← Finite Limits Calculus Continuity →
Print version

Informal Infinite Limits

Another kind of limit involves looking at what happens to f(x) as x gets very big. For example, consider the function f(x)=1/x. As x gets very big, 1/x gets very small. In fact, 1/x gets closer and closer to zero the bigger x gets. Without limits it is very difficult to talk about this fact, because x can keep getting bigger and bigger and 1/x never actually gets to zero; but the language of limits exists precisely to let us talk about the behavior of a function as it approaches something - without caring about the fact that it will never get there. In this case, however, we have the same problem as before: how big does x have to be to be sure that f(x) is really going towards 0?

In this case, we want to say that, however close we want f(x) to get to 0, for x big enough f(x) is guaranteed to get that close. So we have yet another definition.

Definition: (Definition of a limit at infinity)

We call L the limit of f(x) as x approaches infinity if f(x) becomes arbitrarily close to L whenever x is sufficiently large.

When this holds we write

 \lim_{x \to \infty} f(x) = L

or

 f(x) \to L \quad \mbox{as} \quad x \to \infty.

Similarly, we call L the limit of f(x) as x approaches negative infinity if f(x) becomes arbitrarily close to L whenever x is sufficiently negative.

When this holds we write

 \lim_{x \to -\infty} f(x) = L

or

 f(x) \to L \quad \mbox{as} \quad x \to -\infty.

So, in this case, we write:

\quad\lim_{x\to \infin} \frac{1}{x} = 0

and say "The limit, as x approaches infinity, equals 0," or "as x approaches infinity, the function approaches 0".

We can also write:

\quad\lim_{x\to -\infin} \frac{1}{x} = 0,

because making x very negative also forces 1/x to be close to 0.

Notice, however, that infinity is not a number; it's just shorthand for saying "no matter how big." Thus, this is not the same as the regular limits we learned about in the last two chapters.

Limits at Infinity of Rational Functions

One special case that comes up frequently is when we want to find the limit at \infty (or -\infty) of a rational function. A rational function is just one made by dividing two polynomials by each other. For example, f(x)=(x^3+x-6)/(x^2-4x+3) is a rational function. Also, any polynomial is a rational function, since 1 is just a (very simple) polynomial, so we can write the function f(x)=x^2-3 as f(x)=(x^2-3)/1, the quotient of two polynomials.

Consider the numerator of a rational function as we allow the variable to grow very large (in either the positive or negative sense). The term with the highest exponent on the variable will dominate the numerator, and the other terms become more and more insignificant compared to the dominating term. The same applies to the denominator. In the limit, the other terms become negligible, and we only need to examine the dominating term in the numerator and denominator.

There is a simple rule for determining a limit of a rational function as the variable approaches infinity. Look for the term with the highest exponent on the variable in the numerator. Look for the same in the denominator. This rule is based on that information.

  • If the exponent of the highest term in the numerator matches the exponent of the highest term in the denominator, the limit (at both \infty and -\infty) is the ratio of the coefficients of the highest terms.
  • If the numerator has the highest term, then the fraction is called "top-heavy". If, when you divide the numerator by the denominator the resulting exponent on the variable is even, then the limit (at both \infty and -\infty) is \infty. If it is odd, then the limit at \infty is \infty, and the limit at -\infty is -\infty.
  • If the denominator has the highest term, then the fraction is called "bottom-heavy" and the limit (at both \infty and -\infty) is zero.

Note that, if the numerator or denominator is a constant (including 1, as above), then this is the same as x^0. Also, a straight power of x, like x^3, has coefficient 1, since it is the same as 1x^3.

Examples

Example 1

Find \quad\lim_{x\to \infin} \frac{x-5}{x-3} .

The function f(x)=(x-5)/(x-3) is the quotient of two polynomials, x-5 and x-3. By our rule we look for the term with highest exponent in the numerator; it's x. The term with highest exponent in the denominator is also x. So, the limit is the ratio of their coefficients. Since x=1x, both coefficients are 1, so \lim_{x\to\infty} (x-5)/(x-3) = 1/1 = 1.

Example 2

Find \quad\lim_{x\to \infty} \frac{x^3+x-6}{x^2-4x+3}.

We look at the terms with the highest exponents; for the numerator, it is x^3, while for the denominator it is x^2. Since the exponent on the numerator is higher, we know the limit at \infty will be \infty. So,

\quad\lim_{x\to \infty} \frac{x^3+x-6}{x^2-4x+3}=\infty.

← Finite Limits Calculus Continuity →
Print version

Infinity is not a number

Most people seem to struggle with this fact when first introduced to calculus, and in particular limits.

\lim_{x\to 0^+} \frac{1}{x} = \infin .

But \infin is different. \infin is not a number.

Mathematics is based on formal rules that govern the subject. When a list of formal rules applies to a type of object (e.g., "a number") those rules must always apply — no exceptions!

What makes \infin different is this: "there is no number greater than infinity". You can write down the formula in a lot of different ways, but here's one way: 1 +\infin = \infin. If you add one to infinity, you still have infinity; you don't have a bigger number. If you believe that, then infinity is not a number.

Since \infin does not follow the rules laid down for numbers, it cannot be a number. Every time you use the symbol \infin in a formula where you would normally use a number, you have to interpret the formula differently. Let's look at how \infin does not follow the rules that every actual number does:

Addition Breaks

Every number has a negative, and addition is associative. For \infin we could write -\infin and note that \infin - \infin = 0. This is a good thing, since it means we can prove if you take one away from infinity, you still have infinity: \infin -1 = (\infin +1) - 1 = \infin + (1 - 1) = \infin + 0 = \infin . But it also means we can prove 1 = 0, which is not so good.

1+ \infin = \infin
(1+ \infin) - \infin= \infin - \infin
1+ (\infin - \infin)= \infin - \infin
1 = 0\!

Therefore, \infin - \infin = \mathrm{indeterminate}.

Reinterpret Formulas that Use \infin

We started off with a formula that does "mean" something, even though it used \infin and \infin is not a number.

\lim_{x\to 0^+} \frac{1}{x} = \infin .

What does this mean, compared to what it means when we have a regular number instead of an infinity symbol:

\lim_{x\to 2} \frac{1}{x} = \frac1{2} .

This formula says that I can make sure the values of  \frac{1}{x} don't differ very much from \frac{1}{2}, so long as I can control how much x varies away from 2. I don't have to make \frac1{x} exactly equal to \frac{1}{2}, but I also can't control x too tightly. I have to give you a range to vary x within. It's just going to be very, very small (probably) if you want to make  \frac{1}{x} very very close to \frac{1}{2}. And by the way, it doesn't matter at all what happens when x=2.

If we could use the same paragraph as a template for my original formula, we'll see some problems. Let's substitute 0 for 2, and \infin for \frac{1}{2}.

\lim_{x\to 0^+} \frac{1}{x} = \infin .

This formula says that I can make sure the values of  \frac{1}{x} don't differ very much from \infin, so long as I can control how much x varies away from 0. I don't have to make \frac1{x} exactly equal to \infin, but I also can't control x too tightly. I have to give you a range to vary x within. It's just going to be very, very small (probably) if you want to see that  \frac{1}{x} gets very, very close to \infin. And by the way, it doesn't matter at all what happens when x=0.

It's close to making sense, but it isn't quite there. It doesn't make sense to say that some real number is really "close" to \infin. For example, when x = .001 and \frac 1 {x} = 1000 does it really makes sense to say 1000 is closer to \infin than 1 is? Solve the following equations for δ:

1000 + \delta = \infin
\delta = \infin-1000
\delta = \infin
1 + \delta = \infin
 \delta = \infin - 1
 \delta = \infin

No real number is very close to \infin; that's what makes \infin so special! So we have to rephrase the paragraph:

\lim_{x\to 0^+} \frac{1}{x} = \infin .

This formula says that I can make sure the values of  \frac{1}{x} get as big as any number you pick, so long as I can control how much x varies away from 0. I don't have to make \frac1{x} bigger than every number, but I also can't control x too tightly. I have to give you a range to vary x within. It's just going to be very, very small (probably) if you want to see that  \frac{1}{x} gets very, very large. And by the way, it doesn't matter at all what happens when x=0.

You can see that the essential nature of the formula hasn't changed, but the exact details require some human interpretation. While rigorous definitions and clear distinctions are essential to the study of mathematics, sometimes a bit of casual rewording is okay. You just have to make sure you understand what a formula really means so you can draw conclusions correctly.

Exercises

Write out an explanatory paragraph for the following limits that include \infin. Remember that you will have to change any comparison of magnitude between a real number and \infin to a different phrase. In the second case, you will have to work out for yourself what the formula means.

1. \lim_{x \to \infin} \frac{1}{x^2} = 0

This formula says that I can make the values of \frac{1}{x^2} as close as I would like to 0, so long as I make x sufficiently large.

2. \sum_{n = 0}^{\infin} 2^{-n} = 1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \cdots  = 2

This formula says that you can make the sum \sum_{n=0}^{i} 2^{-n} as close as you would like to 2 by making i sufficiently large.

<h1> 2.4 Continuity</h1>

← Infinite Limits Calculus Formal Definition of the Limit →
Print version

Defining Continuity

We are now ready to define the concept of a function being continuous. The idea is that we want to say that a function is continuous if you can draw its graph without taking your pencil off the page. But sometimes this will be true for some parts of a graph but not for others. Therefore, we want to start by defining what it means for a function to be continuous at one point. The definition is simple, now that we have the concept of limits:

Definition: (continuity at a point)

If f(x) is defined on an open interval containing c, then f(x) is said to be continuous at c if and only if

\lim_{x \rightarrow c} f(x) = f(c).

Note that for f to be continuous at c, the definition in effect requires three conditions:

  1. that f is defined at c, so f(c) exists,
  2. the limit as x approaches c exists, and
  3. the limit and f(c) are equal.

If any of these do not hold then f is not continuous at c.

The idea of the definition is that the point of the graph corresponding to c will be close to the points of the graph corresponding to nearby x-values. Now we can define what it means for a function to be continuous in general, not just at one point.

Definition: (continuity)
A function is said to be continuous on (a, b) if it is continuous at every point of the interval (a, b).

We often use the phrase "the function is continuous" to mean that the function is continuous at every real number. This would be the same as saying the function was continuous on (−∞, ∞), but it is a bit more convenient to simply say "continuous".

Note that, by what we already know, the limit of a rational, exponential, trigonometric or logarithmic function at a point is just its value at that point, so long as it's defined there. So, all such functions are continuous wherever they're defined. (Of course, they can't be continuous where they're not defined!)

Discontinuities

A discontinuity is a point where a function is not continuous. There are lots of possible ways this could happen, of course. Here we'll just discuss two simple ways.

Removable discontinuities

The function f(x) = \frac {x^2-9} {x-3} is not continuous at x = 3. It is discontinuous at that point because the fraction then becomes \frac{0}{0}, which is undefined. Therefore the function fails the first of our three conditions for continuity at the point 3; 3 is just not in its domain.

However, we say that this discontinuity is removable. This is because, if we modify the function at that point, we can eliminate the discontinuity and make the function continuous. To see how to make the function f(x) continuous, we have to simplify f(x), getting f(x) = \frac {x^2-9} {x-3} = \frac {(x+3)(x-3)} {(x-3)} = \frac {x+3} {1} \cdot \frac {x-3} {x-3}. We can define a new function g(x) where g(x) = x + 3. Note that the function g(x) is not the same as the original function f(x), because g(x) is defined at x=3, while f(x) is not. Thus, g(x) is continuous at x=3, since \lim_{x\to 3} (x+3) = 6 = g(3). However, whenever x\ne 3, f(x)=g(x); all we did to f to get g was to make it defined at x=3.

In fact, this kind of simplification is often possible with a discontinuity in a rational function. We can divide the numerator and the denominator by a common factor (in our example x-3) to get a function which is the same except where that common factor was 0 (in our example at x=3). This new function will be identical to the old except for being defined at new points where previously we had division by 0.

However, this is not possible in every case. For example, the function f(x)=\frac{x-3}{x^2-6x+9} has a common factor of x-3 in both the numerator and denominator, but when you simplify you are left with g(x)=\frac{1}{x-3}, which is still not defined at x=3. In this case the domain of f(x) and g(x) are the same, and they are equal everywhere they are defined, so they are in fact the same function. The reason that g(x) differed from f(x) in the first example was because we could take it to have a larger domain and not simply that the formulas defining f(x) and g(x) were different.

Jump discontinuities

Illustration of a jump discontinuity

Not all discontinuities can be removed from a function. Consider this function:

k(x) = \left\{\begin{matrix} 1, & \mbox{if }x > 0 \\ -1, & \mbox{if }x \le 0 \end{matrix}\right.

Since \lim_{x\to 0} k(x) does not exist, there is no way to redefine k at one point so that it will be continuous at 0. These sorts of discontinuities are called nonremovable discontinuities.

Note, however, that both one-sided limits exist; \lim_{x\to 0^-} k(x) = -1 and \lim_{x\to 0^+} k(x) = 1. The problem is that they are not equal, so the graph "jumps" from one side of 0 to the other. In such a case, we say the function has a jump discontinuity. (Note that a jump discontinuity is a kind of nonremovable discontinuity.)

One-Sided Continuity

Just as a function can have a one-sided limit, a function can be continuous from a particular side. For a function to be continuous at a point from a given side, we need the following three conditions:

  1. the function is defined at the point,
  2. the function has a limit from that side at that point and
  3. the one-sided limit equals the value of the function at the point.

A function will be continuous at a point if and only if it is continuous from both sides at that point. Now we can define what it means for a function to be continuous on a closed interval.

Definition: (continuity on a closed interval)

A function is said to be continuous on [a,b] if and only if

  1. it is continuous on (a,b),
  2. it is continuous from the right at a and
  3. it is continuous from the left at b.

Notice that, if a function is continuous, then it is continuous on every closed interval contained in its domain.

Intermediate Value Theorem

A useful theorem regarding continuous functions is the following:

Intermediate Value Theorem
If a function f is continuous on a closed interval [a,b], then for every value k between f(a) and f(b) there is a value c between a and b such that f(c)=k.

Application: bisection method

A few steps of the bisection method applied over the starting range [a1;b1]. The bigger red dot is the root of the function.

The bisection method is the simplest and most reliable algorithm to find zeros of a continuous function.

Suppose we want to solve the equation f(x) = 0. Given two points a and b such that f(a) and f(b) have opposite signs, the intermediate value theorem tells us that f must have at least one root between a and b as long as f is continuous on the interval [a,b]. If we know f is continuous in general (say, because it's made out of rational, trigonometric, exponential and logarithmic functions), then this will work so long as f is defined at all points between a and b. So, let's divide the interval [a,b] in two by computing c = (a+b) / 2. There are now three possibilities:

  1. f(c)=0,
  2. f(a) and f(c) have opposite signs, or
  3. f(c) and f(b) have opposite signs.

In the first case, we're done. In the second and third cases, we can repeat the process on the sub-interval where the sign change occurs. In this way we hone in to a small sub-interval containing the zero. The midpoint of that small sub-interval is usually taken as a good approximation to the zero.

Note that, unlike the methods you may have learned in algebra, this works for any continuous function that you (or your calculator) know how to compute.

← Infinite Limits Calculus Formal Definition of the Limit →
Print version

<h1> 2.5 Formal Definition of the Limit</h1>

← Continuity Calculus Proofs of Some Basic Limit Rules →
Print version


In preliminary calculus, the concept of a limit is probably the most difficult one to grasp (after all, it took mathematicians 150 years to arrive at it); it is also the most important and most useful.

The intuitive definition of a limit is inadequate to prove anything rigorously about it. The problem lies in the vague term "arbitrarily close". We discussed earlier that the meaning of this term is that the closer x gets to the specified value, the closer the function must get to the limit, so that however close we want the function to the limit, we can accomplish this by making x sufficiently close to our value. We can express this requirement technically as follows:

Definition: (Formal definition of a limit)

Let f(x) be a function defined on an open interval D that contains c, except possibly at x=c. Let L be a number. Then we say that

 \lim_{x \to c} f(x) = L

if, for every \varepsilon>0, there exists a \delta>0 such that for all x\in D with

0 < \left| x - c \right| < \delta,

we have

\left| f(x) - L \right| < \varepsilon.

To further explain, earlier we said that "however close we want the function to the limit, we can find a corresponding x close to our value." Using our new notation of epsilon (\varepsilon) and delta (\delta), we mean that if we want to make f(x) within \varepsilon of L, the limit, then we know that making x within \delta of c puts it there.

Again, since this is tricky, let's resume our example from before: f(x)=x^2, at x=2. To start, let's say we want f(x) to be within .01 of the limit. We know by now that the limit should be 4, so we say: for \varepsilon=.01, there is some \delta so that as long as 0 < \left| x - c \right| < \delta, then \left| f(x) - L \right| < \varepsilon.

To show this, we can pick any \delta that is bigger than 0, so long as it works. For example, you might pick .00000000000001, because you are absolutely sure that if x is within .00000000000001 of 2, then f(x) will be within .01 of 4. This \delta works for \varepsilon=.01. But we can't just pick a specific value for \varepsilon, like .01, because we said in our definition "for every \varepsilon>0." This means that we need to be able to show an infinite number of \deltas, one for each \varepsilon. We can't list an infinite number of \deltas!

Of course, we know of a very good way to do this; we simply create a function, so that for every \varepsilon, it can give us a \delta. In this case, one definition of \delta that works is \delta(\varepsilon)=\left\{\begin{matrix}2\sqrt2-2,&\mbox{if }\epsilon\geq4\\\sqrt{\epsilon+4}-2,&\mbox{if }\epsilon<4\end{matrix}\right. (see example 5 in choosing delta for an explanation of how this delta was chosen.)

So, in general, how do you show that f(x) tends to L as x tends to c? Well imagine somebody gave you a small number \varepsilon (e.g., say \varepsilon=0.03). Then you have to find a \delta>0 and show that whenever 0<\left|x-c\right|<\delta we have |f(x)-L|<0.03. Now if that person gave you a smaller \varepsilon (say \varepsilon=0.002) then you would have to find another \delta, but this time with 0.03 replaced by 0.002. If you can do this for any choice of \varepsilon then you have shown that f(x) tends to L as x tends to c. Of course, the way you would do this in general would be to create a function giving you a \delta for every \varepsilon, just as in the example above.

Formal Definition of the Limit at Infinity

Definition: (Limit of a function at infinity)

We call L the limit of f(x) as x approaches \infty if for every number \varepsilon>0 there exists a \delta such that whenever x>\delta we have

\left| f(x) - L \right| < \varepsilon

When this holds we write

 \lim_{x \to \infty} f(x) = L

or

 f(x) \to L as  x \to \infty.

Similarly, we call L the limit of f(x) as x approaches -\infty if for every number \varepsilon>0, there exists a number \delta such that whenever x<\delta we have

\left| f(x) - L \right| < \varepsilon

When this holds we write

 \lim_{x \to -\infty} f(x) = L

or

 f(x) \to L as  x\to -\infty.

Notice the difference in these two definitions. For the limit of f(x) as x approaches \infty we are interested in those x such that x>\delta. For the limit of f(x) as x approaches -\infty we are interested in those x such that x<\delta.

Examples

Here are some examples of the formal definition.

Example 1

We know from earlier in the chapter that

\lim_{x \to 8} \frac {x} {4}=2 .

What is \delta when \varepsilon=0.01 for this limit?

We start with the desired conclusion and substitute the given values for f(x) and \varepsilon:

\left| \frac {x} {4} - 2 \right| < 0.01.

Then we solve the inequality for x:

7.96<x<8.04

This is the same as saying

-0.04<x-8<0.04.

(We want the thing in the middle of the inequality to be x-8 because that's where we're taking the limit.) We normally choose the smaller of \left|-0.04\right| and 0.04 for \delta, so \delta=0.04, but any smaller number will also work.

Example 2

What is the limit of f(x) = x + 7 as x approaches 4?

There are two steps to answering such a question; first we must determine the answer — this is where intuition and guessing is useful, as well as the informal definition of a limit — and then we must prove that the answer is right.

In this case, 11 is the limit because we know f(x) = x + 7 is a continuous function whose domain is all real numbers. Thus, we can find the limit by just substituting 4 in for x, so the answer is 4+7=11.

We're not done, though, because we never proved any of the limit laws rigorously; we just stated them. In fact, we couldn't have proved them, because we didn't have the formal definition of the limit yet, Therefore, in order to be sure that 11 is the right answer, we need to prove that no matter what value of \varepsilon is given to us, we can find a value of \delta such that

\left| f(x) - 11 \right| < \varepsilon

whenever

\left| x - 4 \right| < \delta.

For this particular problem, letting \delta=\varepsilon works (see choosing delta for help in determining the value of \delta to use in other problems). Now, we have to prove

\left| f(x) - 11 \right| < \varepsilon

given that

\left| x - 4 \right| < \delta = \varepsilon.

Since \left| x - 4 \right| < \varepsilon, we know

\left| f(x) - 11 \right| = \left| x + 7 - 11 \right| = \left| x - 4 \right| < \varepsilon

which is what we wished to prove.

Example 3

What is the limit of f(x) = x^2 as x approaches 4?

As before, we use what we learned earlier in this chapter to guess that the limit is 4^2=16. Also as before, we pull out of thin air that

\delta = \sqrt{\varepsilon+16}-4.

Note that, since \varepsilon is always positive, so is \delta, as required. Now, we have to prove

\left| x^2 - 16 \right| < \varepsilon

given that

\left| x - 4 \right| < \delta = \sqrt{\varepsilon + 16} - 4.

We know that

\left|x + 4\right| = \left|(x - 4) + 8\right| \le \left|x - 4\right| + 8<\delta+8

(because of the triangle inequality), so

\begin{matrix}
\left| x^2 - 16 \right| & = & \left| x - 4 \right| \cdot \left| x + 4 \right| \\  \\
\ & < & \delta \cdot (\delta + 8) \\  \\
\ & < & (\sqrt{16 + \varepsilon} - 4) \cdot (\sqrt{16 + \varepsilon} + 4) \\  \\
\ & < & (\sqrt{16 + \varepsilon})^2 - 4^2 \\  \\
\ & = & \varepsilon+16-16 \\ \\
\ & < & \varepsilon. \end{matrix}

Example 4

Show that the limit of \sin(1/x) as x approaches 0 does not exist.

We will proceed by contradiction. Suppose the limit exists; call it L. For simplicity, we'll assume that L\neq 1; the case for L=1 is similar. Choose \varepsilon = |1-L|. Then if the limit were L there would be some \delta>0 such that \left|\sin(1/x)-L\right|<\varepsilon=|1-L| for every x with 0<\left|x\right|<\delta. But, for every \delta > 0, there exists some (possibly very large) n such that  0 < x_0 = \frac{1}{\pi /2 + 2\pi n} < \delta, but |\sin(1/x_0) - L|=|1-L|, a contradiction.

Example 5

What is the limit of x \sin(1/x) as x approaches 0?

By the Squeeze Theorem, we know the answer should be 0. To prove this, we let \delta = \varepsilon. Then for all x, if 0 < |x| < \delta, then |x \sin(1/x) - 0| \leq | x | < \varepsilon as required.

Example 6

Suppose that \lim_{x\to a}f(x)=L and \lim_{x\to a}g(x)=M. What is \lim_{x\to a}(f(x)+g(x))?

Of course, we know the answer should be L+M, but now we can prove this rigorously. Given some \varepsilon, we know there's a \delta_1 such that, for any x with 0<\left|x-a\right|<\delta_1, \left|f(x)-L\right|<\varepsilon/2 (since the definition of limit says "for any \varepsilon", so it must be true for \varepsilon/2 as well). Similarly, there's a \delta_2 such that, for any x with 0<\left|x-a\right|<\delta_2, \left|g(x)-M\right|<\varepsilon/2. We can set \delta to be the lesser of \delta_1 and \delta_2. Then, for any x with 0<\left|x-a\right|<\delta, \left|(f(x)+g(x))-(L+M)\right|\le\left|f(x)-L\right|+\left|g(x)-M\right|<\varepsilon/2+\varepsilon/2
=\varepsilon, as required.

If you like, you can prove the other limit rules too using the new definition. Mathematicians have already done this, which is how we know the rules work. Therefore, when computing a limit from now on, we can go back to just using the rules and still be confident that our limit is correct according to the rigorous definition.

Formal Definition of a Limit Being Infinity

Definition: (Formal definition of a limit being infinity)

Let f(x) be a function defined on an open interval D that contains c, except possibly at x=c. Then we say that

 \lim_{x \to c} f(x) = \infty

if, for every \varepsilon, there exists a \delta>0 such that for all x\in D with

0 < \left| x - c \right| < \delta,

we have

f(x) > \varepsilon.

When this holds we write

\lim_{x\to c}f(x)=\infty

or

f(x)\to\infty as x\to c.

Similarly, we say that

 \lim_{x \to c} f(x) = -\infty

if, for every \varepsilon, there exists a \delta>0 such that for all x\in D with

0 < \left| x - c \right| < \delta,

we have

f(x) < \varepsilon.

When this holds we write

\lim_{x\to c}f(x)=-\infty

or

f(x)\to-\infty as x\to c.
← Continuity Calculus Proofs of Some Basic Limit Rules →
Print version

<h1> 2.6 Proofs of Some Basic Limit Rules</h1>

← Formal Definition of the Limit Calculus Limits/Exercises →
Print version

Now that we have the formal definition of a limit, we can set about proving some of the properties we stated earlier in this chapter about limits.

Constant Rule for Limits

If b and c are constants then  \lim_{x\to c} b = b.

Proof of the Constant Rule for Limits:
To prove that  \lim_{x\to c} f(x) = b, we need to find a \delta>0 such that for every \varepsilon>0, \left|b-b\right|<\varepsilon whenever \left|x-c\right|<\delta. \left|b-b\right|=0 and \varepsilon>0, so \left|b-b\right|<\varepsilon is satisfied independent of any value of \delta; that is, we can choose any \delta we like and the \varepsilon condition holds.

Identity Rule for Limits

If c is a constant then  \lim_{x\to c} x = c.

Proof of the Identity Rule for Limits:
To prove that  \lim_{x\to c} x = c, we need to find a \delta>0 such that for every \varepsilon>0, \left|x-c\right|<\varepsilon whenever \left|x-c\right|<\delta. Choosing \delta=\varepsilon satisfies this condition.

Scalar Product Rule for Limits

Suppose that \lim_{x\to c} f(x) =L for finite L and that k is constant. Then  \lim_{x\to c} k f(x) = k \cdot \lim_{x\to c} f(x) =  k L

Proof of the Scalar Product Rule for Limits:
Since we are given that \lim_{x\to c} f(x) =L, there must be some function, call it \delta_{f}(\varepsilon), such that for every \varepsilon>0, \left|f(x)-L\right|<\varepsilon whenever \left|x-c\right|<\delta_{f}(\varepsilon). Now we need to find a \delta_{kf}(\varepsilon) such that for all \varepsilon>0, \left|k f(x)-k L\right|<\varepsilon whenever \left|x-c\right|<\delta_{kf}(\varepsilon).
First let's suppose that k>0. \left|k f(x)-k L\right| = k \left|f(x)-L\right|<\varepsilon, so \left|f(x)-L\right|<\varepsilon/k. In this case, letting \delta_{kf}(\varepsilon)=\delta_{f}(\varepsilon/k) satisfies the limit condition.
Now suppose that k=0. Since f(x) has a limit at x=c, we know from the definition of a limit that f(x) is defined in an open interval D that contains c (except maybe at c itself). In particular, we know that f(x) doesn't blow up to infinity within D (except maybe at c, but that won't affect the limit), so that  0 f(x)=0 in D. Since k f(x) is the constant function 0 in D, the limit  \lim_{x\to c} k f(x) = 0 by the Constant Rule for Limits.
Finally, suppose that k<0. \left|k f(x)-k L\right| = -k \left|f(x)-L\right|<\varepsilon, so \left|f(x)-L\right|<-\varepsilon/k. In this case, letting \delta_{kf}(\varepsilon)=\delta_{f}(-\varepsilon/k) satisfies the limit condition.

Sum Rule for Limits
Suppose that \lim_{x\to c} f(x) =L and \lim_{x\to c} g(x) =M. Then

 \lim_{x\to c} [f(x) + g(x)] = \lim_{x\to c} f(x) +  \lim_{x\to c} g(x) =  L + M

Proof of the Sum Rule for Limits:
Since we are given that \lim_{x\to c} f(x) =L and \lim_{x\to c} g(x) =M, there must be functions, call them \delta_{f}(\varepsilon) and \delta_{g}(\varepsilon), such that for all \varepsilon>0, \left|f(x)-L\right|<\varepsilon whenever \left|x-c\right|<\delta_{f}(\varepsilon), and .\left|g(x)-M\right|<\varepsilon whenever \left|x-c\right|<\delta_{g}(\varepsilon).
Adding the two inequalities gives \left|f(x)-L\right| + \left|g(x)-M\right| < 2\varepsilon. By the triangle inequality we have \left|f(x)-L\right| + \left|g(x)-M\right| \geq \left|(f(x)-L)+(g(x)-M)\right|=\left|(f(x)+g(x))-(L+M)\right|, so we have \left|(f(x)+g(x))-(L+M)\right|<2\varepsilon whenever \left|x-c\right|<\delta_{f}(\varepsilon) and \left|x-c\right|<\delta_{g}(\varepsilon). Let \delta_{fg}(\varepsilon) be the smaller of \delta_{f}(\varepsilon/2) and \delta_{g}(\varepsilon/2). Then this \delta satisfies the definition of a limit for \lim_{x\to c} [f(x) + g(x)] having limit  L + M .

Difference Rule for Limits
Suppose that \lim_{x\to c} f(x) =L and \lim_{x\to c} g(x) =M. Then

 \lim_{x\to c} [f(x) - g(x)] = \lim_{x\to c} f(x) -  \lim_{x\to c} g(x) =  L - M

Proof of the Difference Rule for Limits: Define h(x)=-g(x). By the Scalar Product Rule for Limits, \lim_{x\to c}h(x)=-M. Then by the Sum Rule for Limits, \lim_{x\to c}(f(x)-g(x))=\lim_{x\to c}(f(x)+h(x))=L-M.

Product Rule for Limits
Suppose that \lim_{x\to c} f(x) =L and \lim_{x\to c} g(x) =M. Then

 \lim_{x\to c} [f(x) g(x)] = \lim_{x\to c} f(x) \lim_{x\to c} g(x) = L M

Proof of the Product Rule for Limits:[1]
Let \varepsilon be any positive number. The assumptions imply the existence of the positive numbers \delta_{1}, \delta_{2}, \delta_{3} such that

(1)\qquad\left|f(x)-L\right|<\frac{\varepsilon}{2(1+\left|M\right|)} when 0<\left|x-c\right|<\delta_{1}
(2)\qquad\left|g(x)-M\right|<\frac{\varepsilon}{2(1+\left|L\right|)} when 0<\left|x-c\right|<\delta_{2}
(3)\qquad\left|g(x)-M\right|<1 when 0<\left|x-c\right|<\delta_{3}

According to the condition (3) we see that

\left|g(x)\right|=\left|g(x)-M+M\right|\leq\left|g(x)-M\right|+\left|M\right|<1+\left|M\right| when 0<\left|x-c\right|<\delta_{3}

Supposing then that 0<\left|x-c\right|<\min\{\delta_{1},\delta_{2},\delta_{3}\} and using (1) and (2) we obtain

\begin{align}\left|f(x)g(x)-LM\right|&=\left|f(x)g(x)-Lg(x)+Lg(x)-LM\right|\\
&\leq\left|f(x)g(x)-Lg(x)\right|+\left|Lg(x)-LM\right|\\
&=\left|g(x)\right|\cdot\left|f(x)-L\right|+\left|L\right|\cdot\left|g(x)-M\right|\\
&<(1+\left|M\right|)\frac{\varepsilon}{2(1+\left|M\right|)}+(1+\left|L\right|)\frac{\varepsilon}{2(1+\left|L\right|)}\\
&=\varepsilon
\end{align}

Quotient Rule for Limits
Suppose that \lim_{x\to c} f(x) =L and \lim_{x\to c} g(x) =M and M \neq 0. Then

 \lim_{x\to c} \frac{f(x)}{g(x)} = \frac{\lim_{x\to c} f(x)}{\lim_{x\to c} g(x)} = \frac{L}{M}

Proof of the Quotient Rule for Limits:
If we can show that \lim_{x\to c}\frac{1}{g(x)}=\frac{1}{M}, then we can define a function, h(x) as h(x)=\frac{1}{g(x)} and appeal to the Product Rule for Limits to prove the theorem. So we just need to prove that \lim_{x\to c}\frac{1}{g(x)}=\frac{1}{M}.
Let \varepsilon be any positive number. The assumptions imply the existence of the positive numbers \delta_{1}, \delta_{2} such that

(1)\qquad\left|g(x)-M\right|<\varepsilon\left|M\right|(1+\left|M\right|) when 0<\left|x-c\right|<\delta_{1}
(2)\qquad\left|g(x)-M\right|<1 when 0<\left|x-c\right|<\delta_{2}

According to the condition (2) we see that

\left|g(x)\right|=\left|g(x)-M+M\right|\leq\left|g(x)-M\right|+\left|M\right|<1+\left|M\right| when 0<\left|x-c\right|<\delta_{2}

which implies that

(3)\qquad\left|\frac{1}{g(x)}\right|>\frac{1}{1+\left|M\right|} when 0<\left|x-c\right|<\delta_{2}

Supposing then that 0<\left|x-c\right|<\min\{\delta_{1},\delta_{2}\} and using (1) and (3) we obtain

\begin{align}\left|\frac{1}{g(x)}-\frac{1}{M}\right|&=\left|\frac{M-g(x)}{Mg(x)}\right|\\
&=\left|\frac{g(x)-M}{Mg(x)}\right|\\
&=\left|\frac{1}{g(x)}\right|\cdot\left|\frac{g(x)-M}{M}\right|\\
&<\frac{1}{1+\left|M\right|}\cdot\left|\frac{g(x)-M}{M}\right|\\
&<\frac{1}{1+\left|M\right|}\cdot\left|\frac{\varepsilon\left|M\right|(1+\left|M\right|)}{M}\right|\\
&=\varepsilon
\end{align}
Theorem: (Squeeze Theorem)
Suppose that g(x) \le f(x) \le h(x) holds for all x in some open interval containing c, except possibly at x=c itself. Suppose also that \lim_{x\to c}g(x)=\lim_{x\to c}h(x)=L. Then \lim_{x\to c}f(x)=L also.

Proof of the Squeeze Theorem:
From the assumptions, we know that there exists a \delta such that \left|g(x)-L\right|<\varepsilon and \left|h(x)-L\right|<\varepsilon when 0<\left|x-c\right|<\delta.
These inequalities are equivalent to L-\varepsilon<g(x)<L+\varepsilon and L-\varepsilon<h(x)<L+\varepsilon when 0<\left|x-c\right|<\delta.
Using what we know about the relative ordering of f(x), g(x), and h(x), we have
L-\varepsilon<g(x)<f(x)<h(x)<L+\varepsilon when 0<\left|x-c\right|<\delta.
or
-\varepsilon<g(x)-L<f(x)-L<h(x)-L<\varepsilon when 0<\left|x-c\right|<\delta.
So
\left|f(x)-L\right|<max(\left|g(x)-L\right|,\left|h(x)-L\right|)<\varepsilon when 0<\left|x-c\right|<\delta.

Notes

  1. This proof is adapted from one found at planetmath.org/encyclopedia/ProofOfLimitRuleOfProduct.html due to Planet Math user pahio and made available under the terms of the Creative Commons By/Share-Alike License.
← Formal Definition of the Limit Calculus Limits/Exercises →
Print version

<h1> 2.7 Limits Cumulative Exercises</h1>

← Proofs of Some Basic Limit Rules Calculus Differentiation →
Print version

Basic Limit Exercises

1. \lim_{x\to 2} (4x^2 - 3x+1)

11

2. \lim_{x\to 5} (x^2)

25

Solutions

One-Sided Limits

Evaluate the following limits or state that the limit does not exist.

3.  \lim_{x\to 0^-} \frac{x^3+x^2}{x^3+2x^2}

\frac{1}{2}

4.  \lim_{x\to 7^-} |x^2+x| -x

49

5.  \lim_{x\to -1^+} \sqrt{1-x^2}

0

6.  \lim_{x\to -1^-} \sqrt{1-x^2}

The limit does not exist

Solutions

Two-Sided Limits

Evaluate the following limits or state that the limit does not exist.

7.  \lim_{x \to -1} \frac{1}{x-1}

-\frac{1}{2}

8.  \lim_{x\to 4}  \frac{1}{x-4}

The limit does not exist.

9.  \lim_{x\to 2}  \frac{1}{x-2}

The limit does not exist.

10.  \lim_{x\to -3}  \frac{x^2 - 9}{x+3}

-6

11.  \lim_{x\to 3} \frac{x^2 - 9}{x-3}

6

12.  \lim_{x\to -1} \frac{x^2+2x+1}{x+1}

0

13.  \lim_{x\to -1} \frac{x^3+1}{x+1}

3

14.  \lim_{x\to 4} \frac{x^2 + 5x-36}{x^2 - 16}

\frac{13}{8}

15.  \lim_{x\to 25} \frac{x-25}{\sqrt{x}-5}

10

16.  \lim_{x\to 0} \frac{\left|x\right|}{x}

The limit does not exist.

17.  \lim_{x\to 2} \frac{1}{(x-2)^2}

\infty

18.  \lim_{x\to 3} \frac{\sqrt{x^2+16}}{x-3}

The limit does not exist.

19.  \lim_{x\to -2} \frac{3x^2-8x -3}{2x^2-18}

-\frac{5}{2}

20.  \lim_{x\to 2} \frac{x^2 + 2x + 1}{x^2-2x+1}

9

21.  \lim_{x\to 3} \frac{x+3}{x^2-9}

The limit does not exist.

22.  \lim_{x\to -1} \frac{x+1}{x^2+x}

-1

23.  \lim_{x\to 1} \frac{1}{x^2+1}

\frac{1}{2}

24.  \lim_{x\to 1} x^ + 5x - \frac{1}{2-x}

5

25.  \lim_{x\to 1} \frac{x^2-1}{x^2+2x-3}

\frac{1}{2}

26.  \lim_{x\to 1} \frac{5x}{x^2+2x-3}

The limit does not exist.

Solutions

Limits to Infinity

Evaluate the following limits or state that the limit does not exist.

27.  \lim_{x\to \infty} \frac{-x + \pi}{x^2 + 3x + 2}

0

28.  \lim_{x\to -\infty} \frac{x^2+2x+1}{3x^2+1}

\frac{1}{3}

29.  \lim_{x\to -\infty} \frac{3x^2 + x}{2x^2 - 15}

\frac{3}{2}

30.  \lim_{x\to -\infty} 3x^2-2x+1

\infty

31.  \lim_{x\to \infty} \frac{2x^2-32}{x^3-64}

0

32.  \lim_{x\to \infty} 6

6

33.  \lim_{x\to \infty} \frac{3x^2 +4x}{x^4+2}

0

34.  \lim_{x\to -\infty} \frac{2x+3x^2+1}{2x^2+3}

\frac{3}{2}

35.  \lim_{x\to -\infty} \frac{x^3-3x^2+1}{3x^2+x+5}

-\infty

36.  \lim_{x\to \infty} \frac{x^2+2}{x^3-2}

0

Solutions

Limits of Piecewise Functions

Evaluate the following limits or state that the limit does not exist.

37. Consider the function

 f(x) = \begin{cases} (x-2)^2 & \mbox{if }x<2 \\ x-3 & \mbox{if }x\geq 2. \end{cases}
a.  \lim_{x\to 2^-}f(x)

0

b.  \lim_{x\to 2^+}f(x)

-1

c.  \lim_{x\to 2}f(x)

The limit does not exist


38. Consider the function

 g(x) = \begin{cases} -2x+1 & \mbox{if }x\leq 0 \\ x+1 & \mbox{if }0<x<4 \\ x^2 +2 & \mbox{if }x \geq 4. \end{cases}
a.  \lim_{x\to 4^+} g(x)

18

b.  \lim_{x\to 4^-} g(x)

5

c.  \lim_{x\to 0^+} g(x)

1

d.  \lim_{x\to 0^-} g(x)

1

e.  \lim_{x\to 0} g(x)

1

f.  \lim_{x\to 1} g(x)

2


39. Consider the function

 h(x) = \begin{cases} 2x-3 & \mbox{if }x<2 \\ 8 & \mbox{if }x=2 \\ -x+3 & \mbox{if } x>2. \end{cases}
a.  \lim_{x\to 0} h(x)

-3

b.  \lim_{x\to 2^-} h(x)

1

c.  \lim_{x\to 2^+} h(x)

1

d.  \lim_{x\to 2} h(x)

1

Solutions

External Links


← Proofs of Some Basic Limit Rules Calculus Differentiation →
Print version

Differentiation

Basics of Differentiation

<h1> 3.1 Differentiation Defined</h1>

← Differentiation/Contents Calculus Product and Quotient Rules →
Print version

What is Differentiation?

Differentiation is an operation that allows us to find a function that outputs the rate of change of one variable with respect to another variable.

Informally, we may suppose that we're tracking the position of a car on a two-lane road with no passing lanes. Assuming the car never pulls off the road, we can abstractly study the car's position by assigning it a variable, x. Since the car's position changes as the time changes, we say that x is dependent on time, or x = f(t). This tells where the car is at each specific time. Differentiation gives us a function dx / dt which represents the car's speed, that is the rate of change of its position with respect to time.

Equivalently, differentiation gives us the slope at any point of the graph of a non-linear function. For a linear function, of form f(x)=ax+b, a is the slope. For non-linear functions, such as f(x)=3x^2, the slope can depend on x; differentiation gives us a function which represents this slope.

The Definition of Slope

Historically, the primary motivation for the study of differentiation was the tangent line problem: for a given curve, find the slope of the straight line that is tangent to the curve at a given point. The word tangent comes from the Latin word tangens, which means touching. Thus, to solve the tangent line problem, we need to find the slope of a line that is "touching" a given curve at a given point, or, in modern language, that has the same slope. But what exactly do we mean by "slope" for a curve?

The solution is obvious in some cases: for example, a line y = m x + c is its own tangent; the slope at any point is m. For the parabola y = x^2, the slope at the point (0,0) is 0; the tangent line is horizontal.

But how can you find the slope of, say, y = \sin  x + x^2 at x = 1.5? This is in general a nontrivial question, but first we will deal carefully with the slope of lines.

Of a line

Three lines with different slopes

The slope of a line, also called the gradient of the line, is a measure of its inclination. A line that is horizontal has slope 0, a line from the bottom left to the top right has a positive slope and a line from the top left to the bottom right has a negative slope.

The slope can be defined in two (equivalent) ways. The first way is to express it as how much the line climbs for a given motion horizontally. We denote a change in a quantity using the symbol \Delta (pronounced "delta"). Thus, a change in x is written as \Delta x. We can therefore write this definition of slope as:

\mbox{Slope}=\frac{\Delta y}{\Delta x}

An example may make this definition clearer. If we have two points on a line, P \left(x_1,y_1 \right) and Q \left( x_2,y_2 \right), the change in x from P to Q is given by:

\Delta x = x_2 - x_1\,

Likewise, the change in y from P to Q is given by:

\Delta y = y_2 - y_1\,

This leads to the very important result below.

The slope of the line between the points (x_1, y_1) and (x_2, y_2) is

\frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}.

Alternatively, we can define slope trigonometrically, using the tangent function:

\mbox{Slope}=\tan\left( \alpha \right),

where \alpha is the angle from the rightward-pointing horizontal to the line, measured counter-clockwise. If you recall that the tangent of an angle is the ratio of the y-coordinate to the x-coordinate on the unit circle, you should be able to spot the equivalence here.

Of a graph of a function

The graphs of most functions we are interested in are not straight lines (although they can be), but rather curves. We cannot define the slope of a curve in the same way as we can for a line. In order for us to understand how to find the slope of a curve at a point, we will first have to cover the idea of tangency. Intuitively, a tangent is a line which just touches a curve at a point, such that the angle between them at that point is zero. Consider the following four curves and lines:

(i) (ii)
Tangency Example 1.svg Tangency Example 2.svg
(iii) (iv)
Tangency Example 3.svg Tangency Example 4.svg
  1. The line L crosses, but is not tangent to C at P.
  2. The line L crosses, and is tangent to C at P.
  3. The line L crosses C at two points, but is tangent to C only at P.
  4. There are many lines that cross C at P, but none are tangent. In fact, this curve has no tangent at P.

A secant is a line drawn through two points on a curve. We can construct a definition of a tangent as the limit of a secant of the curve taken as the separation between the points tends to zero. Consider the diagram below.

Tangent as Secant Limit.svg

As the distance h tends to zero, the secant line becomes the tangent at the point x_0. The two points we draw our line through are:

P \left( x_0, f\left( x_0 \right) \right)

and

Q \left( x_0+h, f\left( x_0+h \right) \right)

As a secant line is simply a line and we know two points on it, we can find its slope, m_h, using the formula from before:

m = \frac{y_2 - y_1}{x_2 - x_1}

(We will refer to the slope as m_h because it may, and generally will, depend on h.) Substituting in the points on the line,

m_h = \frac{f\left( x_0+h \right) - f\left( x_0 \right)}{\left(x_0 + h \right) - x_0}.

This simplifies to

m_h = \frac{f\left( x_0+h \right) - f\left( x_0 \right)}{h}.

This expression is called the difference quotient. Note that h can be positive or negative — it is perfectly valid to take a secant through any two points on the curve — but cannot be 0.

The definition of the tangent line we gave was not rigorous, since we've only defined limits of numbers — or, more precisely, of functions that output numbers — not of lines. But we can define the slope of the tangent line at a point rigorously, by taking the limit of the slopes of the secant lines from the last paragraph. Having done so, we can then define the tangent line as well. Note that we cannot simply set h to zero as this would imply division of zero by zero which would yield an undefined result. Instead we must find the limit of the above expression as h tends to zero:

Definition: (Slope of the graph of a function)

The slope of the graph of f(x) at the point (x_0,f(x_0)) is

\lim_{h \to 0}\left[\frac{f\left( x_0+h \right) - f\left( x_0 \right)}{h}\right]

If this limit does not exist, then we say the slope is undefined.

If the slope is defined, say m, then the tangent line to the graph of f(x) at the point (x_0,f(x_0)) is the line with equation

y-f(x_0) = m\cdot(x-x_0)

This last equation is just the point-slope form for the line through (x_0,f(x_0)) with slope m.

Exercises

1. Find the slope of the tangent to the curve y=x^2 at (1,1).

2

Solutions

The Rate of Change of a Function at a Point

Consider the formula for average velocity in the x direction, \frac{\Delta x}{\Delta t}, where \Delta x is the change in x over the time interval \Delta t. This formula gives the average velocity over a period of time, but suppose we want to define the instantaneous velocity. To this end we look at the change in position as the change in time approaches 0. Mathematically this is written as: \lim_{\Delta t \to 0} \frac{\Delta x}{\Delta t}, which we abbreviate by the symbol \frac{dx}{dt}. (The idea of this notation is that the letter d denotes change.) Compare the symbol d with \Delta. The idea is that both indicate a difference between two numbers, but \Delta denotes a finite difference while d denotes an infinitesimal difference. Please note that the symbols dx and dt have no rigorous meaning on their own, since \lim_{\Delta t \to 0} \Delta t=0, and we can't divide by 0.

(Note that the letter s is often used to denote distance, which would yield \frac{ds}{dt}. The letter d is often avoided in denoting distance due to the potential confusion resulting from the expression \frac{dd}{dt}.)

The Definition of the Derivative

You may have noticed that the two operations we've discussed — computing the slope of the tangent to the graph of a function and computing the instantaneous rate of change of the function — involved exactly the same limit. That is, the slope of the tangent to the graph of y=f(x) is \frac{dy}{dx}. Of course, \frac{dy}{dx} can, and generally will, depend on x, so we should really think of it as a function of x. We call this process (of computing \frac{dy}{dx}) differentiation. Differentiation results in another function whose value for any value x is the slope of the original function at x. This function is known as the derivative of the original function.

Since lots of different sorts of people use derivatives, there are lots of different mathematical notations for them. Here are some:

  • f'(x)\ (read "f prime of x") for the derivative of f(x),
  • D_x[f(x)],
  • D f(x),
  • \frac{dy}{dx} for the derivative of y as a function of x or
  • \frac{d}{dx}\left[ y\right], which is more useful in some cases.

Most of the time the brackets are not needed, but are useful for clarity if we are dealing with something like D (fg), where we want to differentiate the product of two functions, f and g.

The first notation has the advantage that it makes clear that the derivative is a function. That is, if we want to talk about the derivative of f(x) at x=2, we can just write f'(2).

In any event, here is the formal definition:

Definition: (derivative)
Let f(x) be a function. Then f'(x) = \lim_{\Delta x \to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x} wherever this limit exists. In this case we say that f is differentiable at x and its derivative at x is f'(x).

Examples

Example 1

The derivative of f(x)=x/2 is

f'(x)=\lim_{\Delta x \to 0}\left(\frac{\frac{x+\Delta x}{2} - \frac{x}{2}}{\Delta x}\right)=\lim_{\Delta x \to 0}\left(\frac{\frac{x}{2}+\frac{\Delta x}{2} - \frac{x}{2}}{\Delta x}\right)=\lim_{\Delta x \to 0}\left(\frac{\frac{\Delta x}{2}}{\Delta x}\right)=\lim_{\Delta x \to 0}\left(\frac{\Delta x}{2 \Delta x}\right)=\lim_{\Delta x \to 0}\left(\frac{1}{2}\right)=\frac{1}{2},

no matter what x is. This is consistent with the definition of the derivative as the slope of a function.

Example 2

What is the slope of the graph of  y=3x^2 at (4,48)? We can do it "the hard (and imprecise) way", without using differentiation, as follows, using a calculator and using small differences below and above the given point:

When x=3.999, y=47.976003.

When x=4.001, y=48.024003.

Then the difference between the two values of x is \Delta x=0.002.

Then the difference between the two values of y is \Delta y=0.048.

Thus, the slope = \frac{\Delta y}{\Delta x} = 24 at the point of the graph at which x=4.

But, to solve the problem precisely, we compute

\lim_{\Delta x\to 0}\frac{3(4+\Delta x)^2-48}{\Delta x}\, = 3\lim_{\Delta x\to 0}\frac{(4+\Delta x)^2-16}{\Delta x}
= 3\lim_{\Delta x\to 0}\frac{16+8\Delta x+(\Delta x)^2-16}{\Delta x}
= 3\lim_{\Delta x\to 0}\frac{8\Delta x+(\Delta x)^2}{\Delta x}
= 3\lim_{\Delta x\to 0}(8+\Delta x)
= 3(8)
= 24.

We were lucky this time; the approximation we got above turned out to be exactly right. But this won't always be so, and, anyway, this way we didn't need a calculator.

In general, the derivative of f(x)=3x^2 is

f'(x)\, = \lim_{\Delta x\to 0}\frac{3(x+\Delta x)^2-3x^2}{\Delta x}
= 3\lim_{\Delta x\to 0}\frac{(x+\Delta x)^2-x^2}{\Delta x}
= 3\lim_{\Delta x\to 0}\frac{x^2+2x\Delta x+(\Delta x)^2-x^2}{\Delta x}
= 3\lim_{\Delta x\to 0}\frac{2x\Delta x+(\Delta x)^2}{\Delta x}
= 3\lim_{\Delta x\to 0}(2x+\Delta x)
= 3(2x)
= 6x.

Example 3

If f(x) = \left|x\right| (the absolute value function) then f'(x) = \frac{x}{\left|x\right|}, which can also be stated as f'(x) = \left\{ \begin{matrix} -1, & x < 0 \\ \operatorname{undefined}, & x = 0 \\ 1, & x > 0 \end{matrix} \right. . Finding this derivative is a bit complicated, so we won't prove it at this point.


Here, f(x) is not smooth (though it is continuous) at x=0 and so the limits \lim_{x \to 0^{+}} f'(x) and \lim_{x \to 0^{-}} f'(x) (the limits as 0 is approached from the right and left respectively) are not equal. From the definition, f'(0)=\lim_{\Delta x\to 0}\frac{\left|\Delta x\right|}{\Delta x}, which does not exist. Thus, f'(0) is undefined, and so f'(x) has a discontinuity at 0. This sort of point of non-differentiability is called a cusp. Functions may also not be differentiable because they go to infinity at a point, or oscillate infinitely frequently.

Understanding the derivative notation

The derivative notation is special and unique in mathematics. The most common notation for derivatives you'll run into when first starting out with differentiating is the Leibniz notation, expressed as  \frac{dy}{dx}. You may think of this as "rate of change in y with respect to x". You may also think of it as "infinitesimal value of y divided by infinitesimal value of x". Either way is a good way of thinking, although you should remember that the precise definition is the one we gave above. Often, in an equation, you will see just \frac{d}{dx}, which literally means "derivative with respect to x". This means we should take the derivative of whatever is written to the right; that is, \frac{d}{dx}(x+2) means \frac{dy}{dx} where y=x+2.

As you advance through your studies, you will see that we sometimes pretend that dy and dx are separate entities that can be multiplied and divided, by writing things like dy=x^4\,dx. Eventually you will see derivatives such as \frac {dx} {dy}, which just means that the input variable of our function is called y and our output variable is called x; sometimes, we will write  \frac{d}{dy}, to mean the derivative with respect to y of whatever is written on the right. In general, the variables could be anything, say \frac{d\theta}{dr}.

All of the following are equivalent for expressing the derivative of y = x^{2}

  • \frac{dy}{dx} = 2x
  • \frac{d}{dx} x^{2} = 2x
  • dy = 2x dx \
  • f '(x) = 2x \
  • D(f(x)) = 2x \

Exercises

2. Using the definition of the derivative find the derivative of the function f(x)=2x+3.

2

3. Using the definition of the derivative find the derivative of the function f(x)=x^3. Now try f(x)=x^4. Can you see a pattern? In the next section we will find the derivative of f(x)=x^n for all n.

\frac{d x^3}{dx}=3x^2\qquad\frac{d x^4}{dx}=4x^3

4. The text states that the derivative of \left|x\right| is not defined at x = 0. Use the definition of the derivative to show this.

\begin{alignat}{2}\lim_{\Delta x\to 0^-}\frac{\left|0+\Delta x\right|-\left|0\right|}{\Delta x}
&=\lim_{\Delta x\to 0^-}\frac{-\Delta x}{\Delta x}
& \qquad\lim_{\Delta x\to 0^+}\frac{\left|0+\Delta x\right|-\left|0\right|}{\Delta x}
&= \lim_{\Delta x\to 0^+}\frac{\Delta x}{\Delta x}\\
&=\lim_{\Delta x\to 0^-}-1
& &=\lim_{\Delta x\to 0^+}1\\
&=-1
& &=1
\end{alignat}
Since the limits from the left and the right at x=0 are not equal, the limit does not exist, so \left|x\right| is not differentiable at x=0.

5. Graph the derivative to y=4x^2 on a piece of graph paper without solving for  dy/dx . Then, solve for  dy/dx and graph that; compare the two graphs.
6. Use the definition of the derivative to show that the derivative of \sin x is \cos x . Hint: Use a suitable sum to product formula and the fact that \lim_{t \to 0}\frac{\sin(t)}{t}=1 and \lim_{t \to 0}\frac{\cos(t)-1}{t}=0.

\begin{align}\lim_{\Delta x\to 0}\frac{\sin(x+\Delta x)-\sin(x)}{\Delta x}
&=\lim_{\Delta x\to 0}\frac{(\sin(x)\cos(\Delta x)+\cos(x)\sin(\Delta x))-\sin(x)}{\Delta x}\\
&=\lim_{\Delta x\to 0}\frac{\sin(x)(\cos(\Delta x)-1)+\cos(x)\sin(\Delta x)}{\Delta x}\\
&=\sin(x)\cdot\lim_{\Delta x\to 0}\frac{\cos(\Delta x)-1}{\Delta x}+\cos(x)\cdot\lim_{\Delta x\to 0}\frac{\sin(\Delta x)}{\Delta x}\\
&=\sin(x)\cdot 0+\cos(x)\cdot 1\\
&=\cos(x)
\end{align}

Solutions

Differentiation Rules

The process of differentiation is tedious for complicated functions. Therefore, rules for differentiating general functions have been developed, and can be proved with a little effort. Once sufficient rules have been proved, it will be fairly easy to differentiate a wide variety of functions. Some of the simplest rules involve the derivative of linear functions.

Derivative of a constant function

For any fixed real number c,

\frac{d}{dx}\left[c\right]=0.

Intuition

The graph of the function f(x) = c is a horizontal line, which has a constant slope of zero. Therefore, it should be expected that the derivative of this function is zero, regardless of the values of x and c.

Proof

The definition of a derivative is

\lim_{\Delta x \to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}.

Let  f(x) = c for all x. (That is, f is a constant function.) Then  f(x+\Delta x) = c . Therefore

 \frac{d}{dx}\left[c\right] = \lim_{\Delta x \to 0} \frac{c-c}{\Delta x} = \lim_{\Delta x \to 0} \frac{0}{\Delta x}.

Let g(\Delta x)=\frac{0}{\Delta x}. To prove that \lim_{\Delta x\to 0}g(\Delta x)=0, we need to find a positive \delta such that, for any given positive \varepsilon, \left|g(\Delta x)-0\right|<\varepsilon whenever 0<\left|\Delta x-0\right|<\delta. But \left|g(\Delta x)-0\right|=0, so \left|g(\Delta x)-0\right|<\varepsilon for any choice of \delta.

Examples

  1. \frac{d}{dx}\left[3\right]=0
  2. \frac{d}{dx}\left[z\right]=0

Note that, in the second example, z is just a constant.

Derivative of a linear function

For any fixed real numbers m and c,

\frac{d}{dx}\left[mx+c\right]=m

The special case \frac{dx}{dx} = 1 shows the advantage of the \frac{d}{dx} notation—rules are intuitive by basic algebra, though this does not constitute a proof, and can lead to misconceptions to what exactly dx and dy actually are.

Intuition

The graph of y=mx+c is a line with constant slope m.

Proof

If f(x)=mx+c, then f(x+\Delta x)=m(x+\Delta x)+c. So,

f'(x)\, = \lim_{\Delta x\to 0}\frac{m(x+\Delta x)+c-mx-c}{\Delta x}\,
= \lim_{\Delta x\to 0}\frac{m(x+\Delta x)-mx}{\Delta x}
= \lim_{\Delta x\to 0}\frac{mx+m\Delta x-mx}{\Delta x}\,
= \lim_{\Delta x\to 0}\frac{m\Delta x}{\Delta x}
= m.

Constant multiple and addition rules

Since we already know the rules for some very basic functions, we would like to be able to take the derivative of more complex functions by breaking them up into simpler functions. Two tools that let us do this are the constant multiple rule and the addition rule.

The Constant Rule

For any fixed real number c,

\frac{d}{dx}\left[cf(x)\right] = c \frac{d}{dx}\left[f(x)\right]

The reason, of course, is that one can factor c out of the numerator, and then of the entire limit, in the definition. The details are left as an exercise.

Example

We already know that

\frac{d}{dx}\left[x^2\right]=2x.

Suppose we want to find the derivative of 3x^2

\frac{d}{dx}\left[3x^2\right] = 3\frac{d}{dx}\left[x^2\right]
= 3\times2x\,
= 6x\,

Another simple rule for breaking up functions is the addition rule.

The Addition and Subtraction Rules

\frac{d}{dx}\left[f(x)\pm g(x)\right]= \frac{d}{dx}\left[f(x)\right]\pm\frac{d}{dx}\left[g(x)\right]

Proof

From the definition:

 \lim_{\Delta x \to 0}\left[\frac{[f(x+\Delta x) \pm g(x + \Delta x)] - [f(x) \pm g(x)]}{\Delta x}\right]

 = \lim_{\Delta x \to 0} 
   \left[\frac{[f(x+\Delta x) - f(x)] \pm [g(x + \Delta x) - g(x)]}{\Delta x}\right]

 = \lim_{\Delta x \to 0} \left[\frac{[f(x+\Delta x) - f(x)]}{\Delta x}\right]
  \pm \lim_{\Delta x \to 0} \left[\frac{[g(x+\Delta x) - g(x)]}{\Delta x}\right]

By definition then, this last term is  \frac{d}{dx} \left[f(x)\right] \pm \frac{d}{dx}\left[g(x)\right]

Example

What is the derivative of 3x^2+5x?

\frac{d}{dx}\left[3x^2+5x\right] = \frac{d}{dx}\left[3x^2+5x\right]
= \frac{d}{dx}\left[3x^2\right]+\frac{d}{dx}\left[5x\right]
= 6x+\frac{d}{dx}\left[5x\right]
= 6x+5\,

The fact that both of these rules work is extremely significant mathematically because it means that differentiation is linear. You can take an equation, break it up into terms, figure out the derivative individually and build the answer back up, and nothing odd will happen.

We now need only one more piece of information before we can take the derivatives of any polynomial.

The Power Rule

\frac{d}{dx}\left[x^n\right]=nx^{n-1}

For example, in the case of x^2 the derivative is 2x^1=2x as was established earlier. A special case of this rule is that dx/dx=dx^1/dx=1x^0=1.

Since polynomials are sums of monomials, using this rule and the addition rule lets you differentiate any polynomial. A relatively simple proof for this can be derived from the binomial expansion theorem.

This rule also applies to fractional and negative powers. Therefore

\frac{d}{dx}\left[\sqrt x \right] = \frac{d}{dx}\left[ x^{1/2}\right]
= \frac 1 2 x^{-1/2}
= \frac 1 {2\sqrt x}

Derivatives of polynomials

With these rules in hand, you can now find the derivative of any polynomial you come across. Rather than write the general formula, let's go step by step through the process.

\frac{d}{dx}\left[6x^5+3x^2+3x+1\right]

The first thing we can do is to use the addition rule to split the equation up into terms:

\frac{d}{dx}\left[6x^5\right]+\frac{d}{dx}\left[3x^2\right]+\frac{d}{dx}\left[3x\right]+\frac{d}{dx}\left[1\right].

We can immediately use the linear and constant rules to get rid of some terms:

\frac{d}{dx}\left[6x^5\right]+\frac{d}{dx}\left[3x^2\right]+3+0.

Now you may use the constant multiplier rule to move the constants outside the derivatives:

6\frac{d}{dx}\left[x^5\right]+3\frac{d}{dx}\left[x^2\right]+3.

Then use the power rule to work with the individual monomials:

6\left(5x^4\right)+3\left(2x\right)+3.

And then do some algebra to get the final answer:

30x^4+6x+3.\,

These are not the only differentiation rules. There are other, more advanced, differentiation rules, which will be described in a later chapter.

Exercises

  • Find the derivatives of the following equations:
7.  f(x) = 42

f'(x)=0

8.  f(x) = 6x + 10

f'(x)=6

9.  f(x) = 2x^2 + 12x + 3

f'(x)=4x+12

Solutions

← Differentiation/Contents Calculus Product and Quotient Rules →
Print version

<h1> 3.2 Product and Quotient Rules</h1>

← Differentiation/Differentiation Defined Calculus Derivatives of Trigonometric Functions →
Print version

Product Rule

When we wish to differentiate a more complicated expression such as

h(x) = (x^2+5x + 7) \cdot (x^3 + 2x - 4),

our only way (up to this point) to differentiate the expression is to expand it and get a polynomial, and then differentiate that polynomial. This method becomes very complicated and is particularly error prone when doing calculations by hand. A beginner might guess that the derivative of a product is the product of the derivatives, similar to the sum and difference rules, but this is not true. To take the derivative of a product, we use the product rule.

Derivatives of products (Product Rule)

\frac{d}{dx}\left[ f(x) \cdot g(x) \right] = f(x) \cdot g'(x)+f'(x) \cdot g(x)\,\!

It may also be stated as

(f\cdot g)'=f'\cdot g+f\cdot g' \,\!

or in the Leibniz notation as

\dfrac{d}{dx}(u\cdot v)=u\cdot \dfrac{dv}{dx}+v\cdot \dfrac{du}{dx}.

The derivative of the product of three functions is:

\dfrac{d}{dx}(u\cdot v \cdot w)=\dfrac{du}{dx} \cdot v \cdot w + u \cdot \dfrac{dv}{dx} \cdot w + u\cdot v\cdot \dfrac{dw}{dx}.

Since the product of two or more functions occurs in many mathematical models of physical phenomena, the product rule has broad application in physics, chemistry, and engineering.

Examples

  • Suppose one wants to differentiate ƒ(x) = x2 sin(x). By using the product rule, one gets the derivative ƒ '(x) = 2x sin(x) + x2cos(x) (since the derivative of x2 is 2x and the derivative of sin(x) is cos(x)).
  • One special case of the product rule is the constant multiple rule, which states: if c is a real number and ƒ(x) is a differentiable function, then (x) is also differentiable, and its derivative is (c × ƒ)'(x) = c × ƒ '(x). This follows from the product rule since the derivative of any constant is zero. This, combined with the sum rule for derivatives, shows that differentiation is linear.

Physics Example I: rocket acceleration

The acceleration of model rockets can be computed with the product rule.

Consider the vertical acceleration of a model rocket relative to its initial position at a fixed point on the ground. Newton's second law says that the force is equal to the time rate change of momentum. If F is the net force (sum of forces), p is the momentum, and t is the time,


\begin{align}
F = \frac{dp}{dt}.
\end{align}

Since the momentum is equal to the product of mass and velocity, this yields


\begin{align}
F = \frac{d}{dt}\left( mv \right),
\end{align}

where m is the mass and v is the velocity. Application of the product rule gives


\begin{align}
F = v\frac{dm}{dt} + m\frac{dv}{dt}.
\end{align}

Since the acceleration, a, is defined as the time rate change of velocity, a = dv/dt,


\begin{align}
F = v\frac{dm}{dt} + ma.
\end{align}

Solving for the acceleration,


\begin{align}
a= \frac{F - v\frac{dm}{dt}}{m}.
\end{align}

Since the rocket is losing mass, dm/dt is negative, and the changing mass term results in increased acceleration.[1][2]

Physics Example II: electromagnetic induction

Faraday's law of electromagnetic induction states that the induced electromotive force is the negative time rate of change of magnetic flux through a conducting loop.

 \mathcal{E} = -{{d\Phi_B} \over dt},

where \mathcal{E} is the electromotive force (emf) in volts and ΦB is the magnetic flux in webers. For a loop of area, A, in a magnetic field, B, the magnetic flux is given by

 \Phi_B = B\cdot A \cdot \cos(\theta),

where θ is the angle between the normal to the current loop and the magnetic field direction.

Taking the negative derivative of the flux with respect to time yields the electromotive force gives


\begin{align}
\mathcal{E} &= -\frac{d}{dt} \left( B\cdot A \cdot \cos(\theta) \right) \\
&= -\frac{dB}{dt} \cdot A \cos(\theta) -B \cdot \frac{dA}{dt} \cos(\theta)- B \cdot A \frac{d}{dt}\cos(\theta)\\
\end{align}

In many cases of practical interest only one variable (A, B, or θ) is changing, so two of the three above terms are often zero.

Proof of the Product Rule

Proving this rule is relatively straightforward, first let us state the equation for the derivative:

\frac{d}{dx} \left[ f(x) \cdot g(x) \right] = \lim_{h \to 0} \frac{ f(x+h)\cdot g(x+h) - f(x) \cdot g(x)}{h}

We will then apply one of the oldest tricks in the book—adding a term that cancels itself out to the middle:

\frac{d}{dx} \left[ f(x) \cdot g(x) \right] = \lim_{h \to 0} \frac{ f(x+h)\cdot g(x+h) \mathbf{- f(x+h) \cdot g(x) + f(x+h) \cdot g(x)} - f(x) \cdot g(x)}{h}

Notice that those terms sum to zero, and so all we have done is add 0 to the equation. Now we can split the equation up into forms that we already know how to solve:

\frac{d}{dx} \left[ f(x) \cdot g(x) \right] = \lim_{h \to 0} \left[ \frac{ f(x+h)\cdot g(x+h) - f(x+h) \cdot g(x) }{h} + \frac{f(x+h) \cdot g(x) - f(x) \cdot g(x)}{h} \right]

Looking at this, we see that we can factor the common terms out of the numerators to get:

\frac{d}{dx} \left[ f(x) \cdot g(x) \right] = \lim_{h \to 0} \left[ f(x+h) \frac{ g(x+h) - g(x) }{h} + g(x) \frac{f(x+h) - f(x)}{h} \right]

Which, when we take the limit, becomes:

\frac{d}{dx} \left[ f(x) \cdot g(x) \right] = f(x) \cdot g'(x) + g(x) \cdot f'(x) , or the mnemonic "one D-two plus two D-one"

This can be extended to 3 functions:

\frac{d}{dx}[fgh] = f(x) g(x) h'(x) + f(x) g'(x) h(x) + f'(x) g(x) h(x) \,

For any number of functions, the derivative of their product is the sum, for each function, of its derivative times each other function.

Back to our original example of a product, h(x) = (x^2+5x + 7) \cdot (x^3 + 2x - 4), we find the derivative by the product rule is

 h'(x) = (x^2+5x+7)(3x^2+2) + (2x+5)(x^3+2x-4) = 5x^4+20x^3+27x^2+12x-6\,

Note, its derivative would not be

{\color{red}(2x+5) \cdot (3x^2+2) = 6x^3+15x^2+4x+10}

which is what you would get if you assumed the derivative of a product is the product of the derivatives.

To apply the product rule we multiply the first function by the derivative of the second and add to that the derivative of first function multiply by the second function. Sometimes it helps to remember the memorize the phrase "First times the derivative of the second plus the second times the derivative of the first."

Application: proof of the Power Rule

The product rule can be used to give a proof of the power rule for whole numbers. The proof proceeds by mathematical induction. We begin with the base case n=1. If  f_1(x) = x then from the definition is easy to see that

 
f_1'(x) = \lim _{ h \rightarrow 0} \frac {x+h - x} h = 1

Next we suppose that for fixed value of N, we know that for  f_N(x) = x^N, f_N'(x) = Nx^{N-1}. Consider the derivative of  f_{N+1}(x)= x^{N+1},

 f_{N+1}'(x) = ( x \cdot x^N) ' = (x)' x^N + x\cdot(x^N)'= x^N + x\cdot N\cdot x^{N-1} = (N+1)x^N.

We have shown that the statement f_n'(x)=n\cdot x^{n-1} is true for n=1 and that if this statement holds for  n=N, then it also holds for n=N+1. Thus by the principle of mathematical induction, the statement must hold for n=1, 2, \dots.

Quotient Rule

There is a similar rule for quotients. To prove it, we go to the definition of the derivative:

\begin{align}
\frac{d}{dx} \frac{f(x)}{g(x)} &=  \lim_{h \to 0} \frac{\frac{f(x + h)}{g(x + h)} - \frac{f(x)}{g(x)}}{h} \\
                               &= \lim_{h \to 0} \frac{f(x + h)g(x) - f(x)g(x + h)}{h g(x) g(x + h)} \\
                               &= \lim_{h \to 0} \frac{f(x + h)g(x) - f(x)g(x) + f(x)g(x) - f(x)g(x + h)}{h g(x) g(x + h)} \\
                               &= \lim_{h \to 0} \frac{g(x)\frac{f(x + h) - f(x)}{h} - f(x)\frac{g(x + h) - g(x)}{h}}{g(x) g(x + h)} \\
                               &= \frac{g(x)f'(x) - f(x) g'(x)}{g(x)^2}
\end{align}

This leads us to the so-called "quotient rule":

Derivatives of quotients (Quotient Rule)

 \frac{d}{dx} \left[{f(x)\over g(x)}\right] = \frac{g(x)f'(x) - f(x)g'(x)}{g(x)^2}\,\!

Some people remember this rule with the mnemonic "low D-high minus high D-low, over the square of what's below!"

Examples

The derivative of (4x - 2)/(x^2 + 1) is:

\begin{align}
\frac{d}{dx}\left[\frac{(4x - 2)}{x^2 + 1}\right] &= \frac{(x^2 + 1)(4) - (4x - 2)(2x)}{(x^2 + 1)^2} \\
                                                  &= \frac{(4x^2 + 4) - (8x^2 - 4x)}{(x^2 + 1)^2} \\
                                                  &= \frac{-4x^2 + 4x + 4}{(x^2 + 1)^2}
\end{align}

Remember: the derivative of a product/quotient is not the product/quotient of the derivatives. (That is, differentiation does not distribute over multiplication or division.) However one can distribute before taking the derivative. That is \frac{d}{dx}\left((a+b)\times(c+d)\right) = \frac{d}{dx}\left(ac+ad+bc+bd\right)

← Differentiation/Differentiation Defined Calculus Derivatives of Trigonometric Functions →
Print version

References

  1. Chandler, David (October 2000). "Newton's Second Law for Systems with Variable Mass". The Physics Teacher 38 (7): 396. 
  2. Courtney, Michael; Courtney, Amy. "Measuring thrust and predicting trajectory in model rocketry". arΧiv:0903.1555. 

<h1> 3.3 Derivatives of Trigonometric Functions</h1>

← Product and Quotient Rules Calculus Chain Rule →
Print version

Sine, cosine, tangent, cosecant, secant, cotangent. These are functions that crop up continuously in mathematics and engineering and have a lot of practical applications. They also appear in more advanced mathematics, particularly when dealing with things such as line integrals with complex numbers and alternate representations of space like spherical and cylindrical coordinate systems.

We use the definition of the derivative, i.e.,

f'(x) = \lim_{h \to 0}\frac{f(x+h)-f(x)}{h},

to work these first two out.

Let us find the derivative of sin x, using the above definition.

 f(x) = \sin{x} \, \!
 f'(x) = \lim_{h \to 0}{\sin(x+h)-\sin{x} \over h} Definition of derivative
 = \lim_{h \to 0}{\cos(x)\sin(h)+\cos(h)\sin(x) - \sin(x) \over h} trigonometric identity
 = \lim_{h \to 0}{\cos(x)\sin(h)+(\cos(h) - 1)\sin(x) \over h} factoring
 = \lim_{h \to 0}{\cos(x)\sin(h) \over h}  +\lim_{h \to 0}{(\cos(h) - 1)\sin(x) \over h} separation of terms
 = \cos{x} \, \! \times 1 + \sin{x} \, \! \times 0 application of limit
 = \cos{x} \, \! solution

Now for the case of cos x.

 f(x) = \cos{x} \, \!
 f'(x) = \lim_{h \to 0}{\cos(x+h)-\cos{x} \over h} Definition of derivative
 = \lim_{h \to 0}{\cos(x)\cos(h)-\sin(h)\sin(x) - \cos(x) \over h} trigonometric identity
 = \lim_{h \to 0}{\cos(x)(\cos(h) - 1)-\sin(x)\sin(h) \over h} factoring
 =\lim_{h \to 0}{\cos(x)(\cos(h) - 1) \over h}  - \lim_{h \to 0}{\sin(x)\sin(h) \over h} separation of terms
 = \cos{x} \, \! \times 0 - \sin{x} \, \! \times 1 application of limit
 = -\sin{x} \, \! solution

Therefore we have established

Derivative of Sine and Cosine

\frac{d}{dx} \sin(x) = \cos(x)\,\!
\frac{d}{dx} \cos(x) = -\sin(x)\,\!


To find the derivative of the tangent, we just remember that:

\tan(x) = \frac{\sin(x)}{\cos(x)}

which is a quotient. Applying the quotient rule, we get:

\frac{d}{dx} \tan(x) = \frac{\cos^2(x) + \sin^2(x)}{\cos^2(x)}

Then, remembering that \cos^2(x) + \sin^2(x) = 1, we simplify:

\frac{\cos^2(x) + \sin^2(x)}{\cos^2(x)} =\frac{1}{\cos^2(x)}
=\sec^2(x)\,


Derivative of the Tangent

\frac{d}{dx}  \tan(x) = \sec^2(x)\,\!

For secants, we again apply the quotient rule.

\sec(x) = \frac{1}{\cos(x)}
\begin{align}\frac{d}{dx} \sec(x)&=\frac{d}{dx}\frac{1}{\cos(x)}\\
&=\frac{\cos(x)\frac{d 1}{dx}-1\frac{d \cos(x)}{dx}}{\cos(x)^2}\\
&=\frac{\cos(x)0-1(-\sin(x))}{\cos(x)^2}
\end{align}

Leaving us with:

\frac{d}{dx} \sec(x) = \frac{\sin(x)}{\cos^2(x)}

Simplifying, we get:


Derivative of the Secant

\frac{d}{dx} \sec(x) = \sec(x) \tan(x)\,\!

Using the same procedure on cosecants:

\csc(x) = \frac{1}{\sin(x)}

We get:


Derivative of the Cosecant

\frac{d}{dx} \csc(x) = -\csc(x) \cot(x)\,\!

Using the same procedure for the cotangent that we used for the tangent, we get:


Derivative of the Cotangent

\frac{d}{dx} \cot(x) = -\csc^2(x) \,\!

← Product and Quotient Rules Calculus Chain Rule →
Print version

<h1> 3.4 Chain Rule</h1>

← Derivatives of Trigonometric Functions Calculus Higher Order Derivatives →
Print version

The chain rule is a method to compute the derivative of the functional composition of two or more functions.

If a function, f, depends on a variable, u, which in turn depends on another variable, x, that is f = y(u(x)) , then the rate of change of f with respect to x can be computed as the rate of change of y with respect to u multiplied by the rate of change of u with respect to x.

Chain Rule

If a function f is composed to two differentiable functions y(x) and u(x), so that f(x) = y(u(x)), then f(x) is differentiable and,

\frac {df}{dx} = \frac {dy} { du} \cdot\frac {du}{ dx}\,\!

The method is called the "chain rule" because it can be applied sequentially to as many functions as are nested inside one another.[1] For example, if f is a function of g which is in turn a function of h, which is in turn a function of x, that is

f(g(h(x))),

the derivative of f with respect to x is given by

 \frac{df}{dx} = \frac{df}{dg} \cdot \frac{dg}{dh} \cdot \frac{dh}{dx} and so on.

A useful mnemonic is to think of the differentials as individual entities that can be canceled algebraically, such as

\frac{df}{dx} = \frac{df}{\cancel{dg}} \cdot \frac{\cancel{dg}}{\cancel{dh}} \cdot \frac{\cancel{dh}}{dx}

However, keep in mind that this trick comes about through a clever choice of notation rather than through actual algebraic cancellation.

The chain rule has broad applications in physics, chemistry, and engineering, as well as being used to study related rates in many disciplines. The chain rule can also be generalized to multiple variables in cases where the nested functions depend on more than one variable.

Examples

Example I

Suppose that a mountain climber ascends at a rate of 0.5 kilometer per hour. The temperature is lower at higher elevations; suppose the rate by which it decreases is 6 °C per kilometer. To calculate the decrease in air temperature per hour that the climber experiences, one multiplies 6 °C per kilometer by 0.5 kilometer per hour, to obtain 3 °C per hour. This calculation is a typical chain rule application.

Example II

Consider the function f(x) = (x2 + 1)3. It follows from the chain rule that

f(x)  = (x^2+1)^3 Function to differentiate
u(x)  = x^2+1 Define u(x) as inside function
f(x)  = [u(x)]^3 Express f(x) in terms of u(x)
\frac{df}{dx}  = \frac{df}{du} \cdot \frac {du}{dx} Express chain rule applicable here
\frac{df}{dx}  = \frac{d}{du}u^3 \cdot\frac {d}{dx}(x^2+1) Substitute in f(u) and u(x)
\frac{df}{dx} = 3u^2 \cdot 2x Compute derivatives with power rule
\frac{df}{dx} = 3(x^2+1)^2 \cdot 2x Substitute u(x) back in terms of x
 \frac{df}{dx} = 6x(x^2+1)^2 Simplify.

Example III

In order to differentiate the trigonometric function

f(x) = \sin(x^2),\,

one can write:

f(x) = \sin(x^2) Function to differentiate
u(x)  = x^2 Define u(x) as inside function
f(x) = \sin(u) Express f(x) in terms of u(x)
\frac{df}{dx}  = \frac{df}{du} \cdot \frac {du}{dx} Express chain rule applicable here
\frac{df}{dx}  = \frac{d}{du}\sin(u) \cdot\frac {d}{dx}(x^2) Substitute in f(u) and u(x)
\frac{df}{dx} = \cos(u) \cdot 2x Evaluate derivatives
\frac{df}{dx} = \cos(x^2)(2x) Substitute u in terms of x.

Example IV: absolute value

The chain rule can be used to differentiate \left|x\right|, the absolute value function:

f(x)  = \left|x\right| Function to differentiate
f(x)  = \sqrt{x^2} Equivalent function
u(x)  = x^2 Define u(x) as inside function
f(x)  = [u(x)]^\frac{1}{2} Express f(x) in terms of u(x)
\frac{df}{dx}  = \frac{df}{du} \cdot \frac {du}{dx} Express chain rule applicable here
\frac{df}{dx}  = \frac{d}{du}u^\frac{1}{2} \cdot\frac {d}{dx}(x^2) Substitute in f(u) and u(x)
\frac{df}{dx} = \frac{1}{2}u^{-\frac{1}{2}} \cdot 2x Compute derivatives with power rule
\frac{df}{dx} = \frac{1}{2}\left(x^2\right)^{-\frac{1}{2}} \cdot 2x Substitute u(x) back in terms of x
 \frac{df}{dx} = \frac{x}{\sqrt{x^2}} Simplify
 \frac{df}{dx} = \frac{x}{\left|x\right|} Express \sqrt{x^2} as absolute value.

Example V: three nested functions

The method is called the "chain rule" because it can be applied sequentially to as many functions as are nested inside one another. For example, if f(g(h(x))) = e^{\sin(x^2)}, sequential application of the chain rule yields the derivative as follows (we make use of the fact that \frac{de^x}{dx}=e^x, which will be proved in a later section):

f(x)  = e^{\sin(x^2)} = e^g Original (outermost) function
h(x)  = x^2 Define h(x) as innermost function
g(x)  = \sin(h) = \sin(x^2) g(h) = sin(h) as middle function
\frac{df}{dx}  = \frac{df}{dg} \cdot \frac{dg}{dh} \cdot \frac{dh}{dx} Express chain rule applicable here
\frac{df}{dg} = e^g = e^{\sin(x^2)} Differentiate f(g)[2]
\frac{dg}{dh} = \cos(h) = \cos(x^2) Differentiate g(h)
\frac{dh}{dx} = 2x Differentiate h(x)
 \frac{d}{dx} e^{\sin(x^2)} = e^{\sin(x^2)}\cdot \cos(x^2)\cdot 2x Substitute into chain rule.

Chain Rule in Physics

Because one physical quantity often depends on another, which, in turn depends on others, the chain rule has broad applications in physics. This section presents examples of the chain rule in kinematics and simple harmonic motion. The chain rule is also useful in electromagnetic induction.

Physics Example I: relative kinematics of two vehicles

One vehicle is headed north and currently located at (0,3); the other vehicle is headed west and currently located at (4,0). The chain rule can be used to find whether they are getting closer or further apart.

For example, one can consider the kinematics problem where one vehicle is heading west toward an intersection at 80 miles per hour while another is heading north away from the intersection at 60 miles per hour. One can ask whether the vehicles are getting closer or further apart and at what rate at the moment when the northbound vehicle is 3 miles north of the intersection and the westbound vehicle is 4 miles east of the intersection.

Big idea: use chain rule to compute rate of change of distance between two vehicles.

Plan:

  1. Choose coordinate system
  2. Identify variables
  3. Draw picture
  4. Big idea: use chain rule to compute rate of change of distance between two vehicles
  5. Express c in terms of x and y via Pythagorean theorem
  6. Express dc/dt using chain rule in terms of dx/dt and dy/dt
  7. Substitute in x, y, dx/dt, dy/dt
  8. Simplify.

Choose coordinate system: Let the y-axis point north and the x-axis point east.

Identify variables: Define y(t) to be the distance of the vehicle heading north from the origin and x(t) to be the distance of the vehicle heading west from the origin.

Express c in terms of x and y via Pythagorean theorem:


c = (x^2 + y^2)^{1/2}

Express dc/dt using chain rule in terms of dx/dt and dy/dt:

\frac{dc}{dt} = \frac{d}{dt}(x^2 + y^2)^{1/2} Apply derivative operator to entire function
= \frac{1}{2}(x^2 + y^2)^{-1/2}\frac{d}{dt}(x^2 + y^2) Sum of squares is inside function
=\frac{1}{2}(x^2 + y^2)^{-1/2}\left[\frac{d}{dt}(x^2) + \frac{d}{dt}(y^2) \right] Distribute differentiation operator
= \frac{1}{2}(x^2 + y^2)^{-1/2}\left[ 2x\frac{dx}{dt} + 2y\frac{dy}{dt}\right] Apply chain rule to x(t) and y(t)}
= \frac{x\frac{dx}{dt} + y\frac{dy}{dt}}{\sqrt{x^2 + y^2}} Simplify.


Substitute in x = 4 mi, y = 3 mi, dx/dt = −80 mi/hr, dy/dt = 60 mi/hr and simplify


\begin{align}
\frac{dc}{dt} & = \frac{4 mi \cdot (-80 mi/hr) + 3 mi \cdot (60) mi/hr}{\sqrt{(4 mi)^2 + (3 mi)^2}}\\
& = \frac{-320 mi^2/hr + 180 mi^2/hr}{5 mi}\\
&= \frac{-140 mi^2/hr}{5 mi}\\
& = -28 mi/hr\\
\end{align}

Consequently, the two vehicles are getting closer together at a rate of 28 mi/hr.

Physics Example II: harmonic oscillator

An undamped spring-mass system is a simple harmonic oscillator.

If the displacement of a simple harmonic oscillator from equilibrium is given by x, and it is released from its maximum displacement A at time t = 0, then the position at later times is given by

 x(t) = A \cos(\omega t),

where ω = 2 π/T is the angular frequency and T is the period of oscillation. The velocity, v, being the first time derivative of the position can be computed with the chain rule:

v(t) = \frac{dx}{dt} Definition of velocity in one dimension
  = \frac{d}{dt} A \cos(\omega t) Substitute x(t)
 = A \frac{d}{dt} \cos(\omega t) Bring constant A outside of derivative
 = A (-\sin(\omega t)) \frac{d}{dt}(\omega t) Differentiate outside function (cosine)
 = -A \sin(\omega t) \frac{d}{dt} (\omega t) Bring negative sign in front
 = -A \sin(\omega t) \omega Evaluate remaining derivative
v(t) = -\omega A \sin(\omega t). Simplify.

The acceleration is then the second time derivative of position, or simply dv/dt.

a(t) = \frac{dv}{dt} Definition of acceleration in one dimension
  = \frac{d}{dt} (-\omega A \sin(\omega t) ) Substitute v(t)
 = -\omega A \frac{d}{dt} \sin(\omega t) Bring constant term outside of derivative
 = -\omega A \cos(\omega t) \frac{d}{dt} (\omega t) Differentiate outside function (sine)
 = -\omega A \cos(\omega t) \omega Evaluate remaining derivative
a(t) = -\omega^2 A \cos(\omega t).  Simplify.

From Newton's second law, F = ma, where F is the net force and m is the object's mass.

F = ma Newton's second law
  = m (-\omega^2 A \cos(\omega t)) Substitute a(t)
 = -m\omega^2  A \cos(\omega t) Simplify
 F = -m\omega^2  x(t). Substitute original x(t).

Thus it can be seen that these results are consistent with the observation that the force on a simple harmonic oscillator is a negative constant times the displacement.

Chain Rule in Chemistry

The chain rule has many applications in Chemistry because many equations in Chemistry describe how one physical quantity depends on another, which in turn depends on another. For example, the ideal gas law describes the relationship between pressure, volume, temperature, and number of moles, all of which can also depend on time.

Chemistry Example I: Ideal Gas Law

Isotherms of an ideal gas. The curved lines represent the relationship between pressure and volume for an ideal gas at different temperatures: lines which are further away from the origin (that is, lines that are nearer to the top right-hand corner of the diagram) represent higher temperatures.

Suppose a sample of n moles of an ideal gas is held in an isothermal (constant temperature, T) chamber with initial volume V0. The ideal gas is compressed by a piston so that its volume changes at a constant rate so that V(t) = V0 - kt, where t is the time. The chain rule can be employed to find the time rate of change of the pressure.[3] The ideal gas law can be solved for the pressure, P to give:

P(t) = \frac{ n R T}{V(t)},

where P(t) and V(t) have been written as explicit functions of time and the other symbols are constant. Differentiating both sides yields

\frac{dP(t)}{dt} = n R T \frac{ d}{dt} \left( \frac{1}{V(t)}\right),

where the constant terms, n, R, and T, have been moved to the left of the derivative operator. Applying the chain rule gives

\frac{dP}{dt} = n R T \frac{ d}{dV} \left( \frac{1}{V(t)}\right)\frac{dV}{dt} = n R T (- \frac{1}{V^2}) \frac{dV}{dt},

where the power rule has been used to differentiate 1/V, Since V(t) = V0 - kt, dV/dt = -k. Substituting in for V and dV/dt yields dP/dt.

\frac{dP}{dt} = - n R T k \left( \frac{1}{(V_0-k t)^2}\right)

Chemistry Example II: Kinetic Theory of Gases

The temperature of an ideal monatomic gas is a measure of the average kinetic energy of its atoms. The size of helium atoms relative to their spacing is shown to scale under 1950 atmospheres of pressure. The atoms have a certain, average speed, slowed down here two trillion fold from room temperature.

A second application of the chain rule in Chemistry is finding the rate of change of the average molecular speed, v, in an ideal gas as the absolute temperature T, increases at a constant rate so that T = T0 + at, where T0 is the initial temperature and t is the time.[3] The kinetic theory of gases relates the root mean square of the molecular speed to the temperature, so that if v(t) and T(t) are functions of time,

v(t) = \left( \frac{3 R T(t)}{M} \right) ^{1 \over 2},

where R is the ideal gas constant, and M is the molecular weight.

Differentiating both sides with respect to time yields:

\frac{d}{dt} v(t) = \frac{d}{dt} \left( \frac{3 R T(t)}{M} \right) ^{1 \over 2}.

Using the chain rule to express the right side in terms of the with respect to temperature, T, and time, t, respectively gives

\frac{dv}{dt} = \frac{d}{dT} \left( \frac{3 R T}{M} \right)^{\frac{1}{2}}\frac{dT}{dt}.

Evaluating the derivative with respect to temperature, T, yields

\frac{dv}{dt} = \frac{1}{2} \left( \frac{3 R T}{M} \right)^{-\frac{1}{2}} \frac{d}{dT}\left( \frac{3RT}{M}\right) \frac{dT}{dt}.

Evaluating the remaining derivative with respect to T, taking the reciprocal of the negative power, and substituting T = T0 + at, produces

\frac{dv}{dt} = \frac{1}{2} \left( \frac{M}{ 3 R (T_0 + a t)} \right) ^{\frac{1}{2}}\frac{3R}{M}\frac{d}{dt}\left( T_0 + at \right).

Evaluating the derivative with respect to t yields

\frac{dv}{dt} = \frac{1}{2} \left( \frac{M}{ 3 R (T_0 + a t)} \right) ^{\frac{1}{2}}\frac{3R}{M} a.

which simplifies to

\frac{dv}{dt} = \frac{a}{2} \left( \frac{3R}{M (T_0 + a t)} \right) ^{\frac{1}{2}}.

Exercises

1. Evaluate f'(x) if f(x)=(x^2+5)^2, first by expanding and differentiating directly, and then by applying the chain rule on f(u(x))=u^2 where u=x^2+5. Compare answers.

4x^3+20x

2. Evaluate the derivative of y=\sqrt{1 + x^2} using the chain rule by letting y=\sqrt{u} and u=1+x^2.

\frac {x} \sqrt {1 + x^2}

Solutions

References

  1. http://www.math.brown.edu/help/derivtips.html
  2. The derivative of e^x is e^x; see Calculus/Derivatives of Exponential and Logarithm Functions.
  3. a b University of British Columbia, UBC Calculus Online Course Notes, Applications of the Chain Rule, http://www.ugrad.math.ubc.ca/coursedoc/math100/notes/derivative/chainap.html Accessed 11/15/2010.

External links

← Derivatives of Trigonometric Functions Calculus Higher Order Derivatives →
Print version

<h1> 3.5 Higher Order Derivatives</h1>

← Chain Rule Calculus Implicit differentiation →
Print version

The second derivative, or second order derivative, is the derivative of the derivative of a function. The derivative of the function f(x) may be denoted by f^\prime(x), and its double (or "second") derivative is denoted by f^{\prime\prime}(x). This is read as "f double prime of x," or "The second derivative of f(x)." Because the derivative of function f is defined as a function representing the slope of function f, the double derivative is the function representing the slope of the first derivative function.

Furthermore, the third derivative is the derivative of the derivative of the derivative of a function, which can be represented by f^{\prime\prime\prime}(x). This is read as "f triple prime of x", or "The third derivative of f(x)". This can continue as long as the resulting derivative is itself differentiable, with the fourth derivative, the fifth derivative, and so on. Any derivative beyond the first derivative can be referred to as a higher order derivative.

Notation

Let  f(x) be a function in terms of x. The following are notations for higher order derivatives.

2nd Derivative 3rd Derivative 4th Derivative nth Derivative Notes
f^{\prime\prime}(x) f^{\prime\prime\prime}(x) f^{(4)}(x) f^{(n)}(x) Probably the most common notation.
\frac{d^2 f}{dx^2} \frac{d^3 f}{dx^3} \frac{d^4 f}{dx^4} \frac{d^n f}{dx^n} Leibniz notation.
\frac{d^2}{dx^2} \left[ f(x) \right] \frac{d^3}{dx^3} \left[ f(x) \right] \frac{d^4}{dx^4} \left[ f(x) \right] \frac{d^n}{dx^n} \left[ f(x) \right] Another form of Leibniz notation.
D^2f D^3f D^4f D^nf Euler's notation.

Warning: You should not write f^{n} (x) to indicate the nth derivative, as this is easily confused with the quantity f(x) all raised to the nth power.

The Leibniz notation, which is useful because of its precision, follows from

\frac{d}{dx}\left( \frac{df}{dx}\right) = \frac{d^2 f}{dx^2}.

Newton's dot notation extends to the second derivative, \ddot y, but typically no further in the applications where this notation is common.

Examples

Example 1:

Find the third derivative of  f(x) = 4x^5 + 6x^3 + 2x + 1 \  with respect to x.

Repeatedly apply the Power Rule to find the derivatives.

  •  f'(x) = 20x^4 + 18x^2 + 2 \
  •  f''(x) = 80x^3 + 36x \
  •  f'''(x) = 240x^2 + 36 \

Example 2:

Find the third derivative of  f(x) = 12\sin x + \frac{1}{x+2} + 2x \  with respect to x.
  •  f'(x) = 12\cos x - \frac{1}{(x+2)^2} + 2
  •  f''(x) = -12\sin x + \frac{2}{(x+2)^3}
  •  f'''(x) = -12\cos x - \frac{6}{(x+2)^4}

Applications:

For applications of the second derivative in finding a curve's concavity and points of inflection, see "Extrema and Points of Inflection" and "Extreme Value Theorem". For applications of higher order derivatives in physics, see the "Kinematics" section.

← Chain Rule Calculus Implicit differentiation →
Print version

<h1> Failed to match page to section number. Check your argument; if correct, consider updating Template:Calculus/map page. Implicit Differentiation</h1>

← Higher Order Derivatives Calculus Derivatives of Exponential and Logarithm Functions →
Print version

Generally, you will encounter functions expressed in explicit form, that is, in the form y = f(x). To find the derivative of y with respect to x, you take the derivative with respect to x of both sides of the equation to get

\frac{dy}{dx}=\frac{d}{dx}[f(x)]=f'(x)

But suppose you have a relation of the form f(x,y(x))=g(x,y(x)). In this case, it may be inconvenient or even impossible to solve for y as a function of x. A good example is the relation y^2 + 2yx + 3 = 5x \,. In this case you can utilize implicit differentiation to find the derivative. To do so, one takes the derivative of both sides of the equation with respect to x and solves for y'. That is, form

\frac{d}{dx}[f(x,y(x))]=\frac{d}{dx}[g(x,y(x))]

and solve for dy/dx. You need to employ the chain rule whenever you take the derivative of a variable with respect to a different variable. For example,

 \frac{d}{dx} (y^3) = \frac{d}{dy}[y^3]\cdot\frac{dy}{dx}=3y^2 \cdot y' \

Implicit Differentiation and the Chain Rule

To understand how implicit differentiation works and use it effectively it is important to recognize that the key idea is simply the chain rule. First let's recall the chain rule. Suppose we are given two differentiable functions f(x) and g(x) and that we are interested in computing the derivative of the function f(g(x)), the the chain rule states that:

\frac{d}{dx}\Big(f(g(x))\Big) = f'(g(x))\,g'(x)

That is, we take the derivative of f as normal and then plug in g, finally multiply the result by the derivative of g.

Now suppose we want to differentiate a term like y2 with respect to x where we are thinking of y as a function of x, so for the remainder of this calculation let's write it as y(x) instead of just y. The term y2 is just the composition of f(x) = x2 and y(x). That is, f(y(x)) = y2(x). Recalling that f′(x) = 2x then the chain rule states that:

\frac{d}{dx}\Big(f(y(x))\Big)=f'(y(x))\,y'(x)=2y(x)y'(x)

Of course it is customary to think of y as being a function of x without always writing y(x), so this calculation usually is just written as

\frac{d}{dx}y^2=2yy'.

Don't be confused by the fact that we don't yet know what y′ is, it is some function and often if we are differentiating two quantities that are equal it becomes possible to explicitly solve for y′ (as we will see in the examples below.) This makes it a very powerful technique for taking derivatives.

Explicit Differentiation

For example, suppose we are interested in the derivative of y with respect to x where x and y are related by the equation

x^2 + y^2 = 1\,

This equation represents a circle of radius 1 centered on the origin. Note that y is not a function of x since it fails the vertical line test (y=\pm1 when x=0, for example).

To find y', first we can separate variables to get

y^2 = 1 - x^2\,

Taking the square root of both sides we get two separate functions for y:

y = \pm \sqrt{1-x^2}\,

We can rewrite this as a fractional power:

y = \pm (1-x^2)^{\frac{1}{2}}\,

Using the chain rule we get,

y' = \pm\frac{1}{2}(1-x^2)^{-1/2}\cdot(-2x) = \pm\frac{x}{(1-x^2)^{1/2}}

And simplifying by substituting y back into this equation gives

y' = -\frac{x}{y}

Implicit Differentiation

Using the same equation

x^2 + y^2 = 1\,

First, differentiate with respect to x on both sides of the equation:

\frac{d}{dx}[x^2 + y^2] = \frac{d}{dx}[1]
\frac{d}{dx}[x^2]+\frac{d}{dx}[y^2] = 0

To differentiate the second term on the left hand side of the equation (call it f(y(x))=y2), use the chain rule:

\frac{df}{dx}=\frac{df}{dy}\cdot\frac{dy}{dx}=2y\cdot y'

So the equation becomes

2x+2yy'=0

Separate the variables:

2yy' = -2x\,

Divide both sides by 2y\,, and simplify to get the same result as above:

y' = -\frac{2x}{2y}
y' = -\frac{x}{y}

Uses

Implicit differentiation is useful when differentiating an equation that cannot be explicitly differentiated because it is impossible to isolate variables.

For example, consider the equation,

x^2 + xy + y^2 = 16\,

Differentiate both sides of the equation (remember to use the product rule on the term xy):

2x + y + xy' + 2yy' = 0\,

Isolate terms with y':

xy' + 2yy' = -2x - y\,

Factor out a y' and divide both sides by the other term:

y' = \frac{-2x-y}{x+2y}

Example

Inxy \,=1

can be solved as:

y=\frac{1}{x}

then differentiated:

\frac{dy}{dx}=-\frac{1}{x^2}

However, using implicit differentiation it can also be differentiated like this:

\frac{d}{dx}[xy]=\frac{d}{dx}[1]

use the product rule:

x\frac{dy}{dx}+y=0

solve for \frac{dy}{dx}:

\frac{dy}{dx}=-\frac{y}{x}

Note that, if we substitute y=\frac{1}{x} into \frac{dy}{dx}=-\frac{y}{x}, we end up with \frac{dy}{dx}=-\frac{1}{x^2} again.

Application: inverse trigonometric functions

Arcsine, arccosine, arctangent. These are the functions that allow you to determine the angle given the sine, cosine, or tangent of that angle.

First, let us start with the arcsine such that:

y=\arcsin(x)

To find dy/dx we first need to break this down into a form we can work with:

x = \sin(y)

Then we can take the derivative of that:

1 = \cos(y) \cdot \frac{dy}{dx}

...and solve for dy / dx:

y=arcsin(x) gives us this unit triangle.
\frac{dy}{dx} = \frac{1}{\cos(y)}

At this point we need to go back to the unit triangle. Since y is the angle and the opposite side is sin(y) (which is equal to x), the adjacent side is cos(y) (which is equal to the square root of 1 minus x2, based on the Pythagorean theorem), and the hypotenuse is 1. Since we have determined the value of cos(y) based on the unit triangle, we can substitute it back in to the above equation and get:


Derivative of the Arcsine

\frac{d}{dx} \arcsin(x) = \frac{1}{\sqrt{1-x^2}}\,\!

We can use an identical procedure for the arccosine and arctangent:


Derivative of the Arccosine

\frac{d}{dx} \arccos(x) = \frac{-1}{\sqrt{1-x^2}}\,\!

Derivative of the Arctangent

\frac{d}{dx} \arctan(x) = \frac{1}{1+x^2}\,\!



← Higher Order Derivatives Calculus Derivatives of Exponential and Logarithm Functions →
Print version

<h1> 3.7 Derivatives of Exponential and Logarithm Functions</h1>

← Implicit differentiation Calculus Some Important Theorems →
Print version

Exponential Function

First, we determine the derivative of e^x using the definition of the derivative:

\frac{d}{dx} e^x = \lim_{h \to 0} \frac{e^{x+h} - e^{x}}{h}

Then we apply some basic algebra with powers (specifically that ab + c = ab ac):

\frac{d}{dx} e^x = \lim_{h \to 0} \frac{e^{x} e^{h} - e^{x}}{h}

Since ex does not depend on h, it is constant as h goes to 0. Thus, we can use the limit rules to move it to the outside, leaving us with:

\frac{d}{dx} e^x = e^x \cdot \lim_{h \to 0} \frac{e^{h} - 1}{h}

Now, the limit can be calculated by techniques we will learn later, for example Calculus/L'Hôpital's rule, and we will see that

\lim_{h \to 0} \frac{e^h - 1}{h} = 1,

so that we have proved the following rule:

Derivative of the exponential function

\frac{d}{dx}e^x = e^x\,\!

Now that we have derived a specific case, let us extend things to the general case. Assuming that a is a positive real constant, we wish to calculate:

\frac{d}{dx}a^x

One of the oldest tricks in mathematics is to break a problem down into a form that we already know we can handle. Since we have already determined the derivative of ex, we will attempt to rewrite ax in that form.

Using that eln(c) = c and that ln(ab) = b · ln(a), we find that:

a^x = e^{x \cdot \ln(a)}

Thus, we simply apply the chain rule:

\frac{d}{dx}e^{x \cdot \ln(a)} = \frac{d}{dx} \left[ x\cdot \ln(a) \right] e^{x \cdot \ln(a)} = \ln(a) a^x
Derivative of the exponential function

\frac{d}{dx}a^x = \ln\left(a\right)a^x\,\!

Logarithm Function

Closely related to the exponentiation is the logarithm. Just as with exponents, we will derive the equation for a specific case first (the natural log, where the base is e), and then work to generalize it for any logarithm.

First let us create a variable y such that:

y = \ln\left(x\right)

It should be noted that what we want to find is the derivative of y or \frac{dy}{dx} .

Next we will put both sides to the power of e in an attempt to remove the logarithm from the right hand side:

e^y = x

Now, applying the chain rule and the property of exponents we derived earlier, we take the derivative of both sides:

 \frac{dy}{dx} \cdot e^y = 1

This leaves us with the derivative:

 \frac{dy}{dx}  = \frac{1}{e^y}

Substituting back our original equation of x = ey, we find that:


Derivative of the Natural Logarithm

\frac{d}{dx}\ln\left(x\right) = \frac{1}{x}\,\!

If we wanted, we could go through that same process again for a generalized base, but it is easier just to use properties of logs and realize that:

\log_b(x) = \frac{\ln(x)}{\ln(b)}

Since 1 / ln(b) is a constant, we can just take it outside of the derivative:

\frac{d}{dx}\log_b(x) = \frac{1}{\ln(b)} \cdot \frac{d}{dx} \ln(x)

Which leaves us with the generalized form of:


Derivative of the Logarithm

\frac{d}{dx}\log_b\left(x\right) = \frac{1}{x\ln\left(b\right)}\,\!

Logarithmic Differentiation

We can use the properties of the logarithm, particularly the natural log, to differentiate more difficult functions, such a products with many terms, quotients of composed functions, or functions with variable or function exponents. We do this by taking the natural logarithm of both sides, re-arranging terms using the logarithm laws below, and then differentiating both sides implicitly, before multiplying through by y.

\log\left(\frac{a}{b}\right) = \log(a) - \log(b)

\log(a^n) = n\log(a)\,\!

\log(a) + \log(b) = \log(ab)\,\!

See the examples below.

Example 1

Suppose we wished to differentiate

y = \frac{(6x^2+9)^2}{\sqrt{3x^3-2}}

We take the natural logarithm of both sides


\begin{align}
 \ln(y) & = \ln\Bigg(\frac{(6x^2+9)^2}{\sqrt{3x^3-2}}\Bigg) \\
            & = \ln(6x^2+9)^2 - \ln(3x^3-2)^{\frac{1}{2}} \\
            & = 2\ln(6x^2+9) - \frac{1}{2}\ln(3x^3-2) \\
\end{align}

Differentiating implicitly, recalling the chain rule


\begin{align}
 \frac{1}{y} \frac{dy}{dx} & = 2 \times \frac{12x}{6x^2+9} - \frac{1}{2} \times \frac{9x^2}{3x^3-2} \\
                                           & = \frac{24x}{6x^2+9} - \frac{\frac{9}{2}x^2}{3x^3-2} \\
                                           & = \frac{24x(3x^3-2) - \frac{9}{2}x^2(6x^2+9)}{(6x^2+9)(3x^3-2)} \\
\end{align}

Multiplying by y, the original function

\frac{dy}{dx} = \frac{(6x^2+9)^2}{\sqrt{3x^3-2}} \times \frac{24x(3x^3-2) - \frac{9}{2}x^2(6x^2+9)}{(6x^2+9)(3x^3-2)}
Example 2

Let us differentiate a function

y=x^x\,\!

Taking the natural logarithm of left and right


\begin{align}
 \ln y & = \ln(x^x) \\
          & = x\ln(x) \\
\end{align}

We then differentiate both sides, recalling the product and chain rules


\begin{align}
 \frac{1}{y} \frac{dy}{dx} & = \ln(x) + x\frac{1}{x} \\
                                           & = \ln(x) + 1 \\
\end{align}

Multiplying by the original function y

\frac{dy}{dx} = x^x(\ln(x) + 1)
Example 3

Take a function

y=x^{6\cos(x)}\,\!

Then


\begin{align}
 \ln y & = \ln(x^{6\cos(x)})\,\! \\
          & = 6\cos(x)\ln(x)\,\! \\
\end{align}

We then differentiate

\frac{1}{y} \frac{dy}{dx} = -6\sin(x)\ln(x)+\frac{6\cos(x)}{x}

And finally multiply by y


\begin{align}
 \frac{dy}{dx} & = y\Bigg(-6\sin(x)\ln(x)+\frac{6\cos(x)}{x}\Bigg)\\
               & = x^{6\cos(x)}\Bigg(-6\sin(x)\ln(x)+\frac{6\cos(x)}{x}\Bigg)\\
                
\end{align}
← Implicit differentiation Calculus Some Important Theorems →
Print version

<h1> 3.8 Some Important Theorems</h1>

← Derivatives of Exponential and Logarithm Functions Calculus Differentiation/Basics of Differentiation/Exercises →
Print version

This section covers three theorems of fundamental importance to the topic of differential calculus: The Extreme Value Theorem, Rolle's Theorem, and the Mean Value Theorem. It also discusses the relationship between differentiability and continuity.

Extreme Value Theorem

Classification of Extrema

We start out with some definitions.

Global Maximum
A global maximum (also called an absolute maximum) of a function f on a closed interval I is a value f(c) such that f(c)\geq f(x) for all x in I.
Global Minimum
A global minimum (also called an absolute minimum) of a function f on a closed interval I is a value f(c) such that f(c)\leq f(x) for all x in I.

Maxima and minima are collectively known as extrema.

The Extreme Value Theorem

Extreme Value Theorem
If f is a function that is continuous on the closed interval [a,b], then f has both a global minimum and a global maximum on [a,b]. It is assumed that a and b are both finite.

The Extreme Value Theorem is a fundamental result of real analysis whose proof is beyond the scope of this text. However, the truth of the theorem allows us to talk about the maxima and minima of continuous functions on closed intervals without concerning ourselves with whether or not they exist. When dealing with functions that do not satisfy the premises of the theorem, we will need to worry about such things. For example, the unbounded function f(x)=x has no extrema whatsoever. If f(x) is restricted to the semi-closed interval I=[0,1), then f has a minimum value of 0 at x=0, but it has no maximum value since, for any given value c in I, one can always find a larger value of f(x) for x in I, for example by forming f(d), where d is the average of c with 1. The function g(x)=\frac{1}{x} has a discontinuity at x=0. g(x) fails to have any extrema in any closed interval around x=0 since the function is unbounded below as one approaches 0 from the left, and it is unbounded above as one approaches 0 from the right. (In fact, the function is undefined for x=0. However, the example is unaffected if g(0) is assigned any arbitrary value.)

The Extreme Value Theorem is an existence theorem. It tells us that global extrema exist if certain conditions are met, but it doesn't tell us how to find them. We will discuss how to determine the extrema of continuous functions in the section titled Extrema and Points of Inflection.

Rolle's Theorem

Rolle's Theorem
If a function,  f(x) \ , is continuous on the closed interval  [a,b] \ , is differentiable on the open interval  (a,b) \ , and  f(a) = f(b) \ , then there exists at least one number c, in the interval  (a,b) \ such that  f'(c) = 0 \ .
Rolle's theorem.svg

Rolle's Theorem is important in proving the Mean Value Theorem. Intuitively it says that if you have a function that is continuous everywhere in an interval bounded by points where the function has the same value, and if the function is differentiable everywhere in the interval (except maybe at the endpoints themselves), then the function must have zero slope in at least one place in the interior of the interval.

Proof of Rolle's Theorem

If f is constant on [a,b], then f'(x)=0 for every x in [a,b], so the theorem is true. So for the remainder of the discussion we assume f is not constant on [a,b].

Since f satisfies the conditions of the Extreme Value Theorem, f must attain its maximum and minimum values on [a,b]. Since f is not constant on [a,b], the endpoints cannot be both maxima and minima. Thus, at least one extremum exists in (a,b). We can suppose without loss of generality that this extremum is a maximum because, if it were a minimum, we could consider the function -f instead. Let f(c) with c in (a,b) be a maximum. It remains to be shown that f'(c)=0.

By the definition of derivative, f'(c)=\lim_{h\to0}\frac{f(c+h)-f(c)}{h}. By substituting h=x-c, this is equivalent to \lim_{x\to c}\frac{f(x)-f(c)}{x-c}. Note that f(x)-f(c)\leq 0 for all x in [a,b] since f(c) is the maximum on [a,b].

\lim_{x\to c^{-}}\frac{f(x)-f(c)}{x-c}\geq0 since it has non-positive numerator and negative denominator.

\lim_{x\to c^{+}}\frac{f(x)-f(c)}{x-c}\leq0 since it has non-positive numerator and positive denominator.

The limits from the left and right must be equal since the function is differentiable at c, so \lim_{x\to c}\frac{f(x)-f(c)}{x-c}=0=f'(c).

Exercise

1. Show that Rolle's Theorem holds true between the x-intercepts of the function f(x)=x^2-3x.

1: The question wishes for us to use the x-intercepts as the endpoints of our interval.

Factor the expression to obtain x(x-3)= 0 . x=0 and x=3 are our two endpoints. We know that f(0) and f(3) are the same, thus that satisfies the first part of Rolle's theorem (f(a)=f(b)).

2: Now by Rolle's Theorem, we know that somewhere between these points, the slope will be zero. Where? Easy: Take the derivative.

\frac{dy}{dx}  = 2x - 3

Thus, at  x = 3/2 , we have a spot with a slope of zero. We know that 3/2 (or 1.5) is between 0 and 3. Thus, Rolle's Theorem is true for this (as it is for all cases).

Mean Value Theorem

Lagrange mean value theorem.svg
Mean Value Theorem

If  f(x) \ is continuous on the closed interval  [a, b] \ and differentiable on the open interval  (a,b) \ , there exists a number,  c \ , in the open interval  (a,b) \ such that

 f'(c) = \frac{f(b) - f(a)}{b - a} .

The Mean Value Theorem is an important theorem of differential calculus. It basically says that for a differentiable function defined on an interval, there is some point on the interval whose instantaneous slope is equal to the average slope of the interval. Note that Rolle's Theorem is the special case of the Mean Value Theorem when f(a)=f(b).

In order to prove the Mean Value Theorem, we will prove a more general statement, of which the Mean Value Theorem is a special case. The statement is Cauchy's Mean Value Theorem, also known as the Extended Mean Value Theorem.

Cauchy's Mean Value Theorem

Cauchy's Mean Value Theorem

If  f(x) \ ,  g(x) \ are continuous on the closed interval  [a, b] \ and differentiable on the open interval  (a,b) \ , then there exists a number,  c \ , in the open interval  (a,b) \ such that

f'(c)(g(b)-g(a))=g'(c)(f(b)-f(a))

If g(b)\ne g(a) and g'(c)\ne 0, then this is equivalent to

 \frac{f'(c)}{g'(c)} = \frac{f(b) - f(a)}{g(b) - g(a)} .

To prove Cauchy's Mean Value Theorem, consider the function h(x)=f(x)(g(b)-g(a))-g(x)(f(b)-f(a))-f(a)g(b)+f(b)g(a). Since both f and g are continuous on [a,b] and differentiable on (a,b), so is h. h'(x)=f'(x)(g(b)-g(a))-g'(x)(f(b)-f(a)).Since h(a)=h(b) (see the exercises), Rolle's Theorem tells us that there exists some number c in (a,b) such that h'(c)=0. This implies that f'(c)(g(b)-g(a))=g'(x)(f(b)-f(a)), which is what was to be shown.

Exercises

2. Show that h(a)=h(b), where h(x) is the function that was defined in the proof of Cauchy's Mean Value Theorem.

\begin{align}h(a)&=f(a)(g(b)-g(a)-g(a)(f(b)-f(a)-f(a)g(b)+f(b)g(a)\\
&=f(a)g(b)-f(a)g(a)-g(a)f(b)-g(a)f(a)-f(a)g(b)+f(b)g(a)\\
&=0\end{align} \begin{align}h(b)&=f(b)(g(b)-g(a))-g(b)(f(b)-f(a))-f(a)g(b)+f(b)g(a)\\
&=f(b)g(b)-f(b)g(a)-g(b)f(b)-g(b)f(a)-f(a)g(b)+f(b)g(a)\\
&=0\end{align}

3. Show that the Mean Value Theorem follows from Cauchy's Mean Value Theorem.

Let g(x)=x. Then g'(x)=1 and g(b)-g(a)=b-a, which is non-zero if b\ne a. Then
 \frac{f'(c)}{g'(c)} = \frac{f(b) - f(a)}{g(b) - g(a)} simplifies to f'(c) = \frac{f(b) - f(a)}{b-a} , which is the Mean Value Theorem.

4. Find the x=c that satisfies the Mean Value Theorem for the function f(x)=x^3 with endpoints x=0 and x=2.

x=\frac{2\sqrt{3}}{3}

5. Find the point that satisifies the mean value theorem on the function f(x) = \sin(x) and the interval [0,\pi].

x=\pi/2

Solutions

Differentiability Implies Continuity

If f'(x_0) exists then f is continuous at x_0. To see this, note that \lim_{x\to x_0}(x-x_0)f'(x_0)=0. But
\begin{align}\lim_{x\to x_0}(x-x_0)f'(x_0)&=\lim_{x\to x_0}(x-x_0)\frac{f(x)-f(x_0)}{x-x_0}\\
&=\lim_{x\to x_0}(f(x)-f(x_0))\\
&=\lim_{x\to x_0}f(x)-f(x_0)\end{align}
This imples that \lim_{x\to x_0}f(x)-f(x_0)=0 or \lim_{x\to x_0}f(x)=f(x_0), which shows that f is continuous at x=x_0.
The converse, however, is not true. Take f(x)=|x|, for example. f is continuous at 0 since \lim_{x\to 0^-}|x|=\lim_{x\to 0^-}-x=0 and \lim_{x\to 0^+}|x|=\lim_{x\to 0^+}x=0 and |0|=0, but it is not differentiable at 0 since \lim_{h\to 0^-}\frac{|0+h|-|0|}{h}=\lim_{h\to 0^-}\frac{-h}{h}=-1 but \lim_{h\to 0^+}\frac{|0+h|-|0|}{h}=\lim_{h\to 0^+}\frac{h}{h}=1.

← Derivatives of Exponential and Logarithm Functions Calculus Differentiation/Basics of Differentiation/Exercises →
Print version

<h1> 3.9 Basics of Differentiation Cumulative Exercises</h1>

← Some Important Theorems Calculus L'Hôpital's rule →
Print version

Find the Derivative by Definition

Find the derivative of the following functions using the limit definition of the derivative.

1. f(x) = x^2 \,

2x

2. f(x) = 2x + 2 \,

2

3. f(x) = \frac{1}{2}x^2 \,

x

4. f(x) = 2x^2 + 4x + 4 \,

4x+4

5. f(x) = \sqrt{x+2} \,

\frac{1}{2\sqrt{x+2}}

6. f(x) = \frac{1}{x} \,

-\frac{1}{x^2}

7. f(x) = \frac{3}{x+1} \,

\frac{-3}{(x+1)^2}

8. f(x) = \frac{1}{\sqrt{x+1}} \,

\frac{-1}{2(x+1)^{3/2}}

9. f(x) = \frac{x}{x+2} \,

\frac{2}{(x+2)^2}

Solutions

Prove the Constant Rule

10. Use the definition of the derivative to prove that for any fixed real number c, \frac{d}{dx}\left[cf(x)\right] = c \frac{d}{dx}\left[f(x)\right]

\begin{align}\frac{d}{dx}\left[cf(x)\right]
&=\lim_{\Delta x \to 0}\frac{cf\left(x+\Delta x \right)-cf\left(x\right)}{\Delta x}\\
&=c\lim_{\Delta x \to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}\\
&=c\frac{d}{dx}\left[f(x)\right]\end{align}

Solutions

Find the Derivative by Rules

Find the derivative of the following functions:

Power Rule

11. f(x) = 2x^2 + 4\,

f'(x)=4x

12. f(x) = 3\sqrt[3]{x}\,

f'(x)=\frac{1}{\sqrt[3]{x^2}}

13. f(x) = 2x^5+8x^2+x-78\,

f'(x)=10x^4+16x+1

14. f(x) = 7x^7+8x^5+x^3+x^2-x\,

f'(x)=49x^6+40x^4+3x^2+2x-1

15. f(x) = \frac{1}{x^2}+3x^\frac{1}{3}\,

f'(x)=\frac{-2}{x^3}+\frac{1}{\sqrt[3]{x^2}}

16. f(x) = 3x^{15} + \frac{1}{17}x^2 +\frac{2}{\sqrt{x}} \,

f'(x)=45x^{14}+\frac{2}{17}x-\frac{1}{x\sqrt{x}}

17. f(x) = \frac{3}{x^4} - \sqrt[4]{x} + x \,

f'(x)=\frac{-12}{x^5}-\frac{1}{4\sqrt[4]{x^3}}+1

18. f(x) = 6x^{1/3}-x^{0.4} +\frac{9}{x^2} \,

f'(x)=\frac{2}{\sqrt[3]{x^2}}-\frac{0.4}{x^{0.6}}-\frac{18}{x^3}

19. f(x) = \frac{1}{\sqrt[3]{x}} + \sqrt{x} \,

f'(x)=\frac{-1}{3x\sqrt[3]{x}}+\frac{1}{2\sqrt{x}}

Solutions

Product Rule

20. f(x) = (x^4+4x+2)(2x+3) \,

10x^4+12x^3+16x+16

21. f(x) = (2x-1)(3x^2+2) \,

18x^2-6x+4

22. f(x) = (x^3-12x)(3x^2+2x) \,

15x^4+8x^3-108x^2-48x

23. f(x) = (2x^5-x)(3x+1) \,

36x^5+10x^4-6x-1

f(x) = (5x^2+3)(2x+7)\,

30x^2+70x+6

f(x) = 3x^2(5x^2+1)^4 \,

6x(25x^2+1)(5x^2+1)^3

f(x) = x^3(2x^2-x+4)^4 \,

x^2(2x^2-x+4)^3(22x^2-7x+12)

f(x) = 5x^2(x^3-x+1)^3 \,

5x(x^3-x+1)^2(11x^3-2x+1)

f(x) = (2-x)^6(5+2x)^4 \,

2(x-2)^5(2x+5)^3(10x+7)

Solutions

Quotient Rule

24. f(x) = \frac{2x+1}{x+5} \,

f'(x)=\frac{9}{(x+5)^2}

25. f(x) = \frac{3x^4+2x +2}{3x^2+1} \,

f'(x)=\frac{18x^5+12x^3-6x^2-12x+2}{(3x^2+1)^2}

26. f(x) = \frac{x^\frac{3}{2}+1}{x+2} \,

f'(x)=\frac{x\sqrt{x}+6\sqrt{x}-2}{2(x+2)^2}

27. d(u) = \frac{u^3+2}{u^3} \,

d'(u)=-\frac{6}{u^4}

28. f(x) = \frac{x^2+x}{2x-1} \,

f'(x)=\frac{2x^2-2x-1}{(2x-1)^2}

29. f(x) = \frac{x+1}{2x^2+2x+3} \,

f'(x)=\frac{-2x^2-4x+1}{(2x^2+2x+3)^2}

30. f(x) = \frac{16x^4+2x^2}{x} \,

f'(x)=48x^2+2

f(x) = \frac{8x^3+2}{5x+5} \,

f'(x)=\frac{2(8x^3+12x^2-1)}{5(x+1)^2}

f(x) = \frac{(3x-2)^2}{x^{1/2}} \,

f'(x)=\frac{(3x-2)(9x+2)}{2x^{3/2}}

f(x) = \frac{ x^{1/2}}{2x-1} \,

f'(x)=\frac{-(2x+1)}{2x^{1/2} (2x-1)^2}

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

f'(x)=\frac{11}{(x+2)^2}

f(x) = \frac{ 4x+3}{2x-1} \,

f'(x)=\frac{-10}{(2x-1)^2}

f(x) = \frac{ x^2}{x+3} \,

f'(x)=\frac{x(x+6)}{(x+3)^2)}

f(x) = \frac{ x^5}{3-x} \,

f'(x)=\frac{x^4(-4x+15)}{(3-x)^2}

Solutions

Chain Rule

31. f(x) = (x+5)^2 \,

f'(x)=2(x+5)

32. g(x) = (x^3 - 2x + 5)^2 \,

g'(x)=2(x^{3}-2x+5)(3x^{2}-2)

33. f(x) = \sqrt{1-x^2} \,

f'(x)=-\frac{x}{\sqrt{1-x^{2}}}

34. f(x) = \frac{(2x+4)^3}{4x^3+1} \,

f'(x)=\frac{6(4x^{3}+1)(2x+4)^{2}-(2x+4)^{3}(12x^{2})}{(4x^{3}+1)^{2}}

35. f(x) = (2x+1)\sqrt{2x+2} \,

f'(x)=2\sqrt{2x+2}+\frac{2x+1}{\sqrt{2x+2}}

36. f(x) = \frac{2x+1}{\sqrt{2x+2}} \,

f'(x)=\frac{2x+3}{(2x+2)^{3/2}}

37. f(x) = \sqrt{2x^2+1}(3x^4+2x)^2 \,

f'(x)=\frac{2x(3x^{4}+2x)^{2}}{\sqrt{2x^{2}+1}}+\sqrt{2x^{2}+1}(2)(3x^{4}+2x)(12x^{3}+2)

38. f(x) = \frac{2x+3}{(x^4+4x+2)^2} \,

f'(x)=\frac{2(x^{4}+4x+2)^{2}-2(2x+3)(x^{4}+4x+2)(4x^{3}+4)}{(x^{4}+4x+2)^{4}}

39. f(x) = \sqrt{x^3+1}(x^2-1) \,

f'(x)=\frac{3x(x^{2}-1)}{2\sqrt{x^{3}+1}}+2x\sqrt{x^{3}+1}

40. f(x) = ((2x+3)^4 + 4(2x+3) +2)^2 \,

f'(x)=2((2x+3)^{4}+4(2x+3)+2)(8(2x+3)^{3}+8)

41. f(x) = \sqrt{1+x^2} \,

f'(x)=\frac{x}{\sqrt{1+x^{2}}}

Solutions

Exponentials

42. f(x) = (3x^2+e)e^{2x}\,

f'(x)=6xe^{2x}+2e^{2x}(3x^{2}+e)

43. f(x) = e^{2x^2+3x}

f'(x)=(4x+3)e^{2x^{2}+3x}

44. f(x) = e^{e^{2x^2+1}}

f'(x)=4xe^{2x^{2}+1+e^{2x^{2}+1}}

45. f(x) = 4^x\,

f'(x)=\ln(4)4^{x}

Solutions

Logarithms

46. f(x) = 2^{x-3}\cdot3\sqrt{x^3-2}+\ln x\,

f'(x)=3\ln(2)2^{x-3}\sqrt{x^{3}-2}+\frac{9x^{2}2^{x-4}}{\sqrt{x^{3}-2}}+\frac{1}{x}

47. f(x) = \ln x - 2e^x + \sqrt{x}\,

f'(x)=\frac{1}{x}-2e^{x}+\frac{1}{2\sqrt{x}}

48. f(x) = \ln(\ln(x^3(x+1))) \,

f'(x)=\frac{4x^{3}+3x^{2}}{x^{3}(x+1)\ln(x^{3}(x+1))}

49. f(x) = \ln(2x^2+3x)\,

f'(x)=\frac{4x+3}{2x^{2}+3x}

50. f(x) = \log_4 x + 2\ln x\,

f'(x)=\frac{1}{x\ln4}+\frac{2}{x}

Solutions

Trigonometric functions

51. f(x) = 3e^x-4\cos (x) - \frac{1}{4}\ln x\,

f'(x)=3e^{x}+4\sin(x)-\frac{1}{4x}

52. f(x) = \sin(x)+\cos(x)\,

f'(x)=\cos(x)-\sin(x)

Solutions

More Differentiation

53. \frac{d}{dx}[(x^{3}+5)^{10}]

30x^{2}(x^{3}+5)^{9}

54. \frac{d}{dx}[x^{3}+3x]

3x^{2}+3

55. \frac{d}{dx}[(x+4)(x+2)(x-3)]

(x+2)(x-3)+(x+4)(x-3)+(x+4)(x+2)

56. \frac{d}{dx}[\frac{x+1}{3x^{2}}]

-\frac{x+2}{3x^{3}}

57. \frac{d}{dx}[3x^{3}]

9x^{2}

58. \frac{d}{dx}[x^{4}\sin x]

4x^{3}\sin x+x^{4}\cos x

59. \frac{d}{dx}[2^{x}]

\ln(2)2^{x}

60. \frac{d}{dx}[e^{x^{2}}]

2xe^{x^{2}}

61. \frac{d}{dx}[e^{2^{x}}]

2*e^{2^{x}}

Solutions

Implicit Differentiation

Use implicit differentiation to find y'

62.  x^3 + y^3 = xy \,

y'=\frac{y-3x^{2}}{3y^{2}-x}

63.  (2x+y)^4 + 3x^2 +3y^2 = \frac{x}{y} + 1 \,

y'=\frac{y-8y^{2}(2x+y)^{3}-6xy^{2}}{4y^{2}(2x+y)^{3}+6y^{3}+x}

Solutions

Logarithmic Differentiation

Use logarithmic differentiation to find \frac{dy}{dx}:

64. y = x(\sqrt[4]{1-x^3}\,)

y'=\sqrt[4]{1-x^{3}}-\frac{3x^{3}}{4(1-x^{3})^{3/4}}

65. y = \sqrt{x+1 \over 1-x}\,

y'=\frac{1}{2}\sqrt{\frac{x+1}{1-x}}\,(\frac{1}{x+1}+\frac{1}{1-x})

66. y = (2x)^{2x}\,

y'=(2x)^{2x}(2\ln(2x)+2)

67. y = (x^3+4x)^{3x+1}\,

y'=(x^{3}+4x)^{3x+1}(3\ln(x^{3}+4x)+\frac{(3x+1)(3x^{2}+4)}{x^{3}+4x})

68. y = (6x)^{\cos(x) + 1}\,

y'=6x^{\cos(x)+1}(-\sin(x)\ln(x)+\frac{\cos(x)+1}{x})

Solutions

Equation of Tangent Line

For each function, f, (a) determine for what values of x the tangent line to f is horizontal and (b) find an equation of the tangent line to f at the given point.

69.  f(x) = \frac{x^3}{3} + x^2 + 5, \;\;\; (3,23)

a) x=0,-2
b) y=15x-22

70.  f(x) = x^3 - 3x + 1, \;\;\;  (1,-1)

a) x=\pm1
b) y=-1

71.  f(x) = \frac{2}{3} x^3 + x^2 - 12x + 6, \;\;\; (0,6)

a) x=2,-3
b) y=-12x+6

72.  f(x) = 2x + \frac{1}{\sqrt{x}}, \;\;\; (1,3)

a) x=2^{-4/3}
b) y=\frac{3}{2}x+\frac{3}{2}

73.  f(x) = (x^2+1)(2-x), \;\;\; (2,0)

a) x=1,\frac{1}{3}
b) y=-5x+10

74.  f(x) = \frac{2}{3}x^3+\frac{5}{2}x^2 +2x+1, \;\;\; (3,\frac{95}{2})

a) x=-\frac{1}{2},-2
/ b) y=35x-\frac{115}{2}

75. Find an equation of the tangent line to the graph defined by (x-y-1)^3 = x \, at the point (1,-1).

y=\frac{2}{3}x-\frac{5}{3}

76. Find an equation of the tangent line to the graph defined by  e^{xy} + x^2 = y^2 \, at the point (1,0).

y=-2x+2

Solutions

Higher Order Derivatives

77. What is the second derivative of 3x^4+3x^2+2x?

36x^2+6

78. Use induction to prove that the (n+1)th derivative of a n-th order polynomial is 0.

base case: Consider the zeroth-order polynomial, c. \frac{dc}{dx}=0
induction step: Suppose that the n-th derivative of a (n-1)th order polynomial is 0. Consider the n-th order polynomial, f(x). We can write f(x)=cx^n+P(x) where P(x) is a (n-1)th polynomial.
\frac{d^{n+1}}{dx^{n+1}}f(x)=\frac{d^{n+1}}{dx^{n+1}}(cx^n+P(x))=\frac{d^{n+1}}{dx^{n+1}}(cx^n)+\frac{d^{n+1}}{dx^{n+1}}P(x)=\frac{d^{n}}{dx^{n}}(cnx^{n-1})+\frac{d}{dx}\frac{d^{n}}{dx^{n}}P(x)=0+\frac{d}{dx}0=0

Solutions

External Links


← Some Important Theorems Calculus L'Hôpital's rule →
Print version

Applications of Derivatives

<h1> Failed to match page to section number. Check your argument; if correct, consider updating Template:Calculus/map page. L'Hôpital's Rule</h1>

← Differentiation/Basics of Differentiation/Exercises Calculus Extrema and Points of Inflection →
Print version


L'Hopital's Rule

Occasionally, one comes across a limit which results in \frac{0}{0} or \frac{\infty}{\infty}, which are called indeterminate limits. However, it is still possible to solve these in many cases due to L'Hôpital's rule. This rule also is vital in explaining how a number of other limits can be derived.

Definition: Indeterminate Limit
If \frac{f(c)}{g(c)} exists, where \lim_{x \to c}f(c)=\lim_{x \to c}g(c)=0 or \lim_{x \to c}f(c)=\lim_{x \to c}g(c)=\infty, the limit \lim_{x \to c}\frac{f(x)}{g(x)} is said to be indeterminate.

All of the following expressions are indeterminate forms.

 \frac{0}{0}, \frac{\pm \infin}{\pm \infin}, \infty - \infty, 0 \cdot \infin, 0^0, \infty^0, 1^\infin \

These expressions are called indeterminate because you cannot determine their exact value in the indeterminate form. Depending on the situation, each indeterminate form could evaluate to a variety of values.

Theorem

If  \lim_{x \to c} \frac{f(x)}{g(x)} \ is indeterminate of type \frac{0}{0} or \frac{\pm \infty}{\pm \infty},

then  \lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{f'(x)}{g'(x)}

In other words, if the limit of the function is indeterminate, the limit equals the derivative of the top over the derivative of the bottom. If that is indeterminate, L'Hôpital's rule can be used again until the limit isn't \frac{0}{0} or \frac{\infty}{\infty}.

Note:

 x \ can approach a finite value c,  \infin or  -\infin .


Proof of the 0/0 case

Suppose that for real functions f and g , \lim_{x\to c}f(x)=0 and \lim_{x\to c}g(x)=0 and that \lim_{x\to c}\frac{f'(x)}{g'(x)} exists. Thus f'(x) and g'(x) exist in an interval (c-\delta,c+\delta) around c , but maybe not at c itself. This implies that both f and g are differentiable (and thus continuous) everywhere in (c-\delta,c+\delta) except perhaps at c. Thus, for any x in (c-\delta,c+\delta) , in any interval [c,x] or [x,c] , f and g are continuous and differentiable, with the possible exception of c . Define
F(x)=\left\{\begin{matrix}f(x),&\mbox{if }x\ne c\\ \lim_{x\to c}f(x),&\mbox{if }x=c\end{matrix}\right.       and       G(x)=\left\{\begin{matrix}g(x),&\mbox{if }x\ne c\\ \lim_{x\to c}g(x),&\mbox{if }x=c\end{matrix}\right..
Note that \lim_{x\to c}\frac{f(x)}{g(x)}=\lim_{x\to c}\frac{F(x)}{G(x)} , \lim_{x\to c}\frac{f'(x)}{g'(x)}=\lim_{x\to c}\frac{F'(x)}{G'(x)} and that F(x) and G(x) are continuous in any interval [c,x] or [x,c] and differentiable in any interval (c,x) or (x,c) when x is in (c-\delta,c+\delta). Cauchy's Mean Value Theorem tells us that \frac{F(x)-F(c)}{G(x)-G(c)}=\frac{F'(\xi)}{G'(\xi)} for some \xi in (c,x) (if x>c ) or (x,c) (if x<c ). Since F(c)=G(c)=0 , we have \frac{F(x)}{G(x)}=\frac{F'(\xi)}{G'(\xi)} for x and \xi in (c-\delta,c+\delta). Note that \lim_{x\to c}\frac{F'(\xi)}{G'(\xi)} is the same limit as \lim_{x\to c}\frac{F'(x)}{G'(x)} since both x and \xi are being squeezed to c . So taking the limit as x\to c of the last equation gives \lim_{x\to c}\frac{F(x)}{G(x)}=\lim_{x\to c}\frac{F'(x)}{G'(x)} which is equivalent to \lim_{x\to c}\frac{f(x)}{g(x)}=\lim_{x\to c}\frac{f'(x)}{g'(x)}.

Examples

Example 1

Find \lim_{x \to 0}\frac{\sin x}{x}

Since plugging in 0 for x results in \frac{0}{0}, use L'Hôpital's rule to take the derivative of the top and bottom, giving:

\lim_{x \to 0}\frac{\cos x}{1}

Plugging in 0 for x gives 1 here.

Example 2

Find \lim_{x \to 0}x \cot x

First, you need to rewrite the function into an indeterminate limit fraction:

\lim_{x \to 0}\frac{x}{\tan x}

Now it's indeterminate. Take the derivative of the top and bottom:

\lim_{x \to 0}\frac{1}{\sec^{2} x}

Plugging in 0 for x once again gives one.

Example 3

Find \lim_{x \to \infty}\frac{4x+22}{5x+9}

This time, plugging in \infty for x gives you \frac{\infty}{\infty}. You know the drill:

\lim_{x \to \infty}\frac{4}{5}

This time, though, there is no x term left! \frac{4}{5} is the answer.

Example 4

Sometimes, forms exist where it is not intuitively obvious how to solve them. One might think the value  1^\infin = 1 . However, as was noted in the definition of an indeterminate form, this isn't possible to evaluate using the rules learned before now, and we need to use L'Hôpital's rule to solve.

Find  \lim_{x \to \infin} \left( 1 + \frac{1}{x} \right) ^ x

Plugging the value of x into the limit yields

 \lim_{x \to \infin} \left( 1 + \frac{1}{x} \right) ^ x = 1^\infin (indeterminate form).

Let  k = \lim_{x \to \infin} \left( 1 + \frac{1}{x} \right) ^ x = 1^\infin

 \ln k \, =  \lim_{x \to \infin} \ln \left( 1 + \frac{1}{x} \right) ^ x
=  \lim_{x \to \infin} x \ln \left( 1 + \frac{1}{x} \right)
=  \lim_{x \to \infin} \frac{\ln \left( 1 + \frac{1}{x} \right)}{\frac{1}{x}} = \frac{\ln 1}{\frac{1}{x}} = \frac{0}{0} (indeterminate form)

We now apply L'Hôpital's rule by taking the derivative of the top and bottom with respect to x.

 \frac{d}{dx} \left[ \ln \left( 1 + \frac{1}{x} \right) \right] = \frac{x}{x+1} \cdot \frac{-1}{x^2} = \frac{-1}{x(x+1)}
 \frac{d}{dx} \left( \frac{1}{x} \right) = \frac{-1}{x^2}

Returning to the expression above

 \ln k \ =  \lim_{x \to \infin} \frac{-(-x^2)}{x(x+1)}
=  \lim_{x \to \infin} \frac{x}{x+1} = \frac{\infin}{\infin} (indeterminate form)

We apply L'Hôpital's rule once again

 \ln k = \lim_{x \to \infin} \frac{1}{1} = 1

Therefore

 k = e \

And

 \lim_{x \to \infin} \left( 1 + \frac{1}{x} \right) ^x = e \ne 1

Careful: this does not prove that  1^\infin = e \ because

 \lim_{x \to \infin} \left( 1 + \frac{2}{x} \right) ^x = 1^\infin \ne e

Exercises

Evaluate the following limits using L'Hôpital's rule:

1. \lim_{x \to 0}\frac{x+\tan x}{\sin x}

2

2. \lim_{x \to \pi}\frac{x-\pi}{\sin x}

-1

3. \lim_{x \to 0}\frac{\sin 3x}{\sin 4x}

\frac{3}{4}

4. \lim_{x \to \infty}\frac{x^5}{e^{5x}}

0

5. \lim_{x \to 0}\frac{\tan x - x}{\sin x - x}

-2

Solutions

← Differentiation/Basics of Differentiation/Exercises Calculus Extrema and Points of Inflection →
Print version

<h1> 3.11 Extrema and Points of Inflection</h1>

← L'Hôpital's rule Calculus Newton's Method →
Print version
The four types of extrema.

Maxima and minima are points where a function reaches a highest or lowest value, respectively. There are two kinds of extrema (a word meaning maximum or minimum): global and local, sometimes referred to as "absolute" and "relative", respectively. A global maximum is a point that takes the largest value on the entire range of the function, while a global minimum is the point that takes the smallest value on the range of the function. On the other hand, local extrema are the largest or smallest values of the function in the immediate vicinity.

All extrema look like the crest of a hill or the bottom of a bowl on a graph of the function. A global extremum is always a local extremum too, because it is the largest or smallest value on the entire range of the function, and therefore also its vicinity. It is also possible to have a function with no extrema, global or local: y=x is a simple example.

At any extremum, the slope of the graph is necessarily zero, as the graph must stop rising or falling at an extremum, and begin to head in the opposite direction. Because of this, extrema are also commonly called stationary points or turning points. Therefore, the first derivative of a function is equal to zero at extrema. If the graph has one or more of these stationary points, these may be found by setting the first derivative equal to zero and finding the roots of the resulting equation.

The function f(x)=x3, which contains a point of inflexion at the point (0,0).

However, a slope of zero does not guarantee a maximum or minimum: there is a third class of stationary point called a point of inflexion (also spelled point of inflection). Consider the function

f \left(x \right) = x^3.

The derivative is

f^\prime \left(x \right) = 3 x^2

The slope at x=0 is 0. We have a slope of zero, but while this makes it a stationary point, this doesn't mean that it is a maximum or minimum. Looking at the graph of the function you will see that x=0 is neither, it's just a spot at which the function flattens out. True extrema require a sign change in the first derivative. This makes sense - you have to rise (positive slope) to and fall (negative slope) from a maximum. In between rising and falling, on a smooth curve, there will be a point of zero slope - the maximum. A minimum would exhibit similar properties, just in reverse.

Good (B and C, green) and bad (D and E, blue) points to check in order to classify the extremum (A, black). The bad points lead to an incorrect classification of A as a minimum.

This leads to a simple method to classify a stationary point - plug x values slightly left and right into the derivative of the function. If the results have opposite signs then it is a true maximum/minimum. You can also use these slopes to figure out if it is a maximum or a minimum: the left side slope will be positive for a maximum and negative for a minimum. However, you must exercise caution with this method, as, if you pick a point too far from the extremum, you could take it on the far side of another extremum and incorrectly classify the point.

The Extremum Test

A more rigorous method to classify a stationary point is called the extremum test, or 2nd Derivative Test. As we mentioned before, the sign of the first derivative must change for a stationary point to be a true extremum. Now, the second derivative of the function tells us the rate of change of the first derivative. It therefore follows that if the second derivative is positive at the stationary point, then the gradient is increasing. The fact that it is a stationary point in the first place means that this can only be a minimum. Conversely, if the second derivative is negative at that point, then it is a maximum.

Now, if the second derivative is zero, we have a problem. It could be a point of inflexion, or it could still be an extremum. Examples of each of these cases are below - all have a second derivative equal to zero at the stationary point in question:

  • y = x^{3} has a point of inflexion at x=0
  • y = x^{4} has a minimum at x=0
  • y =-x^{4} has a maximum at x=0

However, this is not an insoluble problem. What we must do is continue to differentiate until we get, at the (n+1)th derivative, a non-zero result at the stationary point:

f^{\prime} \left(x \right)=0, \,f^{\prime \prime} \left(x \right)=0,\, \ldots ,f^{\left(n\right)} \left(x \right)=0,\,f^{\left(n+1\right)} \left(x \right)\ne 0

If n is odd, then the stationary point is a true extremum. If the (n+1)th derivative is positive, it is a minimum; if the (n+1)th derivative is negative, it is a maximum. If n is even, then the stationary point is a point of inflexion.

As an example, let us consider the function

f \left( x \right) = -x^4

We now differentiate until we get a non-zero result at the stationary point at x=0 (assume we have already found this point as usual):

f^\prime \left( x \right) = -4x^3
f^{\prime \prime} \left( x \right) = -12x^2
f^{\prime \prime \prime} \left( x \right) = -24x
f^{\left(4\right)} \left( x \right) = -24

Therefore, (n+1) is 4, so n is 3. This is odd, and the fourth derivative is negative, so we have a maximum. Note that none of the methods given can tell you if this is a global extremum or just a local one. To do this, you would have to set the function equal to the height of the extremum and look for other roots.

Critical Points

Critical points are the points where a function's derivative is 0 or not defined. Suppose we are interested in finding the maximum or minimum on given closed interval of a function that is continuous on that interval. The extreme values of the function on that interval will be at one or more of the critical points and/or at one or both of the endpoints. We can prove this by contradiction. Suppose that the function f(x) has maximum at a point x=c in the interval (a,b) where the derivative of the function is defined and not 0. If the derivative is positive, then x values slightly greater than c will cause the function to increase. Since c is not an endpoint, at least some of these values are in [a,b]. But this contradicts the assumption that f(c) is the maximum of f(x) for x in [a,b]. Similarly, if the derivative is negative, then x values slightly less than c will cause the function to increase. Since c is not an endpoint, at least some of these values are in [a,b]. This contradicts the assumption that f(c) is the maximum of f(x) for x in [a,b]. A similar argument could be made for the minimum.

Example 1

Consider the function f(x)=x on the interval [-1,1]. The unrestricted function f(x)=x has no maximum or minimum. On the interval [-1,1], however, it is obvious that the minimum will be -1, which occurs at =-1 and the maximum will be 1, which occurs at x=1. Since there are no critical points (f'(x) exists and equals 1 everywhere), the extreme values must occur at the endpoints.

Example 2

Find the maximum and minimum of the function f(x)=x^3-2x^2-5x+6 on the interval [-3,3].

First start by finding the roots of the function derivative:
f'(x)=3x^2-4x-5 = 0
x=\frac{2\pm\sqrt{19}}{3}
Now evaluate the function at all critical points and endpoints to find the extreme values.
f(-3)=-24
f(\frac{2-\sqrt{19}}{3})=\frac{56+38\sqrt{19}}{27}\approx 8.2088
f(\frac{2+\sqrt{19}}{3})=\frac{56-38\sqrt{19}}{27}\approx -4.0607
f(3)=0
From this we can see that the minimum on the interval is -24 when x=-3 and the maximum on the interval is \frac{56+38\sqrt{19}}{27} when x=\frac{2-\sqrt{19}}{3}

See "Optimization" for a common application of these principles.

← L'Hôpital's rule Calculus Newton's Method →
Print version

<h1> 3.12 Newton's Method</h1>

← Extrema and Points of Inflection Calculus Related Rates →
Print version

Newton's Method (also called the Newton-Raphson method) is a recursive algorithm for approximating the root of a differentiable function. We know simple formulas for finding the roots of linear and quadratic equations, and there are also more complicated formulae for cubic and quartic equations. At one time it was hoped that there would be formulas found for equations of quintic and higher-degree, though it was later shown by Neils Henrik Abel that no such equations exist. The Newton-Raphson method is a method for approximating the roots of polynomial equations of any order. In fact the method works for any equation, polynomial or not, as long as the function is differentiable in a desired interval.

Newton's Method

Let f\left(x\right) be a differentiable function. Select a point x_0 based on a first approximation to the root, arbitrarily close to the function's root. To approximate the root you then recursively calculate using:

x_{n+1} = x_n - \frac{f\left(x_n\right)}{f'\left(x_n\right)}

As you recursively calculate, the x_{n+1}'s often become increasingly better approximations of the function's root.

In order to explain Newton's method, imagine that x_0 is already very close to a zero of f\left(x\right). We know that if we only look at points very close to x_0 then f\left(x\right) looks like its tangent line. If x_0 was already close to the place where f\left(x\right) was zero, and near x_0 we know that f\left(x\right) looks like its tangent line, then we hope the zero of the tangent line at x_0 is a better approximation then x_0 itself.

The equation for the tangent line to f\left(x\right) at x_0 is given by

y=f'\left(x_0\right)\left(x-x_0\right)+f\left(x_0\right).

Now we set y=0 and solve for x.

0=f'\left(x_0\right)\left(x-x_0\right)+f\left(x_0\right)
-f\left(x_0\right)=f'\left(x_0\right)\left(x-x_0\right)
\frac{-f\left(x_0\right)}{f'\left(x_0\right)}=\left(x-x_0\right)
x=\frac{-f\left(x_0\right)}{f'\left(x_0\right)}+x_0

This value of x we feel should be a better guess for the value of x where f\left(x\right)=0. We choose to call this value of x_1, and a little algebra we have

x_1=x_0-\frac{f\left(x_0\right)}{f'\left(x_0\right)}.

If our intuition was correct and x_1 is in fact a better approximation for the root of f\left(x\right), then our logic should apply equally well at x_1. We could look to the place where the tangent line at x_1 is zero. We call x_2, following the algebra above we arrive at the formula

x_2=x_1-\frac{f\left(x_1\right)}{f'\left(x_1\right)}.

And we can continue in this way as long as we wish. At each step, if your current approximation is x_n our new approximation will be x_{n+1}=x_n-\frac{f\left(x_n\right)}{f'\left(x_n\right)}.


Examples

Find the root of the function  f\left(x\right) = x^2 \ .
Figure 1: A few iterations of Newton's method applied to y=x^2 starting with x_0=4. The blue curve is f\left(x\right). The other solid lines are the tangents at the various iteration points.

\begin{align}x_{0}&=&4\\
x_{1}&=&x_{0}-\frac{f\left(x_{0}\right)}{f'\left(x_{0}\right)}=4-\frac{16}{8}=2\\
x_{2}&=&x_{1}-\frac{f\left(x_{1}\right)}{f'\left(x_{1}\right)}=2-\frac{4}{4}=1\\
x_{3}&=&x_{2}-\frac{f\left(x_{2}\right)}{f'\left(x_{2}\right)}=1-\frac{1}{2}=\frac{1}{2}\\
x_{4}&=&x_{3}-\frac{f\left(x_{3}\right)}{f'\left(x_{3}\right)}=\frac{1}{2}-\frac{1/4}{1}=\frac{1}{4}\\
x_{5}&=&x_{4}-\frac{f\left(x_{4}\right)}{f'\left(x_{4}\right)}=\frac{1}{4}-\frac{1/16}{1/2}=\frac{1}{8}\\
x_{6}&=&x_{5}-\frac{f\left(x_{5}\right)}{f'\left(x_{5}\right)}=\frac{1}{8}-\frac{1/64}{1/4}=\frac{1}{16}\\
x_{7}&=&x_{6}-\frac{f\left(x_{6}\right)}{f'\left(x_{6}\right)}=\frac{1/256}{1/8}=\frac{1}{32}\end{align}

As you can see x_n is gradually approaching zero (which we know is the root of f\left(x\right)). One can approach the function's root with arbitrary accuracy.

Answer:  f\left(x\right) = x^2 \  has a root at  x = 0 \ .

Notes

Figure 2: Newton's method applied to the function
f\left(x\right) = \begin{cases} \sqrt{x-4}, & \mbox{for}\,\,x \ge 4 \\ -\sqrt{4-x}, & \mbox{for}\,\,x < 4 \end{cases}
starting with x_0=2.

This method fails when f'\left(x\right) = 0. In that case, one should choose a new starting place. Occasionally it may happen that f\left(x\right) = 0 and f'\left(x\right) = 0 have a common root. To detect whether this is true, we should first find the solutions of f'\left(x\right) = 0, and then check the value of f\left(x\right) at these places.

Newton's method also may not converge for every function, take as an example:

f\left(x\right) = \begin{cases} \sqrt{x-r}, & \mbox{for}\,\,x \ge r \\ -\sqrt{r-x}, & \mbox{for}\,\,x < r \end{cases}

For this function choosing any x_1 = r - h then x_2 = r + h would cause successive approximations to alternate back and forth, so no amount of iteration would get us any closer to the root than our first guess.

Figure 3: Newton's method, when applied to the function f\left(x\right)=x^5-x+1 with initial guess x_0=0, eventually iterates between the three points shown above.

Newton's method may also fail to converge on a root if the function has a local maximum or minimum that does not cross the x-axis. As an example, consider f\left(x\right)=x^5-x+1 with initial guess x_0=0. In this case, Newton's method will be fooled by the function, which dips toward the x-axis but never crosses it in the vicinity of the initial guess.

See also

← Extrema and Points of Inflection Calculus Related Rates →
Print version

<h1> 3.13 Related Rates</h1>

← Newton's Method Calculus Optimization →
Print version

Introduction

One useful application of derivatives is as an aid in the calculation of related rates. What is a related rate? In each case in the following examples the related rate we are calculating is a derivative with respect to some value. We compute this derivative from a rate at which some other known quantity is changing. Given the rate at which something is changing, we are asked to find the rate at which a value related to the rate we are given is changing.

Process for solving related rates problems:

  • Write out any relevant formulas and information.
  • Take the derivative of the primary equation with respect to time.
  • Solve for the desired variable.
  • Plug-in known information and simplify.

Notation

Newton's dot notation is used to show the derivative of a variable with respect to time. That is, if f is a quantity that depends on time, then \dot f=\frac{df}{dt}, where t represents the time. This notation is a useful abbreviation in situations where time derivatives are often used, as is the case with related rates.

Examples

Example 1:

Filling cone with water.png
A cone with a circular base is being filled with water. Find a formula which will find the rate with which water is pumped.
  • Write out any relevant formulas or pieces of information.
 V = \frac{1}{3} \pi r^2 h
  • Take the derivative of the equation above with respect to time. Remember to use the Chain Rule and the Product Rule.
 V = \frac{1}{3} \pi r^2h
 \dot V = \frac{\pi}{3} \left( r^2\dot h + 2rh\dot r \right)
Answer:  \dot V = \frac{\pi}{3} \left( r^2\dot h + 2rh\dot r \right)

Example 2:

A spherical hot air balloon is being filled with air. The volume is changing at a rate of 2 cubic feet per minute. How is the radius changing with respect to time when the radius is equal to 2 feet?
  • Write out any relevant formulas and pieces of information.
 V_{sphere} = \frac{4}{3} \pi r^3
 \dot V = 2
 r = 2 \
  • Take the derivative of both sides of the volume equation with respect to time.
 V = \frac{4}{3} \pi r^3
 \dot V =  \frac{4}{3}3\pi r^2\dot r
=  4 \pi r^2\dot r
  • Solve for  \dot r.
 \dot r = \frac{1}{4 \pi r^2}\dot V
  • Plug-in known information.
 \dot r = \frac{1}{16 \pi}2
Answer:  \dot r = \frac{1}{8 \pi} ft/min.

Example 3:

An airplane is attempting to drop a box onto a house. The house is 300 feet away in horizontal distance and 400 feet in vertical distance. The rate of change of the horizontal distance with respect to time is the same as the rate of change of the vertical distance with respect to time. How is the distance between the box and the house changing with respect to time at the moment? The rate of change in the horizontal direction with respect to time is -50 feet per second.

Note: Because the vertical distance is downward in nature, the rate of change of y is negative. Similarly, the horizontal distance is decreasing, therefore it is negative (it is getting closer and closer).

The easiest way to describe the horizontal and vertical relationships of the plane's motion is the Pythagorean Theorem.

  • Write out any relevant formulas and pieces of information.
 x^2 + y^2 = s^2 \ (where s is the distance between the plane and the house)
 x = 300 \
 y = 400 \
 s = \sqrt{x^2 + y^2} = \sqrt{300^2 + 400^2} = 500 \
 \dot x = \dot y = -50
  • Take the derivative of both sides of the distance formula with respect to time.
 x^2 + y^2 = s^2 \
 2x\dot x + 2y\dot y = 2s\dot s
  • Solve for  \dot s.
 \dot s = \frac{1}{2s}( 2x\dot x + 2y\dot y)
=

\frac{x\dot x + y\dot y}{s}

  • Plug-in known information
 \dot s =  \frac{(300)(-50) + (400)(-50)}{(500)}
=  \frac{-35000}{500}
=  -70 \ ft/s
Answer:  \dot s = -70 ft/sec.

Example 4:

Sand falls onto a cone shaped pile at a rate of 10 cubic feet per minute. The radius of the pile's base is always 1/2 of its altitude. When the pile is 5 ft deep, how fast is the altitude of the pile increasing?
  • Write down any relevant formulas and information.
 V = \frac{1}{3} \pi r^2 h
 \dot V = 10
 r = \frac{1}{2} h \
 h = 5 \

Substitute  r = \frac{1}{2} h into the volume equation.

 V \ =  \frac{1}{3} \pi r^2 h
=  \frac{1}{3} \pi h( \frac{h^2}{4})
=  \frac{1}{12} \pi h^3
  • Take the derivative of the volume equation with respect to time.
 V = \frac{1}{12} \pi h^3
 \dot V = \frac{1}{4} \pi h^2\dot h
  • Solve for  \dot h.
 \dot h = \frac{4}{\pi h^2}\dot V
  • Plug-in known information and simplify.
 \dot h =  \frac{4}{\pi (5)^2}10
=  \frac{8}{5 \pi} ft/min
Answer:  \dot h = \frac{8}{5 \pi} ft/min.

Example 5:

A 10 ft long ladder is leaning against a vertical wall. The foot of the ladder is being pulled away from the wall at a constant rate of 2 ft/sec. When the ladder is exactly 8 ft from the wall, how fast is the top of the ladder sliding down the wall?
  • Write out any relevant formulas and information.

Use the Pythagorean Theorem to describe the motion of the ladder.

 x^2 + y^2 = l^2 \ (where l is the length of the ladder)
 l = 10 \
 \dot x = 2
 x = 8 \
 y = \sqrt{l^2 - x^2} = \sqrt{100-64} = \sqrt{36} = 6 \
  • Take the derivative of the equation with respect to time.
 2x\dot x + 2y\dot y = 0 ( l is constant so  \frac{dl^2}{dt} = 0 .)
  • Solve for  \dot y .
 2x\dot x + 2y\dot y = 0
 2y\dot y = -2x\dot x
 \dot y = - \frac{x}{y}\dot x
  • Plug-in known information and simplify.
 \dot y =  \left( - \frac{8}{6} \right) (2)
=  - \frac{8}{3} ft/sec
Answer:  \dot y = -\frac{8}{3} ft/sec.

Exercises

1. A spherical balloon is inflated at a rate of 100 ft^3/min. Assuming the rate of inflation remains constant, how fast is the radius of the balloon increasing at the instant the radius is 4 ft?

\frac{25}{16\pi} \frac{ft}{min}

2. Water is pumped from a cone shaped reservoir (the vertex is pointed down) 10 ft in diameter and 10 ft deep at a constant rate of 3 ft^3/min. How fast is the water level falling when the depth of the water is 6 ft?

\frac{1}{3\pi} \frac{ft}{min}

3. A boat is pulled into a dock via a rope with one end attached to the bow of a boat and the other wound around a winch that is 2ft in diameter. If the winch turns at a constant rate of 2rpm, how fast is the boat moving toward the dock?

4\pi\frac{ft}{min}

4. At time t=0 a pump begins filling a cylindrical reservoir with radius 1 meter at a rate of e^{-t} cubic meters per second. At what time is the liquid height increasing at 0.001 meters per second?

t=-\ln(.001\pi)

Solutions

← Newton's Method Calculus Optimization →
Print version

<h1> 3.14 Optimization</h1>

← Related Rates Calculus Euler's Method →
Print version

Introduction

Optimization is one of the uses of calculus in the real world. Let us assume we are a pizza parlor and wish to maximize profit. Perhaps we have a flat piece of cardboard and we need to make a box with the greatest volume. How does one go about this process?

Obviously, this requires the use of maximums and minimums. We know that we find maximums and minimums via derivatives. Therefore, one can conclude that calculus will be a useful tool for maximizing or minimizing (collectively known as "optimizing") a situation.

Examples

Volume Example

A box manufacturer desires to create a box with a surface area of 100 inches squared. What is the maximum size volume that can be formed by bending this material into a box? The box is to be closed. The box is to have a square base, square top, and rectangular sides.

  • Write out known formulas and information
 A_{base} = x^2 \
 A_{side} = x \cdot h \
 A_{total} = 2x^2 + 4x \cdot h = 100
 V = l \cdot w \cdot h = x^2 \cdot h
  • Eliminate the variable h in the volume equation
 2x^2 + 4xh = 100 \
 x^2 + 2xh = 50 \
 2xh = 50 - x^2 \
 h = \frac{50 - x^2}{2x}
 V \ =  (x^2) \left( \frac{50 - x^2}{2x} \right)
=  \frac{1}{2} (50x - x^3)
  • Find the derivative of the volume equation in order to maximize the volume
 \frac{dV}{dx} = \frac{1}{2} (50-3x^2)
  • Set  \frac{dV}{dx} = 0 and solve for  x \
 \frac{1}{2} (50-3x^2) = 0
 50-3x^2 = 0 \
 3x^2 = 50 \
 x = \pm \frac{\sqrt{50}}{\sqrt{3}}
  • Plug-in the x value into the volume equation and simplify
 V \ =  \frac{1}{2} \left[ 50 \cdot \sqrt{\frac{50}{3}} - \left( \sqrt{\frac{50}{3}} \right) ^3 \right]
=  68.04138174.. \
Answer:  V_{max} = 68.04138174.. \ 

Volume Example II

Open-top box.svg

It is desired to make an open-top box of greatest possible volume from a square piece of tin whose side is \alpha, by cutting equal squares out of the corners and then folding up the tin to form the sides. What should be the length of a side of the squares cut out?

If we call the side length of the cut out squares x, then each side of the base of the folded box is \alpha-2x, and the height is x. Therefore, the volume function is V(x)=x(\alpha-2x)^2=x(\alpha^2-4\alpha x+4x^2)=\alpha^2 x - 4\alpha x^2 + 4x^3.

We must optimize the volume by taking the derivative of the volume function and setting it equal to 0. Since it does not change, \alpha is treated as a constant, not a variable.

V(x)=\alpha^2 x - 4\alpha x^2 + 4x^3

V'(x)=\alpha^2 - 8\alpha x + 12x^2

0=12x^2 - 8\alpha x + \alpha^2

We can now use the quadratic formula to solve for x:

x=\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

x=\frac{-(-8\alpha) \pm \sqrt{(-8\alpha)^2 - 4(12)(\alpha^2)}}{2(12)}

x=\frac{8\alpha \pm \sqrt{64\alpha^2 - 48\alpha^2}}{24}

x=\frac{8\alpha \pm \sqrt{16\alpha^2}}{24}

x=\frac{8\alpha \pm 4\alpha}{24}

x=\frac{\alpha}{6}, \frac{\alpha}{2}

We reject x=\frac{\alpha}{2}, since it is a minimum (it results in the base length \alpha-2x being 0, making the volume 0). Therefore, the answer is x=\frac{\alpha}{6}.

Sales Example

Calculus Graph-Finding Maximum Profit.png

A small retailer can sell n units of a product for a revenue of r(n)=8.1n and at a cost of c(n)=n^3-7n^2+18n, with all amounts in thousands. How many units does it sell to maximize its profit?

The retailer's profit is defined by the equation p(n)=r(n) - c(n), which is the revenue generated less the cost. The question asks for the maximum amount of profit which is the maximum of the above equation. As previously discussed, the maxima and minima of a graph are found when the slope of said graph is equal to zero. To find the slope one finds the derivative of p(n). By using the subtraction rule p'(n)=r'(n) - c'(n):

p(n)\, = r(n) - c(n)\,
p'(n)\, = \frac{d}{dn}\left[8.1n\right]-\frac{d}{dn}\left[n^3-7n^2+18n\right]\,
= -3n^2+14n-9.9\,

Therefore, when -3n^2+14n-9.9\,=0 the profit will be maximized or minimized. Use the quadratic formula to find the roots, giving {3.798,0.869}. To find which of these is the maximum and minimum the function can be tested:

p(0.869) = - 3.97321, p(3.798) = 8.58802

Because we only consider the functions for all n \ge 0 (i.e., you can't have n=-5 units), the only points that can be minima or maxima are those two listed above. To show that 3.798 is in fact a maximum (and that the function doesn't remain constant past this point) check if the sign of p'(n) changes at this point. It does, and for n greater than 3.798 P'(n) the value will remain decreasing. Finally, this shows that for this retailer selling 3.798 units would return a profit of $8,588.02.

← Related Rates Calculus Euler's Method →
Print version

<h1> 3.15 Euler's Method</h1>

← Optimization Calculus Differentiation/Applications of Derivatives/Exercises →
Print version

Euler's Method is a method for estimating the value of a function based upon the values of that function's first derivative.

The general algorithm for finding a value of  y(x) \ is:

 y_{n+1} = y_n + \Delta x_{step} \cdot f(x_n,y_n), \

where f is y'(x). In other words, the new value, y_{n+1}, is the sum of the old value y_n and the step size \Delta x_{step} times the change, f(x_n,y_n).

You can think of the algorithm as a person traveling with a map: Now I am standing here and based on these surroundings I go that way 1 km. Then, I check the map again and determine my direction again and go 1 km that way. I repeat this until I have finished my trip.

The Euler method is mostly used to solve differential equations of the form

 
    y' = f(x,y), 
    y(x_0) = y_0. \


Examples

A simple example is to solve the equation:


 
    y' = x + y,  
    y(0) = 1. \

This yields f = y' = x + y and hence, the updating rule is:

 
    y_{n+1} = y_n + 0.1 (x_n + y_n)\

Step size \Delta x_{step} = 0.1 is used here.

The easiest way to keep track of the successive values generated by the algorithm is to draw a table with columns for  n, x_n, y_n, y_{n+1} \ .

The above equation can be e.g. a population model, where y is the population size and x a decease that is reducing the population.

← Optimization Calculus Differentiation/Applications of Derivatives/Exercises →
Print version

<h1> 3.16 Applications of Derivatives Cumulative Exercises</h1>

← Euler's Method Calculus Integration/Contents →
Print version

Relative Extrema

Find the relative maximum(s) and minimum(s), if any, of the following functions.

1.  f(x) = \frac{x}{x+1} \,

none

2.  f(x) = (x-1)^{2/3} \,

Minimum at the point (1,0)

3.  f(x) = x^2 + \frac{2}{x} \,

Relative minimum at x=1

4.  f(s) = \frac{s}{1+s^2} \,

Relative minimum at x=-1
Relative maximum at x=1

5.  f(x) =  x^2 - 4x + 9 \,

Relative minimum at x=2

6.  f(x) = \frac{x^2 + x +1}{x^2 -x +1} \,

Relative minimum at x=-1
Relative maximum at x=1

Solutions

Range of Function

7. Show that the expression x+ 1/x cannot take on any value strictly between 2 and -2.

f(x)=x+\frac{1}{x}
f'(x)=1-\frac{1}{x^{2}}
1-\frac{1}{x^{2}}=0\implies x=\pm1
f^{\prime\prime}(x)=\frac{2}{x^{3}}
f^{\prime\prime}(-1)=-2
Since f^{\prime\prime}(-1) is negative, x=-1 corresponds to a relative maximum.
f(-1)=-2
\lim\limits _{x\to-\infty}f(x)=-\infty
For x<-1, f'(x) is positive, which means that the function is increasing. Coming from very negative x-values, f increases from a very negative value to reach a relative maximum of -2 at x=-1.
For -1<x<1, f'(x) is negative, which means that the function is decreasing.
\lim_{x\to0^{-}}f(x)=-\infty
\lim_{x\to0^{+}}f(x)=+\infty
f^{\prime\prime}(1)=2
Since f^{\prime\prime}(1) is positive, x=1 corresponds to a relative minimum.
f(1)=2
Between [-1,0) the function decreases from -2 to -\infty, then jumps to +\infty and decreases until it reaches a relative minimum of 2 at x=1.
For x>1, f'(x) is positive, so the function increases from a minimum of 2.
The above analysis shows that there is a gap in the function's range between -2 and 2.

Absolute Extrema

Determine the absolute maximum and minimum of the following functions on the given domain

8.  f(x) = \frac{1}{3}x^3 - \frac{1}{2}x^2 + 1 on [0,3]

Maximum at (3,\frac{11}{2}); minimum at (1,\frac{5}{6})

9.  f(x) = (\frac{4}{3}x^2 -1)x on [-\frac{1}{2},2]

Maximum at (2,\frac{26}{3}); minimum at (\frac{1}{2},-\frac{1}{3})

Solutions

Determine Intervals of Change

Find the intervals where the following functions are increasing or decreasing

10. f(x)=10-6x-2x^2

Increasing on (-\infty,-\frac{3}{2}); decreasing on (-\frac{3}{2},+\infty)

11. f(x)=2x^3-12x^2+18x+15

Decreasing on (1,3); increasing elsewhere

12. f(x)=5+36x+3x^2-2x^3

Increasing on (-2,3); decreasing elsewhere

13. f(x)=8+36x+3x^2-2x^3

Increasing on (-2,3); decreasing elsewhere

14. f(x)=5x^3-15x^2-120x+3

Decreasing on (-2,4); increasing elsewhere

15. f(x)=x^3-6x^2-36x+2

Decreasing on (-2,6); increasing elsewhere

Solutions

Determine Intervals of Concavity

Find the intervals where the following functions are concave up or concave down

16. f(x)=10-6x-2x^2

Concave down everywhere

17. f(x)=2x^3-12x^2+18x+15

Concave down on (-\infty,2); concave up on (2,+\infty)

18. f(x)=5+36x+3x^2-2x^3

Concave up on (-\infty,\frac{1}{2}); concave down on (\frac{1}{2},+\infty)

19. f(x)=8+36x+3x^2-2x^3

Concave up on (-\infty,\frac{1}{2}); concave down on (\frac{1}{2},+\infty)

20. f(x)=5x^3-15x^2-120x+3

Concave down on (-\infty,1); concave up on (1,+\infty)

21. f(x)=x^3-6x^2-36x+2

Concave down on (-\infty,2); concave up on (2,+\infty)

Solutions

Word Problems

22. You peer around a corner. A velociraptor 64 meters away spots you. You run away at a speed of 6 meters per second. The raptor chases, running towards the corner you just left at a speed of 4t meters per second (time t measured in seconds after spotting). After you have run 4 seconds the raptor is 32 meters from the corner. At this time, how fast is death approaching your soon to be mangled flesh? That is, what is the rate of change in the distance between you and the raptor?

10 m/s

23. Two bicycles leave an intersection at the same time. One heads north going 12 mph and the other heads east going 5 mph. How fast are the bikes getting away from each other after one hour?

13 mph

24. You're making a can of volume 200 m^3 with a gold side and silver top/bottom. Say gold costs 10 dollars per m^2 and silver costs 1 dollar per m^2. What's the minimum cost of such a can?

$878.76

Solutions

Graphing Functions

For each of the following, graph a function that abides by the provided characteristics

25. f(1)= f(-2) = 0, \; \lim_{x\to \infty} f(x) = \lim_{x\to -\infty} f(x) = 0, \; \mbox{ vertical asymptote at } x=-3, \; f'(x)>0 \mbox{ on } (0,2),  f'(x)<0 \mbox{ on } (-\infty,-3)\cup(-3,0)\cup(2,\infty),\; f''(x)>0 \mbox{ on } (-3,1)\cup (3,\infty),\; f''(x)<0 \mbox{ on } (-\infty,-3)\cup(1,3).
There are many functions that satisfy all the conditions. Here is one example:
Calculus graphing exercise 1.png
26. f \mbox{ has domain } [-1,1], \; f(-1) = -1, \; f(-\frac{1}{2}) = -2,\; f'(-\frac{1}{2}) = 0,\; f''(x)>0 \mbox{ on } (-1,1)
There are many functions that satisfy all the conditions. Here is one example:
Calculus graphing exercise 2.png

Solutions

← Euler's Method Calculus Integration/Contents →
Print version

Integration

Basics of Integration

<h1> 4.1 Definite Integral</h1>

← Integration/Contents Calculus Fundamental Theorem of Calculus →
Print version

Suppose we are given a function and would like to determine the area underneath its graph over an interval. We could guess, but how could we figure out the exact area? Below, using a few clever ideas, we actually define such an area and show that by using what is called the definite integral we can indeed determine the exact area underneath a curve.

Definition of the Definite Integral

Figure 1: Approximation of the area under the curve f(x) from x=x_0 to x=x_4.
Figure 2: Rectangle approximating the area under the curve from x_2 to x_3 with sample point x_3^*.

The rough idea of defining the area under the graph of f is to approximate this area with a finite number of rectangles. Since we can easily work out the area of the rectangles, we get an estimate of the area under the graph. If we use a larger number of smaller-sized rectangles we expect greater accuracy with respect to the area under the curve and hence a better approximation. Somehow, it seems that we could use our old friend from differentiation, the limit, and "approach" an infinite number of rectangles to get the exact area. Let's look at such an idea more closely.

Suppose we have a function f that is positive on the interval [a,b] and we want to find the area S under f between a and b. Let's pick an integer n and divide the interval into n subintervals of equal width (see Figure 1). As the interval [a,b] has width b-a, each subinterval has width  \Delta x = \frac{b-a}{n}. We denote the endpoints of the subintervals by x_0,x_1,\ldots,x_n. This gives us

 x_i = a + i \Delta x \mbox{ for } i=0,1,\ldots, n.\,
Figure 3: Riemann sums with an increasing number of subdivisions yielding better approximations.

Now for each i=1,\ldots,n pick a sample point x_i^* in the interval [x_{i-1},x_{i}]\! and consider the rectangle of height f(x_i^*) and width \Delta x (see Figure 2). The area of this rectangle is f(x_i^*)\Delta x. By adding up the area of all the rectangles for i=1,\ldots,n we get that the area S is approximated by

 A_n= f(x_1^*) \Delta x + f(x_2^*) \Delta x + \cdots + f(x_n^*) \Delta x.

A more convenient way to write this is with summation notation:

 A_n = \sum_{i=1}^{n} f(x_i^*)\Delta x.

For each number n we get a different approximation. As n gets larger the width of the rectangles gets smaller which yields a better approximation (see Figure 3). In the limit of A_n as n tends to infinity we get the area S.

Definition of the Definite Integral
Suppose f is a continuous function on [a,b] and  \Delta x=\frac{b-a}{n}. Then the definite integral of f between a and b is

\int_{a}^{b} f(x)\ dx = \lim_{n \to \infty} A_n= \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^*) \Delta x,
where x_i^* are any sample points in the interval [x_{i-1},x_{i}] and x_k=a+k\cdot\Delta x for k=0,\dots n.

It is a fact that if f is continuous on [a,b] then this limit always exists and does not depend on the choice of the points x_i^*\in[x_{i-1},x_{i}]. For instance they may be evenly spaced, or distributed ambiguously throughout the interval. The proof of this is technical and is beyond the scope of this section.

Notation

When considering the expression, \int_{a}^{b} f(x)\ dx (read "the integral from a to b of the f of x dx"), the function f is called the integrand and the interval [a,b] is the interval of integration. Also a is called the lower limit and b the upper limit of integration.
Figure 4: The integral gives the signed area under the graph.

One important feature of this definition is that we also allow functions which take negative values. If f(x)<0 for all x then f(x_i^*)<0 so f(x_i^*)\Delta x<0. So the definite integral of f will be strictly negative. More generally if f takes on both positive an negative values then \int_a^b f(x)dx will be the area under the positive part of the graph of f minus the area above the graph of the negative part of the graph (see Figure 4). For this reason we say that \int_a^b f(x) dx is the signed area under the graph.

Independence of Variable

It is important to notice that the variable x did not play an important role in the definition of the integral. In fact we can replace it with any other letter, so the following are all equal:

 \int_a^b f(x) dx = \int_a^b f(t) dt=\int_a^b f(u) du = \int_a^b f(w) dw.

Each of these is the signed area under the graph of f between a and b. Such a variable is often referred to as a dummy variable or a bound variable.

Left and Right Handed Riemann Sums

Figure 5: Right-handed Riemann sum
Figure 6: Left-handed Riemann sum

The following methods are sometimes referred to as L-RAM and R-RAM, RAM standing for "Rectangular Approximation Method."

We could have decided to choose all our sample points x_i^* to be on the right hand side of the interval [x_{i-1},x_{i}] (see Figure 5). Then x_i^*=x_{i} for all i and the approximation that we called A_n for the area becomes

 A_n = \sum_{i=1}^{n} f(x_{i})\Delta x.

This is called the right-handed Riemann sum, and the integral is the limit

 \int_{a}^{b} f(x)\ dx = \lim_{n \to \infty} A_n= \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i) \Delta x.

Alternatively we could have taken each sample point on the left hand side of the interval. In this case x_i^*=x_{i-1} (see Figure 6) and the approximation becomes

 A_n = \sum_{i=1}^{n} f(x_{i-1})\Delta x.

Then the integral of f is

 \int_{a}^{b} f(x)\ dx = \lim_{n \to \infty} A_n= \lim_{n \to \infty} \sum_{i=1}^{n} f(x_{i-1}) \Delta x.

The key point is that, as long as f is continuous, these two definitions give the same answer for the integral.

Examples

Example 1
In this example we will calculate the area under the curve given by the graph of f(x) = x for x between 0 and 1. First we fix an integer n and divide the interval [0,1] into n subintervals of equal width. So each subinterval has width

\Delta x = \frac{1}{n}.

To calculate the integral we will use the right-handed Riemann sum. (We could have used the left-handed sum instead, and this would give the same answer in the end). For the right-handed sum the sample points are

x_i^* = 0 + i\Delta x = \frac{i}{n} \quad i=1,\ldots,n

Notice that f(x_i^*) = x_i^* = \frac{i}{n}. Putting this into the formula for the approximation,

A_n = \sum_{i=1}^n f(x_{i}^*) \Delta x = \sum_{i=1}^n f\left(\frac{i}{n}\right)\Delta x = \sum_{i=1}^n \frac{i}{n} \cdot \frac{1}{n} = \frac{1}{n^2} \sum_{i=1}^n i.

Now we use the formula

 \sum_{i=1}^n i = \frac{n(n+1)}{2}

to get

 A_n = \frac{1}{n^2} \frac{n(n+1)}{2} = \frac{n+1}{2n}.

To calculate the integral of f between 0 and 1 we take the limit as n tends to infinity,

 \int_0^1 f(x) dx = \lim_{n\to \infty} \frac{n+1}{2n} = \frac{1}{2}.

Example 2
Next we show how to find the integral of the function f(x) =x^2 between x=a and x=b. This time the interval [a,b] has width b-a so

\Delta x = \frac{b-a}{n}.

Once again we will use the right-handed Riemann sum. So the sample points we choose are

x_i^* = a + i\Delta x = a + \frac{i(b-a)}{n}.

Thus

A_n\, = \sum_{i=1}^n f(x_{i}^*) \Delta x
=\sum_{i=1}^n f\left(a+\frac{(b-a)i}{n}\right)\Delta x
=\frac{b-a}{n} \sum_{i=1}^n \left(a+\frac{(b-a)i}{n}\right)^2
=\frac{b-a}{n} \sum_{i=1}^n \left( a^2 + \frac{2a(b-a)i}{n} + \frac{(b-a)^2i^2}{n^2} \right)

We have to calculate each piece on the right hand side of this equation. For the first two,

\sum_{i=1}^n a^2 = a^2 \sum_{i=1}^n 1 = na^2
\sum_{i=1}^n \frac{2a(b-a)i}{n} = \frac{2a(b-a)}{n} \sum_{i=1}^n i = \frac{2a(b-a)}{n}\cdot \frac{n(n+1)}{2}.

For the third sum we have to use a formula

 \sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}

to get

 \sum_{i=1}^n \frac{(b-a)^2i^2}{n^2} = \frac{(b-a)^2}{n^2}\frac{n(n+1)(2n+1)}{6}.

Putting this together

 A_n = \frac{b-a}{n} \left(na^2 + \frac{2a(b-a)}{n}\cdot \frac{n(n+1)}{2} + \frac{(b-a)^2}{n^2}\frac{n(n+1)(2n+1)}{6}\right).

Taking the limit as n tend to infinity gives

\int_a^b x^2 dx = (b-a)\left(a^2 + a(b-a) + \frac{1}{3}(b-a)^2\right)
=(b-a)\left( a^2 + ab - a^2 + \frac{1}{3}(b^2 - 2ab + a^2)\right)
=\frac{1}{3}(b-a)(b^2+ab+a^2)
=\frac{1}{3}(b^3-a^3).

Exercises

1. Use left- and right-handed Riemann sums with 5 subdivisions to get lower and upper bounds on the area under the function f(x)=x^6 from x=0 to x=1.

Lower bound: 0.062592
Upper bound: 0.262592

2. Use left- and right-handed Riemann sums with 5 subdivisions to get lower and upper bounds on the area under the function f(x)=x^6 from x=1 to x=2.

Lower bound: 12.460992
Upper bound: 25.060992

Solutions

Basic Properties of the Integral

From the definition of the integral we can deduce some basic properties. For all the following rules, suppose that f and g are continuous on [a,b].

The Constant Rule

Constant Rule

 \int_a^b c f(x) dx = c \int_a^b f(x) dx.

When f is positive, the height of the function cf at a point x is c times the height of the function f. So the area under cf between a and b is c times the area under f. We can also give a proof using the definition of the integral, using the constant rule for limits,

\int_a^b c \, f(x) dx = \lim_{n\to \infty} \sum_{i=1}^n cf(x_i^*)=c\lim_{n\to \infty} \sum_{i=1}^n f(x_i^*)=c\int_a^b f(x)dx.

Example

We saw in the previous section that

\int_0^1 x dx = \frac{1}{2}.

Using the constant rule we can use this to calculate that

 \int_0^1 3x dx = 3\int_0^1 x dx = 3.\frac{1}{2} = \frac{3}{2},
 \int_0^1 -7x dx = -7\int_0^1 x dx = (-7).\frac{1}{2} = -\frac{7}{2}.

Example

We saw in the previous section that

 \int_a^b x^2 dx = \frac{1}{3}(b^3-a^3).

We can use this and the constant rule to calculate that

 \int_1^3 2x^2 dx = 2\int_1^3 x^2 dx = 2.\frac{1}{3}.(3^3-1^3) = \frac{2}{3}(27-1) = \frac{52}{3}.


There is a special case of this rule used for integrating constants:

Integrating Constants

If c is constant then  \int_a^b c \, dx = c \, (b-a).

When c>0 and a<b this integral is the area of a rectangle of height c and width b-a which equals c(b-a).

Example

\int_1^3 9 dx = 9(3-1)=9\cdot 2 = 18.
\int_{-2}^6 11 dx = 11(6-(-2))=11\cdot 8 = 88.
\int_{2}^{17} 0 dx = 0\cdot(17-2) =0.

The addition and subtraction rule

Addition and Subtraction Rules of Integration
 \int_a^b (f(x) + g(x)) dx = \int_a^b f(x) dx + \int_a^b g(x) dx.

 \int_a^b (f(x) - g(x)) dx = \int_a^b f(x) dx - \int_a^b g(x) dx.

As with the constant rule, the addition rule follows from the addition rule for limits:

\int_a^b (f(x)+g(x)) dx = \lim_{n\to \infty} \sum_{i=1}^n f(x_i^*) + g(x_i^*)
= \lim_{n\to \infty} \sum_{i=1}^n f(x_i^*)+\lim_{n\to \infty} \sum_{i=1}^n g(x_i^*)
= \int_a^b f(x)dx+\int_a^b g(x)dx.

The subtraction rule can be proved in a similar way.

Example

From above \int_1^3 9 dx =  18 and \int_1^3 2x^2 dx = \frac{52}{3} so

 \int_1^3 (2x^2 + 9)dx = \int_1^3 2x^2 dx + \int_1^3 9 dx = \frac{52}{3} + 18 = \frac{106}{3},
 \int_1^3 (2x^2 - 9)dx = \int_1^3 2x^2 dx - \int_1^3 9 dx = \frac{52}{3} - 18 = -\frac{2}{3}.

Example

\int_0^2 4x^2 + 14 dx = 4\int_0^2 x^2 dx + \int_0^2 14 dx = 4 \cdot \frac{1}{3}(2^3-0^3) + 2 \cdot 14 = \frac{32}{3} + 28 = \frac{116}{3}.

Exercise

3. Use the subtraction rule to find the area between the graphs of f(x)=x and g(x)=x^2 between x=0 and x=1

\frac{1}{6}

Solution

The Comparison Rule

Figure 7: Bounding the area under f(x) on [a,b]

Comparison Rule

  • Suppose f(x)\ge 0 for all x in [a,b]. Then
 \int_a^b f(x) dx \ge 0.
  • Suppose f(x)\ge g(x) for all x in [a,b]. Then
 \int_a^b f(x) dx \ge \int_a^b g(x) dx.
  • Suppose M\ge f(x)\ge m for all x in [a,b]. Then
 M(b-a)\ge \int_a^b f(x) dx \ge m(b-a).

If f(x)\ge 0 then each of the rectangles in the Riemann sum to calculate the integral of f will be above the y axis, so the area will be non-negative. If f(x)\ge g(x) then f(x)-g(x)\ge 0 and by the first property we get the second property. Finally if M\ge f(x)\ge m then the area under the graph of f will be greater than the area of rectangle with height m and less than the area of the rectangle with height M (see Figure 7). So

M(b-a)=\int_a^b M \ge \int_a^b f(x) dx \ge \int_a^b m = m(b-a).

Linearity with respect to endpoints

Additivity with respect to endpoints Suppose a<c<b. Then

 \int_a^b f(x) dx = \int_a^c f(x) dx + \int_c^b f(x) dx.

Again suppose that f is positive. Then this property should be interpreted as saying that the area under the graph of f between a and b is the area between a and c plus the area between c and b (see Figure 8).

Figure 8: Illustration of the property of additivity with respect to endpoints

Extension of Additivity with respect to limits of integration
When a=b we have that \Delta x=\frac{b-a}{n}=0 so

\int_a^a f(x) dx = 0.

Also in defining the integral we assumed that a<b. But the definition makes sense even when b<a, in which case \Delta x = \frac{1}{n}(b-a) has changed sign. This gives

\int_b^a f(x) dx = -\int_a^b f(x) dx.

With these definitions,

 \int_a^b f(x) dx = \int_a^c f(x) dx + \int_c^b f(x) dx
whatever the order of a,b,c.

Exercise

4. Use the results of exercises 1 and 2 and the property of linearity with respect to endpoints to determine upper and lower bounds on \int_0^2 x^6 dx.

Lower bound: 12.523584
Upper bound: 25.323584

Solution

Even and odd functions

Recall that a function f is called odd if it satisfies f(-x) = -f(x) and is called even if f(-x) = f(x).

Suppose f is a continuous odd function then for any a,

\int_{-a}^a f(x) dx =0.

If f is a continuous even function then for any a,

\int_{-a}^a f(x) dx = 2 \int_0^a f(x)dx.

Suppose f is an odd function and consider first just the integral from -a to 0. We make the substitution u=-x so du=-dx. Notice that if x=-a then u=a and if x=0 then u=0. Hence \int_{-a}^0 f(x) dx = - \int_a^0 f(-u) du= \int_0^a f(-u) du. Now as f is odd,  f(-u) = -f(u) so the integral becomes \int_{-a}^0 f(x) dx = - \int_0^a f(u) du. Now we can replace the dummy variable u with any other variable. So we can replace it with the letter x to give \int_{-a}^0 f(x) dx = - \int_0^a f(u) du = - \int_0^a f(x) dx.

Now we split the integral into two pieces

\int_{-a}^a f(x) dx = \int_{-a}^0 f(x) dx+\int_{0}^a f(x) dx = -\int_0^a f(x) dx + \int_0^a f(x) dx =0.

The proof of the formula for even functions is similar.

5. Prove that if f is a continuous even function then for any a,
\int_{-a}^a f(x) dx = 2 \int_0^a f(x)dx.

From the property of linearity of the endpoints we have

\int_{-a}^a f(x) dx = \int_{-a}^0 f(x) dx +\int_{0}^a f(x) dx

Make the substitution u=-x; du=-dx. u=a when x=-a and u=0 when x=0. Then

\int_{-a}^0 f(x)dx=\int_a^0 f(-u)(-du)=-\int_a^0 f(-u)du=\int_0^a f(-u)du=\int_0^a f(u)du

where the last step has used the evenness of f. Since u is just a dummy variable, we can replace it with x. Then

\int_{-a}^a f(x) dx = \int_0^a f(x)dx + \int_{0}^a f(x) dx = 2\int_{0}^a f(x) dx
← Integration/Contents Calculus Fundamental Theorem of Calculus →
Print version

<h1> 4.2 Fundamental Theorem of Calculus</h1>

← Definite integral Calculus Indefinite integral →
Print version

The fundamental theory of calculus is a critical portion of calculus because it links the concept of a derivative to that of an integral. As a result, we can use our knowledge of derivatives to find the area under the curve, which is often quicker and simpler than using the definition of the integral.

Mean Value Theorem for Integration

We will need the following theorem in the discussion of the Fundamental Theorem of Calculus.

Mean Value Theorem for Integration

Suppose f(x) is continuous on [a,b]. Then \frac{\int_{a}^{b}f(x)dx}{b-a}=f(c) for some c in [a,b].

Proof of the Mean Value Theorem for Integration

f(x) satisfies the requirements of the Extreme Value Theorem, so it has a minimum m and a maximum M in [a,b]. Since
\int_{a}^{b}f(x)dx=\lim\limits _{n\to\infty}\sum\limits _{i=1}^{n}f(x_{i}^{*})\frac{b-a}{n}=\lim\limits _{n\to\infty}\frac{b-a}{n}\sum\limits _{i=1}^{n}f(x_{i}^{*})
and since
m\leq f(x_{i}^{*})\leq M for all x_{i}^{*} in [a,b],
we have

\lim\limits _{n\to\infty}\frac{b-a}{n}\sum\limits _{i=1}^{n}m\leq\lim\limits _{n\to\infty}\frac{b-a}{n}\sum\limits _{i=1}^{n}f(x_{i}^{*})\leq\lim\limits _{n\to\infty}\frac{b-a}{n}\sum\limits _{i=1}^{n}M

\lim\limits _{n\to\infty}\frac{b-a}{n}nm\leq\int_{a}^{b}f(x)dx\leq\lim\limits _{n\to\infty}\frac{b-a}{n}nM

\lim\limits _{n\to\infty}(b-a)m\leq\int_{a}^{b}f(x)dx\leq\lim\limits _{n\to\infty}(b-a)M

(b-a)m\leq\int_{a}^{b}f(x)dx\leq(b-a)M

m\leq\frac{\int_{a}^{b}f(x)dx}{(b-a)}\leq M

Since f is continuous, by the Intermediate Value Theorem there is some f(c) with c in [a,b] such that

\frac{\int_{a}^{b}f(x)dx}{b-a}=f(c)

Fundamental Theorem of Calculus

Statement of the Fundamental Theorem

Suppose that f is continuous on [a,b]. We can define a function F by

F(x)= \int_a^x f(t)\ dt \mbox{ for } x \mbox{ in } [a,b].

Fundamental Theorem of Calculus Part I Suppose f is continuous on [a,b] and F is defined by

F(x)= \int_a^x f(t)\ dt.

Then F is differentiable on (a,b) and for all x\in(a,b),

 F'(x) = f(x).\,

When we have such functions F and f where F^\prime(x)=f(x) for every x in some interval I we say that F is the antiderivative of f on I.

Fundamental Theorem of Calculus Part II Suppose that f is continuous on [a,b] and that F is any antiderivative of f. Then

\ \int_{a}^{b} f(x)\ dx=F(b)-F(a).
Figure 1

Note: a minority of mathematicians refer to part one as two and part two as one. All mathematicians refer to what is stated here as part 2 as The Fundamental Theorem of Calculus.

Proofs

Proof of Fundamental Theorem of Calculus Part I

Suppose x is in (a,b). Pick \Delta x so that x+\Delta x is also in (a, b). Then

F(x) = \int_{a}^{x} f(t) dt

and

F(x+\Delta x) = \int_{a}^{x+\Delta x} f(t) dt.

Subtracting the two equations gives

F(x + \Delta x) - F(x) = \int_{a}^{x + \Delta x} f(t) dt - \int_{a}^{x} f(t) dt.

Now


\int_{a}^{x + \Delta x} f(t) dt  = \int_{a}^{x} f(t) dt + \int_{x}^{x + \Delta x} f(t) dt

so rearranging this we have

F(x + \Delta x) - F(x) = \int_{x}^{x + \Delta x} f(t) dt.

According to the Mean Value Theorem for Integration, there exists a c in [x, x + Δx] such that

\int_{x}^{x + \Delta x}f(t) dt = f(c) \Delta x .

Notice that c depends on \Delta x. Anyway what we have shown is that

F(x + \Delta x) - F(x) = f(c) \Delta x \,,

and dividing both sides by Δx gives

\frac{F(x + \Delta x) - F(x)}{\Delta x} = f(c) .

Take the limit as \Delta x\to 0 we get the definition of the derivative of F at x so we have

F'(x) = \lim_{\Delta x \to 0} f(c)..

To find the other limit, we will use the squeeze theorem. The number c is in the interval [x, x + Δx], so xcx + Δx. Also, \lim_{\Delta x \to 0} x = x and \lim_{\Delta x \to 0} x + \Delta x = x. Therefore, according to the squeeze theorem,

\lim_{\Delta x \to 0} c = x.

As f is continuous we have

F'(x) = \lim_{\Delta x\to 0} f(c)=  f\left(\lim_{\Delta x \to 0} c\right) = f(x)

which completes the proof.

Proof of Fundamental Theorem of Calculus Part II

Define  P(x) = \int_a^x f(t) dt. Then by the Fundamental Theorem of Calculus part I we know that P is differentiable on (a,b) and for all x\in (a,b)

P'(x) = f(x).\,

So P is an antiderivative of f. Since we were assuming that F was also an antiderivative for all x\in (a,b),

P'(x)=F'(x)
P'(x)-F'(x)=0
(P(x)-F(x))'=0.

Let g(x)=P(x)-F(x). The Mean Value Theorem applied to g(x) on [a,\xi] with a<\xi<b says that

\frac{g(\xi)-g(a)}{\xi-a}=g'(c)

for some c in (a,\xi). But since g'(x)=0 for all x in [a,b], g(\xi) must equal g(a) for all \xi in (a,b), i.e. g(x) is constant on (a,b).
This implies there is a constant C=g(a)=P(a)-F(a)=-F(a) such that for all x\in (a,b),

 P(x) = F(x) + C.\,,

and as g is continuous we see this holds when x=a and x=b as well. And putting x=b gives

 \int_a^b f(t) dx = P(b) = F(b) + C = F(b) - F(a).

Notation for Evaluating Definite Integrals

The second part of the Fundamental Theorem of Calculus gives us a way to calculate definite integrals. Just find an antiderivative of the integrand, and subtract the value of the antiderivative at the lower bound from the value of the antiderivative at the upper bound. That is

\int_a^b f(x)dx=F(b)-F(a)

where F'(x)=f(x). As a convenience, we use the notation

F(x)\bigr|_a^b

to represent F(b)-F(a).

Integration of Polynomials

Using the power rule for differentiation we can find a formula for the integral of a power using the Fundamental Theorem of Calculus. Let f(x) =x^n. We want to find an antiderivative for f. Since the differentiation rule for powers lowers the power by 1 we have that

 \frac{d}{dx} x^{n+1} = (n+1)x^n.

As long as n+1\neq 0 we can divide by n+1 to get

 \frac{d}{dx} \left(\frac{x^{n+1}}{n+1}\right)= x^n = f(x).

So the function F(x) = \frac{x^{n+1}}{n+1} is an antiderivative of f. If 0 is not in [a,b] then F is continuous on [a,b] and, by applying the Fundamental Theorem of Calculus, we can calculate the integral of f to get the following rule.

Power Rule of Integration I

 \int_a^b x^n dx = {x^{n+1} \over {n+1}}\biggr|_a^b = \frac{b^{n+1}-a^{n+1}}{n+1}\; as long as n\neq -1 and 0 is not in [a,b].

Notice that we allow all values of n, even negative or fractional. If n>0 then this works even if [a,b] includes 0.

Power Rule of Integration II

 \int_a^b x^n dx = {x^{n+1} \over {n+1}}\biggr|_a^b = \frac{b^{n+1}-a^{n+1}}{n+1} as long as n>0.

Examples

  • To find \int_1^2 x^3 dx we raise the power by 1 and have to divide by 4. So
\int_1^2 x^3 dx = \frac{x^4}{4}\biggr|_1^2 = \frac{2^4}{4} - \frac{1^4}{4} = \frac{15}{4}.
  • The power rule also works for negative powers. For instance
\int_1^3 \frac{1}{x^3} dx = \int_1^3  x^{-3} dx = \frac{x^{-2}}{-2}\biggr|_1^3 = \frac{1}{-2}\left(3^{-2}-1^{-2}\right) = -\frac{1}{2}\left(\frac{1}{3^2} - 1\right) =-\frac{1}{2}\left(\frac{1}{9}-1\right) = \frac{1}{2} \cdot \frac{8}{9} = \frac{4}{9}.
  • We can also use the power rule for fractional powers. For instance
\int_0^5 \sqrt x\, dx = \int_0^5 x^{\frac{1}{2}}\, dx =  \frac{x^{\frac{3}{2}}}{\frac{3}{2}}\Biggr|_0^5 = \frac{2}{3}\left(5^{\frac{3}{2}} - 0^{\frac{3}{2}}\right)=\frac{2}{3}\left(5^{\frac{3}{2}}\right)
  • Using linearity the power rule can also be thought of as applying to constants. For example,
=\int_3^{11} 7\,dx=\int_3^{11} 7x^0\,dx=7\int_3^{11} x^0\,dx=7x \bigr|_3^{11}= 7(11 - 3) = 56.
  • Using the linearity rule we can now integrate any polynomial. For example
\int_0^3 (3x^2 + 4x +2) dx = (x^3 + 2x^2 + 2x)\bigr|_0^3 = 3^3 + 2 \cdot 3^2 + 2 \cdot 3-0 = 27+18+6=51.

Exercises

1. Evaluate \int_0^1 x^6 dx. Compare your answer to the answer you got for exercise 1 in section 4.1.

\frac{1}{7} = 0.\overline{142857}

2. Evaluate \int_1^2 x^6 dx. Compare your answer to the answer you got for exercise 2 in section 4.1.

\frac{127}{7} = 18.\overline{142857}

3. Evaluate \int_0^2 x^6 dx. Compare your answer to the answer you got for exercise 4 in section 4.1.

\frac{128}{7} = 18.\overline{285714}

Solutions

← Definite integral Calculus Indefinite integral →
Print version

<h1> 4.3 Indefinite Integral</h1>

← Fundamental Theorem of Calculus Calculus Improper Integrals →
Print version

Definition

Now recall that F is said to be an antiderivative of f if  F'(x) = f(x)\,.. However, F is not the only antiderivative. We can add any constant to F without changing the derivative. With this, we define the indefinite integral as follows:

\int f(x) dx = F(x) + C \;\;\; where F satisfies F'(x) = f(x)\; and C is any constant.

The function f(x), the function being integrated, is known as the integrand. Note that the indefinite integral yields a family of functions.

Example

Since the derivative of x^4 is 4x^3, the general antiderivative of 4x^3 is x^4 plus a constant. Thus,

 \int 4x^3 dx = x^4 + C.

Example: Finding antiderivatives

Let's take a look at 6x^2. How would we go about finding the integral of this function? Recall the rule from differentiation that

 \frac{d}{dx} x^n = n x^{n-1}\

In our circumstance, we have:

 \frac{d}{dx} x^3  = 3 x^2\

This is a start! We now know that the function we seek will have a power of 3 in it. How would we get the constant of 6? Well,

 2 \frac{d}{dx} x^3= 2 \times 3 x^2 =6x^2.\

Thus, we say that 2x^3 is an antiderivative of 6x^2.

Exercises

1. Evaluate \int \frac{3x}{2}dx

\frac{3}{4}x^2+C

2. Find the general antiderivative of the function f(x)=2x^4.

\frac{2x^5}{5}+C

Solutions

Indefinite integral identities

Basic Properties of Indefinite Integrals

Constant Rule for indefinite integrals

If c is a constant then  \int c f(x) dx = c \int f(x) dx.

Sum/Difference Rule for indefinite integrals

 \int (f(x) + g(x)) dx = \int f(x) dx + \int g(x) dx.
 \int (f(x) - g(x)) dx = \int f(x) dx - \int g(x) dx.

Indefinite integrals of Polynomials

Say we are given a function of the form,  f(x)= x^n , and would like to determine the antiderivative of f. Considering that

 \frac{d}{dx} \frac{1}{n+1}x^{n+1} = x^{n}

we have the following rule for indefinite integrals:

Power rule for indefinite integrals

 \int x^n {dx}= \frac{1}{n+1} x^{n+1} +C \; for all  n \not= -1.

Integral of the Inverse function

To integrate  f(x)=\frac{1}{x} , we should first remember

 \frac{d}{dx} \ln x = \frac{1}{x}.

Therefore, since \frac{1}{x} is the derivative of \ln(x) we can conclude that

\int \frac{dx}{x} = \ln \left| x \right| +C.

Note that the polynomial integration rule does not apply when the exponent is -1. This technique of integration must be used instead. Since the argument of the natural logarithm function must be positive (on the real line), the absolute value signs are added around its argument to ensure that the argument is positive.

Integral of the Exponential function

Since

 \frac{d}{dx} e^x= e^x

we see that e^x is its own antiderivative. This allows us to find the integral of an exponential function:

 \int e^x dx = e^x + C.

Integral of Sine and Cosine

Recall that

\frac{d}{dx}\sin{x}= \cos{x} \,
\frac{d}{dx}\cos{x}= -\sin{x}. \,

So sin x is an antiderivative of cos x and -cos x is an antiderivative of sin x. Hence we get the following rules for integrating sin x and cos x

\int \cos{x}\ dx= \sin{x} +C
\int \sin{x}\ dx= -\cos{x} + C.

We will find how to integrate more complicated trigonometric functions in the chapter on integration techniques.

Example

Suppose we want to integrate the function f(x)=x^4+1+2\sin{x}. An application of the sum rule from above allows us to use the power rule and our rule for integrating \sin{x} as follows,

 \int f(x)\,dx  = \int x^4 + 1 + 2\sin{x}\,dx
 = \int x^4dx + \int 1\,dx + \int 2\sin{x}\,dx
 = \frac{x^5}{5} + x - 2\cos{x} + C.

Exercises

3. Evaluate \int(7x^2+3\cos(x)-e^x)dx

\frac{7}{3}x^3+3\sin(x)-e^x+C

4. Evaluate \int(\frac{2}{5x}+\sin(x))dx

\frac{2}{5}\ln|x|-\cos(x)+C

Solutions

The Substitution Rule

The substitution rule is a valuable asset in the toolbox of any integration greasemonkey. It is essentially the chain rule (a differentiation technique you should be familiar with) in reverse. First, let's take a look at an example:

Preliminary Example

Suppose we want to find \int x \cos(x^2) dx. That is, we want to find a function such that its derivative equals  x \, \cos(x^2). Stated yet another way, we want to find an antiderivative of  f(x)= x \, \cos (x^2). Since \sin(x) differentiates to \cos(x), as a first guess we might try the function \sin (x^2). But by the Chain Rule,

 \frac{d}{dx} \sin (x^2) = \cos(x^2) \cdot \frac{d}{dx} x^2 = \cos(x^2) \cdot 2x = 2x \cos(x^2).

Which is almost what we want apart from the fact that there is an extra factor of 2 in front. But this is easily dealt with because we can divide by a constant (in this case 2). So,

 \frac{d}{dx}\frac{\sin (x^2)}{2} = \frac{1}{2} \cdot \frac{d}{dx} \sin (x^2) = \frac{1}{2} \cdot 2 \cos(x^2)x=x \cos(x^2)=f(x).

Thus, we have discovered a function,  F(x) = \frac{\sin (x^2)}{2} , whose derivative is  x \, \cos (x^2). That is, F is an antiderivative of  f(x)= x \, \cos (x^2). This gives us

 \int x \cos(x^2) dx = \frac{\sin(x^2)}{2} + C.

Generalization

In fact, this technique will work for more general integrands. Suppose u is a differentiable function. Then to evaluate  \int u'(x) \cos(u(x)) dx we just have to notice that by the Chain Rule

 \frac{d}{dx} \sin(u(x)) = \cos(u(x)) \frac{du}{dx} = u'(x) \cos(u(x)).

As long as u' is continuous we have that

\int \cos(u(x)) u'(x) dx = \sin(u(x)) + C.

Now the right hand side of this equation is just the integral of \cos(u) but with respect to u. If we write u instead of u(x) this becomes \int \cos(u(x)) u'(x) dx = \sin(u) du + C = \int \cos(u) du.

So, for instance, if u(x) = x^3 we have worked out that

\int (\cos(x^3)\cdot 3x^2)dx = \sin(x^3) + C.

General Substitution Rule

Now there was nothing special about using the cosine function in the discussion above, and it could be replaced by any other function. Doing this gives us the substitution rule for indefinite integrals:

Substitution rule for indefinite integrals
Assume u is differentiable with continuous derivative and that f is continuous on the range of u. Then

\int f(u(x)) \frac{du}{dx} dx = \int f(u) du.

Notice that it looks like you can "cancel" in the expression \frac{du}{dx} dx to leave just a du. This does not really make any sense because \frac{du}{dx} is not a fraction. But it's a good way to remember the substitution rule.

Examples

The following example shows how powerful a technique substitution can be. At first glance the following integral seems intractable, but after a little simplification, it's possible to tackle using substitution.

Example

We will show that

\int\frac{1}{\left(x^2+a^2\right)^{3/2}}\,dx = \frac{x}{a^2 \sqrt{x^2+a^2}} + C

First, we re-write the integral:

\int \frac{1}{\left(x^2+a^2\right)^{3/2}}\,dx = \int \left(x^2 + a^2\right)^{-3/2}\,dx
= \int \left(x^2 \left(1 + \frac{a^2}{x^2}\right) \right)^{-3/2} dx
= \int x^{-3} \left(1+\frac{a^2}{x^2}\right)^{-3/2} dx
= \int \left(1+\frac{a^2}{x^2}\right)^{-3/2} \left(x^{-3} dx\right).

Now we preform the following substitution:

 u = 1 + \frac{a^2}{x^2}
 \frac{du}{dx} = -2a^2x^{-3} \Longrightarrow  x^{-3}dx = -\frac{du}{2a^2}

Which yields:

\int \left(1+\frac{a^2}{x^2}\right)^{-3/2} \left(x^{-3} dx\right) =
= \int u^{-3/2} \left(-\frac{du}{2a^2}\right)
= -\frac{1}{2a^2} \int u^{-3/2} du
= -\frac{1}{2a^2} \left(-\frac{2}{\sqrt{u}}\right) + C
= \frac{1}{a^2 \sqrt{1+\frac{a^2}{x^2}}} + C
= \left(\frac{x}{x}\right) \frac{1}{a^2 \sqrt{1+\frac{a^2}{x^2}}} + C
= \frac{x}{a^2 \sqrt{x^2+a^2}} + C.

Exercises

5. Evaluate \int x\sin(2x^2)dx by making the substitution u=2x^2

-\frac{\cos(2x^{2})}{4}+C

6. Evaluate \int-3\cos(x)e^{\sin(x)}dx

-3e^{\sin(x)}+C

Solutions

Integration by Parts

Integration by parts is another powerful tool for integration. It was mentioned above that one could consider integration by substitution as an application of the chain rule in reverse. In a similar manner, one may consider integration by parts as the product rule in reverse.

Preliminary Example

General Integration by Parts

Integration by parts for indefinite integrals
Suppose f and g are differentiable and their derivatives are continuous. Then

\int f(x)g(x) dx = (f(x) \int g(x)dx ) - \int ( f'(x) \int g(x)dx ) dx.
  it is also very important to notice that
\int f(x)g(x) dx = (f(x) \int g(x)dx ) - \int ( f'(x) \int g(x)dx ) dx.

is not equal to
      \int f(x)g(x) dx = (g(x) \int f(x)dx ) - \int ( g'(x) \int f(x)dx ) dx.


to set the f(x) and g(x) we need to follow the rule called I.L.A.T.E.


ILATE defines the order in which we must set the f(x)

  • I for inverse trigonometric function
  • L for log functions
  • A for algebraic functions
  • T for trigonometric functions
  • E for exponential function


f(x)and g(x)must be in the order of ILATE or else your final answers will not match with the main key

Examples

Example

Find \int x\cos (x) \,dx .

Here we let:

u = x, so that du = dx,
dv = \cos(x)dx , so that v = \sin(x).

Then:

\int x\cos (x) \,dx = \int u \,dv
= uv - \int v \,du
\int x\cos (x) \,dx = x\sin (x) - \int \sin (x) \,dx
\int x\cos (x) \,dx = x\sin (x) + \cos (x) + C.

Example

Find \int x^2 e^x\,dx

In this example we will have to use integration by parts twice.

Here we let

u = x^2, so that du= 2x dx,
dv= e^xdx, so that v =e^x.

Then:

\int x^2e^x \,dx = \int u \,dv
= uv - \int v \,du
\int x^2e^x \,dx = x^2e^x - \int 2xe^x\,dx= x^2 e^x - 2\int xe^x\,dx.

Now to calculate the last integral we use integration by parts again. Let

u = ''x, so that du=  dx,
dv= e^xdx, so that v =e^x

and integrating by parts gives

\int xe^x \,dx = xe^x - \int e^x\,dx= x e^x - e^x.

So, finally we obtain

\int x^2e^x \,dx =  x^2 e^x - 2(x e^x - e^x)+ C = x^2 e^x - 2x e^x + 2e^x + C =e^x(x^2-2x+2) + C.

Example

Find \int \ln (x) \,dx.

The trick here is to write this integral as

\int \ln (x) \cdot 1 \,dx.

Now let

u = \ln(x) so du = (1/x) dx,
v = x so dv = 1dx.

Then using integration by parts,

\int \ln (x) \,dx = x \ln (x) - \int \frac{x}{x} \,dx
= x \ln (x) - \int 1 \,dx
\int \ln (x) \,dx = x \ln (x) - {x} + {C}
\int \ln (x) \,dx = x ( \ln (x) - 1 ) + C.

Example

Find \int \arctan(x) dx.

Again the trick here is to write the integrand as \arctan(x) = \arctan(x) \cdot 1 . Then let

u = arctan(x); du = 1/(1+x2) dx
v = x; dv = 1·dx

so using integration by parts,

\int \arctan (x) \,dx = x \arctan (x) - \int \frac{x}{1 + x^2} \,dx
= x \arctan (x) - {1 \over 2} \ln \left( 1 + x^2 \right) + C.

Example

Find