# Table of Contents

* Introduction

## Precalculus

1.1 Algebra
1.2 Functions
1.3 Trigonometric functions
1.4 Graphing functions
1.5 Rational functions
1.6 Conic sections
1.7 Exercises
1.8 Hyperbolic logarithm and angles

## Limits

2.1 An Introduction to Limits
2.2 Finite Limits
2.3 Infinite Limits
2.4 Continuity
2.5 Formal Definition of the Limit
2.6 Proofs of Some Basic Limit Rules
2.7 Exercises

## Differentiation
### Basics of Differentiation

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 Derivatives of Hyperbolic Functions
3.9 Some Important Theorems
3.10 Exercises

### Applications of Derivatives

3.11 L'Hôpital's Rule
3.12 Extrema and Points of Inflection
3.13 Newton's Method
3.14 Related Rates
3.15 Optimization
3.16 Euler's Method
3.17 Approximating Values of Functions
3.18 Exercises

## Integration
### Basics of Integration

4.1 Definite integral
4.2 Fundamental Theorem of Calculus
4.3 Indefinite integral
4.4 Improper Integrals

### Integration Techniques

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
4.20 Surface Area
4.21 Work
4.22 Center of Mass
4.23 Pressure and Force
4.24 Probability

## Parametric and Polar Equations
### Parametric Equations

5.1 Introduction to Parametric Equations
5.2 Differentiation and Parametric Equations
5.3 Integration and Parametric Equations

### Polar Equations

5.5 Introduction to Polar Equations
5.6 Differentiation and Polar Equations
5.7 Integration and Polar Equations

## Sequences and Series
### Sequences

6.1 Definition of a Sequence
6.2 Sequences

### Series and Tests

6.3 Definition of a Series
6.4 Series
6.5 Divergence Test
6.6 Ratio Test
6.7 Limit Comparison Test
6.8 Direct Comparison Test
6.9 Integral Test

### Convergence

6.10 Absolute and Conditional Convergence

### Series and Calculus

6.11 Taylor series
6.12 Power series
6.13 Leibniz' formula for pi

### Exercises

6.14 Exercises

## Multivariable Calculus
### Introduction to Multivariable Calculus

7.1 Vectors
7.2 Curves and Surfaces in Space
7.3 Vector Functions
7.4 Introduction to multivariable calculus

### Differentiation

7.5 Limits and Continuity
7.6 Partial Derivatives
7.7 The chain rule and Clairaut's theorem
7.8 Chain Rule
7.9 Directional derivatives and the gradient vector
* Multivariate optimisation: The Lagrangian
* Calculus on matrices
7.10 Derivatives of Multivariate Functions
7.11 Inverse Function Theorem, Implicit Function Theorem (optional)

### Integration

7.12 Multiple integration
* Old: Double Integrals
7.13 Change of variables

### Vector calculus

7.14 Vector Calculus
7.15 Vector Calculus Identities
7.16 Inverting Vector Calculus Operators
7.17 Points, Paths, Surfaces, and Volumes
7.18 Helmholtz Decomposition Theorem
7.19 Discrete Analog to Vector Calculus
7.20 Exercises

## Extensions
### Advanced Integration Techniques

9.1 Complexifying

### Further Analysis

9.2 Systems of Ordinary Differential Equations

### Formal Theory of Calculus

9.3 Real Numbers
9.4 Complex Numbers
9.5 Hyperbolic Angle

## Appendix

* Choosing delta

## Solutions

* Precalculus/Solutions
* Infinity is not a number/Solutions
* Limits/Solutions
* Differentiation/Differentiation Defined/Solutions
* Chain Rule/Solutions
* Some Important Theorems/Solutions
* Differentiation/Basics of Differentiation/Solutions
* L'Hôpital's rule/Solutions
* Related Rates/Solutions
* Differentiation/Applications of Derivatives/Solutions
* Integration/Solutions

## References

* Lester R. Ford, Sr. & Jr. (1963) Calculus, McGraw-Hill via HathiTrust
* w:Mellen W. Haskell (1895) On the introduction of the notion of hyperbolic functions Bulletin of the American Mathematical Society 1(6):155–9.
* Table of Trigonometry
* Summation notation
* Tables of Derivatives
* Tables of Integrals

## Acknowledgements and Further Reading
# Introduction
## What is calculus?

Calculus is the broad area of mathematics dealing with such topics as instantaneous rates of change, areas under curves, and sequences and series. Underlying all of these topics is the concept of a limit, which consists of analyzing the behavior of a function at points ever closer to a particular point, but without ever actually reaching that point. As a typical application of the methods of calculus, consider a moving car. It is possible to create a function describing the displacement of the car (where it is located in relation to a reference point) at any point in time as well as a function describing the velocity (speed and direction of movement) of the car at any point in time. If the car were traveling at a constant velocity, then algebra would be sufficient to determine the position of the car at any time; if the velocity is unknown but still constant, the position of the car could be used (along with the time) to find the velocity.
However, the velocity of a car cannot jump from zero to 35 miles per hour at the beginning of a trip, stay constant throughout, and then jump back to zero at the end. As the accelerator is pressed down, the velocity rises gradually, and usually not at a constant rate (i.e., the driver may push on the gas pedal harder at the beginning, in order to speed up). Describing such motion and finding velocities and distances at particular times cannot be done using methods taught in 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.

## Why learn calculus?

Calculus is essential for many areas of science and engineering. Both make heavy use of mathematical functions to describe and predict physical phenomena that are subject to continuous change, and this requires the use of calculus. Take our car example: if you want to design cars, you need to know how to calculate forces, velocities, accelerations, and positions. All require calculus. Calculus is also necessary to study the motion of gases and particles, the interaction of forces, and the transfer of energy. It is also useful in business whenever rates are involved. For example, equations involving interest or supply and demand curves are grounded in the language of calculus.
Calculus also provides important tools in understanding functions and has led to the development of new areas of mathematics including real and complex analysis, topology, and 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 formulas for computation of derivatives and integrals without resorting to the limit process. The third and fourth chapters include articles that apply the concepts previously learned to calculating volumes, and as other important formulas.
The remainder of the central calculus chapters cover topics taught in higher-level calculus topics: parametric and polar equations, sequences and series, multivariable calculus, and differential equations.
The final chapters cover the same material, using formal notation. They introduce the material at a much faster pace, and cover many more theorems than the other two sections. They assume knowledge of some set theory and set notation.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Precalculus

<h1>1.1 Algebra</h1>
The purpose of this section is for readers to review important algebraic concepts. It is necessary to understand algebra in order to do calculus. If you are confident of your ability, you may skim through this section.

## Rules of arithmetic and algebra

The following laws are true for all $a,b,c$ in $\mathbb {R}$ whether these 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}}=r+nb$, where r is the remainder of a when divided by b, and n is an integer.
* 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.
* $=\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. However, 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$ ."
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, where $a,b\in \mathbb {R}$.
| Meaning | Interval Notation | Set Notation |
| All values greater than or equal to $a$ and less than or equal to $b$ | $[a,b]$ | $\{x:a\leq x\leq b\}$ |
| All values greater than $a$ and less than $b$ | $(a,b)$ | $\{x:a<x<b\}$ |
| All values greater than or equal to $a$ and less than $b$ | $[a,b)$ | $\{x:a\leq x<b\}$ |
| All values greater than $a$ and less than or equal to $b$ | $(a,b]$ | $\{x:a<x\leq b\}$ |
| All values greater than or equal to $a$ | $[a,\infty )$ | $\{x:x\geq a\}$ |
| All values greater than $a$ | $(a,\infty )$ | $\{x:x>a\}$ |
| All values less than or equal to $a$ | $(-\infty ,a]$ | $\{x:x\leq a\}$ |
| All values less than $a$ | $(-\infty ,a)$ | $\{x:x<a\}$ |
| All values | $(-\infty ,\infty )$ | $\{x:x\in \mathbb {R} \}$ |
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. 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\neq 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^{\frac {m}{n}}={\sqrt[{n}]{a^{m}}}=({\sqrt[{n}]{a}})^{m}$ . In the expression ${\sqrt[{n}]{a}}$ , $n$ is called the index of the radical, the symbol ${\sqrt {\;\;}}$ is called the radical sign, and $a$ is called the radicand.
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}$ |
| $(a^{n})^{m}=a^{n\cdot m}$ | $(x^{4})^{5}=x^{20}$ |
| $(ab)^{n}=a^{n}b^{n}$ | $(3x)^{5}=3^{5}x^{5}$ |

### Simplifying expressions involving radicals

We will use the following conventions for simplifying expressions involving radicals:
* Given the expression $a^{\frac {b}{c}}$, write this as ${\sqrt[{c}]{a^{b}}}$
* No fractions under the radical sign
* No radicals in the denominator
* The radicand has no exponentiated factors with exponent greater than or equal to the index of the radical
* Example: Simplify the expression $\left({\frac {1}{8}}\right)^{\frac {1}{2}}$
* Using convention 1, we rewrite the given expression as
* (1)
* $\left({\frac {1}{8}}\right)^{\frac {1}{2}}={\sqrt[{2}]{\left({\frac {1}{8}}\right)^{1}}}={\sqrt {\frac {1}{8}}}$
* The expression now violates convention 2. To get rid of the fraction in the radical, apply the rule
* $\left({\frac {a}{b}}\right)^{n}={\frac {a^{n}}{b^{n}}}$ and simplify the result:
* (2)
* ${\sqrt {\frac {1}{8}}}={\frac {\sqrt {1}}{\sqrt {8}}}={\frac {1}{\sqrt {8}}}$
* The resulting expression violates convention 3. To get rid of the radical in the denominator, multiply by ${\frac {\sqrt {8}}{\sqrt {8}}}$:
* (3)
* ${\frac {1}{\sqrt {8}}}={\frac {1}{\sqrt {8}}}\cdot {\frac {\sqrt {8}}{\sqrt {8}}}={\frac {\sqrt {8}}{8}}$
* Notice that $8=2^{3}$. Since the index of the radical is 2, our expression violates convention 4. We can reduce the exponent of the expression under the radical as follows:
* (4)
* ${\frac {\sqrt {8}}{8}}={\frac {\sqrt {2^{3}}}{8}}={\frac {\sqrt {2^{2}\cdot 2}}{8}}={\frac {2\cdot {\sqrt {2}}}{8}}={\frac {\sqrt {2}}{4}}$

#### Exercise
## Logarithms

Consider the equation
   (5) $y=b^{x}$
$b$ is called the base and $x$ is called the exponent. Suppose we would like to solve for $x$ . We would like to apply an operation to both sides of the equation that will get rid of the base on the right-hand side of the equation. The operation we want is called the logarithm, or log for short, and it is defined as follows:
    $\log _{b}y=x$ exactly if $y=b^{x}$ and $x>0$, $b>0$, and $b\neq 1$.
Logarithms are taken with respect to some base. What the equation is saying is that, when $x$ is the exponent of $b$, the result will be $y$.

### Example

* Example: Calculate $\log _{10}100000$
* $\log _{10}100000$ is the number $x$ such that $10^{x}=100000$. Well $10^{5}=100000$, so $\log _{10}100000=5$

### Common bases for logarithms

When the base is not specified, $\log$ is taken to mean the base 10 logarithm. Later on in our study of calculus we will commonly work with logarithms with base $e\approx 2.718282$ . In fact, the base $e$ logarithm comes up so often that it has its own name and symbol. It is called the natural logarithm, and its symbol is $\ln$ . In computer science the base 2 logarithm often comes up.

### Properties of logarithms
#### Logarithmic addition and subtraction

Logarithms have the property that $\log _{b}x+\log _{b}y=\log _{b}(x\cdot y)$ . To see why this is true, suppose that:
   $\log _{b}x=r$ and $\log _{b}y=s$
These assumptions imply that
   $x=b^{r}$ and $y=b^{s}$
Then by the properties of exponents
   $x\cdot y=b^{r}\cdot b^{s}=b^{r+s}$
According to the definition of the logarithm
   $\log _{b}(x\cdot y)=r+s=\log _{b}x+\log _{b}y$
Similarly, the property that $\log _{b}x-\log _{b}y=\log _{b}\left({\frac {x}{y}}\right)$ also hold true using the same method.
Historically, the development of logarithms was motivated by the usefulness of this fact for simplifying hand calculations by replacing tedious multiplication by table look-ups and addition.

#### Logarithmic powers and roots

Another useful property of logarithms is that $\log _{b}a^{c}=c\cdot \log _{b}a$ . To see why, consider the expression $\log _{b}a^{c}$ . Let us assume that
   $\log _{b}a^{c}=x$
By the definition of the logarithm
   $a^{c}=b^{x}$
Now raise each side of the equation to the power ${\frac {1}{c}}$ and simplify to get
   $a=b^{\frac {x}{c}}$
Now if you take the base $b$ log of both sides, you get
   $\log _{b}a={\frac {x}{c}}$
Solving for $x$ shows that
   $x=c\cdot \log _{b}a$
Similarly, the expression $\log _{b}{\sqrt[{c}]{a}}={\frac {\log _{b}a}{c}}$ holds true using the same methods.

### Converting between bases

Most scientific calculators have the $\log$ and $\ln$ functions built in, which do not include logarithms with other bases. Consider how one might compute $\log _{b}a$, where $b$ and $a$ are given known numbers, when we can only compute logarithms in some base $\beta$. First, let us assume that
   $\log _{b}a=x$
Then the definition of logarithm implies that
   $a=b^{x}$
If we take the base $\beta$ log of each side, we get
   $\log _{\beta }a=\log _{\beta }b^{x}=x\cdot \log _{\beta }b$
Solving for $x$ , we find that
   $x={\frac {\log _{\beta }a}{\log _{\beta }b}}$
For example, if we only use base 10 to calculate $\log _{2}45$, we get $\log _{2}45={\frac {\log 45}{\log 2}}\approx {\frac {1.653212514}{0.301029996}}\approx 5.491853096$ .

### Identities of logarithms summary

A table is provided below for a summary of logarithmic identities.
| | Formula | Example |
| Product | $\log _{b}(x\cdot y)=\log _{b}x+\log _{b}y$ | $\log _{2}32=\log _{2}(4\cdot 8)=\log _{2}4+\log _{2}8=2+3=5$ |
| Quotient | $\log _{b}\!{\frac {x}{y}}=\log _{b}x-\log _{b}y$ | $\log _{2}16=\log _{2}\!{\frac {64}{4}}=\log _{2}64-\log _{2}4=6-2=4$ |
| Power | $\log _{b}\left(a^{c}\right)=c\log _{b}a$ | $\log _{2}64=\log _{2}\left(2^{6}\right)=6\log _{2}2=6$ |
| Root | $\log _{b}{\sqrt[{c}]{a}}={\frac {\log _{b}a}{c}}$ | $\log _{10}{\sqrt {1000}}={\frac {1}{2}}\log _{10}1000={\frac {3}{2}}=1.5$ |
| Change of base | $\log _{b}a={\frac {\log _{\beta }a}{\log _{\beta }b}}$ | $\log _{9}243={\frac {\log _{3}243}{\log _{3}9}}={\frac {5}{2}}=2.5$ |

## 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,-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=-{\frac {c}{a}}$ and $x=-{\frac {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 of $2x$ and $3$, respectively. Applying the previous rule we have
$4x^{2}-9=(2x+3)(2x-3)$

### The AC method

There is a way of simplifying the process of factoring using the AC method. Suppose that a quadratic polynomial has a formula of
$x^{2}+qx+r$
If there are numbers $a$ and $b$ that satisfy both
$a\cdot b=r$
$a+b=q$
Then, the result of factoring will be
$x^{2}+qx+r=(x+a)(x+b)$

### The quadratic formula

The quadratic formula Given any quadratic equation $ax^{2}+bx+c=0\ ,\ a\neq 0$, all solutions of the equation are given by the quadratic formula:
    $x={\frac {-b\pm {\sqrt {b^{2}-4ac}}}{2a}}$
Note that the value of $b^{2}-4ac$ will affect the number of real solutions of the equation.
| If | Then |
| $b^{2}-4ac>0$ | There are two real solutions to the equation |
| $b^{2}-4ac=0$ | There is only one real solution to the equation |
| $b^{2}-4ac<0$ | There are no real solutions to the equation |
* 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\pm 9}{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)\left(x-{\tfrac {1}{4}}\right)$
* All we have to do is set this expression equal to our polynomial and solve for the unknown constant C:
* $C(x+2)\left(x-{\tfrac {1}{4}}\right)=4x^{2}+7x-2$
* $C\left(x^{2}+\left(-{\tfrac {1}{4}}+2\right)x-{\tfrac {2}{4}}\right)=4x^{2}+7x-2$
* $C\left(x^{2}+{\tfrac {7}{4}}x-{\tfrac {1}{2}}\right)=4x^{2}+7x-2$
* You can see that $C=4$ solves the equation. So the factorization is
* $4x^{2}+7x-2=4(x+2)\left(x-{\tfrac {1}{4}}\right)=(x+2)(4x-1)$

### Vieta's formulae

Vieta's formulae relate the coefficients of a polynomial to sums and products of its roots. It is very convenient because under certain circumstances when the sums and products of the quadratic's roots are provided, one does not require to solve the whole quadratic polynomial.
Vieta's formulae in quadratic polynomials Given any quadratic equation $ax^{2}+bx+c=0\ ,\ a\neq 0$, The roots $x_{1},x_{2}$ of the quadratic polynomial satisfy
    $x_{1}+x_{2}=-{\frac {b}{a}},\quad x_{1}x_{2}={\frac {c}{a}}.$

## 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_{1}x+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_{1}x+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\pm b)^{2}=a^{2}\pm 2ab+b^{2}$
$(a-b)(a+b)=a^{2}-b^{2}$
$(a\pm b)^{3}=a^{3}\pm 3a^{2}b+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

Use ^ to write exponents:

### 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}}$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>1.2 Functions</h1>
Functions are everywhere, from a simple correlation between distance and time to complex heat waves. This chapter focuses on the fundamentals of functions: the definition, basic concepts, and other defining aspects. It is very concept-heavy, and expect a lot of reading and understanding. However, this is simply a review and an introduction on what is to come in future chapters.

## Introduction

An easy but vague way to understand functions is, to remember that a function i is like a processor. It takes the input to change the output. Formally, a function f from a set X to a set Y is defined by a set G of ordered pairs (x, y) such that x ∈ X, y ∈ Y, and every element of X is the first component of exactly one ordered pair in G. In other words, for every x in X, there is exactly one element y such that the ordered pair (x, y) belongs to the set of pairs defining the function f. The set G is called the graph of the function. Formally speaking, it may be identified with the function, but this hides the usual interpretation of a function as a process. Therefore, in common usage, the function is generally distinguished from its graph.
Whenever one quantity uniquely determines the value of another quantity, we have a function. That is, the set $X$ uniquely determines the set $Y$. 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.

### 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 next to $f$ can be misinterpreted as multiplication, $2f$. To make sure nobody is too confused, follow this procedure:
* Define the function $f$ by equating it to some expression.
* Give a sentence like the following: "At $x=c$, the function $f$ is..."
* Evaluate the function.

### Description

There are many ways which people describe functions. In the examples above, a verbal description 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.
* A function is given a name (such as $f$) and a formula for the function is also given. For example, $f(x)=3x+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.
* 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=3x+2$ describes a function. The dependent variable appears by itself on the left hand side of equal sign.
* A verbal description of the function.
When a function is given a name (like in number 1 above), the name of the function is usually a single letter of the alphabet (such as $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:
* $f(3)=3(3)+2$
* $3(3)+2=9+2$
* $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".

## Basic concepts of functions

The formal definition of a function states that a function is actually a mapping that associates the elements of one set called the domain of the function, $A$, with the elements of another set called the range of the function, $B$. 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. An example of how is given below.
* Let function $f(x)=5x+{\frac {5x}{2}}$ for all $x$. For what value of $x$ gives $f(x)=225{\frac {1}{2}}$?
* In mathematics, it is important to notice any repetition. If something seems to repeat, keep a note of that in the back of your mind somewhere.
* Here, notice that $f(x)=5x+{\frac {5x}{2}}$ and $f(x)=225{\frac {1}{2}}$. Because $f(x)$ is equal to two different things, it must be the case that the other side of the equal sign to $f(x)$ is equal to the other. This property is known as the transitive property and could thus make the following equation below true:
* $225{\frac {1}{2}}=5x+{\frac {5x}{2}}$
* Next, simplify — make your life easier rather than harder. In this instance, since $5x+{\frac {5x}{2}}$ has $x$ as a like-term, and the two terms are fractions added to the other, put it over a common denominator and simplify. Similar, since $225{\frac {1}{2}}$ is a mixed fraction, $225{\frac {1}{2}}=225+{\frac {1}{2}}$.
* $225{\frac {1}{2}}=5x+{\frac {5x}{2}}$
* $\Rightarrow {\frac {225}{1}}+{\frac {1}{2}}={\frac {5x}{1}}+{\frac {5x}{2}}$
* $\Rightarrow {\frac {450}{2}}+{\frac {1}{2}}={\frac {10x}{2}}+{\frac {5x}{2}}$
* $\Rightarrow {\frac {451}{2}}={\frac {15x}{2}}$
* Multiply both sides by the reciprocal of the coefficient of $x$, ${\frac {2}{15}}$ from both sides by multiplying by it.
* ${\frac {2}{15}}\cdot {\frac {451}{2}}=x$
* ${\frac {451}{15}}=x$ or $x={\frac {451}{15}}$.
* The value of $x$ that makes $f(x)=225{\frac {1}{2}}$ is $x={\frac {451}{15}}$.$\blacksquare$.
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.

### Basic types of transformation

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. To put it in more formal terms, a function $f$ is a mapping of some element $a\in A$, called the domain, to exactly one element $b\in B$, called the range, such that $f:A\to B$. The image below should help explain the modern definition of a function:
* A function is considered one-to-one if an element $a\in A$ from domain $A$ of function $f$, leads to exactly one element $b\in B$ from range $B$ of the function. By definition, since only one element $b$ is mapped by function $f$ from some element $a$, $f:A\to B$ implies that there exists only one element $b$ from the mapping. Therefore, there exists a one-to-one function because it complies with the definition of a function. This definition is similar to Figure 1.
* A function is considered many-to-one if some elements $a_{1},a_{2},\ldots a_{n}\in A$ from domain $A$ of function $f$ maps to exactly one element $b\in B$ from range $B$ of the function. Since some elements $\left(a_{1},a_{2},\ldots a_{n}\right)\in A$ must map onto exactly one element $b\in B$, $f:A\to B$ must be compliant with the definition of a function. Therefore, there exists a many-to-one function.
* A function is considered one-to-many if exactly one element $a\in A$ from domain $A$ of function $f$ maps to some elements $\left(b_{1},b_{2},\ldots b_{n}\right)\in B$ from range $B$ of the function. If some element $a$ maps onto many distinct elements $b$, then $f:A\to B$ is non-functional since there exists many distinct elements $b$. Given many-to-one is non-compliant to the definition of a function, there exists no function that is one-to-many.
The modern definition describes a function sufficiently such that it helps us determine whether some new type of "function" is indeed one. Now that each case is defined above, you can now prove whether functions are one of these function cases. Here is an example problem:
* Given: $f(x)=ax+b$, where $a$ and $b$ are constant and $a\neq 0$.
* Prove: function $f$ is one-to-one. Notice that the only changing element in the function $f$ is $x$. To prove a function is one-to-one by applying the definition may be impossible because although two random elements of domain set $A$ may not be many-to-one, there may be some elements $\left(a_{1},a_{2},\ldots a_{n}\right)\in A$ that may make the function many-to-one. To account for this possibility, we must prove that it is impossible to have some result like that.
* Assume there exists two distinct elements $x_{1}\neq x_{2}$ that will result in $f\left(x_{1}\right)=f\left(x_{2}\right)$. This would make the function many-to-one. In consequence,
* $ax_{1}+b=ax_{2}+b$
* Subtract $b$ from both sides of the equation.
* $\Rightarrow ax_{1}=ax_{2}$
* Subtract $ax_{2}$ from both sides of the equation.
* $\Rightarrow ax_{1}-ax_{2}=0$
* Factor $a$ from both terms to the left of the equation.
* $\Rightarrow a\left(x_{1}-x_{2}\right)=0$
* Multiply ${\frac {1}{a}}$ to both sides of the equation.
* $\Rightarrow \left(x_{1}-x_{2}\right)=0$
* Add $x_{2}$ to both sides of the equation.
* $\Rightarrow x_{1}=x_{2}$
* Notice that $x_{1}=x_{2}$. However, this is impossible because $x_{1}$ and $x_{2}$ are distinct. Ergo, $f\left(x_{1}\right)\neq f\left(x_{2}\right)$. No two distinct inputs can give the same output. Therefore, the function must be one-to-one.

### Basic concepts

There are a few more important ideas to learn from the modern definition of the function, and it comes from knowing the difference between domain, range, and codomain. We already discussed some of these, yet knowing about sets adds a new definition for each of the following ideas. Therefore, let us discuss these based on these new ideas. Let $A$ and $B$ be a set. If we were to combine these two sets, it would be defined as the cartesian cross product $A\times B$. The subset of this product is the function. The below definitions are a little confusing. The best way to interpret these is to draw an image. To the right of these definitions is the image that corresponds to it.
The domain is defined to be a set $A$ with all elements $a\in A$ mapping to at least one unique $b\in B$ .
The set of elements in $B$ is the range of the function mapping $f:A\to B$ in the cartesian cross product, whereby the set of all elements $a\in A$ maps to some element $b\in B$ .
The codomain is the set $B$, where it is not necessarily the case that all elements $b\in B$ was mapped by some $a\in A$ .
Note that the codomain is not as important as the other two concepts.
Take $f(x)={\sqrt {1-x^{2}}}$ for example:
Because of the square root, the content in the square root should be strictly not smaller than 0.
   $1-x^{2}\geq 0$
   $\Leftrightarrow -1\leq x\leq 1$
Thus the domain is
   $x\in [-1,1]$
Correspondingly, the range will be
   $f(x)\in [0,1]$

### Other types of transformation

There is one more final aspect that needs to be defined. We already have a good idea of what makes a mapping a function (e.g. it cannot be one-to-many). However, three more definitions that you will often hear will be necessary to talk about: injective, surjective, bijective.
* A function is injective if it is one-to-one.
* A function is surjective if it is "onto." That is, the mapping $f:A\to B$ has $B$ as the range of the function, where the codomain and the range of the function are the same.
* A function is bijective if it is both surjective and injective.
Again, the above definitions are often very confusing. Again, another image is provided to the right of the bullet points. Along with that, another example is also provided. Let us analyze the function $g(x)=ax^{2}$.
* Given: $g(x)=ax^{2}$, where $a$ is constant and $a\neq 0$.
* Prove: function $g$ is non-surjective and non-injective. Notice that the only changing element in the function $g$ is $x$. Let us check to see the conditions of this function.
* Is it injective? Let $g(x)=y$, and solve for $x$. First, divide by $a$.
* $y=ax^{2}$
* $\Rightarrow {\frac {y}{a}}=x^{2}$
* Then take the square root of $x^{2}$. By definition, ${\sqrt {x^{2}}}=\pm {\sqrt {x^{2}}}=\pm x$, so
* ${\frac {y}{a}}=x^{2}$
* $\Rightarrow \pm {\sqrt {\frac {y}{a}}}=\pm x$
* Notice, however, what we learned from the above manipulation. As a result of solving for $x$, we found that there are two solutions for $x$. However, this resulted in two different values from ${\frac {y}{a}}$. This means that for some individual $x$ that gives $y$, there are two different inputs that result in the same value. Because $f(x_{1})=f(x_{2})$ when $x_{1}\neq x_{2}$, this is by definition non-injective.
* Is it surjective? As a natural consequence of what we learned about inputs, let us determine the range of the function. After all, the only way to determine if something is surjective is to see if the range applies to all real numbers. A good way to determine this is by finding a pattern involving our domains. Let us say we input a negative number for the domain: $f(-x)=a(-x)^{2}=a\cdot (-x)\cdot (-x)=ax^{2}$. This seemingly trivial exercise tells us that negative numbers give us non-negative numbers for our range. This is huge information! For $x\in \mathbb {R}$, the function always results $y>0$ for our range. For the set $B$, we have elements in that set that have no mappings from the set $A$. As such, $y\leq 0$ is the codomain of set $B$. Therefore, this function is non-surjective!

### Tests for equations
#### The vertical line test

The vertical line test 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.
The circle, on the right, is not a function because the vertical line intercepts two points on the graph when $x=1$.

#### The horizontal line and the algebraic 1-1 test

Similarly, the horizontal line test, though does not test if an equation is a function, tests if a function is injective (one-to-one). If any horizontal line ever touches the graph at more than one point, then the function is not one-to-one; if the line always touches at most one point on the graph, then the function is one-to-one.
The algebraic 1-1 test is the non-geometric way to see if a function is one-to-one. The basic concept is that:
Assume there is a function $f$. If:
   $f(a)=f(b)$, and $a=b$, then
function $f$ is one-to-one.
Here is an example: prove that $f(x)={\frac {1-2x}{1+x}}$ is injective.
Since the notation is the notation for a function, the equation is a function. So we only need to prove that it is injective. Let $a$ and $b$ be the inputs of the function and that $f(a)=f(b)$. Thus,
    ${\frac {1-2a}{1+a}}={\frac {1-2b}{1+b}}$
    $\Leftrightarrow (1+b)(1-2a)=(1+a)(1-2b)$
    $\Leftrightarrow 1-2a+b-2ab=1-2b+a-2ab$ $\Leftrightarrow 1-2a+b=1-2b+a$
    $\Leftrightarrow 1-2a+3b=1+a$
    $\Leftrightarrow 1+3b=1+3a$
    $\Leftrightarrow a=b$
So, the result is $a=b$, proving that the function is injective.
Another example is proving that $g(x)=x^{2}$ is not injective.
Using the same method, one can find that $a=\pm b$, which is not $a=b$. So, the function is not injective.

### Remarks

The following arise as a direct consequence of the definition of functions:
* By definition, for each "input" a function returns only one "output", corresponding to that input. While the same output may correspond to more than one input, one input cannot correspond to more than one output. This is expressed graphically as the vertical line test: a line drawn parallel to the axis of the dependent variable (normally vertical) will intersect the graph of a function only once. However, a line drawn parallel to the axis of the independent variable (normally horizontal) may intersect the graph of a function as many times as it likes. Equivalently, this has an algebraic (or 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$ .
* Each function has a set of values, the function's domain, which it can accept as input. Perhaps this set is all positive real numbers; perhaps it is the set {pork, mutton, beef}. This set must be implicitly/explicitly defined in the definition of the function. You cannot feed the function an element that isn't in the domain, as the function is not defined for that input element.
* Each function has a set of values, the function's range, which it can output. This may be the set of real numbers. It may be the set of positive integers or even the set {0,1}. This set, too, must be implicitly/explicitly defined in the definition of the function.
Functions are an important foundation of mathematics. This modern interpretation is a result of the hard work of the mathematicians of history. It was not until recently that the definition of the relation was introduced by René Descartes in Geometry (1637). Nearly a century later, the standard notation ($f(x)=y$) was first introduced by Leonhard Euler in Introductio in Analysin Infinitorum and Institutiones Calculi Differentialis. The term function was also a new innovation during Euler's time as well, being introduced Gottfried Wilhelm Leibniz in a 1673 letter "to describe a quantity related to points of a curve, such as a coordinate or curve's slope." Finally, the modern definition of the function being the relation among sets was first introduced in 1908 by Godfrey Harold Hardy where there is a relation between two variables $x$ and $y$ such that "to some values of $x$ at any rate correspond values of $y$." For the person that wants to learn more about the history of the function, go to History of functions.

## Important functions

The functions listed below are essential to calculus. This section only serves as a review and scratches the surface of those functions. If there are any questions about those functions, please review the materials related to those functions before continuing. More about graphing will be explained in Chapter 1.4

### Polynomials

Polynomial functions are the most common and most convenient functions in the world of calculus. Their frequent appearances and their applications on computer calculations have made them important.
A polynomial in a single indeterminate x can always be written (or rewritten) in the form:
    $f(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+a_{n-2}x^{n-2}+\cdot \cdot \cdot +a_{2}x^{2}+a_{1}x+a_{0}$
To be more concise, it can also be written in the summation form:
    $\sum _{k=0}^{n}a_{k}x^{k}$

#### Constant

When $n=0$, the polynomial can be rewritten into the following function:
   $f(x)=C$, where $C$ is a constant.
The graph of this function is a horizontal line passing the point $(0,C)$.

#### Linear

When $n=1$, the polynomial can be rewritten into
   $f(x)=mx+b$, where $m{\text{ and }}b$ are constants.
The graph of this function is a straight line passing the point $(0,b)$ and $(-{\frac {b}{m}},0)$, and the slope of this function is $m$.

#### Quadratic

When $n=2$, the polynomial can be rewritten into
   $f(x)=ax^{2}+bx+c$, where $a,b,c$ are constants.
The graph of this function is a parabola, like the trajectory of a basketball thrown into the hoop.
If there are questions about the quadratic formula and other basic polynomial concepts, please review the respective chapters in Algebra.

### Trigonometric

Trigonometric functions are also very important because it can connect algebra and geometry. Trigonometric functions are explained in detail here due to its importance and difficulty.

### Exponential and Logarithmic

Exponential and logarithmic functions have a unique identity when calculating the derivatives, so this is a great time to review those functions.
The exponential function is defined as:
    $f(x)=a^{x}$, where $a$ is a constant.
while the logarithmic function is defined as:
    $f(x)=\log _{b}x$, where $b$ is a constant.
A special number will be frequently seen in those functions: the Euler's constant, also known as the base of the natural logarithm. Notated as $e$, it is defined as $e=\sum _{n=0}^{\infty }{\frac {1}{n!}}$.

### Signum

The Signum (sign) function is simply defined as
   ${\mbox{sgn}}(x)=\left\{{\begin{matrix}-1&{\text{if}}&x<0\\0&{\text{if}}&x=0\\1&{\text{if}}&x>0\end{matrix}}\right.$

## Properties of functions

Sometimes, a lot of function manipulations cannot be achieved without some help from basic properties of functions.

### Domain and range

This concept is discussed above.

### Growth

Although it seems obvious to spot a function increasing or decreasing, without the help of graphing software, we need a mathematical way to spot whether the function is increasing or decreasing, or else our human minds cannot immediately comprehend the huge amount of information.
Assume a function $f(x)$ with inputs $x_{1},x_{2}$, and that $x_{1}\in [a,b]$, $x_{2}\in [a,b]$, and $x_{2}>x_{1}$ at all times.
   If for all $x_{1}$ and $x_{2}$, $f(x_{2})-f(x_{1})>0$, then
   $f(x)$ is increasing in $[a,b]$
   If for all $x_{1}$ and $x_{2}$, $f(x_{2})-f(x_{1})<0$, then
   $f(x)$ is decreasing in $[a,b]$
Example: In which intervals is $f(x)={\frac {1}{1-x^{2}}}$ increasing?
Firstly, the domain is important. Because the denominator cannot be 0, the domain for this function is
$x\in (-\infty ,-1)\cup (-1,1)\cup (1,\infty )$
In $(-\infty ,-1)$, the growth of the function is:
   Let $x_{1},x_{2}\in [-\infty ,-1]$ and $x_{2}>x_{1}$
   Thus,
      $f(x_{2})-f(x_{1})={\frac {1}{1-x_{2}^{2}}}-{\frac {1}{1-x_{1}^{2}}}={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}$
   $\because$ both $x_{1},x_{2}\in [-\infty ,-1]$
   $\therefore$ $(1-x_{2}^{2})(1-x_{1}^{2})>0$
   $\because$ $x_{2}>x_{1}$ and $x_{1}<x_{2}<0$
   $\therefore$ $x_{2}^{2}-x_{1}^{2}<0$
      $f(x_{2})-f(x_{1})={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}<0$
   $f(x)$ is decreasing in $(-\infty ,-1)$
In $(-1,1)$
   Let $x_{1},x_{2}\in [-1,1]$ and $x_{2}>x_{1}$
   Thus,
      $f(x_{2})-f(x_{1})={\frac {1}{1-x_{2}^{2}}}-{\frac {1}{1-x_{1}^{2}}}={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}$
   $\because$ both $x_{1},x_{2}\in [-\infty ,-1]$
   $\therefore$$(1-x_{2}^{2})(1-x_{1}^{2})>0$
   However, the sign of $x_{2}^{2}-x_{1}^{2}$ in $(-1,1)$ cannot be determined. It can only be determined in $(-1,0){\text{ and }}(0,1)$.
      $(-1,0)$
      $\because$ $x_{2}>x_{1}$ and $x_{1}<x_{2}<0$
      $\therefore$ $x_{2}^{2}-x_{1}^{2}<0$
      In $(0,1)$
      $\because x_{2}>x_{1}{\text{ and }}0<x_{1}<x_{2}$
      $\therefore x_{2}^{2}-x_{1}^{2}>0$
   As a result,
   $f(x)$ is decreasing in $(-1,0)$ and increasing in $(0,1)$.
In $(1,\infty )$
   Let $x_{1},x_{2}\in [1,\infty ]$ and $x_{2}>x_{1}$
   Thus,
      $f(x_{2})-f(x_{1})={\frac {1}{1-x_{2}^{2}}}-{\frac {1}{1-x_{1}^{2}}}={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}$
   $\because$ both $x_{1},x_{2}\in [-\infty ,-1]$
   $\therefore$$(1-x_{2}^{2})(1-x_{1}^{2})>0$
   $\because x_{2}>x_{1}{\text{ and }}0<x_{1}<x_{2}$
   $\therefore x_{2}^{2}-x_{1}^{2}>0$
      $f(x_{2})-f(x_{1})={\frac {x_{2}^{2}-x_{1}^{2}}{(1-x_{2}^{2})(1-x_{1}^{2})}}>0$
   $f(x)$ is increasing in $(1,\infty )$.
Therefore, the intervals in which the function is increasing are $(0,1)\And (1,\infty )$.
$\blacksquare$
After learning derivatives, there will be more ways to determine the growth of a function.

### Parity

The properties odd and even are associated with symmetry. While even functions have a symmetry about the $y$-axis, odd functions are symmetric about the origin. In mathematical terms:
   A function is even when $f(-x)=f(x)$
   A function is odd when $f(-x)=-f(x)$
Example: Prove that $f(x)={\frac {1}{1-x^{2}}}$ is an even function.
$\because f(-x)={\frac {1}{1-(-x)^{2}}}={\frac {1}{1-x^{2}}}=f(x)$
$\therefore f(x)$ is an even function
$\blacksquare$

## 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=3x+2$ and $y=x^{2}$ , we obtain $y=x^{2}+3x+2$ .
* If we subtract $y=3x+2$ from $y=x^{2}$ , we obtain $y=x^{2}-(3x+2)$ . We can also write this as $y=x^{2}-3x-2$ .
* If we multiply the function $y=3x+2$ and the function $y=x^{2}$ , we obtain $y=(3x+2)x^{2}$ . We can also write this as $y=3x^{3}+2x^{2}$ .
* If we divide the function $y=3x+2$ by the function $y=x^{2}$ , we obtain $y={\frac {3x+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:
* If you are told that $f(x)=3x+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}+3x+2$ .
* If you are told that $f(x)=3x+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}+3x+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{aligned}(f+g)(x)&=f(x)+g(x)\\&=(3x+2)+(x^{2})\\&=x^{2}+3x+2\,\end{aligned}}$ ,
* ${\begin{aligned}(f-g)(x)&=f(x)-g(x)\\&=(3x+2)-(x^{2})\\&=-x^{2}+3x+2\,\end{aligned}}$ ,
* ${\begin{aligned}(f\times g)(x)&=f(x)\times g(x)\\&=(3x+2)\times (x^{2})\\&=3x^{3}+2x^{2}\,\end{aligned}}$ ,
* ${\begin{aligned}\left({\frac {f}{g}}\right)(x)&={\frac {f(x)}{g(x)}}\\&={\frac {3x+2}{x^{2}}}\\&={\frac {3}{x}}+{\frac {2}{x^{2}}}\end{aligned}}$ .

### 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{aligned}h(x)&=f(g(x))\\&=f(x^{2})\\&=3(x^{2})+2\\&=3x^{2}+2\,\end{aligned}}$ .
* 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{aligned}g(f(x))&=g(3x+2)\\&=(3x+2)^{2}\\&=9x^{2}+12x+4\,.\end{aligned}}$
* so $f(g(x))\neq g(f(x))$ .
Composition of functions is very common, mainly because functions themselves are common. For instance, squaring and sine are both functions:
    ${\mbox{square}}(x)=x^{2}$
    ${\mbox{sine}}(x)=\sin(x)$
Thus, the expression $\sin ^{2}(x)$ is a composition of functions:
    $\sin ^{2}(x)$ $={\mbox{square}}(\sin(x))$ $={\mbox{square}}({\mbox{sine}}(x))$
(Note that this is not the same as ${\mbox{sine}}({\mbox{square}}(x))=\sin(x^{2})$ .) Since the function sine equals ${\tfrac {1}{2}}$ if $x={\frac {\pi }{6}}$ ,
    ${\mbox{square}}\left(\sin \left({\tfrac {\pi }{6}}\right)\right)={\mbox{square}}\left({\tfrac {1}{2}}\right)$ .
Since the function square equals ${\frac {1}{4}}$ if $x={\frac {\pi }{6}}$ ,
    $\sin ^{2}\left({\tfrac {\pi }{6}}\right)={\mbox{square}}\left(\sin \left({\tfrac {\pi }{6}}\right)\right)={\mbox{square}}\left({\tfrac {1}{2}}\right)={\frac {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
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\left(x\times {\tfrac {1}{a}}\right)$ | 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)$ |

## 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 because it is not injective. Similarly, the inverse functions of trigonometric functions have to undergo transformations and limitations to be considered as valid functions.

### 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$
    $\Leftrightarrow x=2[f^{-1}(x)]-7$
    $\Leftrightarrow x+7=2[f^{-1}(x)]$
    $\Leftrightarrow {\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.

# External links

* Videos on function and their graphs at Khan Academy
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>Failed to match page to section number. Check your argument; if correct, consider updating Template:Calculus/map page. Graphing linear functions</h1>
It is sometimes difficult to understand the behavior of a function given only its definition; a visual representation or graph can be very helpful. A graph is a set of points in the Cartesian plane, where each point $(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.

## Linear functions

Graphing linear functions are easy to understand and do. Because we know that two points can form a line, only two points are needed for us to graph a linear function if those two points are on the function. Oppositely, we can write down the equation of a linear function if we only know two points that are on the function.
The following section mainly talks about different forms of linear function notations so that you can easily identify or graph the function.

### Introduction

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

The slope is the backbone of linear functions because it shows how much the output of a function changes when the input changes. For example, if the slope of a function is 2, then it means when the input of a function increases by 1 unit, the output of the function increases by 2 units. Now, let's look at a more mathematical example.
   Consider this function: $f(x)=-5x+8$. What does the number $-5$ mean?
   It means that when $x$ increases by 1, $f(x)$ decreases by 5.
   Using mathematical terms:
   $f(x+1)-f(x)=(-5(x+1)+8)-(-5x+8)=-5$
It is easy to calculate the slope because the slope is like the speed of a vehicle. If we divide the change in distance and the corresponding change in time, we get the speed. Similarly, if we divide the change in $f(x)$ over the corresponding change in $x$, we get the 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:
   ${\text{slope}}~={\frac {{\text{change in }}y}{{\text{change in }}x}}={\frac {\Delta y}{\Delta x}}={\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}$
If two points $(x_{1},y_{1})$ and $(x_{2},y_{2})$ on a linear function, then the slope of the linear function is
    $m={\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}$
Interestingly, there is a subtle relationship between the slope and the angle between the graph of the function and the positive $x$-axis, $\theta$. The relationship is:
   $m=\tan \theta$
It is an obvious relationship, but it can be ignored relatively easily.

### Slope-intercept form

When we see a function presented as
   $y=f(x)=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$ .
Example 1: Graph the function $f(x)=3x+2$.
The slope of the function is 3, and it intercepts the $y$-axis at point $(0,2)$. In order to graph the function, we need another point. Since the slope of the function is 3, then
   $f(x+1)=f(x)+3$
   $f(1)=f(0+1)=f(0)+3=5$
Knowing that the function goes through points $(0,2){\text{ and }}(1,5)$, the function can be easily graphed.
$\blacksquare$
Example 2: Now, consider another unknown linear function that goes through points $(-3,-4){\text{ and }}(0,5)$. What is the equation for this function?
The slope can be calculate with the formula mentioned above.
   $m={\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}={\frac {5-(-4)}{0-(-3)}}=3$
And since the $y$-axis interception is $(0,5)$, we can know that
   $b=5$
Thus, the equation of this linear function should be
   $g(x)=3x+5$
$\blacksquare$

### 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)$. The point-slope form is very important. Although it is not used as frequently as its counterpart the slope-intercept form, the concept of knowing a point and drawing the line in the direction of the slope will be encountered when we go into vector equations for lines and planes in future chapters.
Example 1: If a linear function goes through points $(3,-4){\text{ and }}(1,5)$, what is the equation for this function?
The slope is:
   $m={\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}={\frac {5-(-4)}{1-3}}=-{\frac {9}{2}}$
Since we know two points, the following answers are all correct
   $y+4=-{\frac {9}{2}}(x-3){\text{ or }}y-5=-{\frac {9}{2}}(x-1)$
$\blacksquare$
The two-point form is another form to write the equation for a linear function. It is similar to the point-slope form. 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$. However, this expression is not widely used in mathematics because in most situations, $(x_{1},y_{1})$ and $(x_{2},y_{2})$ are known coordinates. It would be redundant to write down a bulky ${\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}$ instead of a simple expression of the slope.

### Intercept form

The intercept form looks like this:
   ${\frac {x}{a}}+{\frac {y}{b}}=1$
By writing the function in the intercept form, we can quickly determine the $x,y$-axis intercepts.
   $x$-axis intercept: $(a,0)$
   $y$-axis intercept: $(0,b)$
When we discuss planes in 3D space, this form will be quite useful to determine the $x,y,z$-axis intercepts.

## Quadratic functions

To graph a quadratic function, there is the simple but work-heavy way, and there is the complicated but clever way. The simple way is to substitute the independent variable $x$ with various numbers and calculate the output $f(x)$. After some substitutions, plot those $(x,f(x))$ and connect those points with a curve. The complicated way is to find special points, such as intercepts and the vertex, and plot it out. The following section is a guide to find those special points, which will be useful in later chapters.
Actually, there is a third way, which we will discuss in Chapter 1.6.

### Standard form

Quadratic functions are functions that look like this
   $y=f(x)=ax^{2}+bx+c$, where $a,b,c$ are constants
The constant $a$ determines the concavity of the function: if $a>0$, $f(x)$ concaves up; if $a<0$, $f(x)$ concaves down.
The constant $c$ is the $y$-coordinate of the $y$-axis interception. In other words, this function goes through point $(0,c)$.

### Vertex form

The vertex form has its advantages over the standard form. While the standard form can determine the concavity and the $y$-axis interception, the vertex form can, as the name suggests, determine the vertex of the function. The vertex of a quadratic function is the highest/lowest point on the graph of a function, depending on the concavity. If $a>0$, the vertex is the lowest point on the graph; if $a<0$, the vertex is the highest point on the graph.
The vertex form looks like this:
   $y=f(x)=a(x-h)^{2}+k$, where $a,h,k$ are constants
The vertex of this function is $(h,k)$ because when $x=h$, $f(h)=k$. If $a>0$, $f(h)=k$ is the absolute minimum value that the function can achieve. If $a<0$, $f(h)=k$ is the absolute maximum value that the function can achieve.
Any standard form can be converted into the vertex form. The vertex form with constants $a,b,c$ looks like this
   $y=f(x)=a(x+{\frac {b}{2a}})^{2}+(c-{\frac {b^{2}}{4a}})$, where $a,b,c$ are constants in the standard form

### Factored form

The factored form can determine the $x$-axis intercepts because the factored form looks like this
   $y=f(x)=a(x-x_{1})(x-x_{2})$, where $x_{1},x_{2}$ are constants and are solutions for the equation $a(x-x_{1})(x-x_{2})=0$
Thus, it can be determined that the function passes through points $(x_{1},0){\text{ and }}(x_{2},0)$.
However, only certain functions can be written in this form. If the quadratic function does not have $x$-axis intercept, it is impossible to write it in the factored form.
Example 1: What is the vertex of this function? $f(x)=x^{2}+2x+3$
The equation can be transformed into the vertex form very easily
   $x^{2}+2x+3=(x^{2}+2x+1)+2=(x+1)^{2}+2$
Thus, the vertex is $(-1,2)$.
$\blacksquare$
Example 2: The image on the right is a quadratic function. Describe the meaning of the colored texts, which are important properties of a quadratic function.
$y=ax^{2}+bx+c$
   This is the equation for the quadratic function. In this case, $a>0$, $c<0$.
   Since there are two $x$-axis intercepts, we can find that $\Delta =b^{2}-4ac>0$.
Points $({\frac {-b-{\sqrt {b^{2}-4ac}}}{2a}},0){\text{ and }}({\frac {-b+{\sqrt {b^{2}-4ac}}}{2a}},0)$
   These are the coordinates for the two $x$-axis intercepts.
   Knowing the coordinates, the function can be written in its factored form:
      $y=a(x-{\frac {-b-{\sqrt {b^{2}-4ac}}}{2a}})(x-{\frac {-b+{\sqrt {b^{2}-4ac}}}{2a}})$
   If you have difficulties deriving the quadratic formula or understanding the expression $\Delta$, see Quadratic function.
Point $(-{\frac {b}{2a}},-{\frac {b^{2}-4ac}{4a}})$
   This is the vertex for the quadratic function. Because $a>0$, the vertex is the lowest point on the graph.
   Since the vertex is known, we can write the function in the vertex form:
      $y=a(x+{\frac {b}{2a}})^{2}-{\frac {b^{2}-4ac}{4a}}$
   Although this does not look like the equation we've just discussed earlier, note that $-{\frac {b^{2}-4ac}{4a}}=+c-{\frac {b^{2}}{4a}}$.
Line $x=-{\frac {b}{2a}}$
   The graph of the function is symmetric about this line. In other words,
   $f(-{\frac {b}{2a}}+x)=f(-{\frac {b}{2a}}-x)$
Point $(-{\frac {b}{2a}},{\frac {1-(b^{2}-4ac)}{4a}})$ and line $y={\frac {-1-(b^{2}-4ac)}{4a}}$ will be discussed in the next chapter (1.6). They are the focus and the directrix respectively.
$\blacksquare$
If you can skillfully and quickly determine those special points, graphing quadratic functions will be less torturing.

## Exponential and Logarithmic functions

Exponential and logarithmic functions are inverse functions with each other. Take the exponential function $f(x)=a^{x}$ for example. The inverse function of $f(x)$, $f^{-1}(x)$, is
   $x=a^{f^{-1}(x)}$
   $\Leftrightarrow f^{-1}(x)=\log _{a}x$
which is a logarithmic function.
Since geometrically, the graph of the inverse function is flipping the graph of the original function over line $y=x$, we only need to know how to graph one of those functions.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>1.7 Precalculus Cumulative Exercises</h1>

## Algebra
### Convert to interval notation

$\{x:-4<x<2\}$
$(-4,2)$
$(-4,2)$
$\left\{x:-{\tfrac {7}{3}}\leq x\leq -{\tfrac {1}{3}}\right\}$
$\left[-{\tfrac {7}{3}},-{\tfrac {1}{3}}\right]$
$\left[-{\tfrac {7}{3}},-{\tfrac {1}{3}}\right]$
$\{x:-\pi \leq x<\pi \}$
$[-\pi ,\pi )$
$[-\pi ,\pi )$
$\{x:x\leq {\tfrac {17}{9}}\}$
$\left(-\infty ,{\tfrac {17}{9}}\right]$
$\left(-\infty ,{\tfrac {17}{9}}\right]$
$\{x:5\leq x+1\leq 6\}$
$[4,5]$
$[4,5]$
$\left\{x:x-{\tfrac {1}{4}}<1\right\}$
$\left(-\infty ,{\frac {5}{4}}\right)$
$\left(-\infty ,{\frac {5}{4}}\right)$
$\{x:3>3x\}$
$(-\infty ,1)$
$(-\infty ,1)$
$\{x:0\leq 2x+1<3\}$
$\left[-{\tfrac {1}{2}},1\right)$
$\left[-{\tfrac {1}{2}},1\right)$
$\{x:5<x{\text{ and }}x<6\}$
$(5,6)$
$(5,6)$
$\{x:5<x{\text{ or }}x<6\}$
$(-\infty ,\infty )$
$(-\infty ,\infty )$

### State the following intervals using set notation

$[3,4]$
$\{x:3\leq x\leq 4\}$
$\{x:3\leq x\leq 4\}$
$[3,4)$
$\{x:3\leq x<4\}$
$\{x:3\leq x<4\}$
$(3,\infty )$
$\{x:x>3\}$
$\{x:x>3\}$
$\left(-{\tfrac {1}{3}},{\tfrac {1}{3}}\right)$
$\left\{x:-{\tfrac {1}{3}}<x<{\tfrac {1}{3}}\right\}$
$\left\{x:-{\tfrac {1}{3}}<x<{\tfrac {1}{3}}\right\}$
$\left(-\pi ,{\tfrac {15}{16}}\right)$
$\left\{x:-\pi <x<{\tfrac {15}{16}}\right\}$
$\left\{x:-\pi <x<{\tfrac {15}{16}}\right\}$
$(-\infty ,\infty )$
$\{x:x\in \mathbb {R} \}$
$\{x:x\in \mathbb {R} \}$

### 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.
$|x+y|=|x|+|y|$
$|x+y|\geq |x|+|y|$
$|x+y|\leq |x|+|y|$

### Evaluate the following expressions

$8^{\frac {1}{3}}$
$2$
$2$
$(-8)^{\frac {1}{3}}$
$-2$
$-2$
$\left({\frac {1}{8}}\right)^{\frac {1}{3}}$
${\frac {1}{2}}$
${\frac {1}{2}}$
$\left(8^{\frac {2}{3}}\right)\left(8^{\frac {3}{2}}\right)(8^{0})$
$8^{\frac {13}{6}}$
$8^{\frac {13}{6}}$
$\left(\left({\frac {1}{8}}\right)^{\frac {1}{3}}\right)^{7}$
${\frac {1}{128}}$
${\frac {1}{128}}$
${\sqrt[{3}]{\frac {27}{8}}}$
${\frac {3}{2}}$
${\frac {3}{2}}$
${\frac {4^{5}\cdot 4^{-2}}{4^{3}}}$
$1$
$1$
$\left({\sqrt {27}}\right)^{\frac {2}{3}}$
$3$
$3$
${\frac {\sqrt {27}}{\sqrt[{3}]{9}}}$
$3^{\frac {5}{6}}$
$3^{\frac {5}{6}}$

### Simplify the following

$x^{3}+3x^{3}$
$4x^{3}$
$4x^{3}$
${\frac {x^{3}+3x^{3}}{x^{2}}}$
$4x$
$4x$
$(x^{3}+3x^{3})^{3}$
$64x^{9}$
$64x^{9}$
${\frac {x^{15}+x^{3}}{x}}$
$x^{14}+x^{2}$
$x^{14}+x^{2}$
$(2x^{2})(3x^{-2})$
$6$
$6$
${\frac {x^{2}y^{-3}}{x^{3}y^{2}}}$
${\frac {1}{xy^{5}}}$
${\frac {1}{xy^{5}}}$
${\sqrt {x^{2}y^{4}}}$
$|xy^{2}|$
$|xy^{2}|$
$\left({\frac {8x^{6}}{y^{4}}}\right)^{\frac {1}{3}}$
${\frac {2x^{2}}{y^{\frac {4}{3}}}}$
${\frac {2x^{2}}{y^{\frac {4}{3}}}}$

### Find the roots of the following polynomials

$x^{2}-1$
$x=\pm 1$
$x=\pm 1$
$x^{2}+2x+1$
$x=-1$
$x=-1$
$x^{2}+7x+12$
$x=-3,x=-4$
$x=-3,x=-4$
$3x^{2}-5x-2$
$x=2,x=-{\frac {1}{3}}$
$x=2,x=-{\frac {1}{3}}$
$x^{2}+{\frac {5}{6}}x+{\frac {1}{6}}$
$x=-{\frac {1}{3}},x=-{\frac {1}{2}}$
$x=-{\frac {1}{3}},x=-{\frac {1}{2}}$
$4x^{3}+4x^{2}+x$
$x=0,x=-{\frac {1}{2}}$
$x=0,x=-{\frac {1}{2}}$
$x^{4}-1$
$x=\pm i,x=\pm 1$
$x=\pm i,x=\pm 1$
$x^{3}+2x^{2}-4x-8$
$x=\pm 2$
$x=\pm 2$

### Factor the following expressions

$4a^{2}-ab-3b^{2}$
$(4a+3b)(a-b)$
$(4a+3b)(a-b)$
$(c+d)^{2}-4$
$(c+d+2)(c+d-2)$
$(c+d+2)(c+d-2)$
$4x^{2}-9y^{2}$
$(2x+3y)(2x-3y)$
$(2x+3y)(2x-3y)$

### Simplify the following

${\frac {x^{2}-1}{x+1}}$
$x-1,x\neq -1$
$x-1,x\neq -1$
${\frac {3x^{2}+4x+1}{x+1}}$
$3x+1,x\neq -1$
$3x+1,x\neq -1$
${\frac {4x^{2}-9}{4x^{2}+12x+9}}$
${\frac {2x-3}{2x+3}}$
${\frac {2x-3}{2x+3}}$
${\frac {x^{2}+y^{2}+2xy}{x(x+y)}}$
${\frac {x+y}{x}},x\neq -y$
${\frac {x+y}{x}},x\neq -y$

## Functions

52. Let $f(x)=x^{2}$ .
$f(0)$
$f(2)$
$f(-1.2)$
$f(0)=0$
$f(2)=4$
$f(-1.2)=1.44$
$f(0)=0$
$f(2)=4$
$f(-1.2)=1.44$
$f$
$(-\infty ,\infty )$
$[0,\infty )$
$(-\infty ,\infty )$
$[0,\infty )$
$f$
$f$
$x=1$
$x=-1$
$f(x)=1$
$f$
$x=1$
$x=-1$
$f(x)=1$
53. Let $f(x)=x+2$ , $g(x)=1/x$ .
    a. Give formulae for
$f+g$
$(f+g)(x)=x+2+{\frac {1}{x}}$
$(f+g)(x)=x+2+{\frac {1}{x}}$
$f-g$
$(f-g)(x)=x+2-{\frac {1}{x}}$
$(f-g)(x)=x+2-{\frac {1}{x}}$
$g-f$
$(g-f)(x)={\frac {1}{x}}-x-2$
$(g-f)(x)={\frac {1}{x}}-x-2$
$f\times g$
$(f\times g)(x)=1+{\frac {2}{x}}$
$(f\times g)(x)=1+{\frac {2}{x}}$
${\frac {f}{g}}$
$\left({\frac {f}{g}}\right)(x)=x^{2}+2x$
$\left({\frac {f}{g}}\right)(x)=x^{2}+2x$
${\frac {g}{f}}$
$\left({\frac {g}{f}}\right)(x)={\frac {1}{x^{2}+2x}}$
$\left({\frac {g}{f}}\right)(x)={\frac {1}{x^{2}+2x}}$
$f\circ g$
$(f\circ g)(x)={\frac {1}{x}}+2$
$(f\circ g)(x)={\frac {1}{x}}+2$
$g\circ f$
$(g\circ f)(x)={\frac {1}{x+2}}$
$(g\circ f)(x)={\frac {1}{x+2}}$
$f(g(2))$
$g(f(2))$
$f(g(2))=2.5\ ,\ g(f(2))=0.25$
$f(g(2))=2.5\ ,\ g(f(2))=0.25$
$f$
$g$
$f^{-1}(x)=x-2\ ,\ g^{-1}(x)={\frac {1}{x}}$
$f^{-1}(x)=x-2\ ,\ g^{-1}(x)={\frac {1}{x}}$
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}}$
$(-\infty ,\infty )$
$(-\infty ,\infty )$
$\left(-{\tfrac {1}{9}},\infty \right)$
$\left(-{\tfrac {1}{9}},\infty \right)$
$f$
$x>0$
$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}}$
$(-\infty ,\infty )$
$(-\infty ,\infty )$
$(-1,\infty )$
$(-1,\infty )$
$f$
$x>0$
$x>0$
57. Consider the following function
    $f(x)={\frac {\sqrt {2x-3}}{x-10}}$
$(1.5,10)\cup (10,\infty )$
$(1.5,10)\cup (10,\infty )$
$(-\infty ,\infty )$
$(-\infty ,\infty )$
$f$
$(1.5,10)\cup (10,\infty )$
$(1.5,10)\cup (10,\infty )$
58. Consider the following function
    $f(x)={\frac {x-7}{x^{2}-49}}$
$(-\infty ,-7)\cup (-7,\infty )$
$(-\infty ,-7)\cup (-7,\infty )$
$(-\infty ,\infty )$
$(-\infty ,\infty )$
$f$
$(-\infty ,-7)\cup (-7,7)\cup (7,\infty )$
$(-\infty ,-7)\cup (-7,7)\cup (7,\infty )$

## Graphing

$3x-y=4$
$3x-y=4$
$3x-2y=0$
$3x-2y=0$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Limits

<h1>2.1 An Introduction to Limits</h1>
Limits, the first step into calculus, explain the complex nature of the subject. It is used to define the process of derivation and integration. It is also used in other circumstances to intuitively demonstrate the process of "approaching".

## Introduction
### Intuitive Look into Limits

The limit is one of the greatest tools in the hands of any mathematician. We will give the limit an approach. Because mathematics came only due to approaches... remember?!
We designate limit in the form:
    $\lim _{x\to a}f(x)$
This is read as "The limit of $f$ of $x$ as $x$ approaches $a$". This is an important thing to remember, it is basic notation which is accepted by the world.
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:
    $\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. There are two ways to approach values near 2. One is to approach from below, and the other is to approach from above:
| $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 |
The table above is the case from below.
| $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 |
The table above is the case from above.
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,
    $\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:
    $\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). Well, one says such a limit does not exist because no finite number is approached. This arises the concept of infinity: an undefined quantity and the limit is also called infinite limit or limit without a bound.
Note that we cannot just substitute 2 into ${\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}&{\text{if }}x\neq 2\\{\mbox{undefined}}&{\text{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 elementary algebra, a typical approach is to simply say that we can cancel the term $(x-2)$ , and then we have the function $f(x)=x^{2}$. However, that would be inaccurate; the function that we have now is not really the same as the one we started with, because it is defined when $x=2$ , and our original function was specifically not defined when $x=2$. This may seem like a minor point, but from making this kind of assumptions we can easily derive absurd results, such that $0=1$ (see Mathematical Fallacy § All numbers equal all other numbers in Wikipedia for a complete example). Even without calculus we can avoid this error by stating that:
    $f(x)={\frac {x^{2}(x-2)}{x-2}}=x^{2}{\text{ when }}x\neq 2$
In calculus, we can introduce a more intuitive and also correct way of looking at this type of function. What we want is to be able to say that, although the function isn't defined when $x=2$, it works almost as if it was. It may not get there, but it gets really, really close. For instance, $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$).
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 {\text{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 can also be understood as: $x$ is infinitely approaching to $c$ but never equals to $c$, just like the function $f(x)={\frac {1}{x}}$, which infinitely approaches to $0$ but never equals $0$.

## Basics
### Rules and Identities

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\cdot f(x)=k\cdot \lim _{x\to c}f(x)=k\cdot L$
* $\lim _{x\to c}{\Bigf(x)+g(x){\Big ]}=\lim _{x\to c}f(x)+\lim _{x\to c}g(x)=L+M$
* $\lim _{x\to c}{\Bigf(x)-g(x){\Big ]}=\lim _{x\to c}f(x)-\lim _{x\to c}g(x)=L-M$
* $\lim _{x\to c}{\Bigf(x)\cdot g(x){\Big ]}=\lim _{x\to c}f(x)\cdot \lim _{x\to c}g(x)=L\cdot M$
* $\lim _{x\to c}{\frac {f(x)}{g(x)}}={\frac {\lim \limits _{x\to c}f(x)}{\lim \limits _{x\to c}g(x)}}={\frac {L}{M}}\quad {\text{ provided }}M\neq 0$
Notice that in the last rule we need to require that $M$ is not equal to 0 (otherwise we would be dividing by zero which is an undefined operation).
These rules are known as identities; they are the scalar product, sum, difference, product, and quotient rules for limits. (A scalar is a constant, and, when you multiply a function by a constant, we say that you are performing scalar multiplication.)
Using these rules we can deduce another. Namely, using the rule for products many times we get that
    $\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.
As a result, we can safely say that all limits for polynomial functions can be deduced into several limits that satisfy the identity rule and thus easier to compute.

#### 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\cdot \lim _{x\to 2}x^{3}=4\cdot 8=32$.
$\blacksquare$

#### Example 2

Find the limit $\lim _{x\to 2}{\Big4x^{3}+5x+7{\Big ]}$.
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\cdot 2=10$ and $\lim _{x\to 2}7=7$. Adding these together gives
    $\lim _{x\to 2}{\Big4x^{3}+5x+7{\Big ]}=\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}{\Big4x^{3}+5x+7{\Big ]}=49$. The limit of the denominator is
    $\lim _{x\to 2}(x-4)(x+10)=\lim _{x\to 2}{\bigx-4{\big ]}\cdot \lim _{x\to 2}{\bigx+10{\big ]}=(2-4)(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 \limits _{x\to 4}{\Bigx^{4}-16x+7{\Big ]}}{\lim \limits _{x\to 4}{\Big4x-5{\Big ]}}}={\frac {\lim \limits _{x\to 4}x^{4}-\lim \limits _{x\to 4}16x+\lim \limits _{x\to 4}7}{\lim \limits _{x\to 4}4x-\lim \limits _{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\ ,\ \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 0. 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$
Remember that the limit is a method to determine the approaching value of a function instead of the value of the function itself. So, though the function is undefined at $x=2$, the value of the function is approaching to $1$ when $x\rightarrow 2$

#### Example 6

Find the limit $\lim _{x\to 0}\left[{\frac {1-\cos(x)}{x}}\right]$.
To evaluate this seemingly complex limit, we will need to recall some sine and cosine identities (see Chapter 1.3). 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 and cosecant functions), 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 can be proved using squeeze theorem. Note that L'Hospital's rule is not allowed to be used to evaluate this limit because it causes circular reasoning,
in the sense that differentiating $\sin x$.requires this limit to equal one, which is exactly the equation that is being proven.
Method 1 (before learning L'Hôpital's rule):
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:
    $\lim _{x\to 0}\left[{\frac {1-\cos(x)}{x}}\right]$ $=\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 {{\big1-\cos(x){\big )}{\big1+\cos(x){\big )}}{x{\big1+\cos(x){\big )}}}$ $=\lim _{x\to 0}{\frac {1-\cos ^{2}(x)}{x{\big1+\cos(x){\big )}}}$ $=\lim _{x\to 0}{\frac {\sin ^{2}(x)}{x{\big1+\cos(x){\big )}}}$ $=\lim _{x\to 0}\left[{\frac {\sin(x)}{x}}\cdot {\frac {\sin(x)}{1+\cos(x)}}\right]$.
Our next step should be to break this up into $\lim _{x\to 0}\left[{\frac {\sin(x)}{x}}\right]\cdot \lim _{x\to 0}\left[{\frac {\sin(x)}{1+\cos(x)}}\right]$ by the product rule. As mentioned above, $\lim _{x\to 0}\left[{\frac {\sin(x)}{x}}\right]=1$.
Next, $\lim _{x\to 0}\left[{\frac {\sin(x)}{1+\cos(x)}}\right]={\frac {\lim \limits _{x\to 0}{\big\sin(x){\big ]}}{\lim \limits _{x\to 0}{\big1+\cos(x){\big ]}}}={\frac {0}{1+\cos(0)}}=0$.
Thus, by multiplying these two results, we obtain 0.
$\blacksquare$
Note that we also cannot apply L'Hospital's rule to evaluate this limit because it causes circular reasoning.
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 0). That is, $c$ must be in the domain of the function.
If $f$ is a polynomial or rational function that is defined at $c$ then
    $\lim _{x\to 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}{\bigg\sin(x^{2})+4\cos ^{3}(3x-1){\bigg ]}=\sin(1^{2})+4\cos ^{3}(3\cdot 1-1)=\sin 1+4\cos ^{3}2$.

### The Squeeze Theorem

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:
Suppose that $g(x)\leq f(x)\leq h(x)$ holds for all $x$ in some open interval containing $c$.
    If $\lim _{x\to c}g(x)=\lim _{x\to c}h(x)=L$,
    Then $\lim _{x\to c}f(x)=L$.
Example: Compute $\lim _{x\to 0}x\cdot \sin \left({\tfrac {1}{x}}\right)$.
Since we know that
   $-1\leq \sin({\frac {1}{x}})\leq 1$
Multiplying $x$ into the inequality yields
   $-|x|\leq x\sin({\frac {1}{x}})\leq |x|$
Now we apply the squeeze theorem
   $\lim _{x\to 0}-|x|\leq \lim _{x\to 0}x\sin({\frac {1}{x}})\leq \lim _{x\to 0}|x|$
Since $\lim _{x\to 0}-|x|=\lim _{x\to 0}|x|=0$,
$\lim _{x\to 0}x\cdot \sin \left({\tfrac {1}{x}}\right)=0$
$\blacksquare$

## Finding Limits

Now, we will discuss how, in practice, to find limits. First, if the function can be built out of rational, trigonometric, logarithmic, or 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$:
   $\lim _{x\to c}f(x)=f(c)$ when $f(x)$ can be built out of rational, trigonometric, logarithmic, or exponential functions and $c\in$ the Domain of $f(x)$
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)={\frac {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.

### Specific DNE Situations

Note that the limit might not exist at all (DNE means "does not exist"). There are a number of ways in which this can occur:
"Gap"
    $f(x)={\sqrt {x^{2}-16}}$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\leq c\leq 4$. 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 $\leq 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.

#### Vertical asymptote

    In $f(x)={\frac {1}{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.)

#### 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 \left({\tfrac {1}{x}}\right)$
    As $x$ gets closer to 0 the function keeps oscillating between $-1$ and 1. In fact, $\sin \left({\tfrac {1}{x}}\right)$ oscillates an infinite number of times on the interval between 0 and any positive value of $x$. The sine function is equal to 0 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 \left({\tfrac {1}{x}}\right)=0$ for every $x={\tfrac {1}{k\pi }}$. In between consecutive pairs of these values, ${\tfrac {1}{k\pi }}$ and ${\tfrac {1}{(k+1)\pi }}$ , $\sin \left({\tfrac {1}{x}}\right)$ 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 ${\tfrac {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 \left({\tfrac {1}{x}}\right)$ does not approach any specific value. Thus, $\lim _{x\to 0}\sin \left({\tfrac {1}{x}}\right)$ does not exist.

### Determining Limits

The formal way to determine whether a limit exists is to find out whether the value of the limit is the same when approaching from below and above (see at the top of this chapter). The notation for the limit approaching from below (in increasing order) is
   $\lim _{x\to c^{-}}f(x)$, notice the negative sign on the constant $c$
The notation for the limit approaching from above (from decreasing order) is
   $\lim _{x\to c^{+}}f(x)$, notice the positive sign on the constant $c$
For example, let us find the limits of $f(x)={\frac {1}{x}}$ when $x$ is approaching $0$ in both directions. In other words, find $\lim _{x\to 0^{-}}{\frac {1}{x}}$ and $\lim _{x\to 0^{+}}{\frac {1}{x}}$.
   Recall the table we made when we are trying to intuitively feel the limit. We can use that to help us. However, if familiar enough with reciprocal functions, we can simply determine the two values by imagining the graph of the function.
   The following table is when $x$ is approaching from below.
| $x$ | -0.3 | -0.2 | -0.1 | -0.05 | -0.01 | -0.001 |
| $f(x)={\frac {1}{x}}$ | -3.333 | -5 | -10 | -20 | -100 | -1000 |
   Thus, we found that when $x$ is approaching from below to $0$, the function approaches negative infinity. In mathematical terms:
   $\lim _{x\to 0^{-}}{\frac {1}{x}}=-\infty$
   Now let's talk about the approach from above.
| $x$ | 0.3 | 0.2 | 0.1 | 0.05 | 0.01 | 0.001 |
| $f(x)={\frac {1}{x}}$ | 3.333 | 5 | 10 | 20 | 100 | 1000 |
   We found that $\lim _{x\to 0^{+}}{\frac {1}{x}}=\infty$
$\blacksquare$
The method of determining if limits exist is relatively intuitive. It only requires some practice to be familiar with the process.
If $\lim _{x\to c^{-}}f(x)=\lim _{x\to c^{+}}f(x)=L$, then $\lim _{x\to c}f(x)=L$. If $\lim _{x\to c^{-}}f(x)\neq \lim _{x\to c^{+}}f(x)=L$, then the limit does not exist (DNE).
Let's use the same example: find $\lim _{x\to 0}{\frac {1}{x}}$.
   Since we already found that $\lim _{x\to 0^{-}}{\frac {1}{x}}=-\infty$ and $\lim _{x\to 0^{+}}{\frac {1}{x}}=\infty$, and obviously,
   $\lim _{x\to 0^{-}}{\frac {1}{x}}\neq \lim _{x\to 0^{+}}{\frac {1}{x}}$
   We can say that $\lim _{x\to 0}{\frac {1}{x}}$ does not exist.
$\blacksquare$

### Infinity Situations

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\neq 0$. 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 0, but not equal to 0. 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.
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 {\text{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$.

## Applications 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

* Online interactive exercises on limits
* Tutorials for the calculus phobe
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>2.2 Finite Limits</h1>

## 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
    $\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:
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 $\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.
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 $\lim _{x\to 2^{-}}{\sqrt {x-2}}$ does not exist.
The right-handed limit, however, $\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.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>2.3 Infinite Limits</h1>

## 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)={\frac {1}{x}}$ . As $x$ gets very big, ${\frac {1}{x}}$ gets very small. In fact, ${\frac {1}{x}}$ gets closer and closer to 0 the bigger $x$ gets. Without limits it is very difficult to talk about this fact, because $x$ can keep getting bigger and bigger and ${\frac {1}{x}}$ never actually gets to 0; 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.
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 \infty }{\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:
    $\lim _{x\to -\infty }{\frac {1}{x}}=0$
because making $x$ very negative also forces ${\frac {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)={\frac {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)={\frac {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 $\pm \infty$ is 0.
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 $\lim _{x\to \infty }{\frac {x-5}{x-3}}$ .
The function $f(x)={\frac {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, $\lim _{x\to \infty }{\frac {x-5}{x-3}}={\frac {1}{1}}=1$ .

#### Example 2

Find $\lim _{x\to \infty }{\frac {x^{3}+x-6}{x^{2}-4x+3}}$.
Using L'Hôpital's rule $d/dx(x^{3}+x-6)=3x^{2}+1$
and
$d/dx(x^{2}-4x+3)=2x-4$
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,
    $\lim _{x\to \infty }{\frac {x^{3}+x-6}{x^{2}-4x+3}}=\infty$ .
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

## 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}}=\infty$
But $\infty$ is different. $\infty$ 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 $\infty$ 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+\infty =\infty$ . 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 $\infty$ does not follow the rules laid down for numbers, it cannot be a number. Every time you use the symbol $\infty$ in a formula where you would normally use a number, you have to interpret the formula differently. Let's look at how $\infty$ does not follow the rules that every actual number does:

## Addition Breaks

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

## Reinterpret Formulae that Use $\infty$

We started off with a formula that does "mean" something, even though it used $\infty$ and $\infty$ is not a number.
    $\lim _{x\to 0^{+}}{\frac {1}{x}}=\infty$
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}}={\frac {1}{2}}$
This formula says that I can make sure the values of ${\frac {1}{x}}$ don't differ very much from ${\tfrac {1}{2}}$ , so long as I can control how much $x$ varies away from 2. I don't have to make ${\frac {1}{x}}$ exactly equal to ${\tfrac {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 ${\tfrac {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 $\infty$ for ${\frac {1}{2}}$ .
    $\lim _{x\to 0^{+}}{\frac {1}{x}}=\infty$
This formula says that I can make sure the values of ${\frac {1}{x}}$ don't differ very much from $\infty$ , so long as I can control how much $x$ varies away from 0. I don't have to make ${\frac {1}{x}}$ exactly equal to $\infty$ , 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 $\infty$ . 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 $\infty$ . For example, when $x=0.001$ and ${\frac {1}{x}}=1000$ does it really makes sense to say 1000 is closer to $\infty$ than 1 is? Solve the following equations for $\delta$ :
    ${\begin{aligned}&1000+\delta =\infty \\&\delta =\infty -1000\\&\delta =\infty \end{aligned}}$
    ${\begin{aligned}&1+\delta =\infty \\&\delta =\infty -1\\&\delta =\infty \end{aligned}}$
No real number is very close to $\infty$; that's what makes $\infty$ so special! So we have to rephrase the paragraph:
    $\lim _{x\to 0^{+}}{\frac {1}{x}}=\infty$
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 ${\frac {1}{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 $\infty$ . Remember that you will have to change any comparison of magnitude between a real number and $\infty$ to a different phrase. In the second case, you will have to work out for yourself what the formula means.
$\lim _{x\to \infty }{\frac {1}{x^{2}}}=0$
${\frac {1}{x^{2}}}$
$x$
${\frac {1}{x^{2}}}$
$x$
$\sum _{n=0}^{\infty }2^{-n}=1+{\frac {1}{2}}+{\frac {1}{4}}+{\frac {1}{8}}+\cdots =2$
$\sum _{k=0}^{n}2^{-k}$
$n$
$\sum _{k=0}^{n}2^{-k}$
$n$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>2.4 Continuity</h1>

## 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:
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\to c}f(x)=f(c)$ .
Note that for $f$ to be continuous at $c$, the definition in effect requires three conditions:
* that $f$ is defined at $c$ , so $f(c)$ exists,
* the limit as $x$ approaches $c$ exists, and
* 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.
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 $(-\infty ,\infty )$ , 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\neq 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

Not all discontinuities can be removed from a function. Consider this function:
    $k(x)={\begin{cases}1&{\text{if }}x>0\\-1&{\text{if }}x\leq 0\end{cases}}$
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:
* the function is defined at the point.
* the function has a limit from that side at that point.
* 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.
A function is said to be continuous on $[a,b]$ if and only if
* it is continuous on $(a,b)$ .
* it is continuous from the right at $a$ .
* 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:
If a function $f$ is continuous on a closed interval $[a,b]$ , then for every value $y$ between $f(a)$ and $f(b)$ there is a value $c\in (a,b)$ such that $f(c)=y$ .

### Application: bisection method

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={\frac {a+b}{2}}$ . There are now three possibilities:
* $f(c)=0$ ,
* $f(a)$ and $f(c)$ have opposite signs, or
* $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 0. The midpoint of that small sub-interval is usually taken as a good approximation to the 0.
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.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>2.5 Formal Definition of the Limit</h1>
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 one.
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:
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<|x-c|<\delta$
we have
    ${\Big |}f(x)-L{\Big |}<\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 =0.01$ , there is some $\delta$ so that as long as $0<|x-c|<\delta$ , then ${\Big |}f(x)-L{\Big |}<\varepsilon$ .
To show this, we can pick any $\delta$ that is bigger than 0, so long as it works. For example, you might pick $10^{-14}$ , because you are absolutely sure that if $x$ is within $10^{-14}$ of 2, then $f(x)$ will be within $0.01$ of 4. This $\delta$ works for $\varepsilon =0.01$ . But we can't just pick a specific value for $\varepsilon$ , like 0.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 $\delta$s, one for each $\varepsilon$ . We can't list an infinite number of $\delta$s!
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{\sqrt {2}}-2&{\mbox{if }}\epsilon \geq 4\\{\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<|x-c|<\delta$ we have ${\Big |}f(x)-L{\Big |}<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

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
    ${\Big |}f(x)-L{\Big |}<\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
    ${\Big |}f(x)-L{\Big |}<\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 $|-0.04|$ 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
    ${\Big |}f(x)-11{\Big |}<\varepsilon$
whenever
    $|x-4|<\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
    ${\Big |}f(x)-11{\Big |}<\varepsilon$
given that
    $|x-4|<\delta =\varepsilon$
Since $|x-4|<\varepsilon$ , we know
    ${\Big |}f(x)-11{\Big |}={\Big |}x+7-11{\Big |}=|x-4|<\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
    ${\Big |}x^{2}-16{\Big |}<\varepsilon$
given that
    $|x-4|<\delta ={\sqrt {\varepsilon +16}}-4$ .
We know that
    $|x+4|={\Big |}(x-4)+8{\Big |}\leq |x-4|+8<\delta +8$
(because of the triangle inequality), so
    ${\begin{matrix}{\Big |}x^{2}-16{\Big |}&=&|x-4|\cdot |x+4|\\\\\ &<&\delta (\delta +8)\\\\\ &<&({\sqrt {16+\varepsilon }}-4)({\sqrt {16+\varepsilon }}+4)\\\\\ &<&({\sqrt {16+\varepsilon }})^{2}-4^{2}\\\\\ &=&\varepsilon +16-16\\\\\ &<&\varepsilon \end{matrix}}$

### Example 4

Show that the limit of $\sin \left({\tfrac {1}{x}}\right)$ 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 \left({\tfrac {1}{x}}\right)-L\right|<\varepsilon =|1-L|$ for every $x$ with $0<|x|<\delta$ . But, for every $\delta >0$ , there exists some (possibly very large) $n$ such that $0<x_{0}={\frac {1}{{\frac {\pi }{2}}+2\pi n}}<\delta$ , but $\left|\sin \left({\tfrac {1}{x_{0}}}\right)-L\right|=|1-L|$ , a contradiction.

### Example 5

What is the limit of $x\sin \left({\tfrac {1}{x}}\right)$ 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 $\left|x\sin \left({\tfrac {1}{x}}\right)-0\right|\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}{\bigf(x)+g(x){\big ]}$ ?
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<|x-a|<\delta _{1}$ , ${\Big |}f(x)-L{\Big |}<{\frac {\varepsilon }{2}}$ (since the definition of limit says "for any $\varepsilon$", so it must be true for ${\frac {\varepsilon }{2}}$ as well). Similarly, there's a $\delta _{2}$ such that, for any $x$ with $0<|x-a|<\delta _{2}$ , ${\Big |}g(x)-M{\Big |}<{\frac {\varepsilon }{2}}$ . We can set $\delta$ to be the lesser of $\delta _{1}$ and $\delta _{2}$ . Then, for any $x$ with $0<|x-a|<\delta$ , ${\bigg |}{\bigf(x)+g(x){\big )}-(L+M){\bigg |}\leq {\Big |}f(x)-L{\Big |}+{\Big |}g(x)-M{\Big |}<{\frac {\varepsilon }{2}}+{\frac {\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

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<|x-c|<\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<|x-c|<\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$ .
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>2.6 Proofs of Some Basic Limit Rules</h1>
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.
If $a,b$ are constants then $\lim _{x\to a}b=b$ .

### Proof of the Constant Rule for Limits

We need to find a $\delta >0$ such that for every $\varepsilon >0$ , $|b-b|<\varepsilon$ whenever $0<|x-a|<\delta$ . $|b-b|=0$ and $\varepsilon >0$ , so $|b-b|<\varepsilon$ is satisfied independent of any value of $\delta$ ; that is, we can choose any $\delta$ we like and the $\varepsilon$ condition holds.
If $a$ is a constant then $\lim _{x\to a}x=a$ .

### Proof

To prove that $\lim _{x\to a}x=a$ , we need to find a $\delta >0$ such that for every $\varepsilon >0$ , $|x-a|<\varepsilon$ whenever $0<|x-a|<\delta$ . Choosing $\delta =\varepsilon$ satisfies this condition.
Suppose that $\lim _{x\to a}f(x)=L$ for finite $L$ and that $c$ is constant. Then $\lim _{x\to a}c\cdot f(x)=c\cdot \lim _{x\to a}f(x)=c\cdot L$

### Proof

Given the limit above, there exists in particular a $\delta >0$ such that ${\Big |}f(x)-L{\Big |}<{\frac {\varepsilon }{k}}$ whenever $0<|x-a|<\delta$ , for some $k>0$ such that $|c|<k$ . Hence
    ${\Big |}c\cdot f(x)-c\cdot L{\Big |}=|c|\cdot {\Big |}f(x)-L{\Big |}<k\cdot {\frac {\varepsilon }{k}}=\varepsilon$
Suppose that $\lim _{x\to c}f(x)=L$ and $\lim _{x\to c}g(x)=M$ . Then
    $\lim _{x\to c}{\Bigf(x)+g(x){\Big ]}=\lim _{x\to c}f(x)+\lim _{x\to c}g(x)=L+M$

### Proof

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$ , ${\Big |}f(x)-L{\Big |}<\varepsilon$ whenever $|x-c|<\delta _{f}(\varepsilon )$ , and ${\Big |}g(x)-M{\Big |}<\varepsilon$ whenever $|x-c|<\delta _{g}(\varepsilon )$ . Adding the two inequalities gives ${\Big |}f(x)-L{\Big |}+{\big |}g(x)-M{\big |}<2\varepsilon$ . By the triangle inequality we have ${\bigg |}(f(x)-L)+(g(x)-M){\bigg |}={\bigg |}(f(x)+g(x))-(L+M){\bigg |}\leq {\Big |}f(x)-L{\Big |}+{\Big |}g(x)-M{\Big |}$ , so we have ${\bigg |}(f(x)+g(x))-(L+M){\bigg |}<2\varepsilon$ whenever $|x-c|<\delta _{f}(\varepsilon )$ and $|x-c|<\delta _{g}(\varepsilon )$ . Let $\delta _{fg}(\varepsilon )$ be the smaller of $\delta _{f}({\tfrac {\varepsilon }{2}})$ and $\delta _{g}({\tfrac {\varepsilon }{2}})$ . Then this $\delta$ satisfies the definition of a limit for $\lim _{x\to c}{\Bigf(x)+g(x){\Big ]}$ having limit $L+M$ .
Suppose that $\lim _{x\to c}f(x)=L$ and $\lim _{x\to c}g(x)=M$ . Then
    $\lim _{x\to c}{\Bigf(x)-g(x){\Big ]}=\lim _{x\to c}f(x)-\lim _{x\to c}g(x)=L-M$

### Proof

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}{\Bigf(x)-g(x){\Big ]}=\lim _{x\to c}{\Bigf(x)+h(x){\Big ]}=L-M$ .
Suppose that $\lim _{x\to c}f(x)=L$ and $\lim _{x\to c}g(x)=M$ . Then $\lim _{x\to c}{\Bigf(x)\cdot g(x){\Big ]}=\lim _{x\to c}f(x)\cdot \lim _{x\to c}g(x)=L\cdot M$

### Proof

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 {\Big |}f(x)-L{\Big |}<{\frac {\varepsilon }{2(1+|M|)}}$ when $0<|x-c|<\delta _{1}$
    $(2)\qquad {\Big |}g(x)-M{\Big |}<{\frac {\varepsilon }{2(1+|L|)}}$ when $0<|x-c|<\delta _{2}$
    $(3)\qquad {\Big |}g(x)-M{\Big |}<1$ when $0<|x-c|<\delta _{3}$
According to the condition (3) we see that
    ${\Big |}g(x){\Big |}={\bigg |}g(x)-M+M{\bigg |}\leq {\Big |}g(x)-M{\Big |}+|M|<1+|M|$ when $0<|x-c|<\delta _{3}$
Supposing then that $0<|x-c|<\min\{\delta _{1},\delta _{2},\delta _{3}\}$ and using (1) and (2) we obtain
    ${\begin{aligned}{\bigg |}f(x)g(x)-LM{\bigg |}&={\bigg |}f(x)g(x)-Lg(x)+Lg(x)-LM{\bigg |}\\&\leq {\bigg |}f(x)g(x)-Lg(x){\bigg |}+{\bigg |}Lg(x)-LM{\bigg |}\\&={\Big |}g(x){\Big |}\cdot {\Big |}f(x)-L{\Big |}+|L|\cdot {\Big |}g(x)-M{\Big |}\\&<(1+|M|){\frac {\varepsilon }{2(1+|M|)}}+(1+|L|){\frac {\varepsilon }{2(1+|L|)}}\\&=\varepsilon \end{aligned}}$
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 \limits _{x\to c}f(x)}{\lim \limits _{x\to c}g(x)}}={\frac {L}{M}}$

### Proof

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 {\Big |}g(x)-M{\Big |}<{\frac {\varepsilon |M|^{2}}{2}}$ when $0<|x-c|<\delta _{1}$
    $(2)\qquad {\Big |}g(x)-M{\Big |}<{\frac {|M|}{2}}$ when $0<|x-c|<\delta _{2}$
According to the condition (2) we see that
    $|M|=|M-g(x)+g(x)|\leq |M-g(x)|+|g(x)|<{\frac {|M|}{2}}+|g(x)|$ so $|g(x)|>{\frac {|M|}{2}}$ when $0<|x-c|<\delta _{2}$
which implies that
    $(3)\qquad \left|{\frac {1}{g(x)}}\right|<{\frac {2}{|M|}}$ when $0<|x-c|<\delta _{2}$
Supposing then that $0<|x-c|<\min\{\delta _{1},\delta _{2}\}$ and using (1) and (3) we obtain
    ${\begin{aligned}\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 {1}{M}}\right|\cdot |g(x)-M|\\&<{\frac {2}{|M|}}\cdot {\frac {1}{|M|}}\cdot |g(x)-M|\\&<{\frac {2}{|M|}}\cdot {\frac {1}{|M|}}\cdot {\frac {\varepsilon |M|^{2}}{2}}\\&=\varepsilon \end{aligned}}$
Suppose that $g(x)\leq f(x)\leq 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

From the assumptions, we know that there exists a $\delta$ such that ${\Big |}g(x)-L{\Big |}<\varepsilon$ and ${\Big |}h(x)-L{\Big |}<\varepsilon$ when $0<|x-c|<\delta$ . These inequalities are equivalent to $L-\varepsilon <g(x)<L+\varepsilon$ and $L-\varepsilon <h(x)<L+\varepsilon$ when $0<|x-c|<\delta$. Using what we know about the relative ordering of $f(x),g(x)$ , and $h(x)$ , we have $L-\varepsilon <g(x)\leq f(x)\leq h(x)<L+\varepsilon$ when $0<|x-c|<\delta$ . Then $-\varepsilon <f(x)-L<\varepsilon$ when $0<|x-c|<\delta$ . So ${\Big |}f(x)-L{\Big |}<\varepsilon$ when $0<|x-c|<\delta$ .
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>2.7 Limits Cumulative Exercises</h1>

## Basic Limit Exercises

$\lim _{x\to 2}{\Big4x^{2}-3x-1{\Big ]}$
$9$
$9$
$\lim _{x\to 5}{\Bigx^{2}{\Big ]}$
$25$
$25$
$\lim _{x\to {\frac {\pi }{4}}}{\Big\cos ^{2}(x){\Big ]}$
$1/2$
$1/2$
$\lim _{x\to 1}{\Big5e^{x-1}-5{\Big ]}$
$0$
$0$
Solutions

## One-Sided Limits

Evaluate the following limits or state that the limit does not exist.
$\lim _{x\to 0^{-}}{\frac {x^{3}+x^{2}}{x^{3}+2x^{2}}}$
${\frac {1}{2}}$
${\frac {1}{2}}$
$\lim _{x\to 7^{-}}{\Big|x^{2}+x|-x{\Big ]}$
$49$
$49$
$\lim _{x\to -1^{+}}{\sqrt {1-x^{2}}}$
$0$
$0$
$\lim _{x\to -1^{-}}{\sqrt {1-x^{2}}}$
$\lim _{x\to 0^{-}}{\frac {|x|}{x}}$
$-1$
$-1$
$\lim _{x\to 1^{-}}\arcsin(x)$
${\frac {\pi }{2}}$
${\frac {\pi }{2}}$
Solutions

## Two-Sided Limits

Evaluate the following limits or state that the limit does not exist.
$\lim _{x\to -1}{\frac {1}{x-1}}$
$-{\frac {1}{2}}$
$-{\frac {1}{2}}$
$\lim _{x\to 4}{\frac {1}{x-4}}$
$\lim _{x\to 2}{\frac {1}{x-2}}$
$\lim _{x\to -3}{\frac {x^{2}-9}{x+3}}$
$-6$
$-6$
$\lim _{x\to 3}{\frac {x^{2}-9}{x-3}}$
$6$
$6$
$\lim _{x\to -1}{\frac {x^{2}+2x+1}{x+1}}$
$0$
$0$
$\lim _{x\to -1}{\frac {x^{3}+1}{x+1}}$
$3$
$3$
$\lim _{x\to 4}{\frac {x^{2}+5x-36}{x^{2}-16}}$
${\frac {13}{8}}$
${\frac {13}{8}}$
$\lim _{x\to 25}{\frac {x-25}{{\sqrt {x}}-5}}$
$10$
$10$
$\lim _{x\to 0}{\frac {|x|}{x}}$
$\lim _{x\to 2}{\frac {1}{(x-2)^{2}}}$
$\infty$
$\infty$
$\lim _{x\to 3}{\frac {\sqrt {x^{2}+16}}{x-3}}$
$\lim _{x\to -2}{\frac {3x^{2}-8x-3}{2x^{2}-18}}$
$-{\frac {5}{2}}$
$-{\frac {5}{2}}$
$\lim _{x\to 2}{\frac {x^{2}+2x+1}{x^{2}-2x+1}}$
$9$
$9$
$\lim _{x\to 3}{\frac {x+3}{x^{2}-9}}$
$\lim _{x\to -1}{\frac {x+1}{x^{2}+x}}$
$-1$
$-1$
$\lim _{x\to 1}{\frac {1}{x^{2}+1}}$
${\frac {1}{2}}$
${\frac {1}{2}}$
$\lim _{x\to 1}\left[x^{2}+5x-{\frac {1}{2-x}}\right]$
$5$
$5$
$\lim _{x\to 0}{\frac {x^{2}}{x^{2}+2x-3}}$
$0$
$0$
$\lim _{x\to 1}{\frac {x^{2}-1}{x^{2}+2x-3}}$
${\frac {1}{2}}$
${\frac {1}{2}}$
$\lim _{x\to 1}{\frac {5x}{x^{2}+2x-3}}$
$\lim _{x\to -1}\ln({\sqrt {x^{2}-1}})$
$\lim _{x\to 1}\arcsin(x)$
Solutions

## Limits to Infinity

Evaluate the following limits or state that the limit does not exist.
$\lim _{x\to \infty }{\frac {-x+\pi }{x^{2}+3x+2}}$
$0$
$0$
$\lim _{x\to -\infty }{\frac {x^{2}+2x+1}{3x^{2}+1}}$
${\frac {1}{3}}$
${\frac {1}{3}}$
$\lim _{x\to -\infty }{\frac {3x^{2}+x}{2x^{2}-15}}$
${\frac {3}{2}}$
${\frac {3}{2}}$
$\lim _{x\to -\infty }{\Big3x^{2}-2x+1{\Big ]}$
$\infty$
$\infty$
$\lim _{x\to \infty }{\frac {2x^{2}-32}{x^{3}-64}}$
$0$
$0$
$\lim _{x\to \infty }6$
$6$
$6$
$\lim _{x\to \infty }{\frac {3x^{2}+4x}{x^{4}+2}}$
$0$
$0$
$\lim _{x\to -\infty }{\frac {2x+3x^{2}+1}{2x^{2}+3}}$
${\frac {3}{2}}$
${\frac {3}{2}}$
$\lim _{x\to -\infty }{\frac {x^{3}-3x^{2}+1}{3x^{2}+x+5}}$
$-\infty$
$-\infty$
$\lim _{x\to \infty }{\frac {x^{2}+2}{x^{3}-2}}$
$0$
$0$
$\lim _{x\to \infty }{\frac {\sin \left({\frac {1}{x}}\right)}{x}}$
$0$
$0$
$\lim _{x\to -\infty }x^{2}\cos \left({\frac {1}{x}}\right)$
$\infty$
$\infty$
$\lim _{x\to \infty }{\frac {\sin(\arctan(x))}{\arctan(-x)}}$
$-{\frac {2}{\pi }}$
$-{\frac {2}{\pi }}$
Solutions

## Limits of Piecewise Functions

Evaluate the following limits or state that the limit does not exist.
48. Consider the function
    $f(x)={\begin{cases}(x-2)^{2}&{\text{if }}x<2\\x-3&{\text{if }}x\geq 2\end{cases}}$
$\lim _{x\to 2^{-}}f(x)$
$0$
$0$
$\lim _{x\to 2^{+}}f(x)$
$-1$
$-1$
$\lim _{x\to 2}f(x)$
49. Consider the function
    $g(x)={\begin{cases}-2x+1&{\text{if }}x\leq 0\\x+1&{\text{if }}0<x<4\\x^{2}+2&{\text{if }}x\geq 4\end{cases}}$
$\lim _{x\to 4^{+}}g(x)$
$18$
$18$
$\lim _{x\to 4^{-}}g(x)$
$5$
$5$
$\lim _{x\to 0^{+}}g(x)$
$1$
$1$
$\lim _{x\to 0^{-}}g(x)$
$1$
$1$
$\lim _{x\to 0}g(x)$
$1$
$1$
$\lim _{x\to 1}g(x)$
$2$
$2$
50. Consider the function
    $h(x)={\begin{cases}2x-3&{\text{if }}x<2\\8&{\text{if }}x=2\\-x+3&{\text{if }}x>2\end{cases}}$
$\lim _{x\to 0}h(x)$
$-3$
$-3$
$\lim _{x\to 2^{-}}h(x)$
$1$
$1$
$\lim _{x\to 2^{+}}h(x)$
$1$
$1$
$\lim _{x\to 2}h(x)$
$1$
$1$
Solutions

## Intermediate Value Theorem

$f(x)=3$
$f(x)={\sqrt {x}}+{\frac {1}{\sqrt {x}}}$
$1\leq x\leq 9$
$f(x)$
$x\in \left[1,9\right]$
$y\in \left[2,{\frac {10}{3}}\right]$
$c\in (1,9)$
$f(c)=3$
$\blacksquare$
$f(x)$
$x\in \left[1,9\right]$
$y\in \left[2,{\frac {10}{3}}\right]$
$c\in (1,9)$
$f(c)=3$
$\blacksquare$
$x=\mu$
$f(\mu )={\frac {\pi }{4}}$
$f(x)={\frac {\sin(x)-\cos(x)}{\ln {x}}}$
$\pi \leq x\leq {\frac {9}{4}}\pi$
$f(x)$
$x\in \left[\pi ,{\frac {9}{4}}\pi \right]$
    $f(\pi )={\frac {1}{\ln(\pi )}}$
    $f\left({\frac {9}{4}}\pi \right)=0$
It is known the following is true: $1\geq {\frac {\pi }{4}}\geq 0$. From there, we can directly argue the following:
    ${\begin{aligned}{\frac {1}{\ln(\pi )}}\geq 1&\Rightarrow {\frac {1}{\ln(\pi )}}\geq 1\geq {\frac {\pi }{4}}\geq 0\\&\Rightarrow {\frac {1}{\ln(\pi )}}\geq {\frac {\pi }{4}}\geq 0\end{aligned}}$
$f(x)$
$x\in \left[\pi ,{\frac {9}{4}}\pi \right]$
$x=\mu$
$f\left({\frac {9}{4}}\pi \right)\leq f(\mu )\leq f(\pi )$
$\mu \in \left[\pi ,{\frac {9}{4}}\pi \right]$
$\blacksquare$
$f(x)$
$x\in \left[\pi ,{\frac {9}{4}}\pi \right]$
    $f(\pi )={\frac {1}{\ln(\pi )}}$
    $f\left({\frac {9}{4}}\pi \right)=0$
It is known the following is true: $1\geq {\frac {\pi }{4}}\geq 0$. From there, we can directly argue the following:
    ${\begin{aligned}{\frac {1}{\ln(\pi )}}\geq 1&\Rightarrow {\frac {1}{\ln(\pi )}}\geq 1\geq {\frac {\pi }{4}}\geq 0\\&\Rightarrow {\frac {1}{\ln(\pi )}}\geq {\frac {\pi }{4}}\geq 0\end{aligned}}$
$f(x)$
$x\in \left[\pi ,{\frac {9}{4}}\pi \right]$
$x=\mu$
$f\left({\frac {9}{4}}\pi \right)\leq f(\mu )\leq f(\pi )$
$\mu \in \left[\pi ,{\frac {9}{4}}\pi \right]$
$\blacksquare$
$x=\Gamma$
$f(\Gamma )=2$
$f(x)={\sqrt {-2x+4}}+5\ln \left(x^{2}\right)$
$-1\leq x\leq 1$
$f(x)$
$x=0$
$\lim _{x\to 0}f(x)$
$f(x)$
$x=0$
$\lim _{x\to 0}f(x)$
Solutions

## External Links

* Limits 1 exercise at Khan Academy
* Limits 2 exercise at Khan Academy
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Basics of Differentiation

<h1>3.1 Differentiation Defined</h1>

## What is Differentiation?

Differentiation is a process of finding 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 ${\frac {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=mx+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.

### The Slope of a Line

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:
    ${\rm {Slope}}={\frac {\Delta y}{\Delta x}}$
An example may make this definition clearer. If we have two points on a line, $P(x_{1},y_{1})$ and $Q(x_{2},y_{2})$ , 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:
    ${\rm {Slope}}=\tan(\alpha )$
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 0. Consider the following four curves and lines:
| (i) | (ii) |
| (iii) | (iv) |
* The line $L$ crosses, but is not tangent to $C$ at $P$ .
* The line $L$ crosses, and is tangent to $C$ at $P$ .
* The line $L$ crosses $C$ at two points, but is tangent to $C$ only at $P$ .
* 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.
As the distance $h$ tends to 0, the secant line becomes the tangent at the point $x_{0}$ . The two points we draw our line through are:
    $P(x_{0},f(x_{0}))$
and
    $Q(x_{0}+h,f(x_{0}+h))$
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(x_{0}+h)-f(x_{0})}{(x_{0}+h)-x_{0}}}$
This simplifies to
    $m_{h}={\frac {f(x_{0}+h)-f(x_{0})}{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 0 as this would imply division of 0 by 0 which would yield an undefined result. Instead we must find the limit of the above expression as $h$ tends to 0:
The slope of the graph of $f(x)$ at the point $(x_{0},f(x_{0}))$ is
    $\lim _{h\to 0}\left[{\frac {f(x_{0}+h)-f(x_{0})}{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

$y=x^{2}$
$(1,1)$
$2$
$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)]$ ,
* $Df(x)$ ,
* ${\frac {dy}{dx}}$ for the derivative of $y$ as a function of $x$ or
* ${\frac {d}{dx}}{\bigy{\big ]}$ , 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(f\cdot g)$ , 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:
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)={\frac {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)=|x|$ (the absolute value function) then $f'(x)={\frac {x}{|x|}}$ , which can also be stated as
    $f'(x)=\left\{{\begin{matrix}-1&x<0\\{\rm {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 {|\Delta x|}{\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

$f(x)=2x+3$
$2$
$2$
$f(x)=x^{3}$
$f(x)=x^{4}$
$f(x)=x^{n}$
$n$
${\frac {d(x^{3})}{dx}}=3x^{2}\qquad {\frac {d(x^{4})}{dx}}=4x^{3}$
${\frac {d(x^{3})}{dx}}=3x^{2}\qquad {\frac {d(x^{4})}{dx}}=4x^{3}$
$|x|$
$x=0$
${\begin{alignedat}{2}\lim _{\Delta x\to 0^{-}}{\frac {|0+\Delta x|-|0|}{\Delta x}}&=\lim _{\Delta x\to 0^{-}}{\frac {-\Delta x}{\Delta x}}&\qquad \lim _{\Delta x\to 0^{+}}{\frac {|0+\Delta x|-|0|}{\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{alignedat}}$
$x=0$
$|x|$
$x=0$
${\begin{alignedat}{2}\lim _{\Delta x\to 0^{-}}{\frac {|0+\Delta x|-|0|}{\Delta x}}&=\lim _{\Delta x\to 0^{-}}{\frac {-\Delta x}{\Delta x}}&\qquad \lim _{\Delta x\to 0^{+}}{\frac {|0+\Delta x|-|0|}{\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{alignedat}}$
$x=0$
$|x|$
$x=0$
$y=4x^{2}$
${\frac {dy}{dx}}$
${\frac {dy}{dx}}$
$\sin(x)$
$\cos(x)$
$\lim _{t\to 0}{\frac {\sin(t)}{t}}=1$
$\lim _{t\to 0}{\frac {\cos(t)-1}{t}}=0$
${\begin{aligned}\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{aligned}}$
${\begin{aligned}\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{aligned}}$
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}}[c]=0$

#### Intuition

The graph of the function $f(x)=c$ is a horizontal line, which has a constant slope of 0. 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}}[c]=\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$ , ${\Big |}g(\Delta x)-0{\Big |}<\varepsilon$ whenever $0<|\Delta x-0|<\delta$ . But ${\Big |}g(\Delta x)-0{\Big |}=0$ , so ${\Big |}g(\Delta x)-0{\Big |}<\varepsilon$ for any choice of $\delta$ .

#### Examples

* ${\frac {d}{dx}}[3]=0$
* ${\frac {d}{dx}}[z]=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}}[mx+c]=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}}{\bigc\cdot f(x){\big ]}=c\cdot {\frac {d}{dx}}{\bigf(x){\big ]}$
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}}{\bigx^{2}{\big ]}=2x$
Suppose we want to find the derivative of $3x^{2}$
    ${\frac {d}{dx}}{\big3x^{2}{\big ]}$ $=3{\frac {d}{dx}}{\bigx^{2}{\big ]}$ $=3\cdot 2x$ $=6x$
Another simple rule for breaking up functions is the addition rule.

#### The Addition and Subtraction Rules

${\frac {d}{dx}}{\bigf(x)\pm g(x){\big ]}={\frac {d}{dx}}{\bigf(x){\big ]}\pm {\frac {d}{dx}}{\bigg(x){\big ]}$
Proof
From the definition:
    $\lim _{\Delta x\to 0}\left[{\frac {{\bigf(x+\Delta x)\pm g(x+\Delta x){\big ]}-{\bigf(x)\pm g(x){\big ]}}{\Delta x}}\right]$ $=\lim _{\Delta x\to 0}\left[{\frac {{\bigf(x+\Delta x)-f(x){\big ]}\pm {\bigg(x+\Delta x)-g(x){\big ]}}{\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}}{\big3x^{2}+5x{\big ]}$ $={\frac {d}{dx}}{\big3x^{2}+5x{\big ]}$ $={\frac {d}{dx}}{\big3x^{2}{\big ]}+{\frac {d}{dx}}{\big5x{\big ]}$ $=6x+{\frac {d}{dx}}{\big5x{\big ]}$ $=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}}{\bigx^{n}{\big ]}=nx^{n-1}$
This has been proved in an example in Derivatives of Exponential and Logarithm Functions where it can be best understood.
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 ${\frac {dx}{dx}}={\frac {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}}{\big{\sqrt {x}}{\big ]}$ $={\frac {d}{dx}}{\bigx^{\frac {1}{2}}{\big ]}$ $={\frac {1}{2}}x^{-{\frac {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}}{\big6x^{5}+3x^{2}+3x+1{\big ]}$
The first thing we can do is to use the addition rule to split the equation up into terms:
    ${\frac {d}{dx}}{\big6x^{5}{\big ]}+{\frac {d}{dx}}{\big3x^{2}{\big ]}+{\frac {d}{dx}}{\big3x{\big ]}+{\frac {d}{dx}}[1]$
We can immediately use the linear and constant rules to get rid of some terms:
    ${\frac {d}{dx}}{\big6x^{5}{\big ]}+{\frac {d}{dx}}{\big3x^{2}{\big ]}+3+0$
Now you may use the constant multiplier rule to move the constants outside the derivatives:
    $6{\frac {d}{dx}}{\bigx^{5}{\big ]}+3{\frac {d}{dx}}{\bigx^{2}{\big ]}+3$
Then use the power rule to work with the individual monomials:
    $6(5x^{4})+3(2x)+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:
$f(x)=42$
$f'(x)=0$
$f'(x)=0$
$f(x)=6x+10$
$f'(x)=6$
$f'(x)=6$
$f(x)=2x^{2}+12x+3$
$f'(x)=4x+12$
$f'(x)=4x+12$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.2 Product and Quotient Rules</h1>

## Product Rule

When we wish to differentiate a more complicated expression such as
    $h(x)=(x^{2}+5x+7)(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}}{\Bigf(x)\cdot g(x){\Big ]}=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 $f(x)=x^{2}\sin(x)$ . By using the product rule, one gets the derivative $f'(x)=2x\sin(x)+x^{2}\cos(x)$ (since ${\frac {d}{dx}}(x^{2})=2x$ and ${\frac {d}{dx}}(\sin(x))=\cos(x)$).
* One special case of the product rule is the constant multiple rule, which states: if $c$ is a real number and $f(x)$ is a differentiable function, then $c\cdot f(x)$ is also differentiable, and its derivative is $(c\cdot f)'(x)=c\cdot f'(x)$ . This follows from the product rule since the derivative of any constant is 0. This, combined with the sum rule for derivatives, shows that differentiation is linear.

#### Physics Example I: 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}}=-{\frac {d\Phi _{B}}{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{aligned}{\mathcal {E}}&=-{\frac {d}{dt}}{\bigB\cdot A\cdot \cos(\theta ){\big )}\\&=-{\frac {dB}{dt}}\cdot A\cos(\theta )-B\cdot {\frac {dA}{dt}}\cos(\theta )-B\cdot A{\frac {d}{dt}}\cos(\theta )\\\end{aligned}}$
In many cases of practical interest only one variable (A, B, or θ) is changing, so two of the three above terms are often 0.

#### Physics Example II: Kinematics

The position of a particle on a number line relative to a fixed point O is $4t^{3}\sin(t)\sec ^{2}(t)$ , where $t$ represents the time. What is its instantaneous velocity at $t=7$ relative to O? Distances are in meters and time in seconds.

##### Answer

Note: To solve this problem, we need some 'tools' from the next section.
We can simplify the function to $4t^{3}\tan(t)\sec(t)$ because ($\sin(t)\sec(t)=\tan(t)$)
    $v(t)={\frac {d}{dt}}{\Big4t^{3}\tan(t)\sec(t){\Big ]}=\tan(t)\sec(t)\cdot {\frac {d}{dt}}[4t^{3}]+4t^{3}\sec(t)\cdot {\frac {d}{dt}}[\tan(t)]+4t^{3}\tan(t)\cdot {\frac {d}{dt}}[\sec(t)]$
    $=12t^{2}\tan(t)\sec(t)+4t^{3}\sec ^{3}(t)+4t^{3}\tan ^{2}(t)\sec(t)$
Substituting $t=7$ into our velocity function:
    $v(7)=12(7)^{2}\tan(7)\sec(7)+4(7)^{3}\sec ^{3}(7)+4(7)^{3}\tan ^{2}(7)\sec(7)=1496.72\ {\frac {m}{s}}$ (to 2 decimal places).

### Proof of the Product Rule

Proving this rule is relatively straightforward; first let us state the equation for the derivative:
    ${\frac {d}{dx}}{\Bigf(x)\cdot g(x){\Big ]}=\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}}{\Bigf(x)\cdot g(x){\Big ]}=\lim _{h\to 0}{\frac {f(x+h)\cdot g(x+h)-{\color {blue}f(x+h)\cdot g(x)+f(x+h)\cdot g(x)}-f(x)\cdot g(x)}{h}}$
Notice that those terms sum to 0, 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}}{\Bigf(x)\cdot g(x){\Big ]}=\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:
    ${\begin{aligned}{\frac {d}{dx}}{\Bigf(x)\cdot g(x){\Big ]}&=\lim _{h\to 0}\left[f(x+h)\cdot {\frac {g(x+h)-g(x)}{h}}+g(x)\cdot {\frac {f(x+h)-f(x)}{h}}\right]\\&=\lim _{h\to 0}\left[f(x+h)\cdot {\frac {g(x+h)-g(x)}{h}}\right]+\lim _{h\to 0}\left[g(x)\cdot {\frac {f(x+h)-f(x)}{h}}\right]\\&=\lim _{h\to 0}f(x+h)\cdot \lim _{h\to 0}{\frac {g(x+h)-g(x)}{h}}+\lim _{h\to 0}g(x)\cdot \lim _{h\to 0}{\frac {f(x+h)-f(x)}{h}}\end{aligned}}$
Which, when we take the limit, becomes:
    ${\frac {d}{dx}}{\Bigf(x)\cdot g(x){\Big ]}=f(x)\cdot g'(x)+f'(x)\cdot g(x)$ , or the mnemonic "one D-two plus two D-one"
This can be extended to 3 functions:
    ${\frac {d}{dx}}[f\cdot g\cdot h]=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)(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)(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 phrase "First times the derivative of the second plus the second times the derivative of the first."

### Generalisation

Leibniz gave the following generalisation for the nth derivative of a product;
    $(f(x)g(x))^{(n)}=\sum _{i=0}^{n}\left({\begin{matrix}n\\i\end{matrix}}\right)f^{(n-i)}(x)g^{(i)}(x)$
Where $\left({\begin{matrix}n\\i\end{matrix}}\right)$ is the binomial coefficient, which may also be written as $n{\text{ choose }}i$ or $_{n}C_{i}$.

# Quotient Rule

There is a similar rule for quotients. To prove it, we go to the definition of the derivative:
    ${\begin{aligned}{\frac {d}{dx}}\left[{\frac {f(x)}{g(x)}}\right]&=\lim _{h\to 0}{\dfrac {{\dfrac {f(x+h)}{g(x+h)}}-{\dfrac {f(x)}{g(x)}}}{h}}\\\\&=\lim _{h\to 0}{\frac {f(x+h)\cdot g(x)-f(x)\cdot g(x+h)}{h\cdot g(x)\cdot g(x+h)}}\\\\&=\lim _{h\to 0}{\frac {f(x+h)\cdot g(x)-{\color {blue}f(x)\cdot g(x)+f(x)\cdot g(x)}-f(x)\cdot g(x+h)}{h\cdot g(x)\cdot g(x+h)}}\\\\&=\lim _{h\to 0}{\dfrac {g(x)\cdot {\dfrac {f(x+h)-f(x)}{h}}-f(x)\cdot {\dfrac {g(x+h)-g(x)}{h}}}{g(x)\cdot g(x+h)}}\\\\&={\dfrac {\lim \limits _{h\to 0}\left[g(x)\cdot {\dfrac {f(x+h)-f(x)}{h}}-f(x)\cdot {\dfrac {g(x+h)-g(x)}{h}}\right]}{\lim \limits _{h\to 0}{\Bigg(x)\cdot g(x+h){\Big ]}}}\\\\&={\dfrac {\lim \limits _{h\to 0}\left[g(x)\cdot {\dfrac {f(x+h)-f(x)}{h}}\right]-\lim \limits _{h\to 0}\left[f(x)\cdot {\dfrac {g(x+h)-g(x)}{h}}\right]}{\lim \limits _{h\to 0}{\Bigg(x)\cdot g(x+h){\Big ]}}}\\\\&={\dfrac {\lim \limits _{h\to 0}g(x)\cdot \lim \limits _{h\to 0}{\dfrac {f(x+h)-f(x)}{h}}-\lim \limits _{h\to 0}f(x)\cdot \lim \limits _{h\to 0}{\dfrac {g(x+h)-g(x)}{h}}}{\lim \limits _{h\to 0}g(x)\cdot \lim \limits _{h\to 0}g(x+h)}}\\\\&={\frac {f'(x)g(x)-f(x)g'(x)}{g(x)^{2}}}\end{aligned}}$
This leads us to the so-called "quotient rule":
* Derivatives of quotients (Quotient Rule)
* ${\frac {d}{dx}}\left[{\frac {f(x)}{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, square the bottom and away we go!"

### Examples

The derivative of ${\frac {4x-2}{x^{2}+1}}$ is:
    ${\begin{aligned}{\frac {d}{dx}}\left[{\frac {4x-2}{x^{2}+1}}\right]&={\frac {(4)(x^{2}+1)-(2x)(4x-2)}{(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{aligned}}$
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}}{\big(a+b)\times (c+d){\big )}={\frac {d}{dx}}(ac+ad+bc+bd)$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

## References

<h1>3.3 Derivatives of Trigonometric Functions</h1>
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}{\frac {\sin(x+h)-\sin(x)}{h}}$ | Definition of derivative |
| $=\lim _{h\to 0}{\frac {\cos(x)\sin(h)+\cos(h)\sin(x)-\sin(x)}{h}}$ | trigonometric identity |
| $=\lim _{h\to 0}{\frac {\cos(x)\sin(h)+(\cos(h)-1)\sin(x)}{h}}$ | factoring |
| $=\lim _{h\to 0}{\frac {\cos(x)\sin(h)}{h}}+\lim _{h\to 0}{\frac {(\cos(h)-1)\sin(x)}{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}{\frac {\cos(x+h)-\cos(x)}{h}}$ | Definition of derivative |
| $=\lim _{h\to 0}{\frac {\cos(x)\cos(h)-\sin(h)\sin(x)-\cos(x)}{h}}$ | trigonometric identity |
| $=\lim _{h\to 0}{\frac {\cos(x)(\cos(h)-1)-\sin(x)\sin(h)}{h}}$ | factoring |
| $=\lim _{h\to 0}{\frac {\cos(x)(\cos(h)-1)}{h}}-\lim _{h\to 0}{\frac {\sin(x)\sin(h)}{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{aligned}{\frac {d}{dx}}\sec(x)&={\frac {d}{dx}}{\frac {1}{\cos(x)}}\\&={\frac {\cos(x){\frac {d1}{dx}}-1{\frac {d\cos(x)}{dx}}}{\cos(x)^{2}}}\\&={\frac {\cos(x)0-1(-\sin(x))}{\cos(x)^{2}}}\end{aligned}}$
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)$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.4 Chain Rule</h1>
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{\biglu(x){\bigr )}$ , 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{\biglu(x){\bigr )}$ , 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. 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{\biglg(h(x)){\bigr )}$
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{\frac {km}{h}}$ . The temperature is lower at higher elevations; suppose the rate by which it decreases is $6^{\circ }C$ per kilometer. To calculate the decrease in air temperature per hour that the climber experiences, one multiplies ${\frac {6^{\circ }C}{km}}$ by $0.5{\frac {km}{h}}$ , to obtain ${\frac {3^{\circ }C}{h}}$ . This calculation is a typical chain rule application.

### Example II

Consider the function $f(x)=(x^{2}+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})\cdot 2x$ | Substitute $u$ in terms of $x$ . |

### Example IV: absolute value

The chain rule can be used to differentiate $|x|$ , the absolute value function:
| $f(x)=|x|$ | 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 {u^{-{\frac {1}{2}}}}{2}}\cdot 2x$ | Compute derivatives with power rule |
| ${\frac {df}{dx}}={\frac {(x^{2})^{-{\frac {1}{2}}}}{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}{|x|}}$ | 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{\biglg(h(x)){\bigr )}=e^{\sin(x^{2})}$ , sequential application of the chain rule yields the derivative as follows (we make use of the fact that ${\frac {d}{dx}}e^{x}=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) |
| ${\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

For example, one can consider the kinematics problem where one vehicle is heading west toward an intersection at 80mph while another is heading north away from the intersection at 60mph. 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

* Choose coordinate system
* Identify variables
* Draw picture
* Big idea: use chain rule to compute rate of change of distance between two vehicles
* Express $c$ in terms of $x$ and $y$ via Pythagorean theorem
* Express ${\frac {dc}{dt}}$ using chain rule in terms of ${\frac {dx}{dt}}$ and ${\frac {dy}{dt}}$
* Substitute in $x,y,{\frac {dx}{dt}},{\frac {dy}{dt}}$
* 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})^{\frac {1}{2}}$
Express ${\frac {dc}{dt}}$ using chain rule in terms of ${\frac {dx}{dt}}$ and ${\frac {dy}{dt}}$ :
| ${\frac {dc}{dt}}={\frac {d}{dt}}(x^{2}+y^{2})^{\frac {1}{2}}$ | Apply derivative operator to entire function |
| $={\frac {(x^{2}+y^{2})^{-{\frac {1}{2}}}}{2}}{\frac {d}{dt}}(x^{2}+y^{2})$ | Sum of squares is inside function |
| $={\frac {(x^{2}+y^{2})^{-{\frac {1}{2}}}}{2}}\left[{\frac {d}{dt}}(x^{2})+{\frac {d}{dt}}(y^{2})\right]$ | Distribute differentiation operator |
| $={\frac {(x^{2}+y^{2})^{-{\frac {1}{2}}}}{2}}\left[2x\cdot {\frac {dx}{dt}}+2y\cdot {\frac {dy}{dt}}\right]$ | Apply chain rule to $x(t)$ and $y(t)$ |
| $={\frac {x\cdot {\frac {dx}{dt}}+y\cdot {\frac {dy}{dt}}}{\sqrt {x^{2}+y^{2}}}}$ | Simplify. |
Substitute in $x=4\ mi\ ,\ y=3\ mi\ ,\ {\frac {dx}{dt}}=-80\ {\frac {mi}{h}}\ ,\ {\frac {dy}{dt}}=60\ {\frac {mi}{h}}$ and simplify
    ${\frac {dc}{dt}}$ $={\frac {4\ mi\cdot \left(-80\ {\frac {mi}{h}}\right)+3\ mi\cdot \left(60\ {\frac {mi}{h}}\right)}{\sqrt {(4\ mi)^{2}+(3\ mi)^{2}}}}$ $={\frac {-320\ {\frac {mi^{2}}{h}}+180\ {\frac {mi^{2}}{h}}}{\sqrt {25\ mi}}}$ $={\frac {-140\ {\frac {mi^{2}}{h}}}{5\ mi}}$ $=-28\ {\frac {mi}{h}}$
Consequently, the two vehicles are getting closer together at a rate of $=28\ {\frac {mi}{h}}$ .

### Physics Example II: 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 $\omega ={\frac {2\pi }{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{\bigl-\sin(\omega t){\bigr )}\cdot {\frac {d}{dt}}(\omega t)$ | Differentiate outside function (cosine) |
| $=-A\sin(\omega t)\cdot {\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 ${\frac {dv}{dt}}$ .
| $a(t)={\frac {dv}{dt}}$ | Definition of acceleration in one dimension |
| $={\frac {d}{dt}}{\bigl-\omega A\sin(\omega t){\bigr )}$ | Substitute $v(t)$ |
| $=-\omega A\cdot {\frac {d}{dt}}\sin(\omega t)$ | Bring constant term outside of derivative |
| $=-\omega A\cos(\omega t)\cdot {\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, ${\vec {F}}=m{\vec {a}}$ , where ${\vec {F}}$ is the net force and $m$ is the object's mass.
| ${\vec {F}}=m{\vec {a}}$ | Newton's second law |
| $=m{\bigl-\omega ^{2}A\cos(\omega t){\bigr )}$ | Substitute $a(t)$ |
| $=-m\omega ^{2}A\cos(\omega t)$ | Simplify |
| ${\vec {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

Suppose a sample of $n$ moles of an ideal gas is held in an isothermal (constant temperature, $T$) chamber with initial volume $V_{0}$ . The ideal gas is compressed by a piston so that its volume changes at a constant rate so that $V(t)=V_{0}-kt$ , where $t$ is the time. The chain rule can be employed to find the time rate of change of the pressure. The ideal gas law can be solved for the pressure, $P$ to give:
    $P(t)={\frac {nRT}{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}}=nRT\cdot {\frac {d}{dt}}\left({\frac {1}{V(t)}}\right)$
where the constant terms $n,R,T$ have been moved to the left of the derivative operator. Applying the chain rule gives
    ${\frac {dP}{dt}}=nRT\cdot {\frac {d}{dV}}\left({\frac {1}{V(t)}}\right){\frac {dV}{dt}}=nRT\left(-{\frac {1}{V^{2}}}\right){\frac {dV}{dt}}$
where the power rule has been used to differentiate ${\frac {1}{V}}$ , Since $V(t)=V_{0}-kt$ , ${\frac {dV}{dt}}=-k$ . Substituting in for $V$ and ${\frac {dV}{dt}}$ yields ${\frac {dP}{dt}}$ .
    ${\frac {dP}{dt}}=-{\frac {nRTk}{(V_{0}-kt)^{2}}}$

### Chemistry Example II: Kinetic Theory of Gases

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=T_{0}+at$ , where $T_{0}$ is the initial temperature and $t$ is the time. 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)={\sqrt {\frac {3R\cdot T(t)}{M}}}$
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({\sqrt {\frac {3R\cdot T(t)}{M}}}\right)$
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({\sqrt {\frac {3RT}{M}}}\right)\cdot {\frac {dT}{dt}}$
Evaluating the derivative with respect to temperature, $T$ , yields
    ${\frac {dv}{dt}}={\frac {1}{2}}{\sqrt {\frac {M}{3RT}}}\cdot {\frac {d}{dT}}\left({\frac {3RT}{M}}\right)\cdot {\frac {dT}{dt}}$
Evaluating the remaining derivative with respect to $T$ , taking the reciprocal of the negative power, and substituting $T=T_{0}+at$ , produces
    ${\frac {dv}{dt}}={\frac {1}{2}}{\sqrt {\frac {M}{3R(T_{0}+at)}}}\cdot {\frac {3R}{M}}\cdot {\frac {d}{dt}}\left(T_{0}+at\right)$
Evaluating the derivative with respect to $t$ yields
    ${\frac {dv}{dt}}={\frac {1}{2}}{\sqrt {\frac {M}{3R(T_{0}+at)}}}\cdot {\frac {3R}{M}}a$
which simplifies to
    ${\frac {dv}{dt}}={\frac {a}{2}}{\sqrt {\frac {3R}{M(T_{0}+at)}}}$

## Proof of the chain rule

Suppose $y$ is a function of $u$ which is a function of $x$ (it is assumed that $y$ is differentiable at $u$ and $x$ , and $u$ is differentiable at $x$ . To prove the chain rule we use the definition of the derivative.
    ${\frac {dy}{dx}}=\lim _{\Delta x\to 0}{\frac {\Delta y}{\Delta x}}$
We now multiply ${\frac {\Delta y}{\Delta x}}$ by ${\frac {\Delta u}{\Delta u}}$ and perform some algebraic manipulation.
    $\lim _{\Delta x\to 0}{\frac {\Delta y}{\Delta x}}=\lim _{\Delta x\to 0}{\frac {\Delta y}{\Delta u}}\cdot {\frac {\Delta u}{\Delta x}}=\lim _{\Delta x\to 0}{\frac {\Delta y}{\Delta u}}\cdot \lim _{\Delta x\to 0}{\frac {\Delta u}{\Delta x}}=\lim _{\Delta x\to 0}{\frac {\Delta y}{\Delta u}}\cdot {\frac {du}{dx}}$
Note that as $\Delta x$ approaches $0$ , $\Delta u$ also approaches $0$ . So taking the limit as of a function as $\Delta x$ approaches $0$ is the same as taking its limit as $\Delta u$ approaches $0$ . Thus
    $\lim _{\Delta x\to 0}{\frac {\Delta y}{\Delta u}}=\lim _{\Delta u\to 0}{\frac {\Delta y}{\Delta u}}={\frac {dy}{du}}$
So we have
    ${\frac {dy}{dx}}={\frac {dy}{du}}\cdot {\frac {du}{dx}}$

## Exercises

$f'(x)$
$f(x)=(x^{2}+5)^{2}$
$f{\biglu(x){\bigr )}=u^{2}$
$u=x^{2}+5$
$4x^{3}+20x$
$4x^{3}+20x$
$y={\sqrt {1+x^{2}}}$
$y={\sqrt {u}}$
$u=1+x^{2}$
${\frac {x}{\sqrt {1+x^{2}}}}$
${\frac {x}{\sqrt {1+x^{2}}}}$
Solutions

## References

* ↑ http://www.math.brown.edu/help/derivtips.html
* ↑ The derivative of $e^{x}$ is $e^{x}$ ; see Calculus/Derivatives of Exponential and Logarithm Functions.
* 1 2 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

* http://calculusapplets.com/chainrule.html
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.5 Higher Order Derivatives</h1>
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'(x)$ , and its double (or "second") derivative is denoted by $f''(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'''(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 | $n$-th Derivative | Notes |
| $f''(x)$ | $f'''(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}}}[f(x)]$ | ${\frac {d^{3}}{dx^{3}}}[f(x)]$ | ${\frac {d^{4}}{dx^{4}}}[f(x)]$ | ${\frac {d^{n}}{dx^{n}}}[f(x)]$ | Another form of Leibniz notation |
| $D^{2}f$ | $D^{3}f$ | $D^{4}f$ | $D^{n}f$ | Euler's notation |
Warning: You should not write $f^{n}(x)$ to indicate the $n$-th 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 3rd 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.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>Failed to match page to section number. Check your argument; if correct, consider updating Template:Calculus/map page. Implicit Differentiation</h1>
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{\biglx,y(x){\bigr )}=g{\biglx,y(x){\bigr )}$ . 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}}{\biglf{\biglx,y(x){\bigr )}{\bigr ]}={\frac {d}{dx}}{\bigg{\biglx,y(x){\bigr )}{\big ]}$
and solve for ${\frac {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),g(x)$ and that we are interested in computing the derivative of the function $f{\biglg(x){\bigr )}$ , the chain rule states that:
    ${\frac {d}{dx}}{\biglf{\biglg(x){\bigr )}{\bigr ]}=f'{\biglg(x){\bigr )}\cdot 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 $y^{2}$ 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 $y^{2}$ is just the composition of $f(x)=x^{2}$ and $y(x)$ . That is, $f{\bigly(x){\bigr )}=y(x)^{2}$ . Recalling that $f'(x)=2x$ then the chain rule states that:
    ${\frac {d}{dx}}{\biglf{\bigly(x){\bigr )}{\bigr ]}=f'{\bigly(x){\bigr )}\cdot 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,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=\pm 1$ 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-x^{2})^{-{\frac {1}{2}}}\cdot (-2x)}{2}}=\mp {\frac {x}{\sqrt {1-x^{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))=y^{2}$), 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

    $xy=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 ${\frac {\mathrm {d} y}{\mathrm {d} x}}$ 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 {\mathrm {d} y}{\mathrm {d} x}}$
...and solve for ${\frac {\mathrm {d} y}{\mathrm {d} x}}$ :
    ${\frac {\mathrm {d} y}{\mathrm {d} x}}={\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)=x$ , the adjacent side is $\cos(y)={\sqrt {1-x^{2}}}$ , 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 {\mathrm {d} }{\mathrm {d} x}}\arcsin(x)={\frac {1}{\sqrt {1-x^{2}}}}$
We can use an identical procedure for the arccosine and arctangent:
* Derivative of the Arccosine
* ${\frac {\mathrm {d} }{\mathrm {d} x}}\arccos(x)={\frac {\mathrm {d} }{\mathrm {d} x}}\left({\frac {\pi }{2}}\right)-{\frac {\mathrm {d} }{\mathrm {d} x}}\arcsin(x)=-{\frac {1}{\sqrt {1-x^{2}}}}$
* Derivative of the Arctangent
* ${\frac {\mathrm {d} }{\mathrm {d} x}}\arctan(x)={\frac {1}{1+x^{2}}}$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.7 Derivatives of Exponential and Logarithm Functions</h1>

## Logarithm Function

We shall first look at the irrational number $e$ in order to show its special properties when used with derivatives of exponential and logarithm functions. As mentioned before in the Algebra section, the value of $e$ is approximately $e\approx 2.718282$ but it may also be calculated as the Infinite Limit:
$e=\lim _{n\to \infty }\left(1+{\frac {1}{n}}\right)^{n}$
Now we find the derivative of $\ln(x)$ using the formal definition of the derivative:
${\frac {d}{dx}}\ln(x)=\lim _{h\to 0}{\frac {\ln(x+h)-\ln(x)}{h}}=\lim _{h\to 0}{\frac {1}{h}}\ln \left({\frac {x+h}{x}}\right)=\lim _{h\to 0}\ln \left({\frac {x+h}{x}}\right)^{\frac {1}{h}}$
Let $n={\frac {x}{h}}$ . Note that as $n\to \infty$ , we get $h\to 0$ . So we can redefine our limit as:
$\lim _{n\to \infty }\ln \left(1+{\frac {1}{n}}\right)^{\frac {n}{x}}={\frac {1}{x}}\ln \left(\lim _{n\to \infty }\left(1+{\frac {1}{n}}\right)^{n}\right)={\frac {1}{x}}\ln(e)={\frac {1}{x}}$
Here we could take the natural logarithm outside the limit because it doesn't have anything to do with the limit (we could have chosen not to). We then substituted the value of $e$ .
* Derivative of the Natural Logarithm
* ${\frac {d}{dx}}\ln(x)={\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 _{a}(x)={\frac {\ln(x)}{\ln(a)}}$
Since ${\frac {1}{\ln(a)}}$ is a constant, we can just take it outside of the derivative:
    ${\frac {d}{dx}}\log _{a}(x)={\frac {1}{\ln(a)}}\cdot {\frac {d}{dx}}\ln(x)$
Which leaves us with the generalized form of:
* Derivative of the Logarithm
* ${\frac {d}{dx}}\log _{a}(x)={\frac {1}{\ln(a)x}}$
An alternative approach to derivative of the logarithm refers to the original expression of the logarithm as quadrature of the hyperbola y = 1/x . This approach is described in an extension of precalculus in § 1.8.

## Exponential Function

We shall take two different approaches to finding the derivative of $\ln(e^{x})$ . The first approach:
    ${\frac {d}{dx}}\ln(e^{x})={\frac {d}{dx}}x=1$
The second approach:
    ${\frac {d}{dx}}\ln(e^{x})={\frac {1}{e^{x}}}\left({\frac {d}{dx}}e^{x}\right)$
Note that in the second approach we made some use of the chain rule. Thus:
    ${\frac {1}{e^{x}}}\left({\frac {d}{dx}}e^{x}\right)=1$
    ${\frac {d}{dx}}e^{x}=e^{x}$
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 $e^{x}$ , we will attempt to rewrite $a^{x}$ in that form.
Using that $e^{\ln(c)}=c$ and that $\ln(a^{b})=b\cdot \ln(a)$ , we find that:
    $a^{x}=e^{\ln(a)x}$
Thus, we simply apply the chain rule:
    ${\frac {d}{dx}}e^{\ln(a)x}=e^{\ln(a)x}\cdot {\frac {d}{dx}}[\ln(a)x]=\ln(a)a^{x}$
* Derivative of the exponential function
* ${\frac {d}{dx}}a^{x}=\ln(a)a^{x}$

## 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(a)+\log(b)=\log(ab)$
* $\log \left({\frac {a}{b}}\right)=\log(a)-\log(b)$
* $\log(a^{n})=n\log(a)$
See the examples below.

#### Example 1

We shall now prove the validity of the power rule using logarithmic differentiation.
${\frac {d}{dx}}\ln(x^{n})=n{\frac {d}{dx}}\ln(x)=nx^{-1}$
${\frac {d}{dx}}\ln(x^{n})={\frac {1}{x^{n}}}\cdot {\frac {d}{dx}}x^{n}$
Thus:
${\frac {1}{x^{n}}}\cdot {\frac {d}{dx}}x^{n}=nx^{-1}$
${\frac {d}{dx}}x^{n}=nx^{n-1}$

##### Example 2

* Suppose we wished to differentiate
* $y={\frac {(6x^{2}+9)^{2}}{\sqrt {3x^{3}-2}}}$
* We take the natural logarithm of both sides
* ${\begin{aligned}\ln(y)&=\ln \left({\frac {(6x^{2}+9)^{2}}{\sqrt {3x^{3}-2}}}\right)\\&=\ln {\big(6x^{2}+9)^{2}{\big )}-\ln {\big(3x^{3}-2)^{\frac {1}{2}}{\big )}\\&=2\ln(6x^{2}+9)-{\frac {\ln(3x^{3}-2)}{2}}\end{aligned}}$
* Differentiating implicitly, recalling the chain rule
* ${\begin{aligned}{\frac {1}{y}}\cdot {\frac {dy}{dx}}&=2\cdot {\frac {12x}{6x^{2}+9}}-{\frac {1}{2}}\cdot {\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{aligned}}$
* Multiplying by $y$ , the original function
* ${\frac {dy}{dx}}={\frac {(6x^{2}+9)^{2}}{\sqrt {3x^{3}-2}}}\cdot {\frac {24x(3x^{3}-2)-{\frac {9}{2}}x^{2}(6x^{2}+9)}{(6x^{2}+9)(3x^{3}-2)}}$

##### Example 3

* Let us differentiate a function
* $y=x^{x}$
* Taking the natural logarithm of left and right
* ${\begin{aligned}\ln(y)&=\ln(x^{x})\\&=x\ln(x)\end{aligned}}$
* We then differentiate both sides, recalling the product and chain rules
* ${\begin{aligned}{\frac {1}{y}}\cdot {\frac {dy}{dx}}&=\ln(x)+x{\frac {1}{x}}\\&=\ln(x)+1\end{aligned}}$
* Multiplying by the original function $y$
* ${\frac {dy}{dx}}=x^{x}(\ln(x)+1)$

##### Example 4

* Take a function
* $y=x^{6\cos(x)}$
* Then
* ${\begin{aligned}\ln(y)&=\ln(x^{6\cos(x)})\\&=6\cos(x)\ln(x)\end{aligned}}$
* We then differentiate
* ${\frac {1}{y}}\cdot {\frac {dy}{dx}}=-6\sin(x)\ln(x)+{\frac {6\cos(x)}{x}}$
* And finally multiply by $y$
* ${\begin{aligned}{\frac {dy}{dx}}&=y\left(-6\sin(x)\ln(x)+{\frac {6\cos(x)}{x}}\right)\\&=6x^{6\cos(x)}\left({\frac {\cos(x)}{x}}-\sin(x)\ln(x)\right)\end{aligned}}$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.9 Some Important Theorems</h1>
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.
A global maximum (also called an absolute maximum) of a function $f$ on a closed interval $[a,b]$ is a value $f(c)$ such that $f(c)\geq f(x)$ for all $x\in [a,b]$ .
A global minimum (also called an absolute minimum) of a function $f$ on a closed interval $[a,b]$ is a value $f(c)$ such that $f(c)\leq f(x)$ for all $x\in [a,b]$ .
Maxima and minima are collectively known as extrema.

### The 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,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 $[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 [0,1)$ , one can always find a larger value of $f(x)$ for $x\in [0,1)$ , 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

If a function $f(x)$ is
* continuous on the closed interval $[a,b]$
* differentiable on the open interval $(a,b)$
* $f(a)=f(b)$
then there exists at least one number $c\in (a,b)$ such that
    $f'(c)=0$
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\to 0}{\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}}\geq 0$ since it has non-positive numerator and negative denominator.
$\lim _{x\to c^{+}}{\frac {f(x)-f(c)}{x-c}}\leq 0$ 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

$f(x)=x^{2}-3x$
$x$
    Factor the expression to obtain $x(x-3)=0$ . $x=0,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 0. Where? Easy: Take the derivative.
    ${\frac {dy}{dx}}=2x-3$
$x=1.5$
${\frac {3}{2}}$
$x$
    Factor the expression to obtain $x(x-3)=0$ . $x=0,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 0. Where? Easy: Take the derivative.
    ${\frac {dy}{dx}}=2x-3$
$x=1.5$
${\frac {3}{2}}$

## Mean Value Theorem

If a function $f(x)$ is
* continuous on the closed interval $[a,b]$
* differentiable on the open interval $(a,b)$
then there exists at least one $c\in (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

If $f(x),g(x)$ are
* continuous on the closed interval $[a,b]$
* differentiable on the open interval $(a,b)$
then there exists a number $c\in (a,b)$ such that
    $f'(c)(g(b)-g(a))=g'(c)(f(b)-f(a))$
If $g(b)\neq g(a)$ and $g'(c)\neq 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'(c)(f(b)-f(a))$
which is what was to be shown.

### Exercises

$h(a)=h(b)$
$h(x)$
${\begin{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
$g(x)=x$
$g'(x)=1$
$g(b)-g(a)=b-a$
$b\neq a$
${\frac {f'(c)}{g'(c)}}={\frac {f(b)-f(a)}{g(b)-g(a)}}$
$f'(c)={\frac {f(b)-f(a)}{b-a}}$
$g(x)=x$
$g'(x)=1$
$g(b)-g(a)=b-a$
$b\neq a$
${\frac {f'(c)}{g'(c)}}={\frac {f(b)-f(a)}{g(b)-g(a)}}$
$f'(c)={\frac {f(b)-f(a)}{b-a}}$
$x=c$
$f(x)=x^{3}$
$x=0$
$x=2$
$x={\frac {2{\sqrt {3}}}{3}}$
$x={\frac {2{\sqrt {3}}}{3}}$
$f(x)=\sin(x)$
$[0,\pi ]$
$x={\frac {\pi }{2}}$
$x={\frac {\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{aligned}\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{aligned}}$
This implies 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$ .
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.10 Basics of Differentiation Cumulative Exercises</h1>

## Find the Derivative by Definition

Find the derivative of the following functions using the limit definition of the derivative.
$f(x)=x^{2}$
$2x$
$2x$
$f(x)=2x+2$
$2$
$2$
$f(x)={\frac {x^{2}}{2}}$
$x$
$x$
$f(x)=2x^{2}+4x+4$
$4x+4$
$4x+4$
$f(x)={\sqrt {x+2}}$
${\frac {1}{2{\sqrt {x+2}}}}$
${\frac {1}{2{\sqrt {x+2}}}}$
$f(x)={\frac {1}{x}}$
$-{\frac {1}{x^{2}}}$
$-{\frac {1}{x^{2}}}$
$f(x)={\frac {3}{x+1}}$
${\frac {-3}{(x+1)^{2}}}$
${\frac {-3}{(x+1)^{2}}}$
$f(x)={\frac {1}{\sqrt {x+1}}}$
${\frac {-1}{2(x+1)^{3/2}}}$
${\frac {-1}{2(x+1)^{3/2}}}$
$f(x)={\frac {x}{x+2}}$
${\frac {2}{(x+2)^{2}}}$
${\frac {2}{(x+2)^{2}}}$
Solutions

## Prove the Constant Rule

$c$
${\frac {d}{dx}}[c\cdot f(x)]=c\cdot {\frac {d}{dx}}[f(x)]$
${\begin{aligned}{\frac {d}{dx}}[c\cdot f(x)]&=\lim _{\Delta x\to 0}{\frac {c\cdot f(x+\Delta x)-c\cdot f(x)}{\Delta x}}\\&=c\lim _{\Delta x\to 0}{\frac {f(x+\Delta x)-f(x)}{\Delta x}}\\&=c{\frac {d}{dx}}[f(x)]\end{aligned}}$
${\begin{aligned}{\frac {d}{dx}}[c\cdot f(x)]&=\lim _{\Delta x\to 0}{\frac {c\cdot f(x+\Delta x)-c\cdot f(x)}{\Delta x}}\\&=c\lim _{\Delta x\to 0}{\frac {f(x+\Delta x)-f(x)}{\Delta x}}\\&=c{\frac {d}{dx}}[f(x)]\end{aligned}}$
Solutions

## Find the Derivative by Rules

Find the derivative of the following functions:

### Power Rule

$f(x)=2x^{2}+4$
$f'(x)=4x$
$f'(x)=4x$
$f(x)=3{\sqrt[{3}]{x}}\,$
$f'(x)={\frac {1}{\sqrt[{3}]{x^{2}}}}$
$f'(x)={\frac {1}{\sqrt[{3}]{x^{2}}}}$
$f(x)=2x^{5}+8x^{2}+x-78$
$f'(x)=10x^{4}+16x+1$
$f'(x)=10x^{4}+16x+1$
$f(x)=7x^{7}+8x^{5}+x^{3}+x^{2}-x$
$f'(x)=49x^{6}+40x^{4}+3x^{2}+2x-1$
$f'(x)=49x^{6}+40x^{4}+3x^{2}+2x-1$
$f(x)={\frac {1}{x^{2}}}+3x^{\frac {1}{3}}$
$f'(x)={\frac {-2}{x^{3}}}+{\frac {1}{\sqrt[{3}]{x^{2}}}}$
$f'(x)={\frac {-2}{x^{3}}}+{\frac {1}{\sqrt[{3}]{x^{2}}}}$
$f(x)=3x^{15}+{\frac {x^{2}}{17}}+{\frac {2}{\sqrt {x}}}$
$f'(x)=45x^{14}+{\frac {2x}{17}}-{\frac {1}{x{\sqrt {x}}}}$
$f'(x)=45x^{14}+{\frac {2x}{17}}-{\frac {1}{x{\sqrt {x}}}}$
$f(x)={\frac {3}{x^{4}}}-{\sqrt[{4}]{x}}+x$
$f'(x)={\frac {-12}{x^{5}}}-{\frac {1}{4{\sqrt[{4}]{x^{3}}}}}+1$
$f'(x)={\frac {-12}{x^{5}}}-{\frac {1}{4{\sqrt[{4}]{x^{3}}}}}+1$
$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}}}$
$f'(x)={\frac {2}{\sqrt[{3}]{x^{2}}}}-{\frac {0.4}{x^{0.6}}}-{\frac {18}{x^{3}}}$
$f(x)={\frac {1}{\sqrt[{3}]{x}}}+{\sqrt {x}}$
$f'(x)={\frac {-1}{3{\sqrt[{3}]{x^{4}}}}}+{\frac {1}{2{\sqrt {x}}}}$
$f'(x)={\frac {-1}{3{\sqrt[{3}]{x^{4}}}}}+{\frac {1}{2{\sqrt {x}}}}$
Solutions

### Product Rule

$f(x)=(x^{4}+4x+2)(2x+3)$
$10x^{4}+12x^{3}+16x+16$
$10x^{4}+12x^{3}+16x+16$
$f(x)=(2x-1)(3x^{2}+2)$
$18x^{2}-6x+4$
$18x^{2}-6x+4$
$f(x)=(x^{3}-12x)(3x^{2}+2x)$
$15x^{4}+8x^{3}-108x^{2}-48x$
$15x^{4}+8x^{3}-108x^{2}-48x$
$f(x)=(2x^{5}-x)(3x+1)$
$36x^{5}+10x^{4}-6x-1$
$36x^{5}+10x^{4}-6x-1$
$f(x)=(5x^{2}+3)(2x+7)$
$30x^{2}+70x+6$
$30x^{2}+70x+6$
$f(x)=3x^{2}(5x^{2}+1)^{4}$
$6x(25x^{2}+1)(5x^{2}+1)^{3}$
$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)$
$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}-5x+2)$
$5x(x^{3}-x+1)^{2}(11x^{3}-5x+2)$
$f(x)=(2-x)^{6}(5+2x)^{4}$
$2(x-2)^{5}(2x+5)^{3}(10x+7)$
$2(x-2)^{5}(2x+5)^{3}(10x+7)$
Solutions

### Quotient Rule

$f(x)={\frac {2x+1}{x+5}}$
$f'(x)={\frac {9}{(x+5)^{2}}}$
$f'(x)={\frac {9}{(x+5)^{2}}}$
$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}}}$
$f'(x)={\frac {18x^{5}+12x^{3}-6x^{2}-12x+2}{(3x^{2}+1)^{2}}}$
$f(x)={\frac {x^{\frac {3}{2}}+1}{x+2}}$
$f'(x)={\frac {x{\sqrt {x}}+6{\sqrt {x}}-2}{2(x+2)^{2}}}$
$f'(x)={\frac {x{\sqrt {x}}+6{\sqrt {x}}-2}{2(x+2)^{2}}}$
$d(u)={\frac {u^{3}+2}{u^{3}}}$
$d'(u)=-{\frac {6}{u^{4}}}$
$d'(u)=-{\frac {6}{u^{4}}}$
$f(x)={\frac {x^{2}+x}{2x-1}}$
$f'(x)={\frac {2x^{2}-2x-1}{(2x-1)^{2}}}$
$f'(x)={\frac {2x^{2}-2x-1}{(2x-1)^{2}}}$
$f(x)={\frac {x+1}{2x^{2}+2x+3}}$
$f'(x)={\frac {-2x^{2}-4x+1}{(2x^{2}+2x+3)^{2}}}$
$f'(x)={\frac {-2x^{2}-4x+1}{(2x^{2}+2x+3)^{2}}}$
$f(x)={\frac {16x^{4}+2x^{2}}{x}}$
$f'(x)=48x^{2}+2$
$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 {2(8x^{3}+12x^{2}-1)}{5(x+1)^{2}}}$
$f(x)={\frac {(3x-2)^{2}}{\sqrt {x}}}$
$f'(x)={\frac {(3x-2)(9x+2)}{2x{\sqrt {x}}}}$
$f'(x)={\frac {(3x-2)(9x+2)}{2x{\sqrt {x}}}}$
$f(x)={\frac {\sqrt {x}}{2x-1}}$
$f'(x)={\frac {-(2x+1)}{2{\sqrt {x}}(2x-1)^{2}}}$
$f'(x)={\frac {-(2x+1)}{2{\sqrt {x}}(2x-1)^{2}}}$
$f(x)={\frac {4x-3}{x+2}}$
$f'(x)={\frac {11}{(x+2)^{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 {-10}{(2x-1)^{2}}}$
$f(x)={\frac {x^{2}}{x+3}}$
$f'(x)={\frac {x(x+6)}{(x+3)^{2}}}$
$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}}}$
$f'(x)={\frac {x^{4}(-4x+15)}{(3-x)^{2}}}$
Solutions

### Chain Rule

$f(x)=(x+5)^{2}$
$f'(x)=2(x+5)$
$f'(x)=2(x+5)$
$g(x)=(x^{3}-2x+5)^{2}$
$g'(x)=2(x^{3}-2x+5)(3x^{2}-2)$
$g'(x)=2(x^{3}-2x+5)(3x^{2}-2)$
$f(x)={\sqrt {1-x^{2}}}$
$f'(x)=-{\frac {x}{\sqrt {1-x^{2}}}}$
$f'(x)=-{\frac {x}{\sqrt {1-x^{2}}}}$
$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}}}$
$f'(x)={\frac {6(4x^{3}+1)(2x+4)^{2}-(2x+4)^{3}(12x^{2})}{(4x^{3}+1)^{2}}}$
$f(x)=(2x+1){\sqrt {2x+2}}$
$f'(x)=2{\sqrt {2x+2}}+{\frac {2x+1}{\sqrt {2x+2}}}$
$f'(x)=2{\sqrt {2x+2}}+{\frac {2x+1}{\sqrt {2x+2}}}$
$f(x)={\frac {2x+1}{\sqrt {2x+2}}}$
$f'(x)={\frac {2x+3}{(2x+2){\sqrt {2x+2}}}}$
$f'(x)={\frac {2x+3}{(2x+2){\sqrt {2x+2}}}}$
$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)$
$f'(x)={\frac {2x(3x^{4}+2x)^{2}}{\sqrt {2x^{2}+1}}}+{\sqrt {2x^{2}+1}}(2)(3x^{4}+2x)(12x^{3}+2)$
$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}}}$
$f'(x)={\frac {2(x^{4}+4x+2)^{2}-2(2x+3)(x^{4}+4x+2)(4x^{3}+4)}{(x^{4}+4x+2)^{4}}}$
$f(x)={\sqrt {x^{3}+1}}(x^{2}-1)$
$f'(x)={\frac {3x^{2}(x^{2}-1)}{2{\sqrt {x^{3}+1}}}}+2x{\sqrt {x^{3}+1}}$
$f'(x)={\frac {3x^{2}(x^{2}-1)}{2{\sqrt {x^{3}+1}}}}+2x{\sqrt {x^{3}+1}}$
$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)$
$f'(x)=2((2x+3)^{4}+4(2x+3)+2)(8(2x+3)^{3}+8)$
$f(x)={\sqrt {1+x^{2}}}$
$f'(x)={\frac {x}{\sqrt {1+x^{2}}}}$
$f'(x)={\frac {x}{\sqrt {1+x^{2}}}}$
Solutions

### Exponentials

$f(x)=(3x^{2}+e)e^{2x}$
$f'(x)=6xe^{2x}+2e^{2x}(3x^{2}+e)$
$f'(x)=6xe^{2x}+2e^{2x}(3x^{2}+e)$
$f(x)=e^{2x^{2}+3x}$
$f'(x)=(4x+3)e^{2x^{2}+3x}$
$f'(x)=(4x+3)e^{2x^{2}+3x}$
$f(x)=e^{e^{2x^{2}+1}}$
$f'(x)=4xe^{2x^{2}+1+e^{2x^{2}+1}}$
$f'(x)=4xe^{2x^{2}+1+e^{2x^{2}+1}}$
$f(x)=4^{x}$
$f'(x)=\ln(4)4^{x}$
$f'(x)=\ln(4)4^{x}$
Solutions

### Logarithms

$f(x)=2^{x-3}\cdot 3{\sqrt {x^{3}-2}}+\ln(x)$
$f'(x)=3\ln(2)2^{x-3}{\sqrt {x^{3}-2}}+{\frac {9x^{2}2^{x-3}}{2{\sqrt {x^{3}-2}}}}+{\frac {1}{x}}$
$f'(x)=3\ln(2)2^{x-3}{\sqrt {x^{3}-2}}+{\frac {9x^{2}2^{x-3}}{2{\sqrt {x^{3}-2}}}}+{\frac {1}{x}}$
$f(x)=\ln(x)-2e^{x}+{\sqrt {x}}$
$f'(x)={\frac {1}{x}}-2e^{x}+{\frac {1}{2{\sqrt {x}}}}$
$f'(x)={\frac {1}{x}}-2e^{x}+{\frac {1}{2{\sqrt {x}}}}$
$f(x)=\ln(\ln(x^{3}(x+1)))$
$f'(x)={\frac {4x^{3}+3x^{2}}{x^{3}(x+1)\ln(x^{3}(x+1))}}$
$f'(x)={\frac {4x^{3}+3x^{2}}{x^{3}(x+1)\ln(x^{3}(x+1))}}$
$f(x)=\ln(2x^{2}+3x)$
$f'(x)={\frac {4x+3}{2x^{2}+3x}}$
$f'(x)={\frac {4x+3}{2x^{2}+3x}}$
$f(x)=\log _{4}(x)+2\ln(x)$
$f'(x)={\frac {1}{x\ln(4)}}+{\frac {2}{x}}$
$f'(x)={\frac {1}{x\ln(4)}}+{\frac {2}{x}}$
Solutions

### Trigonometric functions

$f(x)=3e^{x}-4\cos(x)-{\frac {\ln(x)}{4}}$
$f'(x)=3e^{x}+4\sin(x)-{\frac {1}{4x}}$
$f'(x)=3e^{x}+4\sin(x)-{\frac {1}{4x}}$
$f(x)=\sin(x)+\cos(x)$
$f'(x)=\cos(x)-\sin(x)$
$f'(x)=\cos(x)-\sin(x)$
Solutions

## More Differentiation

${\frac {d}{dx}}[(x^{3}+5)^{10}]$
$30x^{2}(x^{3}+5)^{9}$
$30x^{2}(x^{3}+5)^{9}$
${\frac {d}{dx}}[x^{3}+3x]$
$3x^{2}+3$
$3x^{2}+3$
${\frac {d}{dx}}[(x+4)(x+2)(x-3)]$
$(x+2)(x-3)+(x+4)(x-3)+(x+4)(x+2)$
$(x+2)(x-3)+(x+4)(x-3)+(x+4)(x+2)$
${\frac {d}{dx}}[{\frac {x+1}{3x^{2}}}]$
$-{\frac {x+2}{3x^{3}}}$
$-{\frac {x+2}{3x^{3}}}$
${\frac {d}{dx}}[3x^{3}]$
$9x^{2}$
$9x^{2}$
${\frac {d}{dx}}[x^{4}\sin(x)]$
$4x^{3}\sin(x)+x^{4}\cos(x)$
$4x^{3}\sin(x)+x^{4}\cos(x)$
${\frac {d}{dx}}[2^{x}]$
$\ln(2)2^{x}$
$\ln(2)2^{x}$
${\frac {d}{dx}}[e^{x^{2}}]$
$2xe^{x^{2}}$
$2xe^{x^{2}}$
${\frac {d}{dx}}[e^{2^{x}}]$
$\ln(2)2^{x}e^{2^{x}}$
$\ln(2)2^{x}e^{2^{x}}$
Solutions

## Implicit Differentiation

Use implicit differentiation to find y'
$x^{3}+y^{3}=xy$
$y'={\frac {y-3x^{2}}{3y^{2}-x}}$
$y'={\frac {y-3x^{2}}{3y^{2}-x}}$
$(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}}$
$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}}$:
$y=x({\sqrt[{4}]{1-x^{3}}})$
$y'={\sqrt[{4}]{1-x^{3}}}+{\frac {3x^{3}}{4(1-x^{3})^{\frac {3}{4}}}}$
$y'={\sqrt[{4}]{1-x^{3}}}+{\frac {3x^{3}}{4(1-x^{3})^{\frac {3}{4}}}}$
$y={\sqrt {x+1 \over 1-x}}\,$
$y'={\frac {1}{2}}{\sqrt {\frac {x+1}{1-x}}}\left({\frac {1}{x+1}}+{\frac {1}{1-x}}\right)$
$y'={\frac {1}{2}}{\sqrt {\frac {x+1}{1-x}}}\left({\frac {1}{x+1}}+{\frac {1}{1-x}}\right)$
$y=(2x)^{2x}$
$y'=(2x)^{2x}(2\ln(2x)+2)$
$y'=(2x)^{2x}(2\ln(2x)+2)$
$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}})$
$y'=(x^{3}+4x)^{3x+1}(3\ln(x^{3}+4x)+{\frac {(3x+1)(3x^{2}+4)}{x^{3}+4x}})$
$y=(6x)^{\cos(x)+1}$
$y'=6x^{\cos(x)+1}(-\sin(x)\ln(6x)+{\frac {\cos(x)+1}{x}})$
$y'=6x^{\cos(x)+1}(-\sin(x)\ln(6x)+{\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.
$f(x)={\frac {x^{3}}{3}}+x^{2}+5,\qquad (3,23)$
$x=0,-2$
$y=15x-22$
$x=0,-2$
$y=15x-22$
$f(x)=x^{3}-3x+1,\qquad (1,-1)$
$x=\pm 1$
$y=-1$
$x=\pm 1$
$y=-1$
$f(x)={\frac {2x^{3}}{3}}+x^{2}-12x+6,\qquad (0,6)$
$x=2,-3$
$y=-12x+6$
$x=2,-3$
$y=-12x+6$
$f(x)=2x+{\frac {1}{\sqrt {x}}},\qquad (1,3)$
$x=2^{-{\frac {4}{3}}}$
$y={\frac {3x}{2}}+{\frac {3}{2}}$
$x=2^{-{\frac {4}{3}}}$
$y={\frac {3x}{2}}+{\frac {3}{2}}$
$f(x)=(x^{2}+1)(2-x),\qquad (2,0)$
$x=1,{\frac {1}{3}}$
$y=-5x+10$
$x=1,{\frac {1}{3}}$
$y=-5x+10$
$f(x)={\frac {2x^{3}}{3}}+{\frac {5x^{2}}{2}}+2x+1,\qquad \left(3,{\frac {95}{2}}\right)$
$x=-{\frac {1}{2}},-2$
$y=35x-{\frac {115}{2}}$
$x=-{\frac {1}{2}},-2$
$y=35x-{\frac {115}{2}}$
$(x-y-1)^{3}=x$
$y={\frac {2x}{3}}-{\frac {5}{3}}$
$y={\frac {2x}{3}}-{\frac {5}{3}}$
$e^{xy}+x^{2}=y^{2}$
$y=-2x+2$
$y=-2x+2$
Solutions

## Higher Order Derivatives

$3x^{4}+3x^{2}+2x$
$36x^{2}+6$
$36x^{2}+6$
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$
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

## Advanced Understanding of Derivatives

$f^{\prime }(x)$
$f(x)$
$-f(x)$
$-f^{\prime }(x)$
Suppose $f^{\prime }(x)=\lim _{h\to 0}{\dfrac {f(x+h)-f(h)}{h}}$. Let $g(x)=-f(x)$. ${\begin{aligned}g^{\prime }(x)&=\lim _{h\to 0}{\dfrac {g(x+h)-g(h)}{h}}\\&=\lim _{h\to 0}{\dfrac {-f(x+h)+f(h)}{h}}\\&=\lim _{h\to 0}{\dfrac {-\left(f(x+h)-f(h)\right)}{h}}\\&=-\lim _{h\to 0}{\dfrac {\left(f(x+h)-f(h)\right)}{h}}\\&=-f^{\prime }(x)\end{aligned}}$
$f^{\prime }(x)$
$f(x)$
$-f^{\prime }(x)$
$-f(x)$
$\blacksquare$
Suppose $f^{\prime }(x)=\lim _{h\to 0}{\dfrac {f(x+h)-f(h)}{h}}$. Let $g(x)=-f(x)$. ${\begin{aligned}g^{\prime }(x)&=\lim _{h\to 0}{\dfrac {g(x+h)-g(h)}{h}}\\&=\lim _{h\to 0}{\dfrac {-f(x+h)+f(h)}{h}}\\&=\lim _{h\to 0}{\dfrac {-\left(f(x+h)-f(h)\right)}{h}}\\&=-\lim _{h\to 0}{\dfrac {\left(f(x+h)-f(h)\right)}{h}}\\&=-f^{\prime }(x)\end{aligned}}$
$f^{\prime }(x)$
$f(x)$
$-f^{\prime }(x)$
$-f(x)$
$\blacksquare$
$f(x)$
$-2\leq x\leq 2$
$f(-2)=f(2)<0$
$f(x)$
    (a) the Intermediate Value Theorem;
    (b) Rolle's Theorem;
    (c) the Extreme Value Theorem.
These are examples only. More valid solutions may exist.
    (a) $f(x)$ is continuous. Ergo, the intermediate value theorem applies. There exists some $f(d)=c\in \left[f(-2),0\right]$ such that $f(-2)<c<0$, where $d\in \left[-2,2\right]$.
    (b) Rolle's Theorem does not apply for a non-differentiable function.
    (c) $f(x)$ is continuous. Ergo, the extreme value theorem applies. There exists a $-2\leq c\leq 2$ so that $f(c)>f(x)$ for all $x\in \left[-2,2\right]$.
These are examples only. More valid solutions may exist.
    (a) $f(x)$ is continuous. Ergo, the intermediate value theorem applies. There exists some $f(d)=c\in \left[f(-2),0\right]$ such that $f(-2)<c<0$, where $d\in \left[-2,2\right]$.
    (b) Rolle's Theorem does not apply for a non-differentiable function.
    (c) $f(x)$ is continuous. Ergo, the extreme value theorem applies. There exists a $-2\leq c\leq 2$ so that $f(c)>f(x)$ for all $x\in \left[-2,2\right]$.
$g(x)=f^{-1}(x)$
$f^{-1}(x)$
$f(x)$
$f(x)$
$g^{\prime }(x)$
$g^{\prime }(x)$
$g^{\prime }(x)={\frac {1}{f^{\prime }\left(f^{-1}(x)\right)}}$
$g^{\prime }(x)={\frac {1}{f^{\prime }\left(f^{-1}(x)\right)}}$
$f(x)={\begin{cases}2x^{2}+4,&x<-1\\ax^{3}-2x,&x\geq -1\end{cases}}$
$a$
Find a value, if possible, for $a$ that allows each of the following to be true. If not possible, prove that it cannot be done.
    (a) The function $f(x)$ is continuous but non-differentiable.
    (b) The function $f(x)$ is both continuous and differentiable.
    (a) $a=-4$.
    (b) There is no $a\in \mathbb {R}$ that allows the following to be true. Proof in solutions.
    (a) $a=-4$.
    (b) There is no $a\in \mathbb {R}$ that allows the following to be true. Proof in solutions.
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# 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>

## L'Hôpital'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 by using L'Hôpital's rule. This rule is vital in explaining how other limits can be derived.
If ${\frac {f(a)}{g(a)}}$ exists, where $\lim _{x\to a}f(x)=\lim _{x\to a}g(x)=0$ or $\lim _{x\to a}f(x)=\lim _{x\to a}g(x)=\infty$ , the limit $\lim _{x\to a}{\frac {f(x)}{g(x)}}$ is said to be indeterminate.
All of the following expressions are indeterminate forms.
    ${\frac {0}{0}},{\frac {\pm \infty }{\pm \infty }},\infty -\infty ,0\cdot \infty ,0^{0},\infty ^{0},1^{\infty }$
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 a}{\frac {f(x)}{g(x)}}$ is indeterminate of type ${\frac {0}{0}}$ or ${\frac {\pm \infty }{\pm \infty }}$ ,
   then $\lim _{x\to a}{\frac {f(x)}{g(x)}}=\lim _{x\to a}{\frac {f'(x)}{g'(x)}}$, where $a\in {\overline {\mathbb {R} }}$.
   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 }}$ .

### Proof of the 0/0 case

Suppose that for real functions $f$ and $g$, $\lim _{x\to a}f(x)=\lim _{x\to a}g(x)=0$ and that $\lim _{x\to a}{\frac {f'(x)}{g'(x)}}$ exists. Thus $f'(x)$ and $g'(x)$ exist in an interval $(a-\delta ,a+\delta )$ around $a$ , but maybe not at $a$ itself. Thus, for any $x\in (a-\delta ,a+\delta )$ , in any interval $[x,a]$ or $[a,x]$, $f$ and $g$ are continuous and differentiable, with the possible exception of $a$. Define
    ${\begin{array}{l}F(x)={\begin{cases}f(x)&x\neq a\\\lim \limits _{x\to a}f(x)&x=a\end{cases}}\\G(x)={\begin{cases}g(x)&x\neq a\\\lim \limits _{x\to a}g(x)&x=a\end{cases}}\end{array}}$
Note that $\lim _{x\to a}{\frac {f(x)}{g(x)}}=\lim _{x\to a}{\frac {F(x)}{G(x)}}$ , $\lim _{x\to a}{\frac {f'(x)}{g'(x)}}=\lim _{x\to a}{\frac {F'(x)}{G'(x)}}$, and that $F,G$ are continuous in any interval $[a,x]$ or $[x,a]$ and differentiable in any interval $(a,x)$ or $(x,a)$ when $x\in (a-\delta ,a+\delta )$.
Cauchy's Mean Value Theorem (see 3.9) tells us that ${\frac {F(x)-F(a)}{G(x)-G(a)}}={\frac {F'(c)}{G'(c)}}$ for some $c\in (a,x)$ or $c\in (x,a)$ . Since $F(a)=G(a)=0$ , we have ${\frac {F(x)}{G(x)}}={\frac {F'(c)}{G'(c)}}$ for $x,c\in (a-\delta ,a+\delta )$.
Since $c\in (x,a)$ or $c\in (a,x)$ , by the squeeze theorem
    $\lim _{x\to a}x=a\quad \Rightarrow \quad \lim _{x\to a}c=a$
This implies
    $\lim _{x\to a}{\frac {F'(c)}{G'(c)}}=\lim _{x\to a}{\frac {F'(x)}{G'(x)}}$
So taking the limit as $x\to a$ of the last equation gives $\lim _{x\to a}{\frac {F(x)}{G(x)}}=\lim _{x\to a}{\frac {F'(x)}{G'(x)}}$, which is equivalent to the more commonly used form $\lim _{x\to a}{\frac {f(x)}{g(x)}}=\lim _{x\to a}{\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 {{\frac {d}{dx}}\left(\sin(x)\right)}{{\frac {d}{dx}}(x)}}=\lim _{x\to 0}{\frac {\cos(x)}{1}}$
Plugging in 0 for x gives 1 here. Note that it is logically incorrect to prove this limit by using L'Hôpital's rule, as the same limit is required to prove that the derivative of the sine function exists: it would be a form of begging the question, or circular reasoning. An alternative way to prove this limit equal one is using squeeze theorem.

### 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 1.

### Example 3

Find $\lim _{x\to \infty }{\frac {4x+22}{5x+9}}$
This time, plugging in $\infty$ for x gives you ${\frac {\infty }{\infty }}$ . So using L'Hôpital's rule gives:
    $\lim _{x\to \infty }{\frac {4}{5}}$
Therefore, ${\frac {4}{5}}$ is the answer.

### Example 4

Find $\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}$
Plugging the value of x into the limit yields
    $\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}=1^{\infty }$ (indeterminate form).
Let $k=\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}=1^{\infty }$
    $\ln(k)$ $=\lim _{x\to \infty }\ln \left(1+{\frac {1}{x}}\right)^{x}$ $=\lim _{x\to \infty }x\ln \left(1+{\frac {1}{x}}\right)$ $=\lim _{x\to \infty }{\frac {\ln \left(1+{\frac {1}{x}}\right)}{\frac {1}{x}}}={\frac {\ln(1)}{\frac {1}{x}}}={\frac {0}{0}}$
We now apply L'Hôpital's rule by taking the derivative of the top and bottom with respect to $x$.
    $\ln(k)=\lim _{x\to \infty }{\frac {\ln \left(1+{\frac {1}{x}}\right)}{\frac {1}{x}}}=\lim _{x\to \infty }{\frac {{\frac {d}{dx}}\left[\ln \left(1+{\frac {1}{x}}\right)\right]}{{\frac {d}{dx}}\left({\frac {1}{x}}\right)}}=\lim _{x\to \infty }{\frac {x}{x+1}}$
Since
    $\lim _{x\to \infty }{\frac {x}{x+1}}={\frac {\infty }{\infty }}$
We apply L'Hôpital's rule once again
    $\ln(k)=\lim _{x\to \infty }{\frac {x}{x+1}}=\lim _{x\to \infty }{\frac {1}{1}}=1$
Therefore
    $k=e$
And
    $\lim _{x\to \infty }\left(1+{\frac {1}{x}}\right)^{x}=e$
Similarly, this limit also yields the same result
    $\lim _{x\to \infty }\left(1+x\right)^{\frac {1}{x}}=e$

#### Note

This does not prove that $1^{\infty }=e$ because using the same method,
    $\lim _{x\to \infty }\left(1+{\frac {2}{x}}\right)^{x}=1^{\infty }=e^{2}$

## Exercises

Evaluate the following limits using L'Hôpital's rule:
$\lim _{x\to 0}{\frac {x+\tan(x)}{\sin(x)}}$
$2$
$2$
$\lim _{x\to \pi }{\frac {x-\pi }{\sin(x)}}$
$-1$
$-1$
$\lim _{x\to 0}{\frac {\sin(3x)}{\sin(4x)}}$
${\frac {3}{4}}$
${\frac {3}{4}}$
$\lim _{x\to \infty }{\frac {x^{5}}{e^{5x}}}$
$0$
$0$
$\lim _{x\to 0}{\frac {\tan(x)-x}{\sin(x)-x}}$
$-2$
$-2$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.12 Extrema and Points of Inflection</h1>
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.
In many cases, 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 0 (or is undefined, as in the case of $-|x|$), 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 0 at extrema. If the graph has one or more of these stationary points, these may be found by setting the first derivative equal to 0 and finding the roots of the resulting equation.
However, a slope of zero does not guarantee a maximum or minimum: there is a third class of stationary point called a saddle point. Consider the function
    $f(x)=x^{3}$
The derivative is
    $f'(x)=3x^{2}$
The slope at $x=0$ is 0. We have a slope of 0, 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.
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 0, 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 0 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'(x)=0\ ,\ f''(x)=0\ ,\ \ldots \ ,\ f^{(n)}(x)=0\ ,\ f^{(n+1)}(x)\neq 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(x)=-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'(x)=-4x^{3}$
    $f''(x)=-12x^{2}$
    $f'''(x)=-24x$
    $f^{(4)}(x)=-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.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.13 Newton's Method</h1>
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(x)$ 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(x_{n})}{f'(x_{n})}}$
* 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 0 of $f(x)$ . We know that if we only look at points very close to $x_{0}$ then $f(x)$ looks like its tangent line. If $x_{0}$ was already close to the place where $f(x)$ was 0, and near $x_{0}$ we know that $f(x)$ looks like its tangent line, then we hope the 0 of the tangent line at $x_{0}$ is a better approximation then $x_{0}$ itself.
The equation for the tangent line to $f(x)$ at $x_{0}$ is given by
    $y=f'(x_{0})\cdot (x-x_{0})+f(x_{0})$
Now we set $y=0$ and solve for $x$ .
    $0=f'(x_{0})\cdot (x-x_{0})+f(x_{0})$
    $-f(x_{0})=f'(x_{0})\cdot (x-x_{0})$
    ${\frac {-f(x_{0})}{f'(x_{0})}}=(x-x_{0})$
    $x={\frac {-f(x_{0})}{f'(x_{0})}}+x_{0}$
This value of $x$ we feel should be a better guess for the value of $x$ where $f(x)=0$ . We choose to call this value of $x_{1}$ , and a little algebra we have
    $x_{1}=x_{0}-{\frac {f(x_{0})}{f'(x_{0})}}$
If our intuition was correct and $x_{1}$ is in fact a better approximation for the root of $f(x)$ , 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(x_{1})}{f'(x_{1})}}$
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(x_{n})}{f'(x_{n})}}$ .

## Examples

Find the root of the function $f(x)=x^{2}$.
${\begin{aligned}x_{0}&=&4\\x_{1}&=&x_{0}-{\frac {f(x_{0})}{f'(x_{0})}}=4-{\frac {16}{8}}=2\\x_{2}&=&x_{1}-{\frac {f(x_{1})}{f'(x_{1})}}=2-{\frac {4}{4}}=1\\x_{3}&=&x_{2}-{\frac {f(x_{2})}{f'(x_{2})}}=1-{\frac {1}{2}}={\frac {1}{2}}\\x_{4}&=&x_{3}-{\frac {f(x_{3})}{f'(x_{3})}}={\frac {1}{2}}-{\frac {\frac {1}{4}}{1}}={\frac {1}{4}}\\x_{5}&=&x_{4}-{\frac {f(x_{4})}{f'(x_{4})}}={\frac {1}{4}}-{\frac {\frac {1}{16}}{\frac {1}{2}}}={\frac {1}{8}}\\x_{6}&=&x_{5}-{\frac {f(x_{5})}{f'(x_{5})}}={\frac {1}{8}}-{\frac {\frac {1}{64}}{\frac {1}{4}}}={\frac {1}{16}}\\x_{7}&=&x_{6}-{\frac {f(x_{6})}{f'(x_{6})}}={\frac {\frac {1}{256}}{\frac {1}{8}}}={\frac {1}{32}}\end{aligned}}$
As you can see $x_{n}$ is gradually approaching 0 (which we know is the root of $f(x)$) . One can approach the function's root with arbitrary accuracy.
Answer: $f(x)=x^{2}$ has a root at $x=0$.

## Notes

This method fails when $f'(x)=0$ . In that case, one should choose a new starting place. Occasionally it may happen that $f(x)=0$ and $f'(x)=0$ have a common root. To detect whether this is true, we should first find the solutions of $f'(x)=0$ , and then check the value of $f(x)$ at these places.
Newton's method also may not converge for every function, take as an example:
    $f(x)={\begin{cases}{\sqrt {x-r}},&{\text{for }}x\geq r\\-{\sqrt {r-x}},&{\text{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.
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(x)=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

* Wikipedia:Newton's method
* Wikibooks
* Wikipedia:Abel–Ruffini theorem
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.14 Related Rates</h1>

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

## How to Solve

These general steps should be taken in order to complete a related rates problem.
* Write out any relevant formulas and information about the problem.
** The problem should have a variable you "control" (i.e. have knowledge of the value and rate of) and a variable that you want to find the related rate.
** Usually, related rates problem ask for a rate in respect to time. Do not panic if your equations do not appear to have any relationship to time! This will be handled later.
* Combine the formulas together so that the variable you want to find the related rate of is on one side of the equation and everything else is on the other side.
* Differentiate the formula with respect to time. Any other variable not a simple constant (such as $\pi$) should be differentiated as well. Be wary! Chain Rule usually should be used.
* The other variables that you have differentiated should have been given in the question or should be calculated separately. Nevertheless, plug-in known information and simplify.
* The value you get here is your answer.
The steps to solve a related rates problem is strikingly similar to an optimization problem, except that the main variable to find is not assigned to be 0 (it is supposed to be found) and that the extra variables in the optimization problem algorithm are actual variables in this case and are treated as variables instead of constants when differentiating.

## 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:
* 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^{2}h$
    ${\dot {V}}={\frac {\pi }{3}}\left(r^{2}{\dot {h}}+2rh{\dot {r}}\right)$
${\dot {V}}={\frac {\pi }{3}}\left(r^{2}{\dot {h}}+2rh{\dot {r}}\right)$

### Example 2

* 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 {\dot {V}}{4\pi r^{2}}}$
* Plug-in known information.
    ${\dot {r}}={\frac {2}{16\pi }}$
${\dot {r}}={\frac {1}{8\pi }}$

### Example 3

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 {2x{\dot {x}}+2y{\dot {y}}}{2s}}$ $={\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
${\dot {s}}=-70$

### Example 4

* Write down any relevant formulas and information.
    $V={\frac {\pi }{3}}r^{2}h$
    ${\dot {V}}=10$
    $r={\frac {h}{2}}$
    $h=5$
Substitute $r={\frac {h}{2}}$ into the volume equation.
    $V$ $={\frac {\pi }{3}}r^{2}h$ $={\frac {\pi }{3}}h\left({\frac {h^{2}}{4}}\right)$ $={\frac {\pi }{12}}h^{3}$
* Take the derivative of the volume equation with respect to time.
    $V={\frac {\pi }{12}}h^{3}$
    ${\dot {V}}={\frac {\pi }{4}}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
${\dot {h}}={\frac {8}{5\pi }}$
Example 5:
* 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
${\dot {y}}=-{\frac {8}{3}}$

## Exercises

$100ft^{3}/min$
$4ft$
${\frac {25}{16\pi }}{\frac {ft}{min}}$
${\frac {25}{16\pi }}{\frac {ft}{min}}$
$10ft$
$10ft$
$3ft^{3}/min$
$6ft$
${\frac {1}{3\pi }}{\frac {ft}{min}}$
${\frac {1}{3\pi }}{\frac {ft}{min}}$
$2ft$
$2rpm$
$4\pi {\frac {ft}{min}}$
$4\pi {\frac {ft}{min}}$
$t=0$
$e^{-t}$
$t=-\ln(0.001\pi )$
$t=-\ln(0.001\pi )$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.15 Optimization</h1>

## Introduction

Optimization is one of the uses of calculus in the real world. Perhaps 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?
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.
In general, an optimization problem has a constraint that changes how we view the problem. The wording of the problem (whether subtle or not) can also drastically change how we view the problem. The constraint is the thing we will absolutely not change (such as the general shape, or the amount that we are willing to pay for the entire operation, etc.). If we can identify what we are going to change and what we are going to require stay the same, we will be on our way to solve the problem.

## How to Solve

These general steps should be taken in order to complete an optimization problem.
* Write out necessary formulas and other pieces of information given by the problem.
** The problems should have a variable you control and a variable that you want to maximize/minimize.
** The formulas you find may contain extra variables. Depending on how the question works out, they may be substituted out or can be ignored (which will be explained later).
* Combine the formulas together so that the variable you want to maximize/minimize is on one side of the equation and everything else on the other.
* Differentiate the formula. If your equation has multiple variables, pick any variable to differentiate as long as it is not the one you control (i.e. pick the variable that you could not get rid of from the formula).
** Note that during differentiation, if you come across a variable that you have not picked, imagine it as a number and apply the necessary differentiation rule. Do not treat it as a variable in this case.
* Set the differentiated formula to equal 0 and solve for the variable you control.
* The value you get here is your answer. If you instead have another formula, that means that your answer depends on those other variables, which would usually be what the question asked for if you have such a situation that you have another variable to juggle to begin with.
The reason why this algorithm works comes from a few mathematical theorems which you will probably not need to know when completing these problems. Usually the problems given will be mathematically simple (in other words, there are not a lot of cases to test). However, if you wish to know, they work like this:
* A derivative of 0 is either a global or local maximum or minimum. Usually the question will tend towards answering that question without much difficulty (like always positive numbers, for example)

## Examples
### Volume Example

* 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$
* Write the variable $h$ in terms of $x$ in the volume equation.
    $2x^{2}+4xh=100$
    $x^{2}+2xh=50$
    $2xh=50-x^{2}$
    $h={\frac {50-x^{2}}{2x}}$
    ${\begin{aligned}V&=\left(x^{2}\right)\left({\frac {50-x^{2}}{2x}}\right)\\&={\frac {50x-x^{3}}{2}}\end{aligned}}$
* Find the derivative of the volume equation in order to maximize the volume
    ${\frac {dV}{dx}}={\frac {50-3x^{2}}{2}}$
* Set ${\frac {dV}{dx}}=0$ and solve for $x$
    ${\frac {50-3x^{2}}{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
    ${\begin{aligned}V&={\frac {1}{2}}\left[50{\sqrt {\frac {50}{3}}}-\left({\sqrt {\frac {50}{3}}}\right)^{3}\right]\\&=68.04138174...\end{aligned}}$
$V_{max}=68.04138174...$

### Volume Example II

$\alpha$
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}$
    ${\begin{aligned}0&=V'(x)=\alpha ^{2}-8\alpha x+12x^{2}\\&=12x^{2}-8\alpha x+\alpha ^{2}\end{aligned}}$
We can now use the quadratic formula to solve for $x$:
    $x={\frac {-b\pm {\sqrt {b^{2}-4ac}}}{2a}}$
    ${\begin{aligned}x&={\frac {-(-8\alpha )\pm {\sqrt {(-8\alpha )^{2}-4(12)(\alpha ^{2})}}}{2(12)}}\\&={\frac {8\alpha \pm {\sqrt {64\alpha ^{2}-48\alpha ^{2}}}}{24}}\\&={\frac {8\alpha \pm {\sqrt {16\alpha ^{2}}}}{24}}\\&={\frac {8\alpha \pm 4\alpha }{24}}\end{aligned}}$
    $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).
$x={\frac {\alpha }{6}}$

### Volume Example III

$1.024{\text{ L}}$
This is a classic problem for optimization. The problem is we do not have any specified measurements. Luckily enough, we are given SI units, so we can write what we are given accordingly,
* Conversion factor: $1{\text{ L}}=1000{\text{ cm}}^{3}$. This means that through dimensional analysis (or basic algebra): $1.024{\text{ L}}=1024{\text{ cm}}^{3}$. Recall that this is the volume!
* Volume of a cylinder: $V=\pi r^{2}h$
* Surface area of a cylinder: $S=2\pi rh+2\pi r^{2}$
Recall what we are trying to minimize: "the amount of material required to construct the can of specified volume." This means the surface area needs to be minimized! The unfortunate part is we have two variables (it is not constant). Luckily, we can use the volume to write $h$ in terms of $r$:
    $1024{\text{ cm}}^{3}=\pi r^{2}h$
    $\Rightarrow {\frac {1024{\text{ cm}}^{3}}{\pi {r{\text{ cm}}}^{2}}}={\frac {1024}{\pi r^{2}}}{\text{ cm}}=h$
We can the substitute this information into the surface area formula and minimize (set the first derivative to zero):
    $S(r)=2\pi r\left({\frac {1024}{\pi r^{2}}}\right)+2\pi r^{2}$. Eliminate the $\pi$ and $r$.
    $\Rightarrow S(r)=2\cdot {\frac {1024}{r}}+2\pi r^{2}$ Set the first derivative equal to zero.
    ${\begin{aligned}\Rightarrow 0=S'(r)&={\frac {d}{dr}}\left({\frac {2048}{r}}+2\pi r^{2}\right)\\&={\frac {d}{dr}}\left({\frac {2048}{r}}\right)+{\frac {d}{dr}}\left(2\pi r^{2}\right)\\&={\frac {d}{dr}}\left(2048\cdot {r}^{-1}\right)+2\pi {\frac {d}{dr}}\left(r^{2}\right)\\&=2048\cdot {\frac {d}{dr}}\left({r}^{-1}\right)+2\pi \left(2r\right)\\&=2048\cdot (-1){r}^{-2}+4\pi r\\&=-{\frac {2048}{{r}^{2}}}+4\pi r\\&={\frac {4\pi r^{3}-2048}{{r}^{2}}}\end{aligned}}$
All that is left to do is find the critical values of the operation. This ultimately means to let the numerator equal zero and find what values of $r$ make the denominator equal to zero. Here is the operation for the numerator:
    $4\pi r^{3}-2048=0$
    $\Leftrightarrow 4\pi r^{3}=2048$
    $\Leftrightarrow r^{3}={\frac {2048}{4\pi }}={\frac {512}{\pi }}$
    $\Leftrightarrow r={\sqrt[{3}]{\frac {512}{\pi }}}={\frac {8}{\sqrt[{3}]{\pi }}}\approx 5.4623$
Here is the operation for the denominator:
    ${r}^{2}=0$
    $r=\pm 0$
Let us note that we do not care about one of the critical values being equal to zero. This problem is asking us to find the value that makes the condition true but also minimized. While zero does minimize the amount of material used to construct the can, we cannot make a can if we do not show one. This solution would be interesting, however, if we were asked about the graph of $S(r)$. Nevertheless, our final answer may not necessarily be $r\approx 5.4623{\text{ cm}}$ and $h\approx 10.9245{\text{ cm}}$. We need to verify that the critical value we found is the correct answer. That is where we substitute values for $r\in \left(0,\,{\frac {8}{\sqrt[{3}]{\pi }}}\right)$ and $r\in \left({\frac {8}{\sqrt[{3}]{\pi }}},\,\infty \right)$ into the first derivative:
    For $r\in \left(0,\,{\frac {8}{\sqrt[{3}]{\pi }}}\right)$, let $r=5$: $S'(5)={\frac {4\pi (5)^{3}-2048}{(5)^{2}}}<0$. For $r\in \left({\frac {8}{\sqrt[{3}]{\pi }}},\,\infty \right)$, let $r=6$: $S'(6)={\frac {4\pi (6)^{3}-2048}{(6)^{2}}}>0$.
Based on these results above, it is clear that $r={\frac {8}{\sqrt[{3}]{\pi }}}$ is a value that minimizes the function such that it allows us to make a can. Keep in mind, if you do not show that the value we found is a minimum, then this value could also be a maximum. Imagine if that were the case, and we suggested the company to produce a can that would maximize the amount of material used. Potentially millions of dollars of material costs would offset the profit from the optimum. Either way, we have found our answers:
$5.4623{\text{ cm}}$
$10.9245{\text{ cm}}$

### Sales Example

$n$
$r(n)=8.1n$
$c(n)=n^{3}-7n^{2}+18n$
The retailer's profit is defined by the equation $p(n)=r(n)-c(n)$, which is the net revenue generated. The question asks for the maximum amount of profit, or the maximum of the above equation. As previously discussed, the maxima and minima of a graph are found when the slope of the said graph is equal to zero. To find the slope, one finds the derivative of the function of interest – here, $p(n)$. By using the subtraction rule $p'(n)=r'(n)-c'(n)$:
    $p(n)=r(n)-c(n)$
    $p'(n)={\frac {d}{dn}}[8.1n]-{\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 $n=0.869,3.798$. 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\geq 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.
Here, it does, and for $n$ greater than $3.798$, $P'(n)$ will continue to decrease. This demonstrates that the firm will be maximizing its profits at $n=3.798$. The retailer selling $3.798$ units would return a profit of $$8,588.02$.
$n=3.798$

### Revenue Example

$D(q)=-{\frac {1}{5}}q+10$
$q$
The revenue of a firm is calculated by multiplying the quantity sold to the price. Since $D(q)$ is the price, and $q$ is the quantity sold, $R(q)=q\cdot D(q)$. The question is asking us to find the price that will maximize the quantity. This means finding the quantity is the first goal. The final goal is the price found.
Our first goal is finding the quantity that will maximize the revenue. The revenue function is maximized if the slope of the tangent line is zero at a point and the sign of the slope around those points change sign from positive to negative. This is achieved through taking the derivative and applying the first derivative test. This is made easier when the revenue function distributes the $q$:
    ${\begin{aligned}R(q)&=q\cdot D(q)\\&=q\cdot \left(-{\frac {1}{5}}q+10\right)\\&=-{\frac {1}{5}}q^{2}+10q\end{aligned}}$
Let us now take the first derivative:
    ${\frac {d}{dq}}\left[R(q)\right]={\frac {d}{dq}}\left[-{\frac {1}{5}}q^{2}+10q\right]$
    ${\begin{aligned}R'(q)&={\frac {d}{dq}}\left[-{\frac {1}{5}}q^{2}\right]+{\frac {d}{dq}}\left[10q\right]\\&=-{\frac {1}{5}}{\frac {d}{dq}}\left[q^{2}\right]+10{\frac {d}{dq}}\left[q\right]\\&=-{\frac {1}{5}}\left[2q\right]+10\left[1\right]\\&=-{\frac {2}{5}}q+10\end{aligned}}$
Set the first derivative equal to zero to find the critical values:
    $R'(q)=0=-{\frac {2}{5}}q+10$
    $\Leftrightarrow -10=-{\frac {2}{5}}q$
    $\Leftrightarrow 25=q$
Take note of the original revenue function. Because the revenue function is a quadratic that has its $q^{2}$ term multiplied by a factor less than 0, it is guaranteed there is only one critical value, and it must be a maximum. The calculus-based approach simply confirms this truth (using the first derivate test):
    For any $q<25$, $R'(q)>0$. For any $q>25$, $R'(q)<0$. Therefore, the critical value $q=25$ must be a maximum.
All that is left to do is input this domain into the demand function to find the price the widgets should be sold at. This is a simple substitution exercise:
    ${\begin{aligned}D(25)&=-{\frac {1}{5}}(25)+10\\&=-5+10\\&=5\end{aligned}}$
$5$

### Distance of Function to Origin

$f(x)={\sqrt {4-x}}$
$xy$
Let us write all the relevant equations we might want to keep in mind:
* $D={\sqrt {\left(x_{2}-x_{1}\right)^{2}+\left(y_{2}-y_{1}\right)^{2}}}$
* $y=f(x)$
The problem with optimization problems is that most of the time, you work with two variables as opposed to one. However, the main idea and focus is to write the two-variable equation into a single-variable equation. It is important to relate the variables here. The best way to do this is by using the set-up of the problem to your advantage.
We want to leave the function at $(x,y)$ and minimize the distance required to reach the origin. This means we let $\left(x_{2},y_{2}\right)=(x,y)$. Recall that the origin is at $(0,0)$, so $\left(x_{1},y_{1}\right)=(0,0)$. With all the information we have here, let us go ahead and write the distance function in terms of $x$ the singular variable. Because $y=f(x)$:
    ${\begin{aligned}D(x)&={\sqrt {\left(x-0\right)^{2}+\left(f(x)-0\right)^{2}}}\\&={\sqrt {x^{2}+\left({\sqrt {4-x}}\right)^{2}}}\\&={\sqrt {x^{2}+4-x}}\\&={\sqrt {x^{2}-x+4}}\end{aligned}}$
We will show two ways to take the derivative: the standard way and the non-standard way. The standard way will require us to use the chain rule, so let us demonstrate this procedure:

#### Standard way

    $D(x)={\sqrt {x^{2}-x+4}}$
    $\Rightarrow {\frac {d}{dx}}\left[D(x)\right]={\frac {d}{dx}}\left({\sqrt {x^{2}-x+4}}\right)$
    ${\begin{aligned}\Rightarrow D'(x)&={\frac {d}{dx}}\left({\sqrt {x^{2}-x+4}}\right)&\left({\text{Recall the chain rule: }}{\frac {d}{dx}}\left[f\left(g(x)\right)\right]={\frac {df}{dg}}\cdot {\frac {dg}{dx}}\right)\\&={\frac {d}{dx}}\left(x^{2}-x+4\right)\cdot {\frac {df}{dg}}\left({\sqrt {x^{2}-x+4}}\right)\\&=\left(2x-1\right)\cdot {\frac {1}{2{\sqrt {x^{2}-x+4}}}}\\&={\frac {2x-1}{2{\sqrt {x^{2}-x+4}}}}\end{aligned}}$
We now have the first derivative of the distance formula. To minimize the distance between $(x,y)$ and the origin, set the first derivate equal to zero. By now, you should know why we have to do this:
    Let $D'(x)=0$.
       ${\frac {2x-1}{2{\sqrt {x^{2}-x+4}}}}=0$ implies the numerator is zero. As such:
    Let $2x-1=0$.
       $2x-1=0$
       $\Leftrightarrow 2x=1$
       $\Leftrightarrow x={\frac {1}{2}}$
    Recall that if the denominator can be set equal to zero, then the value for $x$ which makes that true is a critical value. As such, let $2{\sqrt {x^{2}-x+4}}=0$:
       $2{\sqrt {x^{2}-x+4}}=0$
       $\Rightarrow {\sqrt {x^{2}-x+4}}=0$
       $\Rightarrow x^{2}-x+4=0$
    There is no real value for $x$ which makes the above equation true. This can be shown using the determinant is less than zero: $b^{2}-4ac<0$. As such,
The only critical value is $x={\frac {1}{2}}$. By now, you should be saying that we need to use the first derivative test:
    For any $x<{\frac {1}{2}}$, $D'(x)<0$. For any $x>{\frac {1}{2}}$, $D'(x)>0$. This implies the function before the critical value is decreasing, and the function after the critical value is increasing. This implies the function at the critical value is a local minimum.
As such, the $x$-value that will minimize the distance between $(x,y)$ and the origin is $x={\frac {1}{2}}$.
However, you have not finished the question yet. You still have to find the point of the function that the particle needs to stop at. This is simply a matter of substitution into the function $f(x)$:
    ${\begin{aligned}f\left({\frac {1}{2}}\right)&={\sqrt {4-\left({\frac {1}{2}}\right)}}\\&={\sqrt {{\frac {8}{2}}-{\frac {1}{2}}}}\\&={\sqrt {\frac {7}{2}}}\end{aligned}}$
Most teachers in calculus classes don't mind if you leave the answer as $\left({\frac {1}{2}},{\sqrt {\frac {7}{2}}}\right)$. However, for the minuscule number of teachers or testing organizations that care about rationalizing the denominator, the work for ${\sqrt {\frac {7}{2}}}$ is done below:
    ${\begin{aligned}{\sqrt {\frac {7}{2}}}&={\frac {\sqrt {7}}{\sqrt {2}}}\\&={\frac {\sqrt {7}}{\sqrt {2}}}\cdot {\frac {\sqrt {2}}{\sqrt {2}}}\\&={\frac {{\sqrt {7}}\cdot {\sqrt {2}}}{2}}\\&={\frac {\sqrt {14}}{2}}\\\end{aligned}}$
This is the reason most teachers don't mind if the denominator is left as a square root; it distracts from the calculus (although slightly). This leaves us with the final answer:
$\left({\frac {1}{2}},{\frac {\sqrt {14}}{2}}\right)$
$\blacksquare$

#### Non-standard way: implicit differentiation

Only the implicit differentiation will be shown, since any calculations beyond that would result in the same procedures we outlined before. Recall $D(x)={\sqrt {x^{2}-x+4}}$. Square both sides to return the function seen below:
    $\left[D(x)\right]^{2}=x^{2}-x+4$
Taking the derivative of the above function with respect to $x$ will require us to implicitly differentiate (although this differentiation is neatly disguised). The calculations are demonstrated below:
    ${\frac {d}{dx}}\left[\left(D(x)\right)^{2}\right]={\frac {d}{dx}}\left(x^{2}-x+4\right)$
    ${\begin{aligned}\Rightarrow 2D(x){\frac {dD}{dx}}&={\frac {d}{dx}}\left(x^{2}\right)-{\frac {d}{dx}}\left(x\right)+{\frac {d}{dx}}\left(4\right)\\&=2x-1+0\\\end{aligned}}$
    $2D(x){\frac {dD}{dx}}=2x-1$
    ${\begin{aligned}\Leftrightarrow {\frac {dD}{dx}}&={\frac {2x-1}{2D(x)}}\\&={\frac {2x-1}{2{\sqrt {x^{2}-x+4}}}}\end{aligned}}$
Notice how the calculation above resulted in the same first derivative when done the standard way, meaning the calculations from herein will be the same. With this let us move on to the next problem.

### Maximizing the Rectangular Area Formed by a Curved Shelf

$f(x)=15\log(x)$
$100$
This problem seems very weird. However, in actuality, this is a disguised variation of another common optimization problem, the maximum rectangular area formed by a function problem. The problem becomes much more manageable when thinking about it in those terms. What the manufacturer wants, after all, is a maximized indentation size. It is not asking about the volume of that size, only the part where you can find this is actually true.
The image shown on the right is actually the maximum area formed. However, if the problem did not provide an image (and no numbers on the axes), then one would not be approximating.
Let $x$ be the distance from the left-hand side of the shelving unit, and let the height of the rectangle formed be $y=f(x)$. Such a construction means that $(100-x)$ is the length of the rectangle while the height is $15\log(x)$. Therefore, the area function is
    $A(x)=15(100-x)\log(x)$
We want to find the maximum of the function given herein. Let us find the derivative of the area and set it equal to zero:
    $A(x)=15(100-x)\log(x)$
    $\Rightarrow {\frac {d}{dx}}\left[A(x)\right]={\frac {d}{dx}}\left[15(100-x)\log(x)\right]$
    ${\begin{aligned}\Rightarrow A'(x)&=15{\frac {d}{dx}}\left((100-x)\log(x)\right)&\left({\text{Recall the product rule: }}{\frac {d}{dx}}\left[f(x)\cdot g(x)\right]=f\cdot {\frac {dg}{dx}}+g\cdot {\frac {df}{dx}}\right)\\&=15\left[(100-x)\cdot {\frac {d}{dx}}\left(\log(x)\right)+\log(x)\cdot {\frac {d}{dx}}\left(100-x\right)\right]\\&=15\left[{\frac {100-x}{x\ln(10)}}-\log(x)\right]\\&=15\left[{\frac {100-x}{x\ln(10)}}-{\frac {\ln(x)}{\ln(10)}}\right]&\left({\text{Multiply by }}{\frac {x}{x}}{\text{ to the right fraction.}}\right)\\&=15\left[{\frac {100-x}{x\ln(10)}}-{\frac {x\ln(x)}{x\ln(10)}}\right]\\&=15\left[{\frac {100-x-x\ln(x)}{x\ln(10)}}\right]=0\\\end{aligned}}$
However, after finding the first derivative, it is evident that finding the value for $x$ in this specific situation is unknown to us at this time because we do not know about the Lambert-W Function. Therefore, a graphing calculator is acceptable to use now (typically, many teachers want to see as much work as possible before allowing you to use the calculator for solutions). If one does not have a graphing calculator, use Desmos or Geogebra or the many other online graphing calculators.
The answer obtained by those websites is $x\approx 23.94721$ or an exact answer of $x=e^{W(100e)-1}$. We know this is also the maximum that we are looking for because the derivative function is positive for $x<23.94721$ but negative after it. For those curious, the maximum area is $1573.44277$ centimeters-squared.
$x\approx 23.94721$

### Velocity in Different Regions

$v={\frac {c}{n}}$
$n_{1}$
$n_{2}$
$n_{1}<n_{2}$
This does not seem like an optimization problem. In fact, it seems that trying to make this into an optimization problem would be unintuitive. However, this beautiful result in physics is but a clever discovery found by making this into an optimization problem.
Let us write what we know:
* The distance between the point of incidence and the change in the material is $\Upsilon$ (The diagram has an italicized capital upsilon).
* The distance that minimizes the travel time the most is $\Lambda$ (The diagram has an italicized capital lambda). This means the remaining horizontal distance, according to the diagram, is $d-\Lambda$.
* The distance between the change in materials and the end of the refractive material is $\Gamma$ (The diagram has an italicized capital gamma).
All that is left to do is put it all together. We want to find the distance that light travelled.
* The distance travelled by the incident ray is ${\sqrt {(\Lambda )^{2}+(\Upsilon )^{2}}}$.
* The distance travelled by the refractive ray is ${\sqrt {(d-\Lambda )^{2}+(\Gamma )^{2}}}$.
Let us review what we know. We are trying to manipulate $\Lambda$ so that the time travelled is as small as possible to reflect and model how light ravels through two different materials. Everything else that is not a function of $\Lambda$ is a constant. Since we are trying to model the amount of time it takes light to travel through two different materials, we should manipulate the distances so that it models time.
Recall that speed is a ratio between distance and time $\left(v={\frac {D}{\Delta t}}\right)$, so to model the amount of time light took to travel with the given distances, all it means is some rearrangements. Because light travelled through two different materials, the speeds are different. Let $v_{1}>v_{2}$ where $v_{1}$ is the speed of light traveling through the first material of index of refraction $n_{1}$ (and similar for $v_{2}$).
* $t_{1}={\frac {\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}{v_{1}}}$
* $t_{2}={\frac {\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}{v_{2}}}$
The time light took to travel through the two materials is given as a function of $\Lambda$, so
* $T(\Lambda )=t_{1}+t_{2}={\frac {\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}{v_{1}}}+{\frac {\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}{v_{2}}}$
We now finally have an optimization problem. We want to minimize the amount of time travelled. Set the first derivative of $T(\Lambda )$ equal to zero. Remember, everything else besides $\Lambda$ is a constant.
    $T(\Lambda )={\frac {\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}{v_{1}}}+{\frac {\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}{v_{2}}}$
    ${\frac {d}{d\Lambda }}\left[T(\Lambda )\right]={\frac {d}{d\Lambda }}\left({\frac {\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}{v_{1}}}+{\frac {\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}{v_{2}}}\right)$
    ${\begin{aligned}0=T'(\Lambda )&={\frac {d}{d\Lambda }}\left({\frac {\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}{v_{1}}}+{\frac {\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}{v_{2}}}\right)\\&={\frac {d}{d\Lambda }}\left({\frac {\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}{v_{1}}}\right)+{\frac {d}{d\Lambda }}\left({\frac {\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}{v_{2}}}\right)\\&={\frac {1}{v_{1}}}\cdot {\frac {d}{d\Lambda }}\left({\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}\right)+{\frac {1}{v_{2}}}\cdot {\frac {d}{d\Lambda }}\left({\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}\right)\\&={\frac {1}{v_{1}}}\cdot \left({\frac {2\Lambda }{2{\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}}}\right)+{\frac {1}{v_{2}}}\cdot \left({\frac {2(d-\Lambda )\cdot (-1)}{2{\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}}}\right)\\&={\frac {1}{v_{1}}}\cdot \left({\frac {\Lambda }{\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}}\right)-{\frac {1}{v_{2}}}\cdot \left({\frac {d-\Lambda }{\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}}\right)\end{aligned}}$
Recall what we are trying to solve for. We are not trying to solve for $\Lambda$; we are trying to model the situation. If we did have to solve for $\Lambda$, it would be a nightmare (we may even leave it as a non-trivial exercise for the reader), but nevertheless, we can begin modeling the situation. First, move the negative term to the other side:
    ${\frac {1}{v_{1}}}\cdot \left({\frac {\Lambda }{\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}}\right)-{\frac {1}{v_{2}}}\cdot \left({\frac {d-\Lambda }{\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}}\right)=0$
    ${\frac {1}{v_{1}}}\cdot \left({\frac {\Lambda }{\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}}\right)={\frac {1}{v_{2}}}\cdot \left({\frac {d-\Lambda }{\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}}\right)$
The next thing we should attempt to do is rewrite the expression so that we clean-up those fractions (they are intimidating after all, and it would not be practical to model).
We can use the trigonometric functions to help us here in this department. Because the trigonometric functions are simply relations of the ratio of a right triangle, this would be a very good solution.
The normal is defined as the line perpendicular a given "surface". Because the distance $\Upsilon$ is parallel to the normal, the angle generated by that is also $90^{\circ }$. Because the horizontal distance $d$ light travelled is parallel to the "surface," the incident angle of the light, $\theta _{1}$, is an angle between the distance $\Upsilon$ and the incident light vector $\mathbf {I}$, and the light vector $\mathbf {I}$ is a transversal, by the corresponding angles theorem, the angle between the distance $\Upsilon$ and the incident light vector $\mathbf {I}$ is also $\theta _{1}$ (see the upper-left corner of the diagram for reference).
The result of this geometric derivation is simply this: we have found an angle of part of a right triangle. As a result, we can write the distance as a trigonometric equivalent
* $\sin(\theta _{1})={\frac {\Lambda }{\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}}$
We can use similar logic to show that
* $\sin(\theta _{2})={\frac {d-\Lambda }{\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}}$
As a result, we can rewrite the equations involved into something much more manageable and easy to calculate without measuring ratios:
    ${\frac {1}{v_{1}}}\cdot \left({\frac {\Lambda }{\sqrt {\Lambda ^{2}+\Upsilon ^{2}}}}\right)={\frac {1}{v_{2}}}\cdot \left({\frac {d-\Lambda }{\sqrt {(d-\Lambda )^{2}+\Gamma ^{2}}}}\right)$
    $\Leftrightarrow {\frac {1}{v_{1}}}\cdot \sin(\theta _{1})={\frac {1}{v_{2}}}\sin(\theta _{2})$
We are technically not done with the problem. Although we may have related the two different light vectors, we did not model the situation in terms of index of refractions. This leaves us with the two final steps. Recall the speed of light going through a certain material of index of refraction $n$ is $v={\frac {c}{n}}$. This is equivalent to saying ${\frac {1}{v}}={\frac {n}{c}}$. Since the speeds relate to the index of refraction, we may rewrite the above equation as
    ${\frac {n_{1}\cdot \sin(\theta _{1})}{c}}={\frac {n_{2}\cdot \sin(\theta _{2})}{c}}$
Multiply both sides by $c$ and we finally found Snell's Law:
$n_{1}\sin(\theta _{1})=n_{2}\sin(\theta _{2})$
Keep in mind, this result is still a derivative. However, we are allowed to model real life scenarios in terms of differential equations. Sometimes, it may be impossible to model situations without differential equations. We are allowed to write our equation like this (physics certainly does not care here). Finally, although this is not strictly an optimization problem, thinking about in that sense allowed us to obtain a nice rule of the world (a law in science). We proved this behavior, so it seems light will be consistent according to this equation. This in effect has allowed us to confirm in 2003 that negative index of refraction exists (even through experimental observations) and allowed us to discover properties of spin waves.

## References

* ↑ Houck, A. A., Brock, J. B., & Chuang, I. L. (2003). Experimental observations of a left-handed material that obeys Snell’s law. Physical Review Letters, 90(13), 137401. Retrieved 25 July 2020 from http://feynman.mit.edu/ike/homepage/papers/METAMAT-houck-brock-chuang-experimental-observations-of-a-left-handed-material-that-obeys-snells-law-prl-v90-p137401-04apr03.pdf.
* ↑ Stigloher, J., Decker, M., Körner, H. S., Tanabe, K., Moriyama, T., Taniguchi, T., ... & Ono, T. (2016). Snell’s law for spin waves. Physical review letters, 117(3), 037204. Retrieve 22 July 2020 from https://arxiv.org/pdf/1606.02895.pdf.
This page or section of Calculus is a stub. You can help Wikibooks by expanding it.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>3.16 Euler's Method</h1>
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_{\rm {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_{\rm {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_{\rm {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 is time.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
This page or section of Calculus is a stub. You can help Wikibooks by expanding it.
<h1>3.18 Applications of Derivatives Cumulative Exercises</h1>

## Relative Extrema

Find the relative maximum(s) and minimum(s), if any, of the following functions.
$f(x)={\frac {x}{x+1}}$
$f(x)={\sqrt[{3}]{(x-1)^{2}}}$
$(1,0)$
$(1,0)$
$f(x)=x^{2}+{\frac {2}{x}}$
$x=1$
$x=1$
$f(s)={\frac {s}{1+s^{2}}}$
$s=-1$
$s=1$
$s=-1$
$s=1$
$f(x)=x^{2}-4x+9$
$x=2$
$x=2$
$f(x)={\frac {x^{2}+x+1}{x^{2}-x+1}}$
$x=-1$
$x=1$
$x=-1$
$x=1$
Solutions

## Range of Function

$x+{\frac {1}{x}}$
${\begin{aligned}&f(x)=x+{\frac {1}{x}}\\&f'(x)=1-{\frac {1}{x^{2}}}\\&1-{\frac {1}{x^{2}}}=0\implies x=\pm 1\\&f''(x)={\frac {2}{x^{3}}}\\&f''(-1)=-2\end{aligned}}$
Since $f''(-1)$ is negative, $x=-1$ corresponds to a relative maximum. ${\begin{aligned}&f(-1)=-2\\&\lim \limits _{x\to -\infty }f(x)=-\infty \end{aligned}}$
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\to 0^{-}}f(x)=-\infty$ $\lim _{x\to 0^{+}}f(x)=\infty$ $f''(1)=2$ Since $f''(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$ .
$-2$
$2$
${\begin{aligned}&f(x)=x+{\frac {1}{x}}\\&f'(x)=1-{\frac {1}{x^{2}}}\\&1-{\frac {1}{x^{2}}}=0\implies x=\pm 1\\&f''(x)={\frac {2}{x^{3}}}\\&f''(-1)=-2\end{aligned}}$
Since $f''(-1)$ is negative, $x=-1$ corresponds to a relative maximum. ${\begin{aligned}&f(-1)=-2\\&\lim \limits _{x\to -\infty }f(x)=-\infty \end{aligned}}$
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\to 0^{-}}f(x)=-\infty$ $\lim _{x\to 0^{+}}f(x)=\infty$ $f''(1)=2$ Since $f''(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$ .
$-2$
$2$

## Absolute Extrema

Determine the absolute maximum and minimum of the following functions on the given domain
$f(x)={\frac {x^{3}}{3}}-{\frac {x^{2}}{2}}+1$
$[0,3]$
$(3,{\tfrac {11}{2}})$
$(1,{\tfrac {5}{6}})$
$(3,{\tfrac {11}{2}})$
$(1,{\tfrac {5}{6}})$
$f(x)=\left({\frac {4}{3}}x^{2}-1\right)x$
$[-{\tfrac {1}{2}},2]$
$(2,{\tfrac {26}{3}})$
$({\tfrac {1}{2}},-{\tfrac {1}{3}})$
$(2,{\tfrac {26}{3}})$
$({\tfrac {1}{2}},-{\tfrac {1}{3}})$
Solutions

## Determine Intervals of Change

Find the intervals where the following functions are increasing or decreasing
$f(x)=10-6x-2x^{2}$
$(-\infty ,-{\tfrac {3}{2}})$
$(-{\tfrac {3}{2}},\infty )$
$(-\infty ,-{\tfrac {3}{2}})$
$(-{\tfrac {3}{2}},\infty )$
$f(x)=2x^{3}-12x^{2}+18x+15$
$(1,3)$
$(1,3)$
$f(x)=5+36x+3x^{2}-2x^{3}$
$(-2,3)$
$(-2,3)$
$f(x)=8+36x+3x^{2}-2x^{3}$
$(-2,3)$
$(-2,3)$
$f(x)=5x^{3}-15x^{2}-120x+3$
$(-2,4)$
$(-2,4)$
$f(x)=x^{3}-6x^{2}-36x+2$
$(-2,6)$
$(-2,6)$
Solutions

## Determine Intervals of Concavity

Find the intervals where the following functions are concave up or concave down
$f(x)=10-6x-2x^{2}$
$f(x)=2x^{3}-12x^{2}+18x+15$
$(-\infty ,2)$
$(2,\infty )$
$(-\infty ,2)$
$(2,\infty )$
$f(x)=5+36x+3x^{2}-2x^{3}$
$(-\infty ,{\tfrac {1}{2}})$
$({\tfrac {1}{2}},\infty )$
$(-\infty ,{\tfrac {1}{2}})$
$({\tfrac {1}{2}},\infty )$
$f(x)=8+36x+3x^{2}-2x^{3}$
$(-\infty ,{\tfrac {1}{2}})$
$({\tfrac {1}{2}},\infty )$
$(-\infty ,{\tfrac {1}{2}})$
$({\tfrac {1}{2}},\infty )$
$f(x)=5x^{3}-15x^{2}-120x+3$
$(-\infty ,1)$
$(1,\infty )$
$(-\infty ,1)$
$(1,\infty )$
$f(x)=x^{3}-6x^{2}-36x+2$
$(-\infty ,2)$
$(2,\infty )$
$(-\infty ,2)$
$(2,\infty )$
Solutions

## Word Problems

$4t$
$t$
$10{\tfrac {\rm {m}}{\rm {s}}}$
$10{\tfrac {\rm {m}}{\rm {s}}}$
$12{\rm {\,mph}}$
$5{\rm {\,mph}}$
$13{\rm {\,mph}}$
$13{\rm {\,mph}}$
$200{\rm {\,m^{3}}}$
${\rm {m^{2}}}$
${\rm {m^{2}}}$
$216{\rm {\,cm}}$
$972{\rm {\,cm^{2}}}$
$972{\rm {\,cm^{2}}}$
$r$
$2r^{2}$
$2r^{2}$
$R=3{\rm {\,in}}$
$12\pi {\sqrt {3}}{\rm {\,in^{3}}}$
$12\pi {\sqrt {3}}{\rm {\,in^{3}}}$
$6\,{\rm {ft}}$
$15$
$6$
$4{\rm {\,ft/s}}$
$4{\rm {\,ft/s}}$
29. A canoe is being pulled toward a dock (normal to the water) using a taut rope. The canoe is normal to the water while it is being pulled. The rope is hauled in at a constant $5\,{\rm {ft/s}}$. The dock is $5\,{\rm {ft}}$ above the water. Answer items (a) through (b).
$13\,{\rm {ft}}$
$13{\rm {\,ft/s}}$
$13{\rm {\,ft/s}}$
$0.2{\rm {\,rad/s}}$
$0.2{\rm {\,rad/s}}$
$100\,{\rm {m}}$
$2\,{\rm {m}}$
$4\,{\rm {m/s}}$
$1\,{\rm {rad/s}}$
$1\,{\rm {rad/s}}$
Solutions

## Graphing Functions

For each of the following, graph a function that abides by the provided characteristics
$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).$
$f{\mbox{ has domain }}[-1,1],\ f(-1)=-1,\ f(-{\tfrac {1}{2}})=-2,\ f'(-{\tfrac {1}{2}})=0,\ f''(x)>0{\mbox{ on }}(-1,1)$
Solutions

## Approximation Problems

By assumption, for these problems, assume $\pi \approx 3.14$ and $e\approx 2.718$ unless stated otherwise. One may use a calculator or design a computer program, but one must indicate the method and reasoning behind every step where necessary.
$\sin(3)$
$\sin(3)\approx 0.14$
$\Delta x=0.14$
$f(x,y)=1-y^{2}$
$\sin(3)\approx 0.14$
$\Delta x=0.14$
$f(x,y)=1-y^{2}$
${\sqrt {2}}$
${\sqrt {2}}\approx 1.4167$
$2$
${\sqrt {2}}\approx 1.4167$
$2$
$\ln(3)$
$\ln(3)\approx 1.10{\text{ OR }}1.09$
$\ln(3)\approx 1.10{\text{ OR }}1.09$
Solutions

## Advanced Understanding

45. Consider the differentiable function $f(x)$ for all $x>-2$ and continuous function $g(x)$ below, where $g(x)$ is linear for all $x\geq 1$ and differentiable for all $x\in (-2,1)\cup (1,\infty )$, and $f(x)$ and $g(x)$ are continuous for all $x\geq -2$.
$f^{\prime }(1.6)$
$f^{\prime }(1.6)\approx -5$
$f^{\prime }(1.6)\approx -5$
$\lim _{x\to 1.6}{\frac {f(x)-3}{3-g(x)}}$
$\lim _{x\to 1.6}{\frac {f(x)-3}{3-g(x)}}={\frac {3}{7}}$
$\lim _{x\to 1.6}{\frac {f(x)-3}{3-g(x)}}={\frac {3}{7}}$
$f^{\prime }(1.6)=f^{\prime }(2)$
$f(x)$
$c\in \mathbb {R}$
$f(c)=0$
$c=2.2$
$c\in \mathbb {R}$
$f(c)=0$
$c=2.2$
$f(x)$
$g(x)$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Basics of Integration

<h1>4.1 Definite Integral</h1>
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

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{\text{ for }}i=0,1,\dots ,n$
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+\dots +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 \limits _{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 \limits _{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.
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 and negative values then $\int \limits _{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 \limits _{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 \limits _{a}^{b}f(x)dx=\int \limits _{a}^{b}f(t)dt=\int \limits _{a}^{b}f(u)du=\int \limits _{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

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 \limits _{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 \limits _{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}}}\cdot {\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 \limits _{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)^{2}i^{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)^{2}i^{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 \limits _{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

$f(x)=x^{6}$
$x=0$
$x=1$
$0.062592$
$0.262592$
$0.062592$
$0.262592$
$f(x)=x^{6}$
$x=1$
$x=2$
$12.460992$
$25.060992$
$12.460992$
$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 \limits _{a}^{b}c\cdot f(x)dx=c\int \limits _{a}^{b}f(x)dx$
When $f$ is positive, the height of the function $c\cdot f$ at a point $x$ is $c$ times the height of the function $f$ . So the area under $c\cdot f$ 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 \limits _{a}^{b}c\cdot f(x)dx=\lim _{n\to \infty }\sum _{i=1}^{n}c\cdot f(x_{i}^{*})=c\cdot \lim _{n\to \infty }\sum _{i=1}^{n}f(x_{i}^{*})=c\int \limits _{a}^{b}f(x)dx$
Example
We saw in the previous section that
    $\int \limits _{0}^{1}xdx={\frac {1}{2}}$
Using the constant rule we can use this to calculate that
    $\int \limits _{0}^{1}3xdx=3\int \limits _{0}^{1}xdx=3\cdot {\frac {1}{2}}=1.5$ ,
    $\int \limits _{0}^{1}-7xdx=-7\int \limits _{0}^{1}xdx=(-7)\cdot {\frac {1}{2}}=-3.5$ .
Example
We saw in the previous section that
    $\int \limits _{a}^{b}x^{2}dx={\frac {b^{3}-a^{3}}{3}}$
We can use this and the constant rule to calculate that
    $\int \limits _{1}^{3}2x^{2}dx=2\int \limits _{1}^{3}x^{2}dx=2\cdot {\frac {1}{3}}\cdot (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 \limits _{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 \limits _{1}^{3}9dx=9(3-1)=9\cdot 2=18$
    $\int \limits _{-2}^{6}11dx=11(6-(-2))=11\cdot 8=88$
    $\int \limits _{2}^{17}0dx=0\cdot (17-2)=0$

### The addition and subtraction rule

Addition and Subtraction Rules of Integration $\int \limits _{a}^{b}{\biglf(x)+g(x){\bigr )}dx=\int \limits _{a}^{b}f(x)dx+\int \limits _{a}^{b}g(x)dx$
$\int \limits _{a}^{b}{\biglf(x)-g(x){\bigr )}dx=\int \limits _{a}^{b}f(x)dx-\int \limits _{a}^{b}g(x)dx$
As with the constant rule, the addition rule follows from the addition rule for limits:
    $\int \limits _{a}^{b}{\biglf(x)+g(x){\bigr )}dx$ $=\lim _{n\to \infty }\sum _{i=1}^{n}{\Bigf(x_{i}^{*})+g(x_{i}^{*}){\Big )}$ $=\lim _{n\to \infty }\sum _{i=1}^{n}f(x_{i}^{*})+\lim _{n\to \infty }\sum _{i=1}^{n}g(x_{i}^{*})$ $=\int \limits _{a}^{b}f(x)dx+\int \limits _{a}^{b}g(x)dx$
The subtraction rule can be proved in a similar way.
Example
From above $\int \limits _{1}^{3}9dx=18$ and $\int \limits _{1}^{3}2x^{2}dx={\frac {52}{3}}$ so
    $\int \limits _{1}^{3}(2x^{2}+9)dx=\int \limits _{1}^{3}2x^{2}dx+\int \limits _{1}^{3}9dx={\frac {52}{3}}+18={\frac {106}{3}}$
    $\int \limits _{1}^{3}(2x^{2}-9)dx=\int \limits _{1}^{3}2x^{2}dx-\int \limits _{1}^{3}9dx={\frac {52}{3}}-18=-{\frac {2}{3}}$
Example
    $\int \limits _{0}^{2}(4x^{2}+14)dx=4\int \limits _{0}^{2}x^{2}dx+\int \limits _{0}^{2}14dx=4\cdot {\frac {1}{3}}(2^{3}-0^{3})+2\cdot 14={\frac {32}{3}}+28={\frac {116}{3}}$

#### Exercise

$f(x)=x$
$g(x)=x^{2}$
$x=0$
$x=1$
${\frac {1}{6}}$
${\frac {1}{6}}$
Solution

### The Comparison Rule

Comparison Rule
* Suppose $f(x)\geq 0$ for all $x\in [a,b]$ . Then
    $\int \limits _{a}^{b}f(x)dx\geq 0$
* Suppose $f(x)\geq g(x)$ for all $x\in [a,b]$ . Then
    $\int \limits _{a}^{b}f(x)dx\geq \int \limits _{a}^{b}g(x)dx$
* Suppose $M\geq f(x)\geq m$ for all $x\in [a,b]$ . Then
    $M(b-a)\geq \int \limits _{a}^{b}f(x)dx\geq m(b-a)$
If $f(x)\geq 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)\geq g(x)$ then $f(x)-g(x)\geq 0$ and by the first property we get the second property. Finally if $M\geq f(x)\geq 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 \limits _{a}^{b}M\geq \int \limits _{a}^{b}f(x)dx\geq \int \limits _{a}^{b}m=m(b-a)$

### Linearity with respect to endpoints

Additivity with respect to endpoints Suppose $a<c<b$ . Then
    $\int \limits _{a}^{b}f(x)dx=\int \limits _{a}^{c}f(x)dx+\int \limits _{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).
Extension of Additivity with respect to limits of integration When $a=b$ we have that $\Delta x={\frac {b-a}{n}}=0$ so
    $\int \limits _{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 {b-a}{n}}$ has changed sign. This gives
    $\int \limits _{b}^{a}f(x)dx=-\int \limits _{a}^{b}f(x)dx$
With these definitions,
    $\int \limits _{a}^{b}f(x)dx=\int \limits _{a}^{c}f(x)dx+\int \limits _{c}^{b}f(x)dx$
whatever the order of $a,b,c$ .

#### Exercise

$\int \limits _{0}^{2}x^{6}dx$
$12.523584$
$25.323584$
$12.523584$
$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 \limits _{-a}^{a}f(x)dx=0$
If $f$ is a continuous even function then for any $a$ ,
    $\int \limits _{-a}^{a}f(x)dx=2\int \limits _{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 \limits _{-a}^{0}f(x)dx=-\int \limits _{a}^{0}f(-u)du=\int \limits _{0}^{a}f(-u)du$ .
Now as $f$ is odd, $f(-u)=-f(u)$ so the integral becomes
    $\int \limits _{-a}^{0}f(x)dx=-\int \limits _{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 \limits _{-a}^{0}f(x)dx=-\int \limits _{0}^{a}f(u)du=-\int \limits _{0}^{a}f(x)dx$ .
Now we split the integral into two pieces
    $\int \limits _{-a}^{a}f(x)dx=\int \limits _{-a}^{0}f(x)dx+\int \limits _{0}^{a}f(x)dx=-\int \limits _{0}^{a}f(x)dx+\int \limits _{0}^{a}f(x)dx=0$ .
The proof of the formula for even functions is similar.
$f$
$a$
    $\int \limits _{-a}^{a}f(x)dx=2\int \limits _{0}^{a}f(x)dx$ .
    $\int \limits _{-a}^{a}f(x)dx=\int \limits _{-a}^{0}f(x)dx+\int \limits _{0}^{a}f(x)dx$
Make the substitution $u=-x;\quad du=-dx$ . $u=a$ when $x=-a$ and $u=0$ when $x=0$ . Then
    $\int \limits _{-a}^{0}f(x)dx=\int \limits _{a}^{0}f(-u)(-du)=-\int \limits _{a}^{0}f(-u)du=\int \limits _{0}^{a}f(-u)du=\int \limits _{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 \limits _{-a}^{a}f(x)dx=\int \limits _{0}^{a}f(x)dx+\int \limits _{0}^{a}f(x)dx=2\int \limits _{0}^{a}f(x)dx$
    $\int \limits _{-a}^{a}f(x)dx=\int \limits _{-a}^{0}f(x)dx+\int \limits _{0}^{a}f(x)dx$
Make the substitution $u=-x;\quad du=-dx$ . $u=a$ when $x=-a$ and $u=0$ when $x=0$ . Then
    $\int \limits _{-a}^{0}f(x)dx=\int \limits _{a}^{0}f(-u)(-du)=-\int \limits _{a}^{0}f(-u)du=\int \limits _{0}^{a}f(-u)du=\int \limits _{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 \limits _{-a}^{a}f(x)dx=\int \limits _{0}^{a}f(x)dx+\int \limits _{0}^{a}f(x)dx=2\int \limits _{0}^{a}f(x)dx$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.2 Fundamental Theorem of Calculus</h1>
The fundamental theorem 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.
As an illustrative example see § 1.8 for the connection of natural logarithm and 1/x.

## 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 {1}{b-a}}\int \limits _{a}^{b}f(x)dx=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 \limits _{a}^{b}f(x)dx=\lim _{n\to \infty }\sum _{k=1}^{n}f(x_{k}^{*})\cdot {\frac {b-a}{n}}=\lim _{n\to \infty }{\frac {b-a}{n}}\cdot \sum _{k=1}^{n}f(x_{k}^{*})$
and since
    $m\leq f(x_{k}^{*})\leq M$ for all $x_{k}^{*}\in [a,b]$
we have
    ${\begin{aligned}&\lim _{n\to \infty }{\frac {b-a}{n}}\cdot \sum _{k=1}^{n}m\leq \lim _{n\to \infty }{\frac {b-a}{n}}\cdot \sum _{k=1}^{n}f(x_{k}^{*})\leq \lim _{n\to \infty }{\frac {b-a}{n}}\cdot \sum _{k=1}^{n}M\\&\lim _{n\to \infty }mn\cdot {\frac {b-a}{n}}\leq \int \limits _{a}^{b}f(x)dx\leq \lim _{n\to \infty }Mn\cdot {\frac {b-a}{n}}\\&\lim _{n\to \infty }m(b-a)\leq \int \limits _{a}^{b}f(x)dx\leq \lim _{n\to \infty }M(b-a)\\&m(b-a)\leq \int \limits _{a}^{b}f(x)dx\leq M(b-a)\\&m\leq {\frac {1}{b-a}}\int \limits _{a}^{b}f(x)dx\leq M\end{aligned}}$
Since $f$ is continuous, by the Intermediate Value Theorem there is some $f(c)$ with $c\in [a,b]$ such that
    ${\frac {1}{b-a}}\int \limits _{a}^{b}f(x)dx=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 \limits _{a}^{x}f(t)dt\quad {\text{for }}x\in [a,b]$
Fundamental Theorem of Calculus Part I Suppose $f$ is continuous on $[a,b]$ and $F$ is defined by
    $F(x)=\int \limits _{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'(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 \limits _{a}^{b}f(x)dx=F(b)-F(a)$
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\in (a,b)$ . Pick $\Delta x$ so that $x+\Delta x\in (a,b)$ . Then
    $F(x)=\int \limits _{a}^{x}f(t)dt$
and
    $F(x+\Delta x)=\int \limits _{a}^{x+\Delta x}f(t)dt$
Subtracting the two equations gives
    $F(x+\Delta x)-F(x)=\int \limits _{a}^{x+\Delta x}f(t)dt-\int \limits _{a}^{x}f(t)dt$
Now
    $\int \limits _{a}^{x+\Delta x}f(t)dt=\int \limits _{a}^{x}f(t)dt+\int \limits _{x}^{x+\Delta x}f(t)dt$
so rearranging this we have
    $F(x+\Delta x)-F(x)=\int \limits _{x}^{x+\Delta x}f(t)dt$
According to the Mean Value Theorem for Integration, there exists a $c\in [x,x+\Delta x]$ such that
    $\int \limits _{x}^{x+\Delta x}f(t)dt=f(c)\cdot \Delta x$
Notice that $c$ depends on $\Delta x$ . Anyway what we have shown is that
    $F(x+\Delta x)-F(x)=f(c)\cdot \Delta x$
and dividing both sides by $\Delta 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}{\frac {F(x+\Delta x)-F(x)}{\Delta x}}=\lim _{\Delta x\to 0}f(c)$
To find the other limit, we will use the squeeze theorem. $c\in [x,x+\Delta x]$ , so $x\leq c\leq x+\Delta x$ . Hence,
    $\lim _{\Delta x\to 0}{\Bigx+\Delta x{\Big ]}=x\quad \Rightarrow \quad \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.
$\blacksquare$

#### Proof of Fundamental Theorem of Calculus Part II

Define $P(x)=\int \limits _{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)$ ,
    ${\begin{aligned}&P'(x)=F'(x)\\&P'(x)-F'(x)=0\\&{\BigP(x)-F(x){\Big )}'=0\end{aligned}}$
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 \limits _{a}^{b}f(t)dx=P(b)=F(b)+C=F(b)-F(a)$
$\blacksquare$

## 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 \limits _{a}^{b}f(x)dx=F(b)-F(a)$
where $F'(x)=f(x)$ . As a convenience, we use the notation
    $F(x){\bigg |}_{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\notin [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 \limits _{a}^{b}x^{n}dx={\frac {x^{n+1}}{n+1}}{\Bigg |}_{a}^{b}={\frac {b^{n+1}-a^{n+1}}{n+1}}$ as long as $n\neq -1$ and $0\notin [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 \limits _{a}^{b}x^{n}dx={\frac {x^{n+1}}{n+1}}{\Bigg |}_{a}^{b}={\frac {b^{n+1}-a^{n+1}}{n+1}}$ as long as $n>0$ .

### Examples

* To find $\int \limits _{1}^{2}x^{3}dx$ we raise the power by 1 and have to divide by 4. So
    $\int \limits _{1}^{2}x^{3}dx={\frac {x^{4}}{4}}{\Bigg |}_{1}^{2}={\frac {2^{4}}{4}}-{\frac {1^{4}}{4}}={\frac {15}{4}}$
* The power rule also works for negative powers. For instance
    $\int \limits _{1}^{3}{\frac {dx}{x^{3}}}=\int \limits _{1}^{3}x^{-3}dx={\frac {x^{-2}}{-2}}{\Bigg |}_{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 \limits _{0}^{5}{\sqrt {x}}dx=\int \limits _{0}^{5}x^{\frac {1}{2}}dx={\frac {x{\sqrt {x}}}{\frac {3}{2}}}{\Bigg |}_{0}^{5}={\frac {2}{3}}\left(5^{\frac {3}{2}}-0^{\frac {3}{2}}\right)={\frac {10{\sqrt {5}}}{3}}$
* Using linearity the power rule can also be thought of as applying to constants. For example,
    $=\int \limits _{3}^{11}7dx=\int \limits _{3}^{11}7x^{0}dx=7\int \limits _{3}^{11}x^{0}dx=7x{\Bigg |}_{3}^{11}=7(11-3)=56$
* Using the linearity rule we can now integrate any polynomial. For example
    $\int \limits _{0}^{3}(3x^{2}+4x+2)dx=(x^{3}+2x^{2}+2x){\Bigg |}_{0}^{3}=3^{3}+2\cdot 3^{2}+2\cdot 3-0=27+18+6=51$

## Exercises

$\int \limits _{0}^{1}x^{6}dx$
${\frac {1}{7}}=0.{\overline {142857}}$
${\frac {1}{7}}=0.{\overline {142857}}$
$\int \limits _{1}^{2}x^{6}dx$
${\frac {127}{7}}=18.{\overline {142857}}$
${\frac {127}{7}}=18.{\overline {142857}}$
$\int \limits _{0}^{2}x^{6}dx$
${\frac {128}{7}}=18.{\overline {285714}}$
${\frac {128}{7}}=18.{\overline {285714}}$
$\int \limits _{2}^{3}{\frac {x^{3}+3x^{2}-4}{x^{2}}}dx$
${\frac {29}{6}}=4.{\overline {833}}$
${\frac {29}{6}}=4.{\overline {833}}$
$\int \limits _{1}^{4}2x^{3}+{\frac {1}{3x^{2}}}-4{\sqrt {x}}+5dx$
${\frac {1489}{12}}=124.{\overline {083}}$
${\frac {1489}{12}}=124.{\overline {083}}$
$f(x)={\begin{cases}x^{3}&,&x>1\\2x+1&,&x\leq 1\end{cases}}$
$\int \limits _{0}^{6}f(x)dx$
$\int \limits _{0}^{6}f(x)dx={\frac {1301}{4}}=325.25$
$\int \limits _{0}^{6}f(x)dx={\frac {1301}{4}}=325.25$
$f(x)=\int \limits _{1}^{x}t^{2}dt$
$f'(x)$
$f'(x)=x^{2}$
$f'(x)=x^{2}$
$A(\theta )=\int \limits _{1}^{\theta ^{2}}2x\cos \left(4x^{2}\right)dx$
$A'(\theta )$
$A'(\theta )=4\theta ^{3}\cos(4\theta ^{4})$
$A'(\theta )=4\theta ^{3}\cos(4\theta ^{4})$
$M(x)=\int \limits _{x^{3}}^{x}\cos ^{4}(t)-\sin ^{2}(t)dt$
$M'(x)$
$M'(x)=-3x^{2}\cos ^{4}(x^{3})+3x^{2}\sin ^{2}(x^{3})+\cos ^{4}(x)-\sin ^{2}(x)$
$M'(x)=-3x^{2}\cos ^{4}(x^{3})+3x^{2}\sin ^{2}(x^{3})+\cos ^{4}(x)-\sin ^{2}(x)$
$f(x)={\sqrt {x}}$
$[4,9]$
$c$
$c={\frac {1444}{225}}=6.{\overline {417}}$
$c={\frac {1444}{225}}=6.{\overline {417}}$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.3 Indefinite Integral</h1>

## 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}=nx^{n-1}$
In our circumstance, we have:
    ${\frac {d}{dx}}x^{3}=3x^{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 3x^{2}=6x^{2}$
Thus, we say that $2x^{3}$ is an antiderivative of $6x^{2}$ .

### Exercises

$\int {\frac {3x}{2}}dx$
${\frac {3}{4}}x^{2}+C$
${\frac {3}{4}}x^{2}+C$
$f(x)=2x^{4}$
${\frac {2x^{5}}{5}}+C$
${\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\cdot f(x)dx=c\int f(x)dx$
Sum/Difference Rule for indefinite integrals
    $\int {\Bigf(x)+g(x){\Big )}dx=\int f(x)dx+\int g(x)dx$
    $\int {\Bigf(x)-g(x){\Big )}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 {x^{n+1}}{n+1}}+C$ for all $n\neq -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 |x|+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 {\Bigx^{4}+1+2\sin(x){\Big )}dx$ $=\int x^{4}dx+\int 1\,dx+\int 2\sin(x)dx$ $={\frac {x^{5}}{5}}+x-2\cos(x)+C$ .

### Exercises

$\int (7x^{2}+3\cos(x)-e^{x})dx$
${\frac {7x^{3}}{3}}+3\sin(x)-e^{x}+C$
${\frac {7x^{3}}{3}}+3\sin(x)-e^{x}+C$
$\int {\Big{\tfrac {2}{5x}}+\sin(x){\Big )}dx$
${\tfrac {2}{5}}\ln |x|-\cos(x)+C$
${\tfrac {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 {\biglu(x){\bigr )}dx$ we just have to notice that by the Chain Rule
    ${\frac {d}{dx}}\sin {\biglu(x){\bigr )}=\cos {\biglu(x){\bigr )}{\frac {du}{dx}}=u'(x)\cos {\biglu(x){\bigr )}$
As long as $u'$ is continuous we have that
    $\int \cos {\biglu(x){\bigr )}u'(x)dx=\sin {\biglu(x){\bigr )}+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)+C=\int \cos(u)du$
So, for instance, if $u(x)=x^{3}$ we have worked out that
    $\int {\bigl\cos(x^{3})\cdot 3x^{2}{\bigr )}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{\biglu(x){\bigr )}{\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 {dx}{(x^{2}+a^{2}){\sqrt {x^{2}+a^{2}}}}}={\frac {x}{a^{2}{\sqrt {x^{2}+a^{2}}}}}+C$
First, we re-write the integral:
    $\int {\frac {dx}{(x^{2}+a^{2}){\sqrt {x^{2}+a^{2}}}}}$ $=\int (x^{2}+a^{2})^{-{\frac {3}{2}}}dx$ $=\int \left(x^{2}\left(1+{\tfrac {a^{2}}{x^{2}}}\right)\right)^{-{\frac {3}{2}}}dx$ $=\int x^{-3}\left(1+{\tfrac {a^{2}}{x^{2}}}\right)^{-{\frac {3}{2}}}dx$ $=\int \left(1+{\tfrac {a^{2}}{x^{2}}}\right)^{-{\frac {3}{2}}}\left(x^{-3}dx\right)$
Now we perform the following substitution:
    $u=1+{\frac {a^{2}}{x^{2}}}$
    ${\frac {du}{dx}}=-2a^{2}x^{-3}\ \implies \ x^{-3}dx=-{\frac {du}{2a^{2}}}$
Which yields:
       $\int \left(1+{\tfrac {a^{2}}{x^{2}}}\right)^{-{\frac {3}{2}}}\left(x^{-3}dx\right)=$
       $=\int u^{-{\frac {3}{2}}}\left(-{\frac {du}{2a^{2}}}\right)$
       $=-{\frac {1}{2a^{2}}}\int u^{-{\frac {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

$\int x\sin(2x^{2})dx$
$u=2x^{2}$
$-{\frac {\cos(2x^{2})}{4}}+C$
$-{\frac {\cos(2x^{2})}{4}}+C$
$\int -3\cos(x)e^{\sin(x)}dx$
$-3e^{\sin(x)}+C$
$-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.

### 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 \left(f'(x)\int g(x)dx\right)dx$
it is also very important to notice that $\int f(x)g(x)dx=f(x)\int g(x)dx-\int \left(f'(x)\int g(x)dx\right)dx$ is not equal to $\int f(x)g(x)dx=g(x)\int f(x)dx-\int \left(g'(x)\int f(x)dx\right)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$ $=x\sin(x)-\int \sin(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=2xdx$ ,
    $dv=e^{x}dx$ , so that $v=e^{x}$ .
Then:
    $\int x^{2}e^{x}dx$ $=\int u\,dv$ $=uv-\int v\,du$ $=x^{2}e^{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^{x}dx$ , so that $v=e^{x}$
and integrating by parts gives
    $\int xe^{x}dx=xe^{x}-\int e^{x}dx=e^{x}(x-1)$
So, finally we obtain
    $\int x^{2}e^{x}dx=x^{2}e^{x}-2e^{x}(x-1)+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={\frac {dx}{x}}$ ,
    $v=x$ so $dv=1\,dx$ .
Then using integration by parts,
    $\int \ln(x)dx$ $=x\ln(x)-\int {\frac {x}{x}}dx$ $=x\ln(x)-\int 1\,dx$ $=x\ln(x)-x+C$ $=x{\bigl\ln(x)-1{\bigr )}+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)$ so $du={\frac {dx}{1+x^{2}}}$
    $v=x$ so $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)-{\tfrac {1}{2}}\ln(1+x^{2})+C$
Example
Find $\int e^{x}\cos(x)dx$
This example uses integration by parts twice. First let,
    $u=e^{x}$ so $du=e^{x}dx$
    $dv=\cos(x)dx$ so $v=\sin(x)$
so
    $\int e^{x}\cos(x)dx=e^{x}\sin(x)-\int e^{x}\sin(x)dx$
Now, to evaluate the remaining integral, we use integration by parts again, with
    $u=e^{x}$ so $du=e^{x}dx$
    $v=-\cos(x)$ so $dv=\sin(x)dx$
Then
    $\int e^{x}\sin(x)dx$ $=-e^{x}\cos(x)-\int -e^{x}\cos(x)dx$ $=-e^{x}\cos(x)+\int e^{x}\cos(x)dx$
Putting these together, we have
    $\int e^{x}\cos(x)dx=e^{x}\sin(x)+e^{x}\cos(x)-\int e^{x}\cos(x)dx$
Notice that the same integral shows up on both sides of this equation, but with opposite signs. The integral does not cancel; it doubles when we add the integral to both sides to get
    $2\int e^{x}\cos(x)dx=e^{x}{\bigl\sin(x)+\cos(x){\bigr )}$
    $\int e^{x}\cos(x)dx={\frac {e^{x}{\bigl\sin(x)+\cos(x){\bigr )}}{2}}$

### Exercises

$\int {\frac {2x-5}{x^{3}}}dx$
$u=2x-5$
$dv={\frac {dx}{x^{3}}}$
${\frac {5-4x}{2x^{2}}}+C$
${\frac {5-4x}{2x^{2}}}+C$
$\int (2x-1)e^{-3x+1}dx$
${\frac {(1-6x)e^{1-3x}}{9}}+C$
${\frac {(1-6x)e^{1-3x}}{9}}+C$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>Failed to match page to section number. Check your argument; if correct, consider updating Template:Calculus/map page. Improper integrals</h1>
The definition of a definite integral:
    $\int \limits _{a}^{b}f(x)dx$
requires the interval $[a,b]$ be finite. The Fundamental Theorem of Calculus requires that $f$ be continuous on $[a,b]$ . In this section, you will be studying a method of evaluating integrals that fail these requirements—either because their limits of integration are infinite, or because a finite number of discontinuities exist on the interval $[a,b]$ . Integrals that fail either of these requirements are improper integrals. (If you are not familiar with L'Hôpital's rule, it is a good idea to review it before reading this section.)

## Improper Integrals with Infinite Limits of Integration

Consider the integral
    $\int \limits _{1}^{\infty }{\frac {dx}{x^{2}}}$
Assigning a finite upper bound $b$ in place of infinity gives
    $\lim _{b\to \infty }\int \limits _{1}^{b}{\frac {dx}{x^{2}}}=\lim _{b\to \infty }\left({\frac {1}{1}}-{\frac {1}{b}}\right)=\lim _{b\to \infty }\left(1-{\frac {1}{b}}\right)=1$
This improper integral can be interpreted as the area of the unbounded region between $f(x)={\frac {1}{x^{2}}}$ , $y=0$ (the $x$-axis), and $x=1$ .

   ### Definition

   1. Suppose $\int \limits _{a}^{b}f(x)dx$ exists for all $b\geq a$ . Then we define
       $\int \limits _{a}^{\infty }f(x)dx=\lim _{b\to \infty }\int \limits _{a}^{b}f(x)dx$ , as long as this limit exists and is finite.
   If it does exist we say the integral is convergent and otherwise we say it is divergent.
   2. Similarly if $\int \limits _{a}^{b}f(x)dx$ exists for all $a\leq b$ we define
       $\int \limits _{-\infty }^{b}f(x)dx=\lim _{a\to -\infty }\int \limits _{a}^{b}f(x)dx$
   3. Finally suppose $c$ is a fixed real number and that $\int \limits _{-\infty }^{c}f(x)dx$ and $\int \limits _{c}^{\infty }f(x)dx$ are both convergent. Then we define
       $\int \limits _{-\infty }^{\infty }f(x)dx=\int \limits _{-\infty }^{c}f(x)dx+\int \limits _{c}^{\infty }f(x)dx$
Example: Convergent Improper Integral
We claim that
$\int \limits _{0}^{\infty }e^{-x}dx=1$
To do this we calculate
$\int \limits _{0}^{\infty }e^{-x}dx$
$=\lim _{b\to \infty }\int \limits _{0}^{b}e^{-x}dx$
$=\lim _{b\to \infty }(-e^{-x}){\Bigr |}_{0}^{b}$
$=\lim _{b\to \infty }\left(-e^{-b}+1\right)$
$=1$ :
Example: Divergent Improper Integral
We claim that the integral
$\int \limits _{1}^{\infty }{\frac {dx}{x}}$ diverges.
This follows as
$\int \limits _{1}^{\infty }{\frac {dx}{x}}$
$=\lim _{b\to \infty }\int \limits _{1}^{b}{\frac {dx}{x}}$
$=\lim _{b\to \infty }\ln(x){\Bigr |}_{1}^{b}$
$=\lim _{b\to \infty }\left(\ln(b)-0\right)$
$=\infty$
Therefore
$\int \limits _{1}^{\infty }{\frac {dx}{x}}$ diverges. :
Example: Improper Integral
Find $\int \limits _{0}^{\infty }x^{2}e^{-x}dx$ .
To calculate the integral use integration by parts twice to get
$\int \limits _{0}^{b}x^{2}e^{-x}dx$
$=(-x^{2}e^{-x}){\Bigr |}_{0}^{b}+2\int \limits _{0}^{b}xe^{-x}dx$
$=-b^{2}e^{-b}+2\left((-xe^{-x}){\Bigr |}_{0}^{b}+\int \limits _{0}^{b}e^{-x}dx\right)$
$=-b^{2}e^{-b}+2\left(-be^{-b}-(e^{-x}){\Bigr |}_{0}^{b}\right)$
$=-b^{2}e^{-b}+2(-be^{-b}-e^{-b}+1)$
Now $\lim _{b\to \infty }e^{-b}=0$ and because exponentials overpower polynomials, we see that $\lim _{b\to \infty }b^{2}e^{-b}=0$ and $\lim _{b\to \infty }be^{-b}=0$ as well. Hence,
$\int \limits _{0}^{\infty }x^{2}e^{-x}dx=\lim _{b\to \infty }\int \limits _{0}^{b}x^{2}e^{-x}dx=0+2(0-0+1)=2$ :
Example: Powers
Show $\int \limits _{1}^{\infty }{\frac {dx}{x^{p}}}={\begin{cases}{\frac {1}{p-1}},&{\text{if }}p>1\\{\text{diverges}},&{\text{if }}p\leq 1\end{cases}}$
If $p\neq 1$ then
$\int \limits _{1}^{\infty }{\frac {dx}{x^{p}}}$
$=\lim _{b\to \infty }\int \limits _{1}^{b}x^{-p}dx$
$=\lim _{b\to \infty }\left({\frac {x^{-p+1}}{-p+1}}\right){\Bigg |}_{1}^{b}$
$=-{\frac {1}{1-p}}\lim _{b\to \infty }\left(b^{-p+1}-1\right)$
$={\begin{cases}{\frac {1}{p-1}},&{\text{if }}p>1\\{\text{diverges}},&{\text{if }}p<1\end{cases}}$
Notice that we had to assume that $p\neq 1$ to avoid dividing by 0. However the $p=1$ case was done in a previous example. :

## Improper Integrals with a Finite Number Discontinuities

First we give a definition for the integral of functions which have a discontinuity at one point.

   ### Definition of improper integrals with a single discontinuity

   If $f$ is continuous on the interval $[a,b)$ and is discontinuous at $b$ , we define
       $\int \limits _{a}^{b}f(x)dx=\lim _{c\to b^{-}}\int \limits _{a}^{c}f(x)dx$
   If the limit in question exists we say the integral converges and otherwise we say it diverges.
   Similarly if $f$ is continuous on the interval $(a,b]$ and is discontinuous at $a$ , we define
       $\int \limits _{a}^{b}f(x)dx=\lim _{c\to a^{+}}\int \limits _{c}^{b}f(x)dx$
   Finally suppose $f$ has an discontinuity at a point $c\in (a,b)$ and is continuous at all other points in $[a,b]$ . If $\int \limits _{a}^{c}f(x)dx$ and $\int \limits _{c}^{b}f(x)dx$ converge we define
       $\int \limits _{a}^{b}f(x)dx$=$\int \limits _{a}^{c}f(x)dx+\int \limits _{c}^{b}f(x)dx$
Example 1
Show $\int \limits _{0}^{1}{\frac {dx}{x^{p}}}={\begin{cases}{\frac {1}{1-p}},&{\text{if }}p<1\\{\text{diverges}},&{\text{if }}p\geq 1\end{cases}}$
If $p\neq 1$ then
$\int \limits _{0}^{1}{\frac {dx}{x^{p}}}$
$=\lim _{a\to 0^{+}}\int \limits _{a}^{1}x^{-p}dx$
$=\lim _{a\to 0^{+}}\left({\frac {x^{-p+1}}{-p+1}}\right){\Bigg |}_{a}^{1}$
$=-{\frac {1}{1-p}}\lim _{a\to 0^{+}}\left(1-a^{-p+1}\right)$
$={\begin{cases}{\frac {1}{1-p}},&{\mbox{if }}p<1\\{\text{diverges}},&{\text{if }}p>1\end{cases}}$
Notice that we had to assume that $p\neq 1$ do avoid dividing by 0. So instead we do the $p=1$ case separately,
$\int \limits _{0}^{1}{\frac {dx}{x}}=\lim _{a\to 0^{+}}\left[\ln {\big|x|{\big )}{\Big |}_{a}^{1}\right]=\lim _{a\to 0^{+}}{\Big-\ln(a){\Big ]}$
which diverges. :
* Example 2
* The integral $\int \limits _{-1}^{3}{\frac {dx}{x-2}}$ is improper because the integrand is not continuous at $x=2$ . However had we not noticed that we might have been tempted to apply the fundamental theorem of calculus and conclude that it equals
* $\ln {\big|x-2|{\big )}{\Big |}_{-1}^{3}=\ln(5)-\ln(3)=\ln \left({\tfrac {5}{3}}\right)$
* which is not correct. In fact the integral diverges since
* ${\begin{aligned}\int \limits _{-1}^{3}{\frac {dx}{x-2}}&=\lim _{b\to 2^{-}}\int \limits _{-1}^{b}{\frac {dx}{x-2}}+\lim _{a\to 2^{+}}\int \limits _{a}^{3}{\frac {dx}{x-2}}\\&=\lim _{b\to 2^{-}}\ln {\big|x-2|{\big )}{\Big |}_{-1}^{b}+\lim _{a\to 2^{+}}\ln {\big|x-2|{\big )}{\Big |}_{a}^{3}\\&=\lim _{b\to 2^{-}}{\Big\ln(2-b)-\ln(3){\Big ]}+\lim _{a\to 2^{+}}{\Big\ln(1)-\ln(a-2){\Big ]}\\&=\lim _{b\to 2^{-}}{\Big\ln(2-b){\Big ]}-\ln(3)+\lim _{a\to 2^{+}}{\Big-\ln(a-2){\Big ]}\\\end{aligned}}$
* and $\lim _{b\to 2^{-}}{\Big\ln(2-b){\Big ]}$ and $\lim _{a\to 2^{+}}{\Big-\ln(a-2){\Big ]}$ both diverge.
We can also give a definition of the integral of a function with a finite number of discontinuities.

   ### Definition: Improper integrals with finite number of discontinuities

   Suppose $f$ is continuous on $[a,b]$ except at points $c_{1}<c_{2}<\ldots <c_{n}$ in $[a,b]$ . We define ${\begin{aligned}\int \limits _{a}^{b}f(x)dx=\int \limits _{a}^{c_{1}}f(x)dx+\int \limits _{c_{1}}^{c_{2}}f(x)dx+\int \limits _{c_{2}}^{c_{3}}f(x)dx+\cdots +\int \limits _{c_{n-1}}^{c_{n}}f(x)dx+\int \limits _{c_{n}}^{b}f(x)dx\end{aligned}}$ as long as each integral on the right converges.
Notice that by combining this definition with the definition for improper integrals with infinite endpoints, we can define the integral of a function with a finite number of discontinuities with one or more infinite endpoints.

## Comparison Test

There are integrals which cannot easily be evaluated. However it may still be possible to show they are convergent by comparing them to an integral we already know converges.
   Theorem (Comparison Test) Let $f,g$ be continuous functions defined for all $x\geq a$ .
   * Suppose $g(x)\geq f(x)\geq 0$ for all $x\geq a$ . Then if $\int \limits _{a}^{\infty }g(x)dx$ converges so does $\int \limits _{a}^{\infty }f(x)dx$ .
   * Suppose $f(x)\geq h(x)\geq 0$ for all $x\geq a$ . Then if $\int \limits _{a}^{\infty }h(x)dx$ diverges so does $\int \limits _{a}^{\infty }f(x)dx$ .
A similar theorem holds for improper integrals of the form $\int \limits _{-\infty }^{b}f(x)dx$ and for improper integrals with discontinuities.
* Example: Use of comparsion test to show convergence
* Show that $\int \limits _{1}^{\infty }{\frac {\sin(x)+2}{x^{2}}}dx$ converges.
* For all $x$ we know that $-1\leq \sin(x)\leq 1$ so $1\leq \sin(x)+2\leq 3$ . This implies that
* $0\leq {\frac {\sin(x)+2}{x^{2}}}\leq {\frac {3}{x^{2}}}$ .
* We have seen that $\int \limits _{1}^{\infty }{\frac {3}{x^{2}}}dx=3\int \limits _{1}^{\infty }{\frac {dx}{x^{2}}}$ converges. So putting $f(x)={\frac {\sin(x)+2}{x^{2}}}$ and $g(x)={\frac {3}{x^{2}}}$ into the comparison test we get that the integral $\int \limits _{1}^{\infty }{\frac {\sin(x)+2}{x^{2}}}dx$ converges as well.
* Example: Use of Comparsion Test to show divergence
* Show that $\int \limits _{1}^{\infty }{\frac {\sin(x)+2}{x}}dx$ diverges.
* Just as in the previous example we know that $\sin(x)+2\geq 1$ for all $x$ . Thus
* ${\frac {\sin(x)+2}{x}}\geq {\frac {1}{x}}\geq 0$
* We have seen that $\int \limits _{1}^{\infty }{\frac {dx}{x}}$ diverges. So putting $f(x)={\frac {\sin(x)+2}{x}}$ and $g(x)={\frac {1}{x}}$ into the comparison test we get that $\int \limits _{1}^{\infty }{\frac {\sin(x)+2}{x}}dx$ diverges as well.

### An extension of the comparison theorem

To apply the comparison theorem you do not really need $g(x)\geq f(x)\geq 0$ for all $x\geq a$ . What we actually need is this inequality holds for sufficiently large $x$ (i.e. there is a number $c$ such that $g(x)\geq f(x)$ for all $x\geq c$). For then
    $\int \limits _{a}^{\infty }f(x)dx=\int \limits _{a}^{c}f(x)dx+\int \limits _{c}^{\infty }f(x)dx$
so the first integral converges if and only if third does, and we can apply the comparison theorem to the $\int \limits _{c}^{\infty }f(x)dx$ piece.
* Example
* Show that $\int \limits _{1}^{\infty }{\sqrt {\frac {x^{7}}{e^{3x}}}}dx$ converges.
* The reason that this integral converges is because for large $x$ the $e^{-x}$ factor in the integrand is dominant. We could try comparing $x^{\frac {7}{2}}e^{-x}$ with $e^{-x}$ , but as $x\geq 1$ , the inequality
* $x^{\frac {7}{2}}e^{-x}\geq e^{-x}$
* is the wrong way around to show convergence.
* Instead we rewrite the integrand as $x^{\frac {7}{2}}e^{-{\frac {3x}{2}}}dx=x^{\frac {7}{2}}e^{-{\frac {x}{2}}}e^{-x}dx$ .
* Since the limit $\lim _{x\to \infty }{\Bigx^{\frac {7}{2}}e^{-{\frac {x}{2}}}{\Big ]}=0$ we know that for $x$ sufficiently large we have $x^{\frac {7}{2}}e^{-{\frac {x}{2}}}\leq 1$ . So for large $x$ ,
* $x^{\frac {7}{2}}e^{-{\frac {7x}{2}}}=x^{\frac {7}{2}}e^{-{\frac {x}{2}}}e^{-x}\leq e^{-x}$
* Since the integral $\int \limits _{1}^{\infty }e^{-x}dx$ converges the comparison test tells us that $\int \limits _{1}^{\infty }{\sqrt {\frac {x^{7}}{e^{3x}}}}dx$ converges as well.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Integration Techniques

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
<h1>4.5 Infinite Sums</h1>
The most basic, and arguably the most difficult, type of evaluation is to use the formal definition of a Riemann integral.

## Exact Integrals as Limits of Sums

Using the definition of an integral, we can evaluate the limit as $n$ goes to infinity. This technique requires a fairly high degree of familiarity with summation identities. This technique is often referred to as evaluation "by definition," and can be used to find definite integrals, as long as the integrands are fairly simple. We start with definition of the integral:
    $\int \limits _{a}^{b}f(x)dx$ $=\lim _{n\to \infty }\left[{\frac {b-a}{n}}\sum _{k=1}^{n}f(x_{k}^{*})\right]$ Then picking $x_{k}^{*}$ to be $x_{k}=a+k{\frac {b-a}{n}}$ we get, $=\lim _{n\to \infty }\left[{\frac {b-a}{n}}\sum _{k=1}^{n}f{\biga+k{\tfrac {b-a}{n}}{\big )}\right]$
In some simple cases, this expression can be reduced to a real number, which can be interpreted as the area under the curve if $f(x)$ is positive on $[a,b]$ .

### Example 1

Find $\int \limits _{0}^{2}x^{2}dx$ by writing the integral as a limit of Riemann sums.
    $\int \limits _{0}^{2}x^{2}dx$ $=\lim _{n\to \infty }\left[{\frac {b-a}{n}}\sum _{k=1}^{n}f(x_{k}^{*})\right]$ $=\lim _{n\to \infty }\left[{\frac {2}{n}}\sum _{k=1}^{n}f{\big{\tfrac {2k}{n}}{\big )}\right]$ $=\lim _{n\to \infty }\left[{\frac {2}{n}}\sum _{k=1}^{n}\left({\frac {2k}{n}}\right)^{2}\right]$ $=\lim _{n\to \infty }\left[{\frac {2}{n}}\sum _{k=1}^{n}{\frac {4k^{2}}{n^{2}}}\right]$ $=\lim _{n\to \infty }\left[{\frac {8}{n^{3}}}\sum _{k=1}^{n}k^{2}\right]$ $=\lim _{n\to \infty }\left[{\frac {8}{n^{3}}}\cdot {\frac {n(n+1)(2n+1)}{6}}\right]$ $=\lim _{n\to \infty }\left[{\frac {4}{3}}\cdot {\frac {2n^{2}+3n+1}{n^{2}}}\right]$ $=\lim _{n\to \infty }\left[{\frac {8}{3}}+{\frac {4}{n}}+{\frac {4}{3n^{2}}}\right]$ $={\frac {8}{3}}$
In other cases, it is even possible to evaluate indefinite integrals using the formal definition. We can define the indefinite integral as follows:
    $\int f(x)dx$ $=\int \limits _{0}^{x}f(t)dt=\lim _{n\to \infty }\left[{\frac {x-0}{n}}\sum _{k=1}^{n}f(t_{k}^{*})\right]$ $=\lim _{n\to \infty }\left[{\frac {x}{n}}\sum _{k=1}^{n}f{\big0+{\tfrac {k(x-0)}{n}}{\big )}\right]$ $=\lim _{n\to \infty }\left[{\frac {x}{n}}\sum _{k=1}^{n}f{\big{\tfrac {kx}{n}}{\big )}\right]$

### Example 2

Suppose $f(x)=x^{2}$ , then we can evaluate the indefinite integral as follows.
    $\int \limits _{0}^{x}f(t)dt$ $=\lim _{n\to \infty }\left[{\frac {x}{n}}\sum _{k=1}^{n}f{\big{\tfrac {kx}{n}}{\big )}\right]$ $=\lim _{n\to \infty }\left[{\frac {x}{n}}\sum _{k=1}^{n}\left({\frac {kx}{n}}\right)^{2}\right]$ $=\lim _{n\to \infty }\left[{\frac {x}{n}}\sum _{k=1}^{n}{\frac {k^{2}\cdot x^{2}}{n^{2}}}\right]$ $=\lim _{n\to \infty }\left[{\frac {x^{3}}{n^{3}}}\sum _{k=1}^{n}k^{2}\right]$ $=\lim _{n\to \infty }\left[{\frac {x^{3}}{n^{3}}}\sum _{k=1}^{n}k^{2}\right]$ $=\lim _{n\to \infty }\left[{\frac {x^{3}}{n^{3}}}\cdot {\frac {n(n+1)(2n+1)}{6}}\right]$ $=\lim _{n\to \infty }\left[{\frac {x^{3}}{n^{3}}}\cdot {\frac {2n^{3}+3n^{2}+n}{6}}\right]$ $=x^{3}\cdot \lim _{n\to \infty }\left[{\frac {2n^{3}}{6n^{3}}}+{\frac {3n^{2}}{6n^{3}}}+{\frac {n}{6n^{3}}}\right]$ $=x^{3}\cdot \lim _{n\to \infty }\left[{\frac {1}{3}}+{\frac {1}{2n}}+{\frac {1}{6n^{2}}}\right]$ $=x^{3}\cdot \left({\frac {1}{3}}\right)$ $={\frac {x^{3}}{3}}$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.6 Derivative Rules and the Substitution Rule</h1>
After learning a simple list of antiderivatives, it is time to move on to more complex integrands, which are not at first readily integrable. In these first steps, we notice certain special case integrands which can be easily integrated in a few steps.

## Recognizing Derivatives and Reversing Derivative Rules

If we recognize a function $g(x)$ as being the derivative of a function $f(x)$ , then we can easily express the antiderivative of $g(x)$ :
$\int g(x)dx=f(x)+C$
For example, since
${\frac {d}{dx}}\sin(x)=\cos(x)$
we can conclude that
$\int \cos(x)dx=\sin(x)+C$
Similarly, since we know $e^{x}$ is its own derivative,
$\int e^{x}dx=e^{x}+C$
The power rule for derivatives can be reversed to give us a way to handle integrals of powers of $x$ . Since
${\frac {d}{dx}}x^{n}=nx^{n-1}$
we can conclude that
$\int nx^{n-1}dx=x^{n}+C$
or, a little more usefully,
$\int x^{n}dx={\frac {x^{n+1}}{n+1}}+C$

## Integration by Substitution

Very rarely will we encounter a question where they ask us
    1v. Evaluate $\int nx^{n-1}dx$ or $\int \cos(x)dx$
is. We usually get
    2iii. Evaluate $\int {\frac {\sin(\ln(x))}{x}}dx$
instead. These look hard, but there is a way to do them. Mathematicians call it Integration by Substitution, and for many integrals, this can be used to re-express the integrand in a way that makes finding of an antiderivative possible and easy. Sure, depending on the form of the integrand, the substitution to make may be different, but there is no doubt that the overall method is useful.
The objective of Integration by substitution is to substitute the integrand from an expression with variable $x$ and the right side of the integral $dx$ to an expression with variable $u$ where $u=g(x)$ and the right side of the integral $du$ , where $du=g'(x)dx$ . How? By identifying a function and its derivative that makes up a part of the overall equation.

#### Goal

The general gist of Integration by Substitution is to transform the integral so that instead of referencing $x$ , it references the function $u$ . We can show how this method works by abstracting each step using math. In math, we can write down what we want to do (write the steps of Integration by Substitution in math) by writing
Given $u=g(x)$ ,
    $\int \limits _{x=a}^{x=b}f(x)dx\ \to \ \int \limits _{u=c}^{u=d}h(u)du$

#### Steps

    $\int \limits _{x=a}^{x=b}f(x)dx$ $=\int \limits _{x=a}^{x=b}f(x)\ {\frac {du}{du}}\ dx$ (1) i.e. ${\frac {du}{du}}=1$ $=\int \limits _{x=a}^{x=b}{\left(f(x)\ {\frac {dx}{du}}\right)\left({\frac {du}{dx}}\right)}\ dx$ (2) i.e. ${\frac {dx}{du}}\cdot {\frac {du}{dx}}=1$ $=\int \limits _{x=a}^{x=b}\left(f(x)\ {\frac {dx}{du}}\right)g'(x)\ dx$ (3) i.e. ${\frac {du}{dx}}=g'(x)$ $=\int \limits _{x=a}^{x=b}h(g(x))g'(x)dx$ (4) i.e. Now equate $\left(f(x)\ {\frac {dx}{du}}\right)$ with $h(g(x))$ $=\int \limits _{x=a}^{x=b}h(u)g'(x)dx$ (5) i.e. $g(x)=u$ $=\int \limits _{u=g(a)}^{u=g(b)}h(u)du$ (6) i.e. $du={\frac {du}{dx}}dx=g'(x)dx$ $=\int \limits _{u=c}^{u=d}h(u)du$ (7) i.e. We have achieved our desired result

#### Procedure

If the previous mathematical steps are difficult to grasp all at once or difficult to put into practice, don't worry! Here are the steps written in plain English. It even includes the Goal too.
* Find a function $u=g(x)$ that has a $g'(x)$ also in the expression somewhere . This may involve experimenting or staring at the expression in the integrand long enough
** If the question is hard, finding the $g'(x)$ may involve synthesizing numbers (constants) from nowhere so that it can be used to cancel out portions of $g'(x)$ . However, if the entirety of $g'(x)$ needs to cancel artificially, then this may be a sign that you are making a question harder.
* Calculate $g'(x)={\frac {du}{dx}}$
* Calculate $h(u)$ which is $f(x){\frac {dx}{du}}={\frac {f(x)}{g'(x)}}$ and make sure the final expression $h(u)$ does not have $x$ in it
* Calculate $c=g(a)$
* Calculate $d=g(b)$
In summary, Integration by Substitution tells us the following
Substitution rule for definite integrals Assume $u$ is differentiable with continuous derivative and that $f$ is continuous on the range of $u$ . Suppose $c=u(a),d=u(b)$ . Then $\int \limits _{a}^{b}f(u(x)){\frac {du}{dx}}dx=\int \limits _{c}^{d}f(u)du$ .

## Examples
### Integrating with the derivative present

Under ideal circumstances for Integration by Substitution, a component of the integrand can be viewed as the derivative of another component of the integrand. This makes it so that the substitution can be easily applied to simplify the integrand.
For example, in the integral
    $\int 3x^{2}(x^{3}+1)^{5}dx$
we see that $3x^{2}$ is the derivative of $x^{3}+1$ . Letting
    $u=x^{3}+1$
we have
    ${\frac {du}{dx}}=3x^{2}$
or, in order to apply it to the integral,
    $du=3x^{2}dx$
With this we may write
    $\int 3x^{2}(x^{3}+1)^{5}dx=\int u^{5}du={\frac {u^{6}}{6}}+C={\frac {(x^{3}+1)^{6}}{6}}+C$
Note that it was not necessary that we had exactly the derivative of $u$ in our integrand. It would have been sufficient to have any constant multiple of the derivative.
For instance, to treat the integral
    $\int x^{4}\sin(x^{5})dx$
we may let $u=x^{5}$ . Then
    $du=5x^{4}dx$
and so
    ${\frac {du}{5}}=x^{4}dx$
the right-hand side of which is a factor of our integrand. Thus,
    $\int x^{4}\sin(x^{5})dx=\int {\frac {\sin(u)}{5}}du=-{\frac {\cos(u)}{5}}+C=-{\frac {\cos(x^{5})}{5}}+C$
In general, the integral of a power of a function times that function's derivative may be integrated in this way. Since ${\frac {d[g(x)]}{dx}}=g'(x)$ ,
we have $dx={\frac {d[g(x)]}{g'(x)}}$ .
Therefore,
    $\int g'(x)g(x)^{n}dx$ $=\int g'(x)g(x)^{n}{\frac {d[g(x)]}{g'(x)}}$ $=\int g(x)^{n}d[g(x)]$ $={\frac {g(x)^{n+1}}{n+1}}$
There is a similar rule for definite integrals, but we have to change the endpoints.

### Synthesizing Terms

What if the derivative does not show up one-for-one in the expression? This is okay! For some integrals, it may be necessary to synthesize constants in order to solve the integral. Usually, this looks like a multiplication between the expression and ${\frac {n}{n}}=1$ , for some number $n$ . Note that this usually works for variables as well, but synthesizing variables should not be a common thing and should only be an absolute last resort.
As an example of this practice put into the Integration by Substitution method, consider the integral
    $\int \limits _{0}^{2}x\cos(1+x^{2})dx$
By using the substitution $u=1+x^{2}$ , we obtain $du=2x\,dx$ . However, notice that the constant 2 does not show up in the expression in the integrand. This is where this extra step applies. Notice that
    $\int \limits _{0}^{2}x\cos(1+x^{2})dx$ $={\frac {1}{2}}\int \limits _{0}^{2}2x\cos(1+x^{2})dx$ $={\frac {1}{2}}\int \limits _{1}^{5}\cos(u)du$ $={\frac {\sin(5)-\sin(1)}{2}}$
and remember to calculate the new bounds for this integral. The lower limit for this integral was $x=0$ but is now $u=1+0^{2}=1$ and the upper limit was $x=2$ but is now $u=1+2^{2}=5$ .

## Appendix
### Proof of the substitution rule

We will now prove the substitution rule for definite integrals. Let $H$ be an anti-derivative of $h$ so
    $H'(u)=h(u)$
Suppose we have a differentiable function $g(x)$ such that $u=g(x)$ , and numbers $c=g(a),d=g(b)$ derived from some given numbers $a,b$ .
By the Fundamental Theorem of Calculus, we have
    $\int \limits _{c}^{d}h(u)du=H(d)-H(c)$
Next we define a function $F$ by the rule
    $F(x)=H(g(x))=H(u)$
Naturally
    $f(x)=F'(x)={\frac {dF}{dx}}$
Then by the Chain rule $F$ is differentiable with derivative
    ${\frac {dF}{dx}}={\frac {dH}{du}}\cdot {\frac {du}{dx}}=h(u){\frac {du}{dx}}=h(g(x)){\frac {du}{dx}}$
Integrating both sides with respect to $x$ and using the Fundamental Theorem of Calculus we get
    $\int \limits _{a}^{b}h(g(x)){\frac {du}{dx}}dx=\int \limits _{a}^{b}{\frac {dF}{dx}}dx=F(b)-F(a)$
But by the definition of $F$ this equals
    $F(b)-F(a)=H(g(b))-H(g(a))=H(d)-H(c)=\int \limits _{c}^{d}h(u)du$
Hence
    $\int \limits _{a}^{b}f(x)dx=\int \limits _{a}^{b}h(g(x)){\frac {du}{dx}}dx=\int \limits _{c}^{d}h(u)du$
which is the substitution rule for definite integrals.

### Exercises

Evaluate the following using a suitable substitution.
$\int {\frac {19}{\sqrt {9x-38}}}dx$
${\frac {38{\sqrt {9x-38}}}{9}}+C$
${\frac {38{\sqrt {9x-38}}}{9}}+C$
$\int -15{\sqrt {9x+43}}dx$
$-{\frac {10(9x+43){\sqrt {9x+43}}}{9}}+C$
$-{\frac {10(9x+43){\sqrt {9x+43}}}{9}}+C$
$\int {\frac {17\sin(x)}{\cos(x)}}dx$
$-17\ln |\cos(x)|+C$
$-17\ln |\cos(x)|+C$
$\int 5\cos(x)\sin(x)dx$
${\frac {5\sin ^{2}(x)}{2}}+C$
${\frac {5\sin ^{2}(x)}{2}}+C$
$\int \limits _{0}^{1}-{\frac {10}{(-5x-32)^{4}}}dx$
$-{\frac {17885}{2489696256}}$
$-{\frac {17885}{2489696256}}$
$\int -3e^{3x+12}dx$
$-e^{3x+12}+C$
$-e^{3x+12}+C$
Solutions

# External links

* Videos and exercises on u-substitution on Khan Academy
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.7 Integration by Parts</h1>
Continuing on the path of reversing derivative rules in order to make them useful for integration, we reverse the product rule.

## Integration by parts

If $y=uv$ where $u$ and $v$ are functions of $x$ , then
    $y'=(uv)'=u'v+uv'$
Rearranging,
    $uv'=(uv)'-u'v$
Therefore,
    $\int uv'dx=\int (uv)'\ dx-\int u'v\ dx$
Therefore,
    $\int uv'\ dx=uv-\int vu'\ dx$
or
    $\int u\ dv=uv-\int v\ du$
This is the integration by-parts formula. It is very useful in many integrals involving products of functions and others.
For instance, to treat
    $\int x\sin(x)dx$
we choose $u=x$ and $dv=\sin(x)dx$ . With these choices, we have $du=dx$ and $v=-\cos(x)$ , and we have
    $\int x\sin(x)dx=-x\cos(x)-\int {\big-\cos(x){\big )}dx=-x\cos(x)+\int \cos(x)dx=\sin(x)-x\cos(x)+C$
Note that the choice of $u$ and $dv$ was critical. Had we chosen the reverse, so that $u=\sin(x)$ and $dv=x\ dx$ , the result would have been
    ${\frac {x^{2}\sin(x)}{2}}-\int {\frac {x^{2}\cos(x)}{2}}dx$
The resulting integral is no easier to work with than the original; we might say that this application of integration by parts took us in the wrong direction.
So the choice is important. One general guideline to help us make that choice is, if possible, to choose $u$ as the factor of the integrated, which becomes simpler when we differentiate it. In the last example, we see that $\sin(x)$ does not become simpler when we differentiate it: $\cos(x)$ is no more straightforward than $\sin(x)$.
An important feature of the integration-by-parts method is that we often need to apply it more than once. For instance, to integrate
    $\int x^{2}e^{x}dx$
we start by choosing $u=x^{2}$ and $dv=e^{x}dx$ to get
    $\int x^{2}e^{x}dx=x^{2}e^{x}-2\int xe^{x}dx$
Note that we still have an integral to take care of, and we do this by applying integration by parts again, with $u=x$ and $dv=e^{x}dx$, which gives us
    $\int x^{2}e^{x}dx=x^{2}e^{x}-2\int xe^{x}dx=x^{2}e^{x}-2(xe^{x}-e^{x})+C=x^{2}e^{x}-2xe^{x}+2e^{x}+C$
So, two applications of integration by parts were necessary, owing to the power of $x^{2}$ in the integrand.
Note that any power of x does become simpler when we differentiate it, so when we see an integral of the form
    $\int x^{n}f(x)dx$
one of our first thoughts ought to be to consider using integration by parts with $u=x^{n}$. Of course, for it to work, we need to be able to write down an antiderivative for $dv$.

### Example

Use integration by parts to evaluate the integral
    $\int e^{x}\sin(x)dx$
Solution: If we let $u=\sin(x)$ and $v'=e^{x}dx$ , then we have $u'=\cos(x)dx$ and $v=e^{x}$ . Using our rule for integration by parts gives
    $\int e^{x}\sin(x)dx=e^{x}\sin(x)-\int e^{x}\cos(x)dx$
We do not seem to have made much progress.
But if we integrate by parts again with $u=\cos(x)$ and $v'=e^{x}dx$ and hence $u'=-\sin(x)dx$ and $v=e^{x}$ , we obtain
    $\int e^{x}\sin(x)dx=e^{x}\sin(x)-e^{x}\cos(x)-\int e^{x}\sin(x)dx$
We may solve this identity to find the anti-derivative of $\sin(x)e^{x}$ and obtain
    $\int e^{x}\sin(x)dx={\frac {e^{x}{\big\sin(x)-\cos(x){\big )}}{2}}+C$

### With definite integral

The rule is essentially the same for definite integrals as long as we keep the endpoints.
   Integration by parts for definite integrals Suppose f and g are differentiable and their derivatives are continuous. Then
       $\int \limits _{a}^{b}f(x)g'(x)dx={\bigf(x)g(x){\big )}{\bigg |}_{a}^{b}-\int \limits _{a}^{b}f'(x)g(x)dx$
       $=f(b)g(b)-f(a)g(a)-\int \limits _{a}^{b}f'(x)g(x)dx$ .
This can also be expressed in Leibniz notation.
       $\int \limits _{a}^{b}u\ dv=(uv){\Big |}_{a}^{b}-\int \limits _{a}^{b}v\ du.$

### More Examples

Examples Set 1: Integration by Parts

## Exercises

Evaluate the following using integration by parts.
$\int -4\ln(x)dx$
$4x-4x\ln(x)+C$
$4x-4x\ln(x)+C$
$\int (38-7x)\cos(x)dx$
$(38-7x)\sin(x)-7\cos(x)+C$
$(38-7x)\sin(x)-7\cos(x)+C$
$\int \limits _{0}^{\tfrac {\pi }{2}}(-6x+45)\cos(x)dx$
$51-3\pi$
$51-3\pi$
$\int (5x+1)(x-6)^{4}dx$
${\frac {(5x+1)(x-6)^{5}}{5}}-{\frac {(x-6)^{6}}{6}}+C$
${\frac {(5x+1)(x-6)^{5}}{5}}-{\frac {(x-6)^{6}}{6}}+C$
$\int \limits _{-1}^{1}(2x+8)^{3}(2-x)dx$
$1916.8$
$1916.8$
Solutions

# External links

* Videos and exercises on integration by parts at Khan Academy
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.8 Trigonometric Substitutions</h1>
The idea behind the trigonometric substitution is quite simple: to replace expressions involving square roots with expressions that involve standard trigonometric functions, but no square roots. Integrals involving trigonometric functions are often easier to solve than integrals involving square roots.
Let us demonstrate this idea in practice. Consider the expression ${\sqrt {1-x^{2}}}$ . Probably the most basic trigonometric identity is $\sin ^{2}(\theta )+\cos ^{2}(\theta )=1$ for an arbitrary angle $\theta$ . If we replace $x$ in this expression by $\sin(\theta )$ , with the help of this trigonometric identity we see
    ${\sqrt {1-x^{2}}}={\sqrt {1-\sin ^{2}(\theta )}}={\sqrt {\cos ^{2}(\theta )}}=\cos(\theta )$
Note that we could write $\theta =\arcsin(x)$ since we replaced $x^{2}$ with $\sin ^{2}(\theta )$ .
We would like to mention that technically one should write the absolute value of $\cos(\theta )$ , in other words ${\bigl |}\cos(\theta ){\bigr |}$ as our final answer since ${\sqrt {a^{2}}}=|a|$ for all possible $a$ . But as long as we are careful about the domain of all possible $x$ and how $\cos(\theta )$ is used in the final computation, omitting the absolute value signs does not constitute a problem. However, we cannot directly interchange the simple expression $\cos(\theta )$ with the complicated ${\sqrt {1-x^{2}}}$ wherever it may appear, we must remember when integrating by substitution we need to take the derivative into account. That is we need to remember that $dx=\cos(\theta )d\theta$ , and to get a integral that only involves $\theta$ we need to also replace $dx$ by something in terms of $d\theta$ . Thus, if we see an integral of the form
    $\int {\sqrt {1-x^{2}}}dx$
we can rewrite it as
    $\int \cos(\theta )\cos(\theta )d\theta =\int \cos ^{2}(\theta )d\theta$
Notice in the expression on the left that the first $\cos(\theta )$ comes from replacing the ${\sqrt {1-x^{2}}}$ and the $\cos(\theta )d\theta$ comes from substituting for the $dx$ .
Since $\cos ^{2}(\theta )={\frac {1+\cos(2\theta )}{2}}$ our original integral reduces to:
    ${\tfrac {1}{2}}\int d\theta +{\tfrac {1}{2}}\int \cos(2\theta )d\theta$ .
These last two integrals are easily handled. For the first integral we get
    ${\tfrac {1}{2}}\int d\theta ={\tfrac {1}{2}}\theta$
For the second integral we do a substitution, namely $u=2\theta ,du=2d\theta$ to get:
    ${\tfrac {1}{2}}\int \cos(2\theta )d\theta ={\tfrac {1}{2}}\int \cos(u){\tfrac {1}{2}}du={\tfrac {1}{4}}\sin(u)={\frac {\sin(2\theta )}{4}}$
Finally we see that:
    $\int \cos ^{2}(\theta )d\theta ={\frac {\theta }{2}}+{\frac {\sin(2\theta )}{4}}={\frac {\theta +\sin(\theta )\cos(\theta )}{2}}$
However, this is in terms of $\theta$ and not in terms of $x$ , so we must substitute back in order to rewrite the answer in terms of $x$ .
That is we worked out that:
    $\sin(\theta )=x\qquad \cos(\theta )={\sqrt {1-x^{2}}}\qquad \theta =\arcsin(x)$
So we arrive at our final answer
    $\int {\sqrt {1-x^{2}}}dx={\frac {\arcsin(x)+x{\sqrt {1-x^{2}}}}{2}}$
As you can see, even for a fairly harmless looking integral this technique can involve quite a lot of calculation. Often it is helpful to see if a simpler method will suffice before turning to trigonometric substitution. On the other hand, frequently in the case of integrands involving square roots, this is the most tractable way to solve the problem. We begin with giving some rules of thumb to help you decide which trigonometric substitutions might be helpful.
If the integrand contains a single factor of one of the forms ${\sqrt {a^{2}-x^{2}}}{\mbox{ or }}{\sqrt {a^{2}+x^{2}}}{\mbox{ or }}{\sqrt {x^{2}-a^{2}}}$ we can try a trigonometric substitution.
   * If the integrand contains ${\sqrt {a^{2}-x^{2}}}$ let $x=a\sin(\theta )$ and use the identity $1-\sin ^{2}(\theta )=\cos ^{2}(\theta )$ .
   * If the integrand contains ${\sqrt {a^{2}+x^{2}}}$ let $x=a\tan(\theta )$ and use the identity $1+\tan ^{2}(\theta )=\sec ^{2}(\theta )$ .
   * If the integrand contains ${\sqrt {x^{2}-a^{2}}}$ let $x=a\sec(\theta )$ and use the identity $\sec ^{2}(\theta )-1=\tan ^{2}(\theta )$ .

### Sine substitution

If the integrand contains a piece of the form ${\sqrt {a^{2}-x^{2}}}$ we use the substitution
    $x=a\sin(\theta )\quad dx=a\cos(\theta )d\theta$
This will transform the integrand to a trigonometric function. If the new integrand can't be integrated on sight then the tan-half-angle substitution described below will generally transform it into a more tractable algebraic integrand.
E.g., if the integrand is ${\sqrt {1-x^{2}}}$ ,
    ${\begin{aligned}\int \limits _{0}^{1}{\sqrt {1-x^{2}}}dx&=\int \limits _{0}^{\frac {\pi }{2}}{\sqrt {1-\sin ^{2}(\theta )}}\cos(\theta )d\theta \\&=\int \limits _{0}^{\frac {\pi }{2}}\cos ^{2}(\theta )d\theta \\&={\tfrac {1}{2}}\int \limits _{0}^{\frac {\pi }{2}}{\bigl1+\cos(2\theta ){\bigr )}d\theta \\&={\frac {\pi }{4}}\end{aligned}}$
If the integrand is ${\sqrt {\frac {1+x}{1-x}}}$ , we can rewrite it as
    ${\sqrt {\frac {1+x}{1-x}}}={\sqrt {{\frac {1+x}{1+x}}\cdot {\frac {1+x}{1-x}}}}={\frac {1+x}{\sqrt {1-x^{2}}}}$
Then we can make the substitution
    ${\begin{aligned}\int \limits _{0}^{a}{\frac {1+x}{\sqrt {1-x^{2}}}}dx&=\int \limits _{0}^{\alpha }{\frac {1+\sin(\theta )}{\cos(\theta )}}\cos(\theta )d\theta &0<a<1\\&=\int \limits _{0}^{\alpha }{\bigl1+\sin(\theta ){\bigr )}d\theta &\alpha =\arcsin(a)\\&=\alpha +{\Big-\cos(\theta ){\Big ]}_{0}^{\alpha }\\&=\alpha +1-\cos(\alpha )\\&=1+\arcsin(a)-{\sqrt {1-a^{2}}}\end{aligned}}$

### Tangent substitution

When the integrand contains a piece of the form ${\sqrt {a^{2}+x^{2}}}$ we use the substitution
    $x=a\tan(\theta )\qquad {\sqrt {x^{2}+a^{2}}}=a\sec(\theta )\qquad dx=a\sec ^{2}(\theta )d\theta$
E.g., if the integrand is $(x^{2}+a^{2})^{-{\frac {3}{2}}}$ then on making this substitution we find
    ${\begin{aligned}\int \limits _{0}^{z}(x^{2}+a^{2})^{-{\frac {3}{2}}}dx&=a^{-2}\int \limits _{0}^{\alpha }\cos(\theta )d\theta &z>0\\&=a^{-2}{\Big\sin(\theta ){\Big ]}_{0}^{\alpha }&\alpha =\arctan \left({\tfrac {z}{a}}\right)\\&=a^{-2}\sin(\alpha )\\&=a^{-2}{\frac {\frac {z}{a}}{\sqrt {1+{\frac {z^{2}}{a^{2}}}}}}\\&={\frac {z}{a^{2}{\sqrt {a^{2}+z^{2}}}}}\end{aligned}}$
If the integral is
    $I=\int \limits _{0}^{z}{\sqrt {x^{2}+a^{2}}}\qquad z>0$
then on making this substitution we find
    ${\begin{matrix}I&=&a^{2}\int _{0}^{\alpha }\sec ^{3}\theta \,d\theta &&&\alpha =\tan ^{-1}(z/a)\\&=&a^{2}\int _{0}^{\alpha }\sec \theta \,d\tan \theta &&&\\&=&a^{2}[\sec \theta \tan \theta ]_{0}^{\alpha }&-&a^{2}\int _{0}^{\alpha }\sec \theta \tan ^{2}\theta \,d\theta &\\&=&a^{2}\sec \alpha \tan \alpha &-&a^{2}\int _{0}^{\alpha }\sec ^{3}\theta \,d\theta &+a^{2}\int _{0}^{\alpha }\sec \theta \,d\theta \\&=&a^{2}\sec \alpha \tan \alpha &-&I&+a^{2}\int _{0}^{\alpha }\sec \theta \,d\theta \\\end{matrix}}$
After integrating by parts, and using trigonometric identities, we've ended up with an expression involving the original integral. In cases like this we must now rearrange the equation so that the original integral is on one side only
    $I$ $={\tfrac {a^{2}}{2}}{\Bigg\sec(\alpha )\tan(\alpha )+\int \limits _{0}^{\alpha }\sec(\theta )d\theta {\Bigg )}$ $={\tfrac {a^{2}}{2}}{\Bigg\sec(\alpha )\tan(\alpha )+{\bigg\ln {\Big\sec(\theta )+\tan(\theta ){\Big )}{\bigg ]}_{0}^{\alpha }{\Bigg )}$ $={\tfrac {a^{2}}{2}}{\bigg\sec(\alpha )\tan(\alpha )+a^{2}\ln {\Big\sec(\alpha )+\tan(\alpha ){\Big )}{\bigg )}$ $={\tfrac {a^{2}}{2}}{\bigg{\tfrac {z}{a^{2}}}{\sqrt {a^{2}+z^{2}}}+\ln \left({\tfrac {z+{\sqrt {a^{2}+z^{2}}}}{a}}\right){\bigg )}$ $={\tfrac {1}{2}}{\biggz{\sqrt {z^{2}+a^{2}}}+a^{2}\ln \left({\tfrac {z+{\sqrt {a^{2}+z^{2}}}}{a}}\right){\bigg )}$
As we would expect from the integrand, this is approximately ${\frac {z^{2}}{2}}$ for large $z$ .
In some cases it is possible to do trigonometric substitution in cases when there is no ${\sqrt {\ \ }}$ appearing in the integral.
Example
    $\int {\frac {dx}{x^{2}+1}}$
The denominator of this function is equal to ${\bigl{\sqrt {1+x^{2}}}{\bigr )}^{2}$ . This suggests that we try to substitute $x=\tan(u)$ and use the identity $1+\tan ^{2}(u)=\sec ^{2}(u)$ . With this substitution, we obtain that $dx=\sec ^{2}(u)du$ and thus
    $\int {\frac {dx}{x^{2}+1}}=\int {\frac {\sec ^{2}(u)}{\tan ^{2}(u)+1}}du$
    $=\int {\frac {\sec ^{2}(u)}{\sec ^{2}(u)}}du$
    $=\int du$
    $=u+c$
Using the initial substitution $u=\arctan(x)$ gives
    $\int {\frac {dx}{x^{2}+1}}=\arctan(x)+C$

### Secant substitution

If the integrand contains a factor of the form $\displaystyle {\sqrt {x^{2}-a^{2}}}$ we use the substitution
    $x=a\sec(\theta )\quad dx=a\sec(\theta )\tan(\theta )d\theta \quad {\sqrt {x^{2}-a^{2}}}=a\tan(\theta )$

#### Example 1

Find $\int \limits _{0}^{z}{\frac {\sqrt {x^{2}-1}}{x}}dx$ .
    $\int \limits _{0}^{z}{\frac {\sqrt {x^{2}-1}}{x}}dx$ $=\int \limits _{0}^{\alpha }{\frac {\tan(\theta )}{\sec(\theta )}}\sec(\theta )\tan(\theta )d\theta \qquad z>1$ $=\int \limits _{0}^{\alpha }\tan ^{2}(\theta )d\theta \qquad \qquad \qquad \qquad \alpha =\operatorname {arcsec}(z)$ $={\bigg\tan(\theta )-\theta {\bigg ]}_{0}^{\alpha }\qquad \qquad \qquad \tan(\alpha )={\sqrt {\sec ^{2}(\alpha )-1}}$ $=\tan(\alpha )-\alpha \qquad \qquad \qquad \qquad \tan(\alpha )={\sqrt {z^{2}-1}}$ $={\sqrt {z^{2}-1}}-\operatorname {arcsec}(z)$

#### Example 2

Find $\int \limits _{1}^{z}{\frac {\sqrt {x^{2}-1}}{x^{2}}}dx$ .
    $\int \limits _{1}^{z}{\frac {\sqrt {x^{2}-1}}{x^{2}}}dx$ $=\int \limits _{1}^{\alpha }{\frac {\tan(\theta )}{\sec ^{2}(\theta )}}\sec(\theta )\tan(\theta )d\theta \qquad z>1$ $=\int \limits _{0}^{\alpha }{\frac {\sin ^{2}(\theta )}{\cos(\theta )}}d\theta \qquad \qquad \qquad \alpha =\operatorname {arcsec}(z)$
We can now integrate by parts
    $\int \limits _{1}^{z}{\frac {\sqrt {x^{2}-1}}{x^{2}}}dx$ $=-{\bigg\tan(\theta )\cos(\theta ){\bigg ]}_{0}^{\alpha }+\int \limits _{0}^{\alpha }\sec(\theta )d\theta$ $=-\sin(\alpha )+{\bigg\ln {\bigl\sec(\theta )+\tan(\theta ){\bigr )}{\bigg ]}_{0}^{\alpha }$ $=\ln {\bigl\sec(\alpha )+\tan(\alpha ){\bigr )}-\sin(\alpha )$ $=\ln {\biglz+{\sqrt {z^{2}-1}}{\bigr )}-{\frac {\sqrt {z^{2}-1}}{z}}$

## Exercise

Evaluate the following using an appropriate trigonometric substitution.
$\int {\frac {10}{25x^{2}+a}}dx$
${\frac {2}{\sqrt {a}}}\arctan {\Big{\tfrac {5x}{\sqrt {a}}}{\Big )}+C$
${\frac {2}{\sqrt {a}}}\arctan {\Big{\tfrac {5x}{\sqrt {a}}}{\Big )}+C$
Solution
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.9 Trigonometric Integrals</h1>
When the integrand is primarily or exclusively based on trigonometric functions, the following techniques are useful.

### Powers of Sine and Cosine

We will give a general method to solve generally integrands of the form $\cos ^{m}(x)\cdot \sin ^{n}(x)$ . First let us work through an example.
    $\int \cos ^{3}(x)\sin ^{2}(x)dx$
Notice that the integrand contains an odd power of cos. So rewrite it as
    $\int \cos ^{2}(x)\sin ^{2}(x)\cos(x)dx$
We can solve this by making the substitution $u=\sin(x)$ so $du=\cos(x)dx$ . Then we can write the whole integrand in terms of $u$ by using the identity
    $\cos ^{2}(x)=1-\sin ^{2}(x)=1-u^{2}$ .
So
    $\int \cos ^{3}(x)\sin ^{2}(x)dx$ $=\int \cos ^{2}(x)\sin ^{2}(x)\cos(x)dx$ $=\int (1-u^{2})u^{2}du$ $=\int u^{2}du-\int u^{4}du$ $={\frac {u^{3}}{3}}+{\frac {u^{5}}{5}}+C$ $={\frac {\sin ^{3}(x)}{3}}-{\frac {\sin ^{5}(x)}{5}}+C$
This method works whenever there is an odd power of sine or cosine.
   To evaluate $\int \cos ^{m}(x)\sin ^{n}(x)dx$ when either $m$ or $n$ is odd.
   * If $m$ is odd substitute $u=\sin(x)$ and use the identity $\cos ^{2}(x)=1-\sin ^{2}(x)=1-u^{2}$ .
   * If $n$ is odd substitute $u=\cos(x)$ and use the identity $\sin ^{2}(x)=1-\cos ^{2}(x)=1-u^{2}$ .

#### Example

Find $\int \limits _{0}^{\frac {\pi }{2}}\cos ^{40}(x)\sin ^{3}(x)dx$ .
As there is an odd power of $\sin$ we let $u=\cos(x)$ so $du=-\sin(x)dx$ . Notice that when $x=0$ we have $u=\cos(0)=1$ and when $x={\frac {\pi }{2}}$ we have $u=\cos({\tfrac {\pi }{2}})=0$ .
    $\int \limits _{0}^{\frac {\pi }{2}}\cos ^{40}(x)\sin ^{3}(x)dx$ $=\int \limits _{0}^{\frac {\pi }{2}}\cos ^{40}(x)\sin ^{2}(x)\sin(x)dx$ $=-\int \limits _{1}^{0}u^{40}(1-u^{2})du$ $=\int \limits _{0}^{1}u^{40}(2-u^{2})du$ $=\int \limits _{0}^{5}(u^{40}-u^{42})du$ $=\left({\frac {u^{41}}{41}}-{\frac {u^{43}}{43}}\right){\Bigg |}_{0}^{1}$ $={\frac {1}{41}}-{\frac {1}{43}}$
When both $m$ and $n$ are even, things get a little more complicated.
   To evaluate $\int \cos ^{m}(x)\sin ^{n}(x)dx$ when both $m$ and $n$ are even.
   Use the identities $\sin ^{2}(x)={\frac {1-\cos(2x)}{2}}$ and $\cos ^{2}(x)={\frac {1+\cos(2x)}{2}}$ .

#### Example

Find $\int \sin ^{2}(x)\cos ^{4}(x)dx$ .
As $\sin ^{2}(x)={\frac {1-\cos(2x)}{2}}$ and $\cos ^{2}(x)={\frac {1+\cos(2x)}{2}}$ we have
    $\int \sin ^{2}(x)\cos ^{4}(x)dx=\int \left({\frac {1-\cos(2x)}{2}}\right)\left({\frac {1+\cos(2x)}{2}}\right)^{2}dx$
and expanding, the integrand becomes
    ${\frac {1}{8}}\int \left(1-\cos ^{2}(2x)+\cos(2x)-\cos ^{3}(2x)\right)dx$
Using the multiple angle identities
    $I$ $={\frac {1}{8}}\left(\int 1dx-\int \cos ^{2}(2x)dx+\int \cos(2x)dx-\int \cos ^{3}(2x)dx\right)$ $={\frac {1}{8}}\left(x-{\frac {1}{2}}\int {\Big1+\cos(4x){\Big )}dx+{\frac {\sin(2x)}{2}}-\int \cos ^{2}(2x)\cos(2x)dx\right)$ TODO: CORRECT FORMULA$={\frac {1}{164}}\left(x+\sin(2x)+\int \cos(4x)dx-2\int {\Big1-\sin ^{2}(2x){\Big )}\cos(2x)dx\right)$
then we obtain on evaluating
    $I={\frac {x}{16}}-{\frac {\sin(4x)}{64}}+{\frac {\sin ^{3}(2x)}{48}}+C$

### Powers of Tan and Secant

   To evaluate $\int \tan ^{m}(x)\sec ^{n}(x)dx$ .
   * If $n$ is even and $n\geq 2$ then substitute $u=tan(x)$ and use the identity $\sec ^{2}(x)=1+\tan ^{2}(x)$ .
   * If $n$ and $m$ are both odd then substitute $u=\sec(x)$ and use the identity $\tan ^{2}(x)=\sec ^{2}(x)-1$ .
   * If $n$ is odd and $m$ is even then use the identity $\tan ^{2}(x)=\sec ^{2}(x)-1$ and apply a reduction formula to integrate $\sec ^{j}(x)dx$ , using the examples below to integrate when $j=1,2$ .

#### Example 1

Find $\int \sec ^{2}(x)dx$ .
There is an even power of $\sec(x)$ . Substituting $u=\tan(x)$ gives $du=\sec ^{2}(x)dx$ so
$\int \sec ^{2}(x)dx=\int du=u+C=\tan(x)+C.$

#### Example 2

Find $\int \tan(x)dx$ .
Let $u=\cos(x)$ so $du=-\sin(x)dx$ . Then
    $\int \tan(x)dx$ $=\int {\frac {\sin(x)}{\cos(x)}}dx$ $=\int -{\frac {du}{u}}$ $=-\ln |u|+C$ $=-\ln {\Big |}\cos(x){\Big |}+C$ $=\ln {\Big |}\sec(x){\Big |}+C$

#### Example 3

Find $\int \sec(x)dx$ .
The trick to do this is to multiply and divide by the same thing like this:
    $\int \sec(x)dx$ $=\int \sec(x){\frac {\sec(x)+\tan(x)}{\sec(x)+\tan(x)}}dx$ $=\int {\frac {\sec ^{2}(x)+\sec(x)\tan(x)}{\sec(x)+\tan(x)}}dx$
Making the substitution $u=\sec(x)+\tan(x)$ so $du=\sec(x)\tan(x)+\sec ^{2}(x)dx$ ,
    $\int \sec(x)dx$ $=\int {\frac {du}{u}}$ $=\ln |u|+C$ $\ln {\Big |}\sec(x)+\tan(x){\Big |}+C$

### More trigonometric combinations

   For the integrals $\int \sin(nx)\cos(mx)dx$ or $\int \sin(nx)\sin(mx)dx$ or $\int \cos(nx)\cos(mx)dx$ use the identities
   * $\sin(a)\cos(b)={\frac {\sin(a+b)+\sin(a-b)}{2}}$
   * $\sin(a)\sin(b)={\frac {\cos(a-b)-\cos(a+b)}{2}}$
   * $\cos(a)\cos(b)={\frac {\cos(a-b)+\cos(a+b)}{2}}$

#### Example 1

Find $\int \sin(3x)\cos(5x)dx$ .
We can use the fact that $\sin(a)\cos(b)={\frac {\sin(a+b)+\sin(a-b)}{2}}$ , so
    $\sin(3x)\cos(5x)={\frac {\sin(8x)+\sin(-2x)}{2}}$
Now use the oddness property of $\sin(x)$ to simplify
    $\sin(3x)\cos(5x)={\frac {\sin(8x)-\sin(2x)}{2}}$
And now we can integrate
    $\int \sin(3x)\cos(5x)dx$ $=\int {\Big{\frac {\sin(8x)-\sin(2x)}{2}}{\Big )}dx$ $={\frac {\cos(2x)}{4}}-{\frac {\cos(8x)}{16}}+C$

#### Example 2

Find:$\int \sin(x)\sin(2x)dx$ .
Using the identities
    $\sin(x)\sin(2x)={\frac {\cos(-x)-\cos(3x)}{2}}={\frac {\cos(x)-\cos(3x)}{2}}$
Then
    $\int \sin(x)\sin(2x)dx$ $={\frac {1}{2}}\int {\Big\cos(x)-\cos(3x){\Big )}dx$ $={\frac {\sin(x)}{2}}-{\frac {\sin(3x)}{6}}+C$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.10 Rational Functions by Partial Fractional Decomposition</h1>
Suppose we want to find $\int {\frac {3x+1}{x^{2}+x}}dx$ . One way to do this is to simplify the integrand by finding constants $A$ and $B$ so that
    ${\frac {3x+1}{x^{2}+x}}={\frac {3x+1}{x(x+1)}}={\frac {A}{x}}+{\frac {B}{x+1}}$ .
This can be done by cross multiplying the fraction which gives
    ${\frac {3x+1}{x(x+1)}}={\frac {A(x+1)+Bx}{x(x+1)}}$
As both sides have the same denominator we must have
    $3x+1=A(x+1)+Bx$
This is an equation for $x$ so it must hold whatever value $x$ is. If we put in $x=0$ we get $A=1$ and putting $x=-1$ gives $=-B=-2$ so $B=2$ . So we see that
    ${\frac {3x+1}{x^{2}+x}}={\frac {1}{x}}+{\frac {2}{x+1}}$
Returning to the original integral
    $\int {\frac {3x+1}{x^{2}+x}}dx$ $=\int {\frac {dx}{x}}+\int {\frac {2}{x+1}}dx$ $=\int {\frac {dx}{x}}+2\int {\frac {dx}{x+1}}$ $=\ln |x|+2\ln {\Big |}x+1{\Big |}+C$
Rewriting the integrand as a sum of simpler fractions has allowed us to reduce the initial integral to a sum of simpler integrals. In fact this method works to integrate any rational function.

## Method of Partial Fractions

   To decompose the rational function ${\frac {P(x)}{Q(x)}}$:
   * Step 1 Use long division (if necessary) to ensure that the degree of $P(x)$ is less than the degree of $Q(x)$ (see Breaking up a rational function in section 1.1).
   * Step 2 Factor Q(x) as far as possible.
   * Step 3 Write down the correct form for the partial fraction decomposition (see below) and solve for the constants.
To factor Q(x) we have to write it as a product of linear factors (of the form $ax+b$) and irreducible quadratic factors (of the form $ax^{2}+bx+c$ with $b^{2}-4ac<0$).
Some of the factors could be repeated. For instance if $Q(x)=x^{3}-6x^{2}+9x$ we factor $Q(x)$ as
    $Q(x)=x(x^{2}-6x+9)=x(x-3)(x-3)=x(x-3)^{2}$
It is important that in each quadratic factor we have $b^{2}-4ac<0$ , otherwise it is possible to factor that quadratic piece further. For example if $Q(x)=x^{3}-3x^{2}+2x$ then we can write
    $Q(x)=x(x^{2}-3x+2)=x(x-1)(x-2)$
We will now show how to write ${\frac {P(x)}{Q(x)}}$ as a sum of terms of the form
    ${\frac {A}{(ax+b)^{k}}}$ and ${\frac {Ax+B}{(ax^{2}+bx+c)^{k}}}$
Exactly how to do this depends on the factorization of $Q(x)$ and we now give four cases that can occur.

### Q(x) is a product of linear factors with no repeats

This means that $Q(x)=(a_{1}x+b_{1})(a_{2}x+b_{2})\cdots (a_{n}x+b_{n})$ where no factor is repeated and no factor is a multiple of another.
For each linear term we write down something of the form ${\frac {A}{(ax+b)}}$ , so in total we write
    ${\frac {P(x)}{Q(x)}}={\frac {A_{1}}{a_{1}x+b_{1}}}+{\frac {A_{2}}{a_{2}x+b_{2}}}+\cdots +{\frac {A_{n}}{a_{n}x+b_{n}}}$
* Example 1
* Find $\int {\frac {1+x^{2}}{(x+3)(x+5)(x+7)}}dx$
* Here we have $P(x)=1+x^{2}\ ,\ Q(x)=(x+3)(x+5)(x+7)$ and Q(x) is a product of linear factors. So we write
* ${\frac {1+x^{2}}{(x+3)(x+5)(x+7)}}={\frac {A}{x+3}}+{\frac {B}{x+5}}+{\frac {C}{x+7}}$
* Multiply both sides by the denominator
* $1+x^{2}=A(x+5)(x+7)+B(x+3)(x+7)+C(x+3)(x+5)$
* Substitute in three values of x to get three equations for the unknown constants,
* ${\begin{matrix}x=-3&1+3^{2}=2\cdot 4A\\x=-5&1+5^{2}=-2\cdot 2B\\x=-7&1+7^{2}=(-4)\cdot (-2)C\end{matrix}}$
* so $A={\tfrac {5}{4}}\ ,\ B=-{\tfrac {13}{2}}\ ,\ C={\tfrac {25}{4}}$ , and
* ${\frac {1+x^{2}}{(x+3)(x+5)(x+7)}}={\frac {5}{4x+12}}-{\frac {13}{2x+10}}+{\frac {25}{4x+28}}$
* We can now integrate the left hand side.
* $\int {\frac {1+x^{2}}{(x+3)(x+5)(x+7)}}dx={\tfrac {5}{4}}\ln {\Big |}x+3{\Big |}-{\tfrac {13}{2}}\ln {\Big |}x+5{\Big |}+{\tfrac {25}{4}}\ln {\Big |}x+7{\Big |}+C$

#### Exercises

Evaluate the following by the method partial fraction decomposition.
$\int {\frac {2x+11}{(x+6)(x+5)}}dx$
$\ln {\Big |}x+6{\Big |}+\ln {\Big |}x+5{\Big |}+C$
$\ln {\Big |}x+6{\Big |}+\ln {\Big |}x+5{\Big |}+C$
$\int {\frac {7x^{2}-5x+6}{(x-1)(x-3)(x-7)}}dx$
${\tfrac {2}{3}}\ln {\Big |}x-1{\Big |}-{\tfrac {27}{4}}\ln {\Big |}x-3{\Big |}+{\tfrac {157}{12}}\ln {\Big |}x-7{\Big |}+C$
${\tfrac {2}{3}}\ln {\Big |}x-1{\Big |}-{\tfrac {27}{4}}\ln {\Big |}x-3{\Big |}+{\tfrac {157}{12}}\ln {\Big |}x-7{\Big |}+C$
Solutions

### Q(x) is a product of linear factors some of which are repeated

If $(ax+b)$ appears in the factorisation of $Q(x)$ k-times then instead of writing the piece ${\frac {A}{ax+b}}$ we use the more complicated expression
${\frac {A_{1}}{ax+b}}+{\frac {A_{2}}{(ax+b)^{2}}}+{\frac {A_{3}}{(ax+b)^{3}}}+\cdots +{\frac {A_{k}}{(ax+b)^{k}}}$
* Example 2
* Find $\int {\frac {dx}{(x+1)(x+2)^{2}}}$
* Here $P(x)=1$ and $Q(x)=(x+1)(x+2)^{2}$ We write
* ${\frac {1}{(x+1)(x+2)^{2}}}={\frac {A}{x+1}}+{\frac {B}{x+2}}+{\frac {C}{(x+2)^{2}}}$
* Multiply both sides by the denominator
* $1=A(x+2)^{2}+B(x+1)(x+2)+C(x+1)$
* Substitute in three values of $x$ to get 3 equations for the unknown constants,
* ${\begin{matrix}x=0&1=2^{2}A+2B+C\\x=-1&1=A\\x=-2&1=-C\end{matrix}}$
* so $A=1\ ,\ B=-1\ ,\ C=-1$ and
* ${\frac {1}{(x+1)(x+2)^{2}}}={\frac {1}{x+1}}-{\frac {1}{x+2}}-{\frac {1}{(x+2)^{2}}}$
* We can now integrate the left hand side.
* $\int {\frac {dx}{(x+1)(x+2)^{2}}}=\ln \left|x+1\right|-\ln \left|x+2\right|+{\frac {1}{x+2}}+C$
* We now simplify the fuction with the property of Logarithms.
* $\ln \left|x+1\right|-\ln \left|x+2\right|+{\frac {1}{x+2}}+C=\ln \left|{\frac {x+1}{x+2}}\right|+{\frac {1}{x+2}}+C$

#### Exercise

$\int {\frac {x^{2}-x+2}{x(x+2)^{2}}}dx$
${\frac {\ln {\Big |}x(x+2){\Big |}}{2}}+{\frac {4}{x+2}}+C$
${\frac {\ln {\Big |}x(x+2){\Big |}}{2}}+{\frac {4}{x+2}}+C$
Solution

### Q(x) contains some quadratic pieces which are not repeated

If $ax^{2}+bx+c$ appears we use ${\frac {Ax+B}{ax^{2}+bx+c}}$ .

#### Exercises

Evaluate the following using the method of partial fractions.
$\int {\frac {2}{(x+2)(x^{2}+3)}}dx$
$\ln \left({\sqrt[{7}]{\frac {(x+2)^{2}}{x^{2}+3}}}\right)+{\frac {4\arctan {\Big{\tfrac {x}{\sqrt {3}}}{\Big )}}{7{\sqrt {3}}}}+C$
$\ln \left({\sqrt[{7}]{\frac {(x+2)^{2}}{x^{2}+3}}}\right)+{\frac {4\arctan {\Big{\tfrac {x}{\sqrt {3}}}{\Big )}}{7{\sqrt {3}}}}+C$
$\int {\frac {dx}{(x+2)(x^{2}+2)}}$
$\ln \left({\sqrt[{12}]{\frac {(x+2)^{2}}{x^{2}+2}}}\right)+{\frac {{\sqrt {2}}\arctan {\Big{\tfrac {x}{\sqrt {2}}}{\Big )}}{6}}+C$
$\ln \left({\sqrt[{12}]{\frac {(x+2)^{2}}{x^{2}+2}}}\right)+{\frac {{\sqrt {2}}\arctan {\Big{\tfrac {x}{\sqrt {2}}}{\Big )}}{6}}+C$
Solutions

### Q(x) contains some repeated quadratic factors

If $ax^{2}+bx+c$ appears k-times then use
    ${\frac {A_{1}x+B_{1}}{ax^{2}+bx+c}}+{\frac {A_{2}x+B_{2}}{(ax^{2}+bx+c)^{2}}}+{\frac {A_{3}x+B_{3}}{(ax^{2}+bx+c)^{3}}}+\cdots +{\frac {A_{k}x+B_{k}}{(ax^{2}+bx+c)^{k}}}$

#### Exercise

Evaluate the following using the method of partial fractions.
$\int {\frac {dx}{(x-1)(x^{2}+1)^{2}}}$
${\frac {1-x}{4(x^{2}+1)}}+{\tfrac {1}{8}}\ln \left({\frac {(x-1)^{2}}{x^{2}+1}}\right)-{\frac {\arctan(x)}{2}}+C$
${\frac {1-x}{4(x^{2}+1)}}+{\tfrac {1}{8}}\ln \left({\frac {(x-1)^{2}}{x^{2}+1}}\right)-{\frac {\arctan(x)}{2}}+C$
Solution
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.11 Tangent Half Angle Substitution</h1>
Another useful change of variables is the Weierstrass substitution, named after Karl Weierstrass:
    $t=\tan \left({\tfrac {x}{2}}\right)$
With this transformation, using the double-angle trigonometric identities,
    $\sin(x)={\frac {2t}{1+t^{2}}}\quad \cos(x)={\frac {1-t^{2}}{1+t^{2}}}\quad \tan(x)={\frac {2t}{1-t^{2}}}\quad dx={\frac {2\ dt}{1+t^{2}}}$
This transforms a trigonometric integral into an algebraic integral, which may be easier to integrate.
For example, if the integrand is ${\frac {1}{1+\sin(x)}}$ then
    $\int \limits _{0}^{\frac {\pi }{2}}{\frac {dx}{1+\sin(x)}}=\int \limits _{0}^{1}{\frac {\left({\frac {2\ dt}{1+t^{2}}}\right)}{1+\left({\frac {2t}{1+t^{2}}}\right)}}=\int \limits _{0}^{1}{\frac {2\ dt}{(t+1)^{2}}}$
This method can be used to further simplify trigonometric integrals produced by the changes of variables described earlier.
For example, if we are considering the integral
    $I=\int \limits _{-1}^{1}{\frac {\sqrt {1-x^{2}}}{1+x^{2}}}dx$
we can first use the substitution $x=\sin(\theta )$ , which gives
    $I=\int \limits _{-{\frac {\pi }{2}}}^{\frac {\pi }{2}}{\frac {\cos ^{2}(\theta )}{1+\sin ^{2}(\theta )}}d\theta$
then use the tan-half-angle substition to obtain
    $I=\int \limits _{-1}^{1}{\frac {(1-t^{2})^{2}}{1+6t^{2}+t^{4}}}\cdot {\frac {2\ dt}{1+t^{2}}}$
In effect, we've removed the square root from the original integrand. We could do this with a single change of variables, but doing it in two steps gives us the opportunity of doing the trigonometric integral another way.
Having done this, we can split the new integrand into partial fractions, and integrate.
    ${\begin{aligned}I&=\int \limits _{-1}^{1}{\frac {2-{\sqrt {2}}}{t^{2}+3-2{\sqrt {2}}}}dt+\int \limits _{-1}^{1}{\frac {2+{\sqrt {2}}}{t^{2}+3+2{\sqrt {2}}}}dt-\int \limits _{-1}^{1}{\frac {2}{1+t^{2}}}dt\\[8pt]&={\frac {4-2{\sqrt {2}}}{\sqrt {3-2{\sqrt {2}}}}}\cdot \arctan \left({\sqrt {3+2{\sqrt {2}}}}\right)+{\frac {4+2{\sqrt {2}}}{\sqrt {3+2{\sqrt {2}}}}}\cdot \arctan \left({\sqrt {3-2{\sqrt {2}}}}\right)-\pi \end{aligned}}$
This result can be further simplified by use of the identities
    $3\pm 2{\sqrt {2}}=\left({\sqrt {2}}\pm 1\right)^{2}\quad \arctan \left({\sqrt {2}}\pm 1\right)=\left({\frac {1}{4}}\pm {\frac {1}{8}}\right)\pi$
ultimately leading to
    $I=\left({\sqrt {2}}-1\right)\pi$
In principle, this approach will work with any integrand which is the square root of a quadratic multiplied by the ratio of two polynomials. However, it should not be applied automatically.
E.g., in this last example, once we deduced
    $I=\int \limits _{-{\frac {\pi }{2}}}^{\frac {\pi }{2}}{\frac {\cos ^{2}(\theta )}{1+\sin ^{2}(\theta )}}d\theta$
we could have used the double angle formula, since this contains only even powers of cos and sin. Doing that gives
    $I=\int \limits _{-{\frac {\pi }{2}}}^{\frac {\pi }{2}}{\frac {1+\cos(2\theta )}{3-\cos(2\theta )}}d\theta ={\frac {1}{2}}\int \limits _{-\pi }^{\pi }{\frac {1+\cos(\phi )}{3-\cos(\phi )}}d\phi$
Using tan-half-angle on this new, simpler, integrand gives
    ${\begin{aligned}I&=\int \limits _{-\infty }^{\infty }{\frac {1}{1+2t^{2}}}\cdot {\frac {dt}{1+t^{2}}}\\&=\int \limits _{-\infty }^{\infty }{\frac {2\ dt}{1+2t^{2}}}-\int \limits _{-\infty }^{\infty }{\frac {dt}{1+t^{2}}}\end{aligned}}$
This can be integrated on sight to give
    $I={\frac {4}{\sqrt {2}}}\cdot {\frac {\pi }{2}}-2{\frac {\pi }{2}}=\left({\sqrt {2}}-1\right)\pi$
This is the same result as before, but obtained with less algebra, which shows why it is best to look for the most straightforward methods at every stage.
A more direct way of evaluating the integral I is to substitute $t=\tan(\theta )$ right from the start, which will directly bring us to the line
    $I=\int \limits _{-\infty }^{\infty }{\frac {1}{1+2t^{2}}}\cdot {\frac {dt}{1+t^{2}}}$
above. More generally, the substitution $t=\tan(x)$ gives us
    $\sin(x)={\frac {t}{\sqrt {1+t^{2}}}}\quad \cos(x)={\frac {1}{\sqrt {1+t^{2}}}}\quad dx={\frac {dt}{1+t^{2}}}$
so this substitution is the preferable one to use if the integrand is such that all the square roots would disappear after substitution, as is the case in the above integral.

##### Example

Using the trigonometric substitution $t=a\tan(x)$ , then $dt=a\sec ^{2}(x)dx$ and ${\sqrt {t^{2}+a^{2}}}=a\sec(x)$ when $-{\frac {\pi }{2}}<x<{\frac {\pi }{2}}$ . So,
    $\int {\frac {dt}{(t^{2}+a^{2}){\sqrt {t^{2}+a^{2}}}}}$ $=\int {\frac {a\sec ^{2}(x)}{a^{3}\sec ^{3}(x)}}dx$ $={\frac {1}{a^{2}}}\int \cos(x)dx$ $={\frac {\sin(x)}{a^{2}}}+C$ $={\frac {1}{a^{2}}}\cdot {\frac {a\tan(x)}{a\sec(x)}}+C$ $={\frac {t}{a^{2}{\sqrt {t^{2}+a^{2}}}}}+C$

### Alternate Method

In general, to evaluate integrals of the form
    $\int {\frac {A+B\cos(x)+C\sin(x)}{a+b\cos(x)+c\sin(x)}}\ dx$ ,
it is extremely tedious to use the aforementioned "tan half angle" substitution directly, as one easily ends up with a rational function with a 4th degree denominator. Instead, we may first write the numerator as
    ${A+B\cos(x)+C\sin(x)\equiv p{\Biga+b\cos(x)+c\sin(x){\Big )}+q{\frac {d}{dx}}{\Biga+b\cos(x)+c\sin(x){\Big )}+r}$ .
Then the integral can be written as
    ${\begin{aligned}\int \left(p+q\cdot {\frac {{\frac {d}{dx}}{\bigla+b\cos(x)+c\sin(x){\bigr )}}{a+b\cos(x)+c\sin(x)}}+{\frac {r}{a+b\cos(x)+c\sin(x)}}\right)dx\end{aligned}}$
which can be evaluated much more easily.

#### Example

Evaluate $\int {\frac {\cos(x)+2}{\cos(x)+\sin(x)}}dx$ ,
Let
    $\cos(x)+2\equiv p{\Big\cos(x)+\sin(x){\Big )}+q{\frac {d}{dx}}{\Big\cos(x)+\sin(x){\Big )}+r$ .
Then
    $\cos(x)+2\equiv p{\Big\cos(x)+\sin(x){\Big )}+q{\Big\cos(x)-\sin(x){\Big )}+r$
    $\cos(x)+2\equiv (p+q)\cos(x)+(p-q)\sin(x)+r$
Comparing coefficients of cos(x), sin(x) and the constants on both sides, we obtain
    ${\begin{cases}p+q&=1\\p-q&=0\\r&=2\end{cases}}$
yielding p = q = 1/2, r = 2. Substituting back into the integrand,
    ${\begin{aligned}\int {\frac {\cos(x)+2}{\cos(x)+\sin(x)}}dx=\int {\frac {dx}{2}}+{\frac {1}{2}}\int {\frac {d{\bigl\cos(x)+\sin(x){\bigr )}}{\cos(x)+\sin(x)}}+\int {\frac {2}{\cos(x)+\sin(x)}}dx\end{aligned}}$
The last integral can now be evaluated using the "tan half angle" substitution described above, and we obtain
    $\int {\frac {2}{\cos(x)+\sin(x)}}dx={\sqrt {2}}\ln \left|{\frac {\tan {\bigl{\frac {x}{2}}{\bigr )}-1+{\sqrt {2}}}{\tan {\bigl{\frac {x}{2}}{\bigr )}-1-{\sqrt {2}}}}\right|+C$ .
The original integral is thus
    ${\int {\frac {\cos(x)+2}{\cos(x)+\sin(x)}}dx={\frac {x+\ln {\Big |}\cos(x)+\sin(x){\Big |}}{2}}+{\sqrt {2}}\ln \left|{\frac {\tan {\bigl{\frac {x}{2}}{\bigr )}-1+{\sqrt {2}}}{\tan {\bigl{\frac {x}{2}}{\bigr )}-1-{\sqrt {2}}}}\right|+C}$ .
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.12 Reduction Formula</h1>
A reduction formula is one that enables us to solve an integral problem by reducing it to a problem of solving an easier integral problem, and then reducing that to the problem of solving an easier problem, and so on.
For example, if we let
    $I_{n}=\int x^{n}e^{x}dx$
Integration by parts allows us to simplify this to
    $I_{n}=x^{n}e^{x}-n\int x^{n-1}e^{x}dx=$
    $I_{n}=x^{n}e^{x}-nI_{n-1}$
which is our desired reduction formula. Note that we stop at
    $I_{0}=e^{x}$ .
Similarly, if we let
    $I_{n}=\int \sec ^{n}(\theta )d\theta$
then integration by parts lets us simplify this to
    $I_{n}=\sec ^{n-2}(\theta )\tan(\theta )-(n-2)\int \sec ^{n-2}(\theta )\tan ^{2}(\theta )d\theta$
Using the trigonometric identity, $\tan ^{2}(\theta )=\sec ^{2}(\theta )-1$ , we can now write
    $I_{n}$ $=\sec ^{n-2}(\theta )\tan(\theta )+(n-2)\left(\int \sec ^{n-2}(\theta )d\theta -\int \sec ^{n}(\theta )d\theta \right)$ $=\sec ^{n-2}(\theta )\tan(\theta )+(n-2)\left(I_{n-2}-I_{n}\right)$
Rearranging, we get
    $I_{n}={\frac {\sec ^{n-2}(\theta )\tan(\theta )}{n-1}}+{\frac {n-2}{n-1}}I_{n-2}$
Note that we stop at $n=1$ or 2 if $n$ is odd or even respectively.
As in these two examples, integrating by parts when the integrand contains a power often results in a reduction formula.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.13 Irrational Functions</h1>
Integration of irrational functions is more difficult than rational functions, and many cannot be done. However, there are some particular types that can be reduced to rational forms by suitable substitutions.

### Type 1

Integrand contains ${\sqrt[{n}]{\frac {ax+b}{cx+d}}}$
Use the substitution $u={\sqrt[{n}]{\frac {ax+b}{cx+d}}}$ .

#### Example

Find $\int {\frac {1}{x}}{\sqrt {\frac {1-x}{x}}}\,dx$ .
Find $\int {\frac {x}{\sqrt[{3}]{ax+b}}}\,dx$ .

### Type 2

Integral is of the form $\int {\frac {Px+Q}{\sqrt {ax^{2}+bx+c}}}\,dx$
Write $Px+Q$ as $Px+Q=p\cdot {\frac {d[ax^{2}+bx+c]}{dx}}+q$ .

#### Example

Find $\int {\frac {4x-1}{\sqrt {5-4x-x^{2}}}}\,dx$ .

### Type 3

Integrand contains ${\sqrt {a^{2}-x^{2}}}$ , ${\sqrt {a^{2}+x^{2}}}$ or ${\sqrt {x^{2}-a^{2}}}$
This was discussed in "trigonometric substitutions above". Here is a summary:
* For ${\sqrt {a^{2}-x^{2}}}$ , use $x=a\sin(\theta )$ .
* For ${\sqrt {a^{2}+x^{2}}}$ , use $x=a\tan(\theta )$ .
* For ${\sqrt {x^{2}-a^{2}}}$ , use $x=a\sec(\theta )$ .

### Type 4

Integral is of the form $\int {\frac {dx}{(px+q){\sqrt {ax^{2}+bx+c}}}}$
Use the substitution $u={\frac {1}{px+q}}$ .

#### Example

Find $\int {\frac {dx}{(1+x){\sqrt {3+6x+x^{2}}}}}$ .

### Type 5

Other rational expressions with the irrational function ${\sqrt {ax^{2}+bx+c}}$
* If $a>0$ , we can use $u={\sqrt {ax^{2}+bx+c}}\pm {\sqrt {a}}x$ .
* If $c>0$ , we can use $u={\frac {{\sqrt {ax^{2}+bx+c}}\pm {\sqrt {c}}}{x}}$ .
* If $ax^{2}+bx+c$ can be factored as $a(x-\alpha )(x-\beta )$ , we can use $u={\sqrt {\frac {a(x-\alpha )}{x-\beta }}}$ .
* If $a<0$ and $ax^{2}+bx+c$ can be factored as $-a(\alpha -x)(x-\beta )$ , we can use $x=\alpha \cos ^{2}(\theta )+\beta \sin ^{2}(\theta )$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.14 Numerical Approximations</h1>
This page or section of Calculus is a stub. You can help Wikibooks by expanding it.
It is often the case, when evaluating definite integrals, that an antiderivative for the integrand cannot be found, or is extremely difficult to find. In some instances, a numerical approximation to the value of the definite value will suffice. The following techniques can be used, and are listed in rough order of ascending complexity.

## Riemann Sum

This comes from the definition of an integral. If we pick n to be finite, then we have:
$\int \limits _{a}^{b}f(x)dx\approx \sum _{i=1}^{n}f(x_{i}^{*})\Delta x$
where $x_{i}^{*}$ is any point in the i-th sub-interval $[x_{i-1},x_{i}]$ on $[a,b]$ .

### Right Rectangle

A special case of the Riemann sum, where we let $x_{i}^{*}=x_{i}$ , in other words the point on the far right-side of each sub-interval on, $[a,b]$ . Again if we pick n to be finite, then we have:
$\int \limits _{a}^{b}f(x)dx\approx \sum _{i=1}^{n}f(x_{i})\Delta x$

### Left Rectangle

Another special case of the Riemann sum, this time we let $x_{i}^{*}=x_{i-1}$ , which is the point on the far left side of each sub-interval on $[a,b]$ . As always, this is an approximation when $n$ is finite. Thus, we have:
$\int \limits _{a}^{b}f(x)dx\approx \sum _{i=1}^{n}f(x_{i-1})\Delta x$

## Trapezoidal Rule

$\int \limits _{a}^{b}f(x)dx\approx {\frac {b-a}{2n}}\left[f(x_{0})+2\sum _{i=1}^{n-1}{\biglf(x_{i}){\bigr )}+f(x_{n})\right]={\frac {b-a}{2n}}{\bigg{f(x_{0})+2f(x_{1})+2f(x_{2})+\cdots +2f(x_{n-1})+f(x_{n})}{\bigg )}$

## Simpson's Rule

Remember, n must be even,
    $\int \limits _{a}^{b}f(x)dx$ $\approx {\frac {b-a}{6n}}\left[f(x_{0})+\sum _{i=1}^{n-1}\left((3-(-1)^{i})f(x_{i})\right)+f(x_{n})\right]$ $={\frac {b-a}{6n}}{\biggf(x_{0})+4f{\bigl{\tfrac {x_{1}}{2}}{\bigr )}+2f(x_{1})+4f{\bigl{\tfrac {x_{3}}{2}}{\bigr )}+\cdots +4f{\bigl{\tfrac {x_{n-1}}{2}}{\bigr )}+f(x_{n}){\bigg ]}$

## Maclaurin Approximation

A common technique of approximating common trigonometric functions is to use the Taylor-Maclaurin series. Term-by-term integration allows one to easy compute the value of the integral by hand, well up to 5 decimal places of precision, and up to 10 given a factorial table.
For example, using the Maclaurin series of $\sin(x)$, one can easily approximate its integral with a polynomial.
$\sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n+1}}{(2n+1)!}}$
We can then easily integrate each term, taking $(-1)^{n}$ and ${\frac {1}{(2n+1)!}}$ to be constants.
${\displaystyle \sum _{n=0}^{\infty }{\int {\frac {(-1)^{n}x^{2n+1}}{(2n+1)!}}}}\implies c_{0}+{\displaystyle \sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n+2}}{(2n+2)!}}}$
We can easily find the constant term by inspecting the known principle integral, $-\cos(x)$, and the new series. This nets us the final equation.
$\int _{0}^{t}{\sin(x)\;\mathrm {d} x}+1={\displaystyle \sum _{n=0}^{\infty }{\frac {(-1)^{n}t^{2n+2}}{(2n+2)!}}}$
While this is a rather fast-converging series, converging at $\log _{10}((2x+2)!)$ digits of significance, it is relatively useless, since factorials are expensive to compute.

## Further reading

* Numerical Methods/Numerical Integration
This page or section of Calculus is a stub. You can help Wikibooks by expanding it.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References
<h1>4.15 Integration Exercises</h1>

## Integration of Polynomials

Evaluate the following:
$\int (x^{2}-2)^{2}dx$
${\frac {x^{5}}{5}}-{\frac {4x^{3}}{3}}+4x+C$
${\frac {x^{5}}{5}}-{\frac {4x^{3}}{3}}+4x+C$
$\int 8x^{3}dx$
$2x^{4}+C$
$2x^{4}+C$
$\int (4x^{2}+11x^{3})dx$
${\frac {4x^{3}}{3}}+{\frac {11x^{4}}{4}}+C$
${\frac {4x^{3}}{3}}+{\frac {11x^{4}}{4}}+C$
$\int (31x^{32}+4x^{3}-9x^{4})dx$
${\frac {31x^{33}}{33}}+x^{4}-{\frac {9x^{5}}{5}}+C$
${\frac {31x^{33}}{33}}+x^{4}-{\frac {9x^{5}}{5}}+C$
$\int 5x^{-2}\,dx$
$-{\frac {5}{x}}+C$
$-{\frac {5}{x}}+C$
Solutions

## Indefinite Integration

Find the general antiderivative of the following:
$\int {\bigl\cos(x)+\sin(x){\bigr )}dx$
$\sin(x)-\cos(x)+C$
$\sin(x)-\cos(x)+C$
$\int 3\sin(x)dx$
$-3\cos(x)+C$
$-3\cos(x)+C$
$\int {\bigl1+\tan ^{2}(x){\bigr )}dx$
$\tan(x)+C$
$\tan(x)+C$
$\int {\bigl3x-\sec ^{2}(x){\bigr )}dx$
${\frac {3x^{2}}{2}}-\tan(x)+C$
${\frac {3x^{2}}{2}}-\tan(x)+C$
$\int -e^{x}\,dx$
$-e^{x}+C$
$-e^{x}+C$
$\int 8e^{x}\,dx$
$8e^{x}+C$
$8e^{x}+C$
$\int {\frac {dx}{7x}}$
${\frac {\ln |x|}{7}}+C$
${\frac {\ln |x|}{7}}+C$
Solutions

## Integration by Substitution

Find the anti-derivative or compute the integral depending on whether the integral is indefinite or definite.
$\int _{0}^{\pi /2}\sin(x)\cos(x)\,dx$
${\frac {1}{2}}$
${\frac {1}{2}}$
$\int _{0}^{\pi /4}\tan(x)\,dx$
${\frac {\ln(2)}{2}}$
${\frac {\ln(2)}{2}}$
$\int _{1/2}^{1}{\frac {e^{\sqrt {2x-1}}}{\sqrt {2x-1}}}\,dx$
$e-1$
$e-1$
$\int _{-3}^{-{\sqrt {6}}}{\frac {8x}{\sqrt {x^{2}-5}}}\,dx$
$-8$
$-8$
$\int -{\frac {3}{2}}{\sqrt {\frac {2}{e^{3x-2}}}}\,dx$
${\sqrt {\frac {2}{e^{3x-2}}}}+C$
${\sqrt {\frac {2}{e^{3x-2}}}}+C$
$\int {\frac {x\sec \left({\sqrt {x^{2}-5}}\right)\tan \left({\sqrt {x^{2}-5}}\right)}{50{\sqrt {x^{2}-5}}}}\,dx$
${\frac {\sec \left({\sqrt {x^{2}-5}}\right)}{50}}+C$
${\frac {\sec \left({\sqrt {x^{2}-5}}\right)}{50}}+C$
$\int {\frac {2\sec ^{2}\left(\ln(x)\right)\tan \left(\ln(x)\right)}{x}}\,dx$
$\tan ^{2}\left(\ln(x)\right)+C$
$\tan ^{2}\left(\ln(x)\right)+C$
$\int \left(e^{x}-1\right)x^{e^{x}-2}+x^{e^{x}-1}e^{x}\ln(x)\,dx$
$x^{e^{x}-1}+C$
$x^{e^{x}-1}+C$
$\int 2\sec ^{2}\left(\ln \left(x^{2}+{\frac {2}{x}}\right)\right){\frac {x^{3}-1}{x^{4}+2x}}\,dx$
$\tan \left(\ln \left(x^{2}+{\frac {2}{x}}\right)\right)+C$
$\tan \left(\ln \left(x^{2}+{\frac {2}{x}}\right)\right)+C$
Solutions

## Integration by parts

$\int \sin(x)\cos(x)dx$
$u=\sin(x)$
$v'=\cos(x)$
$u=\cos(x)$
$v'=\sin(x)$
${\frac {\sin ^{2}(x)}{2}}$
$-{\frac {\cos ^{2}(x)}{2}}$
${\frac {\sin ^{2}(x)}{2}}$
$-{\frac {\cos ^{2}(x)}{2}}$
Solutions

## Integration by Trigonometric Substitution

$\int {\frac {dx}{x^{2}+a^{2}}}$
${\frac {\arctan {\bigl{\tfrac {x}{a}}{\bigr )}}{a}}+C$
${\frac {\arctan {\bigl{\tfrac {x}{a}}{\bigr )}}{a}}+C$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Area
## Introduction

Finding the area between two curves, usually given by two explicit functions, is often useful in calculus.
In general the rule for finding the area between two curves is
$A=A_{\rm {top}}-A_{\rm {bottom}}$ or
If f(x) is the upper function and g(x) is the lower function
$A=\int \limits _{a}^{b}{\biglf(x)-g(x){\bigr )}dx$
This is true whether the functions are in the first quadrant or not.

## Area between two curves

Suppose we are given two functions $y_{1}=f(x)$ and $y_{2}=g(x)$ and we want to find the area between them on the interval $[a,b]$ . Also assume that $f(x)\geq g(x)$ for all $x$ on the interval $[a,b]$ . Begin by partitioning the interval $[a,b]$ into $n$ equal subintervals each having a length of $\Delta x={\frac {b-a}{n}}$ . Next choose any point in each subinterval, $x_{i}^{*}$ . Now we can 'create' rectangles on each interval. At the point $x_{i}*$ , the height of each rectangle is $f(x_{i}^{*})-g(x_{i}^{*})$ and the width is $\Delta x$ . Thus the area of each rectangle is ${\biglf(x_{i}^{*})-g(x_{i}^{*}){\bigr ]}\Delta x$ . An approximation of the area, $A$ , between the two curves is
    $A:=\sum _{i=1}^{n}{\Bigf(x_{i}^{*})-g(x_{i}^{*}){\Big ]}\Delta x$ .
Now we take the limit as $n$ approaches infinity and get
    $A=\lim _{n\to \infty }\sum _{i=1}^{n}{\Bigf(x_{i}^{*})-g(x_{i}^{*}){\Big ]}\Delta x$
which gives the exact area. Recalling the definition of the definite integral we notice that
    $A=\int \limits _{a}^{b}{\biglf(x)-g(x){\bigr )}dx$ .
This formula of finding the area between two curves is sometimes known as applying integration with respect to the x-axis since the rectangles used to approximate the area have their bases lying parallel to the x-axis. It will be most useful when the two functions are of the form $y_{1}=f(x)$ and $y_{2}=g(x)$ . Sometimes however, one may find it simpler to integrate with respect to the y-axis. This occurs when integrating with respect to the x-axis would result in more than one integral to be evaluated. These functions take the form $x_{1}=f(y)$ and $x_{2}=g(y)$ on the interval $[c,d]$ . Note that $[c,d]$ are values of $y$ . The derivation of this case is completely identical. Similar to before, we will assume that $f(y)\geq g(y)$ for all $y$ on $[c,d]$ . Now, as before we can divide the interval into $n$ subintervals and create rectangles to approximate the area between $f(y)$ and $g(y)$ . It may be useful to picture each rectangle having their 'width', $\Delta y$ , parallel to the y-axis and 'height', $f(y_{i}^{*})-g(y_{i}^{*})$ at the point $y_{i}^{*}$, parallel to the x-axis. Following from the work above we may reason that an approximation of the area, $A$ , between the two curves is
    $A:=\sum _{i=1}^{n}{\Bigf(y_{i}^{*})-g(y_{i}^{*}){\Big ]}\Delta y$ .
As before, we take the limit as $n$ approaches infinity to arrive at
    $A=\lim _{n\to \infty }\sum _{i=1}^{n}{\Bigf(y_{i}^{*})-g(y_{i}^{*}){\Big ]}\Delta y$ ,
which is nothing more than a definite integral, so
    $A=\int \limits _{c}^{d}{\biglf(y)-g(y){\bigr )}dy$ .
Regardless of the form of the functions, we basically use the same formula.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Volume

When we think about volume from an intuitive point of view, we typically think of it as the amount of "space" an item occupies. Unfortunately assigning a number that measures this amount of space can prove difficult for all but the simplest geometric shapes. Calculus provides a new tool that can greatly extend our ability to calculate volume. In order to understand the ideas involved it helps to think about the volume of a cylinder.
The volume of a cylinder is calculated using the formula $V=\pi r^{2}h$ . The base of the cylinder is a circle whose area is given by $A=\pi r^{2}$ . Notice that the volume of a cylinder is derived by taking the area of its base and multiplying by the height $h$ . For more complicated shapes, we could think of approximating the volume by taking the area of some cross section at some height $x$ and multiplying by some small change in height $\Delta x$ then adding up the heights of all of these approximations from the bottom to the top of the object. This would appear to be a Riemann sum. Keeping this in mind, we can develop a more general formula for the volume of solids in $\mathbb {R} ^{3}$ (3 dimensional space).

## Formal Definition

Formally the ideas above suggest that we can calculate the volume of a solid by calculating the integral of the cross-sectional area along some dimension. In the above example of a cylinder, every cross section is given by the same circle, so the cross-sectional area is therefore a constant function, and the dimension of integration was vertical (although it could have been any one we desired). Generally, if $S$ is a solid that lies in $\mathbb {R} ^{3}$ between $x=a$ and $x=b$ , let $A(x)$ denote the area of a cross section taken in the plane perpendicular to the $x$-axis, and passing through the point $x$ .
If the function $A(x)$ is continuous on $[a,b]$ , then the volume $V_{S}$ of the solid $S$ is given by:
    $V_{S}=\int \limits _{a}^{b}A(x)dx$

## Examples
### Example 1: A right cylinder

Now we will calculate the volume of a right cylinder using our new ideas about how to calculate volume. Since we already know the formula for the volume of a cylinder this will give us a "sanity check" that our formulas make sense. First, we choose a dimension along which to integrate. In this case, it will greatly simplify the calculations to integrate along the height of the cylinder, so this is the direction we will choose. Thus we will call the vertical direction $x$ (see Figure 1). Now we find the function, $A(x)$ , which will describe the cross-sectional area of our cylinder at a height of $x$ . The cross-sectional area of a cylinder is simply a circle. Now simply recall that the area of a circle is $\pi r^{2}$ , and so $A(x)=\pi r^{2}$ . Before performing the computation, we must choose our bounds of integration. In this case, we simply define $x=0$ to be the base of the cylinder, and so we will integrate from $x=0$ to $x=h$ , where $h$ is the height of the cylinder. Finally, we integrate:
    ${\begin{aligned}V_{\mathrm {cylinder} }&=\int \limits _{a}^{b}A(x)dx\\&=\int \limits _{0}^{h}\pi r^{2}dx\\&=\pi r^{2}\int \limits _{0}^{h}dx\\&=\pi r^{2}x{\bigg |}_{x=0}^{h}\\&=\pi r^{2}(h-0)\\&=\pi r^{2}h\end{aligned}}$
This is exactly the familiar formula for the volume of a cylinder.

### Example 2: A right circular cone

For our next example we will look at an example where the cross sectional area is not constant. Consider a right circular cone. Once again the cross sections are simply circles. But now the radius varies from the base of the cone to the tip. Once again we choose $x$ to be the vertical direction, with the base at $x=0$ and the tip at $x=h$ , and we will let $R$ denote the radius of the base. While we know the cross sections are just circles we cannot calculate the area of the cross sections unless we find some way to determine the radius of the circle at height $x$ .
Luckily in this case it is possible to use some of what we know from geometry. We can imagine cutting the cone perpendicular to the base through some diameter of the circle all the way to the tip of the cone. If we then look at the flat side we just created, we will see simply a triangle, whose geometry we understand well. The right triangle from the tip to the base at height $x$ is similar to the right triangle from the tip to the base at height $h$ . This tells us that ${\frac {r}{h-x}}={\frac {R}{h}}$ . So that we see that the radius of the circle at height $x$ is $r(x)={\frac {R}{h}}(h-x)$ . Now using the familiar formula for the area of a circle we see that $A(x)=\pi {\frac {R^{2}}{h^{2}}}(h-x)^{2}$ .
Now we are ready to integrate.
    ${\begin{aligned}V_{\mathrm {cone} }&=\int \limits _{a}^{b}A(x)dx\\&=\int \limits _{0}^{h}\pi {\frac {R^{2}}{h^{2}}}(h-x)^{2}dx\\&=\pi {\frac {R^{2}}{h^{2}}}\int \limits _{0}^{h}(h-x)^{2}dx\end{aligned}}$
By u-substitution we may let $u=h-x$ , then $du=-dx$ and our integral becomes
    ${\begin{aligned}&&=\pi {\frac {R^{2}}{h^{2}}}\left(-\int \limits _{h}^{0}u^{2}du\right)\\&&=\pi {\frac {R^{2}}{h^{2}}}\left(-{\frac {u^{3}}{3}}{\bigg |}_{h}^{0}\right)\\&&=\pi {\frac {R^{2}}{h^{2}}}\left(-0+{\frac {h^{3}}{3}}\right)\\&&={\frac {\pi }{3}}R^{2}h\end{aligned}}$

### Example 3: A sphere

In a similar fashion, we can use our definition to prove the well known formula for the volume of a sphere. First, we must find our cross-sectional area function, $A(x)$ . Consider a sphere of radius $R$ which is centered at the origin in $\mathbb {R} ^{3}$ . If we again integrate vertically then $x$ will vary from $-R$ to $R$ . In order to find the area of a particular cross section it helps to draw a right triangle whose points lie at the center of the sphere, the center of the circular cross section, and at a point along the circumference of the cross section. As shown in the diagram the side lengths of this triangle will be $R$ , $|x|$ , and $r$ . Where $r$ is the radius of the circular cross section. Then by the Pythagorean theorem $r={\sqrt {R^{2}-|x|^{2}}}$ and find that $A(x)=\pi (R^{2}-|x|^{2})$ . It is slightly helpful to notice that $|x|^{2}=x^{2}$ so we do not need to keep the absolute value.
So we have that
    ${\begin{aligned}V_{\mathrm {sphere} }&=\int \limits _{a}^{b}A(x)dx\\&=\int \limits _{-R}^{R}\pi (R^{2}-x^{2})dx\\&=\pi \int \limits _{-R}^{R}R^{2}dx-\pi \int \limits _{-R}^{R}x^{2}dx\\&=\pi R^{2}x{\Bigg |}_{-R}^{R}-\pi {\frac {x^{3}}{3}}{\Bigg |}_{-R}^{R}\\&=\pi R^{2}(R-(-R))-\pi \left({\frac {R^{3}}{3}}-{\frac {(-R)^{3}}{3}}\right)\\&=2\pi R^{3}-{\frac {2\pi }{3}}R^{3}={\frac {4\pi }{3}}R^{3}\end{aligned}}$

## Extension to Non-trivial Solids

Now that we have shown our definition agrees with our prior knowledge, we will see how it can help us extend our horizons to solids whose volumes are not possible to calculate using elementary geometry.
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Volume of solids of revolution

In this section we cover solids of revolution and how to calculate their volume. A solid of revolution is a solid formed by revolving a 2-dimensional region around an axis. For example, revolving the semi-circular region bounded by the curve $y={\sqrt {1-x^{2}}}$ and the line $y=0$ around the $x$-axis produces a sphere. There are two main methods of calculating the volume of a solid of revolution using calculus: the disk method and the shell method.

## Disk Method

Consider the solid formed by revolving the region bounded by the curve $y=f(x)$ , which is continuous on $[a,b]$ , and the lines $x=a$ , $x=b$ and $y=0$ around the $x$-axis. We could imagine approximating the volume by approximating $f(x)$ with the stepwise function $g(x)$ shown in figure 2, which uses a right-handed approximation to the function. Now when the region is revolved, the region under each step sweeps out a cylinder, whose volume we know how to calculate, i.e.
    $V_{\rm {cylinder}}=\pi r^{2}h$
where $r$ is the radius of the cylinder and $h$ is the cylinder's height. This process is reminiscent of the Riemann process we used to calculate areas earlier. Let's try to write the volume as a Riemann sum and from that equate the volume to an integral by taking the limit as the subdivisions get infinitely small.
Consider the volume of one of the cylinders in the approximation, say the $k$-th one from the left. The cylinder's radius is the height of the step function, and the thickness is the length of the subdivision. With $n$ subdivisions and a length of $b-a$ for the total length of the region, each subdivision has width
    $\Delta x={\frac {b-a}{n}}$
Since we are using a right-handed approximation, the $k$-th sample point will be
    $x_{k}=k\Delta x$
So the volume of the $k$-th cylinder is
    $V_{k}=\pi f(x_{k})^{2}\Delta x$
Summing all of the cylinders in the region from $a$ to $b$ , we have
    $V_{\rm {approx}}=\sum _{k=1}^{n}\pi f(x_{k})^{2}\Delta x$
Taking the limit as $n$ approaches infinity gives us the exact volume
    $V=\lim _{n\to \infty }\sum _{k=1}^{n}\pi f(x_{k})^{2}\Delta x$
which is equivalent to the integral
    $V=\int \limits _{a}^{b}\pi f(x)^{2}dx$
* Example: Volume of a Sphere
* Let's calculate the volume of a sphere using the disk method. Our generating region will be the region bounded by the curve $f(x)={\sqrt {r^{2}-x^{2}}}$ and the line $y=0$ . Our limits of integration will be the $x$-values where the curve intersects the line $y=0$ , namely, $x=\pm r$ . We have
* ${\begin{aligned}V_{\rm {sphere}}&=\int \limits _{-r}^{r}\pi (r^{2}-x^{2})dx\\&=\pi \left(\int \limits _{-r}^{r}r^{2}dx-\int \limits _{-r}^{r}x^{2}dx\right)\\&=\pi \left(r^{2}x{\bigg |}_{-r}^{r}-{\frac {x^{3}}{3}}{\bigg |}_{-r}^{r}\right)\\&=\pi {\Bigr^{2}{\biglr-(-r){\bigr )}-{\tfrac {1}{3}}{\biglr^{3}-(-r)^{3}{\bigr )}{\Big )}\\&=\pi \left(2r^{3}-{\frac {2r^{3}}{3}}\right)\\&=\pi {\frac {6r^{3}-2r^{3}}{3}}\\&={\frac {4\pi }{3}}r^{3}\end{aligned}}$

### Exercises

$r$
$h$
$y=r-{\frac {r}{h}}x$
$y=0$
$x=0$
$x$
${\frac {\pi r^{2}h}{3}}$
${\frac {\pi r^{2}h}{3}}$
$y=x^{2}$
$x=1$
$y=0$
$x$
${\frac {\pi }{5}}$
${\frac {\pi }{5}}$
Solutions

## Washer Method

The washer method is an extension of the disk method to solids of revolution formed by revolving an area bounded between two curves around the $x$-axis. Consider the solid of revolution formed by revolving the region in figure 3 around the $x$-axis. The curve $f(x)$ is the same as that in figure 1, but now our solid has an irregularly shaped hole through its center whose volume is that of the solid formed by revolving the curve $g(x)$ around the $x$-axis. Our approximating region has the same upper boundary, $f_{\rm {step}}(x)$ as in figure 2, but now we extend only down to $g_{\rm {step}}(x)$ rather than all the way down to the $x$-axis. Revolving each block around the $x$-axis forms a washer-shaped solid with outer radius $f_{\rm {step}}(x)$ and inner radius $g_{\rm {step}}(x)$ . The volume of the $k$-th hollow cylinder is
    ${\begin{aligned}V_{k}&=\pi \cdot f(x_{k})^{2}\Delta x-\pi \cdot g(x_{k})^{2}\Delta x\\&=\pi {\biglf(x_{k})^{2}-g(x_{k})^{2}{\bigr )}\Delta x\end{aligned}}$
where $\Delta x={\frac {b-a}{n}}$ and $x_{k}=k\Delta x$ . The volume of the entire approximating solid is
    $V_{\rm {approx}}=\sum _{k=1}^{n}\pi {\biglf(x_{k})^{2}-g(x_{k})^{2}{\bigr )}\Delta x$
Taking the limit as $n$ approaches infinity gives the volume
    ${\begin{aligned}V&=\lim _{n\to \infty }\sum _{k=1}^{n}\pi {\biglf(x_{k})^{2}-g(x_{k})^{2}{\bigr )}\Delta x\\&=\int \limits _{a}^{b}\pi {\biglf(x)^{2}-g(x)^{2}{\bigr )}dx\end{aligned}}$

### Exercises

$y=R-{\frac {R}{h}}x$
$y=r$
$x=0$
$x$
$\pi h\left({\frac {R^{2}}{3}}-r^{2}\right)$
$\pi h\left({\frac {R^{2}}{3}}-r^{2}\right)$
$y=x^{2}$
$y=x^{3}$
$x=1$
$y=0$
$x$
${\frac {2\pi }{35}}$
${\frac {2\pi }{35}}$
Solutions

## Shell Method

The shell method is another technique for finding the volume of a solid of revolution. Using this method sometimes makes it easier to set up and evaluate the integral. Consider the solid of revolution formed by revolving the region in figure 5 around the $y$-axis. While the generating region is the same as in figure 1, the axis of revolution has changed, making the disk method impractical for this problem. However, dividing the region up as we did previously suggests a similar method of finding the volume, only this time instead of adding up the volume of many approximating disks, we will add up the volume of many cylindrical shells. Consider the solid formed by revolving the region in figure 6 around the $y$-axis. The $k$-th rectangle sweeps out a hollow cylinder with height ${\Big |}f(x_{k}){\Big |}$ and with inner radius $x_{k}$ and outer radius $x_{k}+\Delta x$ , where $\Delta x={\frac {b-a}{n}}$ and $x_{k}=k\Delta x$ , the volume of which is
    $V_{k}$ $=\pi {\bigl(x_{k}+\Delta x)^{2}-x_{k}^{2}{\bigr )}{\Big |}f(x_{k}){\Big |}$ $=\pi {\bigl(x_{k}^{2}+2x_{k}\Delta x+\Delta x^{2})-x_{k}^{2}{\bigr )}{\Big |}f(x_{k}){\Big |}$ $=\pi (2x_{k}\Delta x+\Delta x^{2}){\Big |}f(x_{k}){\Big |}$
The volume of the entire approximating solid is
    $V_{\rm {approx}}=\sum _{k=1}^{n}\pi (2x_{k}\Delta x+\Delta x^{2}){\Big |}f(x_{k}){\Big |}$
Taking the limit as $n$ approaches infinity gives us the exact volume
    $V$ $=\lim _{n\to \infty }\sum _{k=1}^{n}\pi (2x_{k}\Delta x+\Delta x^{2}){\Big |}f(x_{k}){\Big |}$ $=\pi \cdot \lim _{n\to \infty }\left(\sum _{k=1}^{n}2x_{k}\Delta x{\Big |}f(x_{k}){\Big |}+\sum _{k=1}^{n}\Delta x^{2}{\Big |}f(x_{k}){\Big |}\right)$
Since $|f|$ is continuous on $[a,b]$ , the Extreme Value Theorem implies that $|f|$ has some maximum, $M$ , on $[a,b]$ . Using this and the fact that $\Delta x^{2}{\Big |}f(x_{k}){\Big |}>0$ , we have
    ${\sum _{k=1}^{n}2x_{k}\Delta x{\Big |}f(x_{k}){\Big |}\leq \sum _{k=1}^{n}2x_{k}\Delta x{\Big |}f(x_{k}){\Big |}+\sum _{k=1}^{n}\Delta x^{2}{\Big |}f(x_{k}){\Big |}\leq \sum _{k=1}^{n}2x_{k}\Delta x{\Big |}f(x_{k}){\Big |}+\sum _{k=1}^{n}\Delta x^{2}M}$
But
    $\lim _{n\to \infty }\sum _{k=1}^{n}\Delta x^{2}M$ $=\lim _{n\to \infty }\sum _{k=1}^{n}\left({\frac {b-a}{n}}\right)^{2}M$ $=\lim _{n\to \infty }{\frac {(b-a)^{2}}{n}}M$ $=0$
So by the Squeeze Theorem
    $\pi \cdot \lim _{n\to \infty }\left(\sum _{k=1}^{n}2x_{k}\Delta x{\Big |}f(x_{k}){\Big |}+\sum _{k=1}^{n}\Delta x^{2}{\Big |}f(x_{k}){\Big |}\right)=\pi \cdot \lim _{n\to \infty }\sum _{k=1}^{n}2x_{k}\Delta x{\Big |}f(x_{k}){\Big |}$
which is just the integral
    $\int \limits _{a}^{b}2\pi x{\Big |}f(x){\Big |}dx$

### Exercises

$r$
$h$
$y$
${\frac {\pi r^{2}h}{3}}$
${\frac {\pi r^{2}h}{3}}$
$y=x^{2}$
$x=1$
$y=0$
$y$
${\frac {\pi }{2}}$
${\frac {\pi }{2}}$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Arc length

Suppose that we are given a function $f$ that is continuous on an interval $[a,b]$ and we want to calculate the length of the curve drawn out by the graph of $f(x)$ from $x=a$ to $x=b$ . If the graph were a straight line this would be easy — the formula for the length of the line is given by Pythagoras' theorem. And if the graph were a piecewise linear function we can calculate the length by adding up the length of each piece.
The problem is that most graphs are not linear. Nevertheless we can estimate the length of the curve by approximating it with straight lines. Suppose the curve $C$ is given by the formula $y=f(x)$ for $a\leq x\leq b$ . We divide the interval $[a,b]$ into $n$ subintervals with equal width $\Delta x$ and endpoints $x_{0},x_{1},\ldots ,x_{n}$ . Now let $y_{i}=f(x_{i})$ so $P_{i}=(x_{i},y_{i})$ is the point on the curve above $x_{i}$ . The length of the straight line between $P_{i}$ and $P_{i+1}$ is
    ${\bigl |}P_{i}P_{i+1}{\bigr |}={\sqrt {(y_{i+1}-y_{i})^{2}+(x_{i+1}-x_{i})^{2}}}$
So an estimate of the length of the curve $C$ is the sum
    $\sum _{i=0}^{n-1}{\bigl |}P_{i}P_{i+1}{\bigr |}$
As we divide the interval $[a,b]$ into more pieces this gives a better estimate for the length of $C$ . In fact we make that a definition.
The length of the curve $y=f(x)$ for $a\leq x\leq b$ is defined to be
    $L=\lim _{n\to \infty }\sum _{i=0}^{n-1}{\bigl |}P_{i+1}P_{i}{\bigr |}$

## The Arclength Formula

Suppose that $f'$ is continuous on $[a,b]$ . Then the length of the curve given by $y=f(x)$ between $a$ and $b$ is given by
    $L=\int \limits _{a}^{b}{\sqrt {1+f'(x)^{2}}}dx$
And in Leibniz notation
    $L=\int \limits _{a}^{b}{\sqrt {1+\left({\tfrac {dy}{dx}}\right)^{2}}}dx$
Proof: Consider $y_{i+1}-y_{i}=f(x_{i+1})-f(x_{i})$ . By the Mean Value Theorem there is a point $z_{i}$ in $(x_{i+1},x_{i})$ such that
    $y_{i+1}-y_{i}=f(x_{i+1})-f(x_{i})=f'(z_{i})(x_{i+1}-x_{i})$
So
    ${\bigl |}P_{i}P_{i+1}{\bigr |}$ $={\sqrt {(x_{i+1}-x_{i})^{2}+(y_{i+1}-y_{i})^{2}}}$ $={\sqrt {(x_{i+1}-x_{i})^{2}+f'(z_{i})^{2}(x_{i+1}-x_{i})^{2}}}$ $={\sqrt {{\bigl1+f'(z_{i})^{2}{\bigr )}(x_{i+1}-x_{i})^{2}}}$ $={\sqrt {1+f'(z_{i})^{2}}}\Delta x$
Putting this into the definition of the length of $C$ gives
    $L=\lim _{n\to \infty }\sum _{i=0}^{n-1}{\sqrt {1+f'(z_{i})^{2}}}\Delta x$
Now this is the definition of the integral of the function $g(x)={\sqrt {1+f'(x)^{2}}}$ between $a$ and $b$ (notice that $g$ is continuous because we are assuming that $f'$ is continuous). Hence
    $L=\int \limits _{a}^{b}{\sqrt {1+f'(x)^{2}}}dx$
as claimed.
* Example: Length of the curve $y=2x$ from $x=0$ to $x=1$
* As a sanity check of our formula, let's calculate the length of the "curve" $y=2x$ from $x=0$ to $x=1$ . First let's find the answer using the Pythagorean Theorem.
* $P_{0}=(0,0)$
* and
* $P_{1}=(1,2)$
* so the length of the curve, $s$ , is
* $s={\sqrt {2^{2}+1^{2}}}={\sqrt {5}}$
* Now let's use the formula
* $s=\int \limits _{0}^{1}{\sqrt {1+\left({\tfrac {d(2x)}{dx}}\right)^{2}}}\,dx=\int \limits _{0}^{1}{\sqrt {1+2^{2}}}\,dx={\sqrt {5}}x{\bigg |}_{0}^{1}={\sqrt {5}}$

### Exercises

$y=x{\sqrt {x}}$
$x=0$
$x=1$
${\frac {13{\sqrt {13}}-8}{27}}$
${\frac {13{\sqrt {13}}-8}{27}}$
$y={\frac {e^{x}+e^{-x}}{2}}$
$x=0$
$x=1$
${\frac {e-{\frac {1}{e}}}{2}}$
${\frac {e-{\frac {1}{e}}}{2}}$
Solutions

## Arclength of a parametric curve

For a parametric curve, that is, a curve defined by $x=f(t)$ and $y=g(t)$ , the formula is slightly different:
    $L=\int \limits _{a}^{b}{\sqrt {f'(t)^{2}+g'(t)^{2}}}\,dt$
Proof: The proof is analogous to the previous one: Consider $y_{i+1}-y_{i}=g(t_{i+1})-g(t_{i})$ and $x_{i+1}-x_{i}=f(t_{i+1})-f(t_{i})$ .
By the Mean Value Theorem there are points $c_{i}$ and $d_{i}$ in $(t_{i+1},t_{i})$ such that
    $y_{i+1}-y_{i}=g(t_{i+1})-g(t_{i})=g'(c_{i})(t_{i+1}-t_{i})$
and
    $x_{i+1}-x_{i}=f(t_{i+1})-f(t_{i})=f'(d_{i})(t_{i+1}-t_{i})$
So
    ${\bigl |}P_{i}P_{i+1}{\bigr |}$ $={\sqrt {(x_{i+1}-x_{i})^{2}+(y_{i+1}-y_{i})^{2}}}$ $={\sqrt {f'(d_{i})^{2}(t_{i+1}-t_{i})^{2}+g'(c_{i})^{2}(t_{i+1}-t_{i})^{2}}}$ $={\sqrt {{\biglf'(d_{i})^{2}+g'(c_{i})^{2}{\bigr )}(t_{i+1}-t_{i})^{2}}}$ $={\sqrt {f'(d_{i})^{2}+g'(c_{i})^{2}}}\Delta t$
Putting this into the definition of the length of the curve gives
    $L=\lim _{n\to \infty }\sum _{i=0}^{n-1}{\sqrt {f'(d_{i})^{2}+g'(c_{i})^{2}}}\Delta t$
This is equivalent to:
    $L=\int \limits _{a}^{b}{\sqrt {f'(t)^{2}+g'(t)^{2}}}\,dt$

### Exercises

$x(t)=R\cos(t)$
$y(t)=R\sin(t)$
$t$
$0$
$2\pi$
$2\pi R$
$2\pi R$
$x(t)=R{\biglt-\sin(t){\bigr )}$
$y(t)=R{\bigl1-\cos(t){\bigr )}$
$t$
$0$
$2\pi$
$8R$
$8R$
Solutions
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Surface area

This page or section of Calculus is a stub. You can help Wikibooks by expanding it.
Suppose we are given a function $f$ and we want to calculate the surface area of the function $f$ rotated around a given line. The calculation of surface area of revolution is related to the arc length calculation.
If the function $f$ is a straight line, other methods such as surface area formulae for cylinders and conical frusta can be used. However, if $f$ is not linear, an integration technique must be used.
Recall the formula for the lateral surface area of a conical frustum:
    $A=2\pi rl$
where $r$ is the average radius and $l$ is the slant height of the frustum.
For $y=f(x)$ and $a\leq x\leq b$ , we divide $[a,b]$ into subintervals with equal width $\delta x$ and endpoints $x_{0},x_{1},\ldots ,x_{n}$ . We map each point $y_{i}=f(x_{i})$ to a conical frustum of width Δx and lateral surface area $A_{i}$ .
We can estimate the surface area of revolution with the sum
    $A=\sum _{i=0}^{n}A_{i}$
As we divide $[a,b]$ into smaller and smaller pieces, the estimate gives a better value for the surface area.

## Definition (Surface of Revolution)

The surface area of revolution of the curve $y=f(x)$ about a line for $a\leq x\leq b$ is defined to be
$A=\lim _{n\to \infty }\sum _{i=0}^{n}A_{i}$

## The Surface Area Formula

Suppose $f$ is a continuous function on the interval $[a,b]$ and $r(x)$ represents the distance from $f(x)$ to the axis of rotation. Then the lateral surface area of revolution about a line is given by
    $A=2\pi \int _{a}^{b}r(x){\sqrt {1+f'(x)^{2}}}\,dx$
And in Leibniz notation
    $A=2\pi \int _{a}^{b}r(x){\sqrt {1+\left({\tfrac {dy}{dx}}\right)^{2}}}\,dx$
Proof:
    $A$ $=\lim _{n\to \infty }\sum _{i=1}^{n}A_{i}$ $=\lim _{n\to \infty }\sum _{i=1}^{n}2\pi r_{i}l_{i}$ $=2\pi \cdot \lim _{n\to \infty }\sum _{i=1}^{n}r_{i}l_{i}$
As $n\to \infty$ and $\Delta x\to 0$, we know two things:
* the average radius of each conical frustum $r_{i}$ approaches a single value
* the slant height of each conical frustum $l_{i}$ equals an infitesmal segment of arc length
From the arc length formula discussed in the previous section, we know that
    $l_{i}={\sqrt {1+f'(x_{i})^{2}}}$
Therefore
    $A$ $=2\pi \cdot \lim _{n\to \infty }\sum _{i=1}^{n}r_{i}l_{i}$ $=2\pi \cdot \lim _{n\to \infty }\sum _{i=1}^{n}r_{i}{\sqrt {1+f'(x_{i})^{2}}}\Delta x$
Because of the definition of an integral $\int _{a}^{b}f(x)dx=\lim _{n\to \infty }\sum _{i=1}^{n}f(c_{i})\Delta x_{i}$ , we can simplify the sigma operation to an integral.
    $A=2\pi \int _{a}^{b}r(x){\sqrt {1+f'(x)^{2}}}dx$
Or if $f$ is in terms of $y$ on the interval $[c,d]$
    $A=2\pi \int _{c}^{d}r(y){\sqrt {1+f'(y)^{2}}}dy$

# Work

This page or section of Calculus is a stub. You can help Wikibooks by expanding it.
${\begin{aligned}W=\int F\,dr&=\int ma\,dr\\&=\int m\,{\frac {dv}{dt}}\,dr\\&=m\int {\frac {dr}{dt}}\,dv\\&=m\int v\,dv\\&={\frac {mv^{2}}{2}}=\Delta E_{k}\end{aligned}}$

# Centre of mass

This page or section of Calculus is a stub. You can help Wikibooks by expanding it.
${\vec {r}}_{G}={\frac {\displaystyle \sum \limits _{k=1}^{n}m_{k}{\vec {r_{k}}}}{\displaystyle \sum \limits _{k=1}^{n}m_{k}}}$

## Exercises

See the exercises for Integration

# Introduction
## Introduction

Parametric equations are typically defined by two equations that specify both the $x,y$ coordinates of a graph using a parameter. They are graphed using the parameter (usually $t$) to figure out both the $x,y$ coordinates.

### Example 1

${\begin{aligned}x&=t\\y&=t^{2}\end{aligned}}$
Note: This parametric equation is equivalent to the rectangular equation $y=x^{2}$ .

### Example 2

${\begin{aligned}x&=\cos(t)\\y&=\sin(t)\end{aligned}}$
Note: This parametric equation is equivalent to the rectangular equation $x^{2}+y^{2}=1$ and the polar equation $r=1$ .
Parametric equations can be plotted by using a $t$-table to show values of $x,y$ for each value of $t$ . They can also be plotted by eliminating the parameter though this method removes the parameter's importance.

## Forms of Parametric Equations

Parametric equations can be described in three ways:
* Parametric form
* Vector form
* An equality
The first two forms are used far more often, as they allow us to find the value of the component at the given value of the parameter. The final form is used less often; it allows us to verify a solution to the equation, or find the parameter (or some constant multiple thereof).

### Parametric Form

A parametric equation can be shown in parametric form by describing it with a system of equations. For instance:
${\begin{aligned}x&=t\\y&=t^{2}-1\end{aligned}}$

### Vector Form

Vector form can be used to describe a parametric equation in a similar manner to parametric form. In this case, a position vector is given:
${\binom {x}{y}}={\binom {t}{t^{2}-1}}$

### Equalities

A parametric equation can also be described with a set of equalities. This is done by solving for the parameter, and equating the components. For example:
${\begin{aligned}x&=t\\y&=t^{2}-1\end{aligned}}$
From here, we can solve for $t$ :
${\begin{aligned}t&=x\\t&=\pm {\sqrt {1+y}}\end{aligned}}$
And hence equate the two right-hand sides:
$x=\pm {\sqrt {1+y}}$

## Converting Parametric Equations

There are a few common place methods used to change a parametric equation to rectangular form. The first involves solving for $t$ in one of the two equations and then replacing the new expression for $t$ with the variable found in the second equation.

### Example 1

${\begin{aligned}x&=t-3\\y&=t^{3}\end{aligned}}$
$x=t-3$ becomes $x+3=t$
$y=(x+3)^{3}$

### Example 2

${\begin{aligned}x&=3\cos(t)\\y&=4\sin(t)\end{aligned}}$
Isolate the trigonometric functions
${\begin{aligned}\cos(t)&={\frac {x}{3}}\\\sin(t)&={\frac {y}{4}}\end{aligned}}$
Use the identity
${\begin{aligned}&\cos ^{2}(t)+\sin ^{2}(t)=1\\&{\frac {x^{2}}{9}}+{\frac {y^{2}}{16}}=1\end{aligned}}$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Differentiation
## Taking Derivatives of Parametric Systems

Just as we are able to differentiate functions of $x$ , we are able to differentiate $x$ and $y$ , which are functions of $t$ . Consider:
${\begin{aligned}x&=\sin(t)\\y&=t\end{aligned}}$
We would find the derivative of $x$ with respect to $t$ , and the derivative of $y$ with respect to $t$ :
${\begin{aligned}x'&=\cos(t)\\y'&=1\end{aligned}}$
In general, we say that if
${\begin{aligned}x&=x(t)\\y&=y(t)\end{aligned}}$
then:
${\begin{aligned}x'&=x'(t)\\y'&=y'(t)\end{aligned}}$
It's that simple.
This process works for any amount of variables.

## Slope of Parametric Equations

In the above process, $x'$ has told us only the rate at which $x$ is changing, not the rate for $y$ , and vice versa. Neither is the slope.
In order to find the slope, we need something of the form ${\frac {dy}{dx}}$ .
We can discover a way to do this by simple algebraic manipulation:
${\frac {y'}{x'}}={\frac {\frac {dy}{dt}}{\frac {dx}{dt}}}={\frac {dy}{dx}}$
So, for the example in section 1, the slope at any time $t$ :
${\frac {1}{\cos(t)}}=\sec(t)$
In order to find a vertical tangent line, set the horizontal change, or $x'$ , equal to 0 and solve.
In order to find a horizontal tangent line, set the vertical change, or $y'$ , equal to 0 and solve.
If there is a time when both $x',y'$ are 0, that point is called a singular point.

## Concavity of Parametric Equations

Solving for the second derivative of a parametric equation can be more complex than it may seem at first glance.
When you have take the derivative of ${\frac {dy}{dx}}$ in terms of $t$ , you are left with ${\frac {\frac {d^{2}y}{dx}}{dt}}$ :
${\frac {d}{dt}}\left[{\frac {dy}{dx}}\right]={\frac {\frac {d^{2}y}{dx}}{dt}}$ .
By multiplying this expression by ${\frac {dt}{dx}}$ , we are able to solve for the second derivative of the parametric equation:
${\frac {\frac {d^{2}y}{dx}}{dt}}\times {\frac {dt}{dx}}={\frac {d^{2}y}{dx^{2}}}$ .
Thus, the concavity of a parametric equation can be described as:
${\frac {d}{dt}}\left[{\frac {dy}{dx}}\right]\times {\frac {dt}{dx}}$
So for the example in sections 1 and 2, the concavity at any time $t$ :
${\frac {d}{dt}}[\csc(t)]\times \cos(t)=-\csc ^{2}(t)\times \cos(t)$
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Integration
## Introduction

Because most parametric equations are given in explicit form, they can be integrated like many other equations. Integration has a variety of applications with respect to parametric equations, especially in kinematics and vector calculus.
    ${\begin{aligned}x&=\int x'(t)\mathrm {d} t\\y&=\int y'(t)\mathrm {d} t\end{aligned}}$
So, taking a simple example, with respect to t:
    $y=\int \cos(t)\mathrm {d} t=\sin(t)+C$

## Arc length

Consider a function defined by,
    $x=f(t)$
    $y=g(t)$
Say that $f$ is increasing on some interval, $[\alpha ,\beta ]$. Recall, as we have derived in a previous chapter, that the length of the arc created by a function over an interval, $[\alpha ,\beta ]$, is given by,
    $L=\int _{\alpha }^{\beta }{\sqrt {1+(f'(x))^{2}}}\mathrm {d} x$
It may assist your understanding, here, to write the above using Leibniz's notation,
    $L=\int _{\alpha }^{\beta }{\sqrt {1+\left({\frac {\mathrm {d} y}{\mathrm {d} x}}\right)^{2}}}\mathrm {d} x$
Using the chain rule,
    ${\frac {\mathrm {d} y}{\mathrm {d} x}}={\frac {\mathrm {d} y}{\mathrm {d} t}}\cdot {\frac {\mathrm {d} t}{\mathrm {d} x}}$
We may then rewrite $\mathrm {d} x$,
    ${\frac {\mathrm {d} x}{\mathrm {d} t}}\mathrm {d} t$
Hence, $L$ becomes,
    $L=\int _{\alpha }^{\beta }{\sqrt {1+\left({\frac {\mathrm {d} y}{\mathrm {d} t}}\cdot {\frac {\mathrm {d} t}{\mathrm {d} x}}\right)^{2}}}{\frac {\mathrm {d} x}{\mathrm {d} t}}\mathrm {d} t$
Extracting a factor of $\left({\frac {\mathrm {d} t}{\mathrm {d} x}}\right)^{2}$,
    $L=\int _{\alpha }^{\beta }{\sqrt {\left({\frac {\mathrm {d} t}{\mathrm {d} x}}\right)^{2}}}{\sqrt {\left({\frac {\mathrm {d} x}{\mathrm {d} t}}\right)^{2}+\left({\frac {\mathrm {d} y}{\mathrm {d} t}}\right)^{2}}}{\frac {\mathrm {d} x}{\mathrm {d} t}}\mathrm {d} t$
As $f$ is increasing on $[\alpha ,\beta ]$, ${\sqrt {\left({\frac {\mathrm {d} t}{\mathrm {d} x}}\right)^{2}}}={\frac {\mathrm {d} t}{\mathrm {d} x}}$, and hence we may write our final expression for $L$ as,
    $\int _{\alpha }^{\beta }{\sqrt {\left({\frac {\mathrm {d} x}{\mathrm {d} t}}\right)^{2}+\left({\frac {\mathrm {d} y}{\mathrm {d} t}}\right)^{2}}}\mathrm {d} t$

### Example

Take a circle of radius $R$, which may be defined with the parametric equations,
    $x=R\sin \theta$
    $y=R\cos \theta$
As an example, we can take the length of the arc created by the curve over the interval $[0,R]$. Writing in terms of $\theta$,
    $x=0\implies \theta =\arcsin \left({\frac {0}{R}}\right)=0$
    $x=R\implies \theta =\arcsin \left({\frac {R}{R}}\right)=\arcsin(1)={\frac {\pi }{2}}$
Computing the derivatives of both equations,
    ${\frac {\mathrm {d} x}{\mathrm {d} \theta }}=R\cos \theta$
    ${\frac {\mathrm {d} y}{\mathrm {d} \theta }}=-R\sin \theta$
Which means that the arc length is given by,
    $L=\int _{0}^{\frac {\pi }{2}}{\sqrt {(-R\sin \theta )^{2}+R^{2}\cos ^{2}\theta }}\mathrm {d} \theta$
By the Pythagorean identity,
    $L=R\int _{0}^{\frac {\pi }{2}}\mathrm {d} \theta =R{\frac {\pi }{2}}$
One can use this result to determine the perimeter of a circle of a given radius. As this is the arc length over one "quadrant", one may multiply $L$ by 4 to deduce the perimeter of a circle of radius $R$ to be $2\pi R$.

## Volume

This page or section of Calculus is a stub. You can help Wikibooks by expanding it.

# Polar Equations

=Introduction
The polar coordinate system is a two-dimensional coordinate system in which each point on a plane is determined by an angle and a distance. The polar coordinate system is especially useful in situations where the relationship between two points is most easily expressed in terms of angles and distance; in the more familiar Cartesian coordinate system or rectangular coordinate system, such a relationship can only be found through trigonometric formulae.
As the coordinate system is two-dimensional, each point is determined by two polar coordinates: the radial coordinate and the angular coordinate. The radial coordinate (usually denoted as $r$) denotes the point's distance from a central point known as the pole (equivalent to the origin in the Cartesian system). The angular coordinate (also known as the polar angle or the azimuth angle, and usually denoted by $\theta$ or $t$) denotes the positive or anticlockwise (counterclockwise) angle required to reach the point from the 0° ray or polar axis (which is equivalent to the positive $x$-axis in the Cartesian coordinate plane).

## Plotting points with polar coordinates

Each point in the polar coordinate system can be described with the two polar coordinates, which are usually called $r$ (the radial coordinate) and θ (the angular coordinate, polar angle, or azimuth angle, sometimes represented as $\phi$ or $t$). The $r$ coordinate represents the radial distance from the pole, and the θ coordinate represents the anticlockwise (counterclockwise) angle from the $0^{\circ }$ ray (sometimes called the polar axis), known as the positive $x$-axis on the Cartesian coordinate plane.
For example, the polar coordinates $(3,60^{\circ })$ would be plotted as a point 3 units from the pole on the $60^{\circ }$ ray. The coordinates $(-3,240^{\circ })$ would also be plotted at this point because a negative radial distance is measured as a positive distance on the opposite ray (the ray reflected about the origin, which differs from the original ray by $180^{\circ }$).
One important aspect of the polar coordinate system, not present in the Cartesian coordinate system, is that a single point can be expressed with an infinite number of different coordinates. This is because any number of multiple revolutions can be made around the central pole without affecting the actual location of the point plotted. In general, the point $(r,\theta )$ can be represented as $(r,\theta \pm 360^{\circ }k)$ or $(-r,\theta \pm (2k+1)180^{\circ })$ , where $k$ is any integer.
The arbitrary coordinates $(0,\theta )$ are conventionally used to represent the pole, as regardless of the θ coordinate, a point with radius 0 will always be on the pole. To get a unique representation of a point, it is usual to limit $r$ to negative and non-negative numbers $r\geq 0$ and $\theta$ to the interval $[0,360^{\circ })$ or $(-180^{\circ },180^{\circ }]$ (or, in radian measure, $[0,2\pi )$ or $(-\pi ,\pi ]$).
Angles in polar notation are generally expressed in either degrees or radians, using the conversion $2\pi \ {\text{rad}}=360^{\circ }$ . The choice depends largely on the context. Navigation applications use degree measure, while some physics applications (specifically rotational mechanics) and almost all mathematical literature on calculus use radian measure.

### Converting between polar and Cartesian coordinates

The two polar coordinates $r,\theta$ can be converted to the Cartesian coordinates $x,y$ by using the trigonometric functions sine and cosine:
    $x=r\cos(\theta )$
    $y=r\sin(\theta )$
while the two Cartesian coordinates $x,y$ can be converted to polar coordinate $r$ by
    $r={\sqrt {x^{2}+y^{2}}}$ (by a simple application of the Pythagorean theorem).
To determine the angular coordinate $\theta$ , the following two ideas must be considered:
* For $r=0$ , $\theta$ can be set to any real value.
* For $r\neq 0$ , to get a unique representation for $\theta$ , it must be limited to an interval of size $2\pi$ . Conventional choices for such an interval are $[0,2\pi )$ and $(-\pi ,\pi ]$ .
To obtain $\theta$ in the interval $[0,2\pi )$ , the following may be used ($\arctan$ denotes the inverse of the tangent function):
    $\theta ={\begin{cases}\arctan \left({\frac {y}{x}}\right)&{\text{if }}x>0{\text{ and }}y\geq 0\\\arctan \left({\frac {y}{x}}\right)+2\pi &{\text{if }}x>0{\text{ and }}y<0\\\arctan \left({\frac {y}{x}}\right)+\pi &{\text{if }}x<0\\{\frac {\pi }{2}}&{\text{if }}x=0{\text{ and }}y>0\\{\frac {3\pi }{2}}&{\text{if }}x=0{\text{ and }}y<0\end{cases}}$
To obtain $\theta$ in the interval $(-\pi ,\pi ]$ , the following may be used:
    $\theta ={\begin{cases}\arctan \left({\frac {y}{x}}\right)&{\text{if }}x>0\\\arctan \left({\frac {y}{x}}\right)+\pi &{\text{if }}x<0{\text{ and }}y\geq 0\\\arctan \left({\frac {y}{x}}\right)-\pi &{\text{if }}x<0{\text{ and }}y<0\\{\frac {\pi }{2}}&{\text{if }}x=0{\text{ and }}y>0\\-{\frac {\pi }{2}}&{\text{if }}x=0{\text{ and }}y<0\end{cases}}$
One may avoid having to keep track of the numerator and denominator signs by use of the atan2 function, which has separate arguments for the numerator and the denominator.

## Polar equations

The equation defining an algebraic curve expressed in polar coordinates is known as a polar equation. In many cases, such an equation can simply be specified by defining $r$ as a function of $\theta$ . The resulting curve then consists of points of the form ${\bigr(\theta ),\theta {\big )}$ and can be regarded as the graph of the polar function $r$ .
Different forms of symmetry can be deduced from the equation of a polar function $r$ . If $r(-\theta )=r(\theta )$ the curve will be symmetrical about the horizontal $(0^{\circ }/180^{\circ })$ ray, if $r(\pi -\theta )=r(\theta )$ it will be symmetric about the vertical $(90^{\circ }/270^{\circ })$ ray, and if $r(\theta -\alpha ^{\circ })=r(\theta )$ it will be rotationally symmetric $\alpha ^{\circ }$ counterclockwise about the pole.
Because of the circular nature of the polar coordinate system, many curves can be described by a rather simple polar equation, whereas their Cartesian form is much more intricate. Among the best known of these curves are the polar rose, Archimedean spiral, lemniscate, limaçon, and cardioid.
For the circle, line, and polar rose below, it is understood that there are no restrictions on the domain and range of the curve.

### Circle

The general equation for a circle with a center at $(r_{0},\phi )$ and radius $a$ is
    $r^{2}-2rr_{0}\cos(\theta -\varphi )+r_{0}^{2}=a^{2}$
This can be simplified in various ways, to conform to more specific cases, such as the equation
    $r(\theta )=a$
for a circle with a center at the pole and radius $a$ .

### Line

Radial lines (those running through the pole) are represented by the equation
    $\theta =\varphi$
where $\phi$ is the angle of elevation of the line; that is, $\phi =\arctan(m)$ where $m$ is the slope of the line in the Cartesian coordinate system. The non-radial line that crosses the radial line $\theta =\phi$ perpendicularly at the point $(r_{0},\phi )$ has the equation
    $r(\theta )=r_{0}\sec(\theta -\varphi )$

### Polar rose

A polar rose is a famous mathematical curve that looks like a petaled flower, and that can be expressed as a simple polar equation,
    $r(\theta )=a\cos(k\theta +\phi _{0})$
for any constant $\phi _{0}$ (including 0). If $k$ is an integer, these equations will produce a $k$-petaled rose if $k$ is odd, or a $2k$-petaled rose if $k$ is even. If $k$ is rational but not an integer, a rose-like shape may form but with overlapping petals. Note that these equations never define a rose with 2, 6, 10, 14, etc. petals. The variable $a$ represents the length of the petals of the rose.

### Archimedean spiral

The Archimedean spiral is a famous spiral that was discovered by Archimedes, which also can be expressed as a simple polar equation. It is represented by the equation
    $r(\theta )=a+b\theta$
Changing the parameter $a$ will turn the spiral, while $b$ controls the distance between the arms, which for a given spiral is always constant. The Archimedean spiral has two arms, one for $\theta >0$ and one for $\theta <0$ . The two arms are smoothly connected at the pole. Taking the mirror image of one arm across the $90^{\circ }/270^{\circ }$ line will yield the other arm. This curve is notable as one of the first curves, after the Conic Sections, to be described in a mathematical treatise, and as being a prime example of a curve that is best defined by a polar equation.

### Conic sections

A conic section with one focus on the pole and the other somewhere on the $0^{\circ }$ ray (so that the conic's semi-major axis lies along the polar axis) is given by:
    $r={\frac {\ell }{1+\epsilon \cos(\theta )}}$
where $\epsilon$ is the eccentricity and $\ell$ is the semi-latus rectum (the perpendicular distance at a focus from the major axis to the curve).
* If $\epsilon >1$ , this equation defines a hyperbola.
* If $\epsilon =1$ , it defines a parabola.
* If $0<\epsilon <1$ , it defines an ellipse. The special case $\epsilon =0$ of the latter results in a circle of radius $\ell$ .
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References

# Differentiation
### Differential calculus

We have the following formulae:
    $r{\frac {\partial }{\partial r}}=x{\frac {\partial }{\partial x}}+y{\frac {\partial }{\partial y}}$
    ${\frac {\partial }{\partial \theta }}=-y{\frac {\partial }{\partial x}}+x{\frac {\partial }{\partial y}}$
To find the Cartesian slope of the tangent line to a polar curve $r(\theta )$ at any given point, the curve is first expressed as a system of parametric equations.
    $x=r(\theta )\cos(\theta )$
    $y=r(\theta )\sin(\theta )$
Differentiating both equations with respect to $\theta$ yields
    ${\frac {\partial x}{\partial \theta }}=r'(\theta )\cos(\theta )-r(\theta )\sin(\theta )$
    ${\frac {\partial y}{\partial \theta }}=r'(\theta )\sin(\theta )+r(\theta )\cos(\theta )$
Dividing the second equation by the first yields the Cartesian slope of the tangent line to the curve at the point $(r,r(\theta ))$ :
    ${\frac {dy}{dx}}={\frac {r'(\theta )\sin(\theta )+r(\theta )\cos(\theta )}{r'(\theta )\cos(\theta )-r(\theta )\sin(\theta )}}$

# Integration
## Introduction

Integrating a polar equation requires a different approach than integration under the Cartesian system, hence yielding a different formula, which is not as straightforward as integrating the function $f(x)$ .

## Proof

In creating the concept of integration, we used Riemann sums of rectangles to approximate the area under the curve. However, with polar graphs, one can use sectors of circles with radius $r$ and angle measure $d\theta$ . The area of each sector is then $\pi r^{2}{\frac {d\theta }{2\pi }}$ and the sum of all the infinitesimally small sectors' areas is: ${\frac {1}{2}}\int \limits _{a}^{b}r^{2}d\theta$ , This is the form to use to integrate a polar expression of the form $r=f(\theta )$ where $(a,f(a))$ and $(b,f(b))$ are the ends of the curve that you wish to integrate.

### Integral calculus

Let $R$ denote the region enclosed by a curve $r=f(\theta )$ and the rays $\theta =a$ and $\theta =b$ , where $0<b-a<2\pi$ . Then, the area of $R$ is
    ${\frac {1}{2}}\int \limits _{a}^{b}r^{2}d\theta$
This result can be found as follows. First, the interval $[a,b]$ is divided into $n$ subintervals, where $n$ is an arbitrary positive integer. Thus $\theta$, the length of each subinterval, is equal to $b-a$ (the total length of the interval), divided by $n$ , the number of subintervals. For each subinterval $i=1,2,\dots ,n$ , let $\theta _{i}$ be the midpoint of the subinterval, and construct a circular sector with the center at the origin, radius $r_{i}=f(\theta _{i})$ , central angle $\delta \theta$ , and arc length $r_{i}\delta \theta$ . The area of each constructed sector is therefore equal to ${\tfrac {1}{2}}r_{i}^{2}\delta \theta$ . Hence, the total area of all of the sectors is
    $\sum _{i=1}^{n}{\tfrac {1}{2}}r_{i}^{2}\delta \theta$
As the number of subintervals $n$ is increased, the approximation of the area continues to improve. In the limit as $n\to \infty$ , the sum becomes the Riemann integral.

#### Generalization

Using Cartesian coordinates, an infinitesimal area element can be calculated as $dA=dx\,dy$ . The substitution rule for multiple integrals states that, when using other coordinates, the Jacobian determinant of the coordinate conversion formula has to be considered:
    $J=\det {\frac {\partial (x,y)}{\partial (r,\theta )}}={\begin{vmatrix}{\dfrac {\partial x}{\partial r}}&{\dfrac {\partial x}{\partial \theta }}\\{\dfrac {\partial y}{\partial r}}&{\dfrac {\partial y}{\partial \theta }}\end{vmatrix}}={\begin{vmatrix}\cos(\theta )&-r\sin(\theta )\\\sin(\theta )&r\cos(\theta )\end{vmatrix}}=r\cos ^{2}(\theta )+r\sin ^{2}(\theta )=r$
Hence, an area element in polar coordinates can be written as
    $dA=J\,dr\,d\theta =r\,dr\,d\theta$
Now, a function that is given in polar coordinates can be integrated as follows:
    $\iint _{R}g(r,\theta )dA=\int \limits _{a}^{b}\int \limits _{0}^{r(\theta )}g(r,\theta )\,r\,dr\,d\theta$
Here, R is the same region as above, namely, the region enclosed by a curve $r=f(\theta )$ and the rays $\theta =a$ and $\theta =b$ .
The formula for the area of $R$ mentioned above is retrieved by taking $g$ identically equal to 1.

## Applications

Polar integration is often useful when the corresponding integral is either difficult or impossible to do with the Cartesian coordinates. For example, let's try to find the area of the closed unit circle. That is, the area of the region enclosed by $x^{2}+y^{2}=1$ .

#### In Cartesian

Template:Organize section
    $\int \limits _{-1}^{1}\int \limits _{-{\sqrt {1-x^{2}}}}^{\sqrt {1-x^{2}}}\,dy\,dx=2\int \limits _{-1}^{1}{\sqrt {1-x^{2}}}dx$
In order to evaluate this, one usually uses trigonometric substitution. By setting $\sin(\theta )=x$ , we get both $\cos(\theta )={\sqrt {1-x^{2}}}$ and $\cos(\theta )d\theta =dx$ .
    ${\begin{aligned}\int {\sqrt {1-x^{2}}}dx&=\int \cos ^{2}(\theta )d\theta \\&=\int {\frac {1+\cos(2\theta )}{2}}d\theta \\&={\frac {\theta }{2}}+{\frac {\sin(2\theta )}{4}}+C={\frac {\theta }{2}}+{\frac {\sin(\theta )\cos(\theta )}{2}}+C&={\frac {\arcsin(x)+x{\sqrt {1-x^{2}}}}{2}}+C\end{aligned}}$
Putting this back into the equation, we get
    $2\int \limits _{-1}^{1}{\sqrt {1-x^{2}}}dx=2\left[{\frac {\arcsin(x)+x{\sqrt {1-x^{2}}}}{2}}\right]_{-1}^{1}=\arcsin(1)-\arcsin(-1)=\pi$

#### In Polar

To integrate in polar coordinates, we first realize $r={\sqrt {x^{2}+y^{2}}}={\sqrt {1}}=1$ and in order to include the whole circle, $a=0$ and $b=2\pi$ .
    $\int \limits _{0}^{2\pi }\int \limits _{0}^{1}r\,dr\,d\theta =\int \limits _{0}^{2\pi }\left[{\frac {r^{2}}{2}}\right]_{0}^{1}d\theta =\int \limits _{0}^{2\pi }{\frac {d\theta }{2}}=\left[{\frac {\theta }{2}}\right]_{0}^{2\pi }={\frac {2\pi }{2}}=\pi$

### An interesting example

A less intuitive application of polar integration yields the Gaussian integral
    $\int \limits _{-\infty }^{\infty }e^{-x^{2}}dx={\sqrt {\pi }}$
Try it! (Hint: multiply $\int \limits _{-\infty }^{\infty }e^{-x^{2}}dx$ and $\int \limits _{-\infty }^{\infty }e^{-y^{2}}dy$ .)

# Sequences

A sequence is an ordered list of objects (or events). Like a set, it contains members (also called elements or terms), and the number of terms (possibly infinite) is called the length of the sequence. Unlike a set, order matters, and exactly the same elements can appear multiple times at different positions in the sequence.
For example, (C, R, Y) is a sequence of letters that differs from (Y, C, R), as the ordering matters. Sequences can be finite, as in this example, or infinite, such as the sequence of all even positive integers (2, 4, 6,...).

## Examples and notation

There are various and quite different notions of sequences in mathematics, some of which (e.g., exact sequence) are not covered by the notations introduced below.
A sequence may be denoted (a$_1$, a$_2$, ...). For shortness, the notation (a$_n$) is also used.
A more formal definition of a finite sequence with terms in a set S is a function from {1, 2, ..., n} to S for some n ≥ 0. An infinite sequence in S is a function from {1, 2, ...} (the set of natural numbers without 0) to S.
Sequences may also start from 0, so the first term in the sequence is then a$_0$.
A finite sequence is also called an n-tuple. Finite sequences include the empty sequence ( ) that has no elements.
A function from all integers into a set is sometimes called a bi-infinite sequence, since it may be thought of as a sequence indexed by negative integers grafted onto a sequence indexed by positive integers.
The sequence $a_{n}\ =\ {\frac {1}{n}}$ is called the harmonic sequence.
If c and d are given numbers, the sequence $a_{n}\ =\ c+nd$ is an arithmetic sequence.
If b and r ≠ 0 are given, the sequence $a_{n}\ =\ br^{n}$ is a geometric sequence.

## Types and properties of sequences

A subsequence of a given sequence is a sequence formed from the given sequence by deleting some of the elements (which, as stated in the introduction, can also be called "terms") without disturbing the relative positions of the remaining elements.
If the terms of the sequence are a subset of an ordered set, then a monotonically increasing sequence is one for which each term is greater than or equal to the term before it; if each term is strictly greater than the one preceding it, the sequence is called strictly monotonically increasing. A monotonically decreasing sequence is defined similarly. Any sequence fulfilling the monotonicity property is called monotonic or monotone. This is a special case of the more general notion of a monotonic function. A sequence that both increases and decreases (at different places in the sequence) is said to be non-monotonic or non-monotone.
The terms non-decreasing and non-increasing are often used in order to avoid any possible confusion with strictly increasing and strictly decreasing, respectively. If the terms of a sequence are integers, then the sequence is an integer sequence. If the terms of a sequence are polynomials, then the sequence is a polynomial sequence.
If S is endowed with a topology (as is true of real numbers, for example), then it becomes possible to consider the convergence of an infinite sequence in S. Such considerations involve the concept of the limit of a sequence.
It can be shown that bounded monotonic sequences must converge.

## Sequences in analysis

In analysis, when talking about sequences, one will generally consider sequences of the form
    $(x_{1},x_{2},x_{3},...)\,$ or $(x_{0},x_{1},x_{2},...)\,$
which is to say, infinite sequences of elements indexed by natural numbers. (It may be convenient to have the sequence start with an index different from 1 or 0. For example, the sequence defined by x$_n$ = 1/log(n) would be defined only for n ≥ 2. When talking about such infinite sequences, it is usually sufficient (and does not change much for most considerations) to assume that the members of the sequence are defined at least for all indices large enough, that is, greater than some given N.)
The most elementary type of sequences are numerical ones, that is, sequences of real or complex numbers.

# Series
## Introduction

A series is the sum of a sequence of terms. An infinite series is the sum of an infinite number of terms (the actual sum of the series need not be infinite, as we will see below).
An arithmetic series is the sum of a sequence of terms with a common difference (the difference between consecutive terms). For example:
    $1+4+7+10+13+\cdots$
is an arithmetic series with common difference 3, since $a_{2}-a_{1}=3$, $a_{3}-a_{2}=3$, and so forth.
A geometric series is the sum of terms with a common ratio. For example, an interesting series which appears in many practical problems in science, engineering, and mathematics is the geometric series $r+r^{2}+r^{3}+r^{4}+\cdots$ where the $\cdots$ indicates that the series continues indefinitely. A common way to study a particular series (following Cauchy) is to define a sequence consisting of the sum of the first $n$ terms. For example, to study the geometric series we can consider the sequence which adds together the first n terms:
    $S_{n}(r)=\sum _{i=1}^{n}r^{i}$
Generally by studying the sequence of partial sums we can understand the behavior of the entire infinite series.
Two of the most important questions about a series are:
* Does it converge?
* If so, what does it converge to?
For example, it is fairly easy to see that for $r>1$, the geometric series $S_{n}(r)$ will not converge to a finite number (i.e., it will diverge to infinity). To see this, note that each time we increase the number of terms in the series, $S_{n}(r)$ increases by $r^{n+1}$, since $r^{n+1}>1$ for all $r>1$ (as we defined), $S_{n}(r)$ must increase by a number greater than one every term. When increasing the sum by more than one for every term, it will diverge.
Perhaps a more surprising and interesting fact is that for $|r|<1$, $S_{n}(r)$ will converge to a finite value. Specifically, it is possible to show that
    $\lim _{n\to \infty }S_{n}(r)={\frac {r}{1-r}}$
Indeed, consider the quantity
    $(1-r)S_{n}(r)=(1-r)\sum _{i=1}^{n}r^{i}=\sum _{i=1}^{n}r^{i}-\sum _{i=2}^{n+1}r^{i}=r-r^{n+1}$
Since $r^{n+1}\to 0$ as $n\to \infty$ for $|r|<1$, this shows that $(1-r)S_{n}(r)\to r$ as $n\to \infty$. The quantity $1-r$ is non-zero and doesn't depend on $n$ so we can divide by it and arrive at the formula we want.
We'd like to be able to draw similar conclusions about any series.
Unfortunately, there is no simple way to sum a series. The most we will be able to do in most cases is determine if it converges. The geometric and the telescoping series are the only types of series we can easily find the sum of.

## Convergence

It is obvious that for a series to converge, the $a_{n}$ must tend to zero (because sum of an infinite number of terms all greater than any given positive number will be infinity), but even if the limit of the sequence is 0, this is not sufficient to say it converges.
Consider the harmonic series, the sum of ${\frac {1}{n}}$, and group terms
    ${\begin{matrix}\sum \limits _{n=1}^{2^{m}}{\frac {1}{n}}&=&1+{\frac {1}{2}}&+&{\frac {1}{3}}+{\frac {1}{4}}&+&{\frac {1}{5}}+{\frac {1}{6}}+{\frac {1}{7}}+{\frac {1}{8}}&+\ \cdots &+&\sum \limits _{p=1+2^{n-1}}^{2^{n}}{\frac {1}{p}}\\\\&>&{\frac {3}{2}}&+&{\frac {2}{4}}&+&{\frac {4}{8}}&+\ \cdots &+&{\frac {2^{n-1}}{2^{n}}}\\\\&=&{\frac {3}{2}}&+&{\frac {1}{2}}&+&{\frac {1}{2}}&+\ \cdots &+&{\frac {1}{2}}\end{matrix}}$
This final sum contains m terms. As m tends to infinity, so does the sum, hence the series diverges.
We can also deduce something about how quickly it diverges. Using the same grouping of terms, we can get an upper limit on the sum of the first so many terms, the partial sums.
    $1+{\frac {m}{2}}\leq \sum _{n=1}^{2^{m}}{\frac {1}{n}}\leq 1+m$
or
    $1+{\frac {\log _{2}(m)}{2}}\leq \sum _{n=1}^{m}{\frac {1}{n}}\leq 1+\log _{2}(m)$
and the partial sums increase like $\log _{2}(m)$, very slowly.

### Comparison test

The argument above, based on considering upper and lower bounds on terms, can be modified to provide a general-purpose test for convergence and divergence called the comparison test (or direct comparison test). It can be applied to any series with nonnegative terms:
* If $\sum b_{n}$ converges and $0\leq a_{n}\leq b_{n}$, then $\sum a_{n}$ converges.
* If $\sum b_{n}$ diverges and $0\leq b_{n}\leq a_{n}$, then $\sum a_{n}$ diverges.
There are many such tests for convergence and divergence, the most important of which we will describe below.

### Absolute convergence

Theorem: If the series of absolute values, $\sum _{n=1}^{\infty }|a_{n}|$, converges, then so does the series $\sum _{n=1}^{\infty }a_{n}$
We say such a series converges absolutely.
Proof:
Let $\epsilon >0$
According to the Cauchy criterion for series convergence, exists $N$ so that for all $N<m,n$ :
    $\sum _{k=n}^{m}|a_{k}|<\epsilon$
We know that:
    $\left|\sum _{k=n}^{m}a_{k}\right|\leq \sum _{k=n}^{m}|a_{k}|$
And then we get:
    $\left|\sum _{k=n}^{m}a_{k}\right|\leq \sum _{k=n}^{m}|a_{k}|<\epsilon$
Now we get:
    $\left|\sum _{k=n}^{m}a_{k}\right|<\epsilon$
Which is exactly the Cauchy criterion for series convergence.
$Q.E.D$
The converse does not hold. The series $1-{\frac {1}{2}}+{\frac {1}{3}}-{\frac {1}{4}}+\cdots$ converges, even though the series of its absolute values diverges.
A series like this that converges, but not absolutely, is said to converge conditionally.
If a series converges absolutely, we can add terms in any order we like. The limit will still be the same.
If a series converges conditionally, rearranging the terms changes the limit. In fact, we can make the series converge to any limit we like by choosing a suitable rearrangement.
E.g., in the series $1-{\frac {1}{2}}+{\frac {1}{3}}-{\frac {1}{4}}+\cdots$, we can add only positive terms until the partial sum exceeds 100, subtract 1/2, add only positive terms until the partial sum exceeds 100, subtract 1/4, and so on, getting a sequence with the same terms that converges to 100.
This makes absolutely convergent series easier to work with. Thus, all but one of convergence tests in this chapter will be for series all of whose terms are positive, which must be absolutely convergent or divergent series. Other series will be studied by considering the corresponding series of absolute values.

### Ratio test

For a series with terms $a_{n}$, if
    $\lim _{n\to \infty }\left|{\frac {a_{n+1}}{a_{n}}}\right|=r$
then
* the series converges (absolutely) if $r<1$
* the series diverges if $r>1$ (or if $r$ is infinity)
* the series could do either if $r=1$, so the test is not conclusive in this case.
E.g., suppose
    $a_{n}={\frac {n!n!}{(2n)!}}$
then
    ${\frac {a_{n+1}}{a_{n}}}={\frac {(n+1)^{2}}{(2n+1)(2n+2)}}={\frac {n+1}{4n+2}}\to {\frac {1}{4}}$
so this series converges.

### Integral test

If $f(x)$ is a monotonically decreasing, always positive function, then the series
    $\sum _{n=1}^{\infty }f(n)$
converges if and only if the integral
    $\int _{1}^{\infty }f(x)\,dx$
converges.
E.g., consider $f(x)={\frac {1}{x^{p}}}$, for a fixed $p$.
* If $p=1$ this is the harmonic series, which diverges.
* If $p<1$ each term is larger than the harmonic series, so it diverges.
* If $p>1$ then
    $\int _{1}^{\infty }x^{-p}dx$ $=\lim _{s\to \infty }\int _{1}^{s}x^{-p}dx$ $=\lim _{s\to \infty }-{\frac {1}{(p-1)x^{p-1}}}{\Bigg |}_{1}^{s}$ $=\lim _{s\to \infty }\left({\frac {1}{p-1}}-{\frac {1}{(p-1)s^{p-1}}}\right)$ $={\frac {1}{p-1}}$
The integral converges, for $p>1$, so the series converges.
We can prove this test works by writing the integral as
    $\int _{1}^{\infty }f(x)\,dx=\sum _{n=1}^{\infty }\int _{n}^{n+1}f(x)\,dx$
and comparing each of the integrals with rectangles, giving the inequalities
    $f(n)\geq \int _{n}^{n+1}f(x)\,dx\geq f(n+1)$
Applying these to the sum then shows convergence.

### Limit comparison test

Given an infinite series $\sum a_{n}$ with positive terms only, if one can find another infinite series $\sum b_{n}$ with positive terms for which
    $\lim _{n\to \infty }{\frac {a_{n}}{b_{n}}}=L$
for a positive and finite $L$ (i.e., the limit exists and is not zero), then the two series either both converge or both diverge. That is,
* $\sum a_{n}$ converges if $\sum b_{n}$ converges, and
* $\sum a_{n}$ diverges if $\sum b_{n}$ diverges.
Example:
    $a_{n}=n^{-{\frac {n+1}{n}}}$
For large $n$, the terms of this series are similar to, but smaller than, those of the harmonic series. We compare the limits.
    $\lim {\frac {a_{n}}{b_{n}}}=\lim {\frac {n^{-{\frac {n+1}{n}}}}{\frac {1}{n}}}=\lim {\frac {n}{n^{\frac {n+1}{n}}}}=\lim {\frac {1}{n^{\frac {1}{n}}}}=1>0$
so this series diverges.

### Alternating series

Given an infinite series $\sum a_{n}$, if the signs of the $a_{n}$ alternate, that is if
    $a_{n}=(-1)^{n}|a_{n}|$
for all n or
    $a_{n}=(-1)^{n+1}|a_{n}|$
for all $n$, then we call it an alternating series.
The alternating series test states that such a series converges if
    $\lim _{n\to \infty }a_{n}=0$
and
    ${\bigl |}a_{n+1}{\bigr |}<|a_{n}|$
(that is, the magnitude of the terms is decreasing).
Note that this test cannot lead to the conclusion that the series diverges; if one cannot conclude that the series converges, this test is inconclusive, although other tests may, of course, be used to give a conclusion.

#### Estimating the sum of an alternating series

The absolute error that results in using a partial sum of an alternating series to estimate the final sum of the infinite series is smaller than the magnitude of the first omitted term.
    $\left|\sum _{n=1}^{\infty }a_{n}-\sum _{n=1}^{m}a_{n}\right|<{\bigl |}a_{m+1}{\bigr |}$

## Geometric series

The geometric series can take either of the following forms
    $\sum _{n=0}^{\infty }ar^{n}$ or $\sum _{n=1}^{\infty }ar^{n-1}$
As you have seen at the start, the sum of the geometric series is
    $s=\lim _{n\to \infty }S_{n}=\lim _{n\to \infty }{\frac {a(1-r^{n})}{1-r}}={\frac {a}{1-r}}\quad {\mbox{ for }}|r|<1$.

## Telescoping series

    $\sum _{n=0}^{\infty }(b_{n}-b_{n+1})$
Expanding (or "telescoping") this type of series is informative. If we expand this series, we get:
    $\sum _{n=0}^{k}(b_{n}-b_{n+1})=(b_{0}-b_{1})+(b_{1}-b_{2})+\cdots +(b_{k-1}-b_{k})$
Additive cancellation leaves:
    $\sum _{n=0}^{k}(b_{n}-b_{n+1})=b_{0}-b_{k}$
Thus,
    $\sum _{n=0}^{\infty }(b_{n}-b_{n+1})=\lim _{k\to \infty }\sum _{n=0}^{k}(b_{n}-b_{n+1})=\lim _{k\to \infty }(b_{0}-b_{k})=b_{0}-\lim _{k\to \infty }b_{k}$
and all that remains is to evaluate the limit.
There are other tests that can be used, but these tests are sufficient for all commonly encountered series.

# Taylor Series
## Taylor Series

A function $f(x)$ is said to be analytic if it can be represented by the an infinite power series
    $\sum _{n=0}^{\infty }c_{n}(x-a)^{n}$
The Taylor expansion or Taylor series representation of a function, then, is
    $\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}$
sin(x) and Taylor approximations, polynomials of degree 1, 3, 5, 7, 9, 11 and 13.
Here, $n!$ is the factorial of $n$ and $f^{(n)}(a)$ denotes the $n$th derivative of $f$ at the point $a$ . If this series converges for every $x$ in the interval $(a-r,a+r)$ and the sum is equal to $f(x)$ , then the function $f(x)$ is called analytic. To check whether the series converges towards $f(x)$, one normally uses estimates for the remainder term of Taylor's theorem. A function is analytic if and only if a power series converges to the function; the coefficients in that power series are then necessarily the ones given in the above Taylor series formula.
If $a=0$ , the series is also called a Maclaurin series.
The importance of such a power series representation is threefold. First, differentiation and integration of power series can be performed term by term and is hence particularly easy. Second, an analytic function can be uniquely extended to a holomorphic function defined on an open disk in the complex plane, which makes the whole machinery of complex analysis available. Third, the (truncated) series can be used to approximate values of the function near the point of expansion.
The function $f(z)=e^{-{\frac {1}{z^{2}}}}$ is not analytic: the Taylor series is 0, although the function is not.
Note that there are examples of infinitely often differentiable functions $f(x)$ whose Taylor series converge, but are not equal to $f(x)$ . For instance, for the function defined piecewise by saying that $f(x)={\begin{cases}0&x=0\\e^{-{\frac {1}{x^{2}}}}&x\neq 0\end{cases}}$ , all the derivatives are 0 at $x=0$ , so the Taylor series of $f(x)$ is 0, and its radius of convergence is infinite, even though the function most definitely is not 0. This particular pathology does not afflict complex-valued functions of a complex variable. Notice that $f(z)=e^{-{\frac {1}{z^{2}}}}$ does not approach 0 as $z$ approaches 0 along the imaginary axis.
Some functions cannot be written as Taylor series because they have a singularity; in these cases, one can often still achieve a series expansion if one allows also negative powers of the variable $x$; see Laurent series. For example, $f(z)=e^{-{\frac {1}{z^{2}}}}$ can be written as a Laurent series.
The Parker-Sockacki theorem is a recent advance in finding Taylor series which are solutions to differential equations. This theorem is an expansion on the Picard iteration.

### Derivation

Suppose we want to represent a function as an infinite power series, or in other words a polynomial with infinite terms of degree "infinity". Each of these terms are assumed to have unique coefficients, as do most finite-polynomials do. We can represent this as an infinite sum like so:
    $f(x)={c_{0}}(x-a)^{0}+c_{1}(x-a)^{1}+c_{2}(x-a)^{2}+c_{3}(x-a)^{3}+\cdots +c_{n}(x-a)^{n}+\cdots$
where $a$ is the radius of convergence and $c_{0},c_{1},c_{2},\dots ,c_{n},\dots$ are coefficients. Next, with summation notation, we can efficiently represent this series as
    $\sum _{n=0}^{\infty }c_{n}(x-a)^{n}$
which will become more useful later. As of now, we have no schematic for finding the coefficients other than finding each one in the series by hand. That method would not be particularly useful. Let us, then, try to find a pattern and a general solution for finding the coefficients. As of now, we have a simple method for finding the first coefficient. If we substitute $a$ for $x$ then we get
    $f(a)=c_{0}$
This gives us $c_{0}$ . This is useful, but we still would like a general equation to find any coefficient in the series. We can try differentiating with respect to x the series to get
    $f'(x)=c_{1}(x-a)^{0}+2c_{2}(x-a)^{1}+3c_{3}(x-a)^{2}+4c_{4}(x-a)^{3}+\cdots +nc_{n}(x-a)^{(n-1)}+\cdots$
We can assume $c_{n}$ and $a$ are constant. This proves to be useful, because if we again substitute $a$ for $x$ we get
    $f'(a)=c_{1}$
Noting that the first derivative has one constant term ($c_{1}(x-a)^{0}=c_{1}$) we can find the second derivative to find $c_{2}$ . It is
    $f''(x)=2c_{2}+(2\times 3)c_{3}(x-a)^{1}+(3\times 4)c_{4}(x-a)^{2}+\cdots +(n)(n-1)c_{n}(x-a)^{(n-2)}+\cdots$
If we again substitute $a$ for $x$ :
    $f''(a)=2c_{2}$
Note that $c_{2}$'s initial exponent was 2, and $c_{1}$'s initial exponent was 1. This is slightly more enlightening, however it is still slightly ambiguous as to what is happening. Going off the previous examples, if we differentiate again we get
    $f'''(x)=(2\times 3)c_{3}(x-a)^{0}+(2\times 3\times 4)c_{4}(x-a)^{1}+(3\times 4\times 5)c_{5}(x-a)^{2}+\cdots +(n)(n-1)(n-2)c_{n}(x-a)^{n-3}$
If we substitute $x=a$ we, again, that
    $f'''(a)=(2\times 3)c_{3}$
By now, the pattern should be becoming clearer. $(n)(n-1)(n-2)$ looks suspiciously like $n!$ . And indeed, it is! If we carry this out $n$ times by finding the $n$th derivative, we find that the multiple of the coefficient is $n!$ . So for some $c_{n}$ , for any integer $n\geq 0$ ,
    $n!\times c_{n}={\frac {d^{n}}{dx^{n}}}f(a)$
Or, with some simple manipulation, more usefully,
    $c_{n}={\frac {f^{(n)}(a)}{n!}}$
where $f^{(0)}(x)=f(x)$ and $f^{(1)}(x)=f'(x)$ and so on. With this, we can find any coefficient of the "infinite polynomial". Using the summation definition for our "polynomial" given earlier,
    $\sum _{n=0}^{\infty }c_{n}(x-a)^{n}$
we can substitute for $c_{n}$ to get
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}$
This is the definition of any Taylor series. But now that we have this series, how can we derive the definition for a given analytic function? We can do just as the definition specifies, and fill in all the necessary information. But we will also want to find a specific pattern, because sometimes we are left with a great many terms simplifying to 0.
First, we have to find $f(a)$ . Because we are now deriving our own Taylor Series, we can choose anything we want for $f(x)$ , but note that not all functions will work. It would be useful to use a function that we can easily find the $n$-th derivative for. A good example of this would be $\sin(x)$ . With $\sin(x)$ chosen, we can begin to find the derivatives. Before we begin, we should also note that $a$ is essentially the "offset" of the function along the x-axis, because this is also essentially true for any polynomial. With that in mind, we can assume, in this particular case, that the offset is $0$ and so $a=0$. With that in mind, "0-th" derivative or the function itself would be
    $\sin(0)=0$
If we plug that in to the definition of the first term in the series, again noting that $a=0$ , we get
    ${\frac {0}{0!}}x^{0}=0$
where $0!=1$ . This means that the first term of the series is 0, because anything multiplied by 0 is 0. Take note that not all Taylor series start out with a 0 term. Next, to find the next term, we need to find the first derivative of the function. Remembering that the derivative of $\sin(x)$ is $\cos(x)$ we get that
    ${\frac {d}{dx}}\sin(0)=\cos(0)=1$
This means that our second term in the series is
    ${\frac {1}{1!}}x^{1}=x$
Next, we need to find the third term. We repeat this process.
    ${\frac {d^{2}}{dx^{2}}}\sin(0)=-\sin(0)=0$
Because the derivative of $\cos(x)=-\sin(x)$ . We continue with
    ${\frac {0}{2!}}x^{2}=0$
The fourth term:
    ${\frac {d^{3}}{dx^{3}}}\sin(0)=-\cos(0)=-1$
    ${\frac {-1}{3!}}x^{3}={\frac {-x^{3}}{6}}$
Repeating this process we can get the sequence
    ${\frac {0}{0!}}x^{0},{\frac {1}{1!}}x^{1},{\frac {0}{2!}}x^{2},{\frac {-1}{3!}}x^{3},{\frac {0}{4!}}x^{4},{\frac {1}{5!}}x^{5},{\frac {0}{6!}}x^{6},{\frac {-1}{7!}}x^{7},\dots$
which simplifies to
    $0,x,0,{\frac {-x^{3}}{6}},0,{\frac {x^{5}}{120}},0,{\frac {-x^{7}}{5040}},\dots$
Because we are ultimately dealing with a series, the zero terms can be ignored, giving use the new sequence
    $x,{\frac {-x^{3}}{6}},{\frac {x^{5}}{120}},{\frac {-x^{7}}{5040}},\dots$
There is a pattern here, however it may be easier to see if we take the numerator and the denominator separately. The numerator:
    $1,-1,1,-1,\dots$
    $1!,3!,5!,7!,\dots$
And for the $x$ part of the terms, we have the sequence
    $x,x^{3},x^{5},\dots$
By this point, at least for the denominator and the $x$ part, the pattern should be obvious. It is, for the denominator
    $(2n-1)!={\text{denom}}_{n}$
The $x$ term:
    $x^{2n-1}={\text{xterm}}_{n}$
Finally, the numerator may not be as obvious, but it follows this pattern:
    $(-1)^{n-1}$
With all of these things discovered, we can put them together to find the rule for the $n$th term of the sequence:
    ${\frac {(-1)^{n-1}}{(2n-1)!}}x^{2n-1}={\text{sumterm}}_{n}$
And so our Taylor (Maclaurin) series for $\sin(x)$ is
    $f(x)=\sum _{n=1}^{\infty }{\frac {(-1)^{n-1}}{(2n-1)!}}x^{2n-1}$

### List of Taylor series

Several important Taylor series expansions follow. All these expansions are also valid for complex arguments $x$ .
Exponential function and natural logarithm:
    $e^{x}=\sum _{n=0}^{\infty }{\frac {x^{n}}{n!}}\quad {\text{ for all }}x$
    $\ln(1+x)=\sum _{n=1}^{\infty }{\frac {(-1)^{n-1}}{n}}x^{n}\quad {\text{ for }}|x|<1$
Geometric series:
    ${\frac {1}{1-x}}=\sum _{n=0}^{\infty }x^{n}\quad {\text{ for }}|x|<1$
Binomial series:
    $(1+x)^{\alpha }=\sum _{n=0}^{\infty }{\binom {\alpha }{n}}x^{n}\quad {\text{ for all }}|x|<1\quad {\text{ and all complex }}\alpha$
Trigonometric functions:
    $\sin(x)=\sum _{n=1}^{\infty }{\frac {(-1)^{n-1}}{(2n-1)!}}x^{2n-1}\quad {\text{ for all }}x$
    $\cos(x)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{(2n)!}}x^{2n}\quad {\text{ for all }}x$
    $\tan(x)=\sum _{n=1}^{\infty }{\frac {B_{2n}(-4)^{n}(1-4^{n})}{(2n)!}}x^{2n-1}\quad {\text{ for }}|x|<{\frac {\pi }{2}}$
    $\sec(x)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}E_{2n}}{(2n)!}}x^{2n}\quad {\text{ for }}|x|<{\frac {\pi }{2}}$
    $\arcsin(x)=\sum _{n=0}^{\infty }{\frac {(2n)!}{4^{n}(n!)^{2}(2n+1)}}x^{2n+1}\quad {\text{ for }}|x|<1$
    $\arctan(x)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{2n+1}}x^{2n+1}\quad {\text{ for }}|x|<1$
Hyperbolic functions:
    $\sinh(x)=\sum _{n=1}^{\infty }{\frac {x^{2n-1}}{(2n-1)!}}\quad {\text{ for all }}x$
    $\cosh(x)=\sum _{n=0}^{\infty }{\frac {x^{2n}}{(2n)!}}\quad {\text{ for all }}x$
    $\tanh(x)=\sum _{n=1}^{\infty }{\frac {B_{2n}2^{2n}(2^{2n}-1)}{(2n)!}}x^{2n-1}\quad {\text{ for }}|x|<{\frac {\pi }{2}}$
    ${\rm {arsinh}}(x)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}(2n)!}{2^{2n}(n!)^{2}(2n+1)}}x^{2n+1}\quad {\text{ for }}|x|<1$
    ${\rm {artanh}}(x)=\sum _{n=1}^{\infty }{\frac {x^{2n-1}}{2n-1}}\quad {\text{ for }}|x|<1$
Lambert's W function:
    $W_{0}(x)=\sum _{n=1}^{\infty }{\frac {(-n)^{n-1}}{n!}}x^{n}\quad {\text{ for }}|x|<{\frac {1}{e}}$
The numbers $B_{k}$ appearing in the expansions of $\tan(x)$ and $\tanh(x)$ are the Bernoulli numbers. The ${\binom {\alpha }{n}}$ in the binomial expansion are the binomial coefficients. The $E_{k}$ in the expansion of $sec(x)$ are Euler numbers.

### Multiple dimensions

The Taylor series may be generalized to functions of more than one variable with
    $\sum _{n_{1}=0}^{\infty }\cdots \sum _{n_{d}=0}^{\infty }{\frac {\partial ^{n_{1}}}{\partial x_{1}^{n_{1}}}}\cdots {\frac {\partial ^{n_{d}}}{\partial x_{d}^{n_{d}}}}{\frac {f(a_{1},\dots ,a_{d})}{n_{1}!\cdots n_{d}!}}(x_{1}-a_{1})^{n_{1}}\cdots (x_{d}-a_{d})^{n_{d}}$

### History

The Taylor series is named for mathematician Brook Taylor, who first published the power series formula in 1715.

### Constructing a Taylor Series

Several methods exist for the calculation of Taylor series of a large number of functions. One can attempt to use the Taylor series as-is and generalize the form of the coefficients, or one can use manipulations such as substitution, multiplication or division, addition or subtraction of standard Taylor series (such as those above) to construct the Taylor series of a function, by virtue of Taylor series being power series. In some cases, one can also derive the Taylor series by repeatedly applying integration by parts. The use of computer algebra systems to calculate Taylor series is common, since it eliminates tedious substitution and manipulation.

#### Example 1

Consider the function
    $f(x)=\ln {\big1+\cos(x){\big )}$
for which we want a Taylor series at 0.
We have for the natural logarithm
    $\ln(1+x)=\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}}{n}}x^{n}=x-{\frac {x^{2}}{2}}+{\frac {x^{3}}{3}}-{\frac {x^{4}}{4}}+\cdots \quad {\text{ for }}|x|<1$
and for the cosine function
    $\cos(x)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{(2n)!}}x^{2n}=1-{\frac {x^{2}}{2!}}+{\frac {x^{4}}{4!}}-\cdots \quad {\text{ for all }}x\in \mathbb {C}$
We can simply substitute the second series into the first. Doing so gives
    $\left(1-{\frac {x^{2}}{2!}}+{\frac {x^{4}}{4!}}-\cdots \right)-{\frac {1}{2}}\left(1-{\frac {x^{2}}{2!}}+{\frac {x^{4}}{4!}}-\cdots \right)^{2}+{\frac {1}{3}}\left(1-{\frac {x^{2}}{2!}}+{\frac {x^{4}}{4!}}-\cdots \right)^{3}-\cdots$
Expanding by using multinomial coefficients gives the required Taylor series. Note that cosine and therefore $f$ are even functions, meaning that $f(x)=f(-x)$, hence the coefficients of the odd powers $x$, $x^{3}$, $x^{5}$, $x^{7}$ and so on have to be zero and don't need to be calculated. The first few terms of the series are
    $\ln {\big1+\cos(x){\big )}=\ln(2)-{\frac {x^{2}}{4}}-{\frac {x^{4}}{96}}-{\frac {x^{6}}{1440}}-{\frac {17x^{8}}{322560}}-{\frac {31x^{10}}{7257600}}-\cdots$
The general coefficient can be represented using Faà di Bruno's formula. However, this representation does not seem to be particularly illuminating and is therefore omitted here.

#### Example 2

Suppose we want the Taylor series at 0 of the function
    $g(x)={\frac {e^{x}}{\cos(x)}}$
We have for the exponential function
    $e^{x}=\sum _{n=0}^{\infty }{\frac {x^{n}}{n!}}=1+x+{\frac {x^{2}}{2!}}+{\frac {x^{3}}{3!}}+{\frac {x^{4}}{4!}}+\cdots$
and, as in the first example,
    $\cos(x)=1-{\frac {x^{2}}{2!}}+{\frac {x^{4}}{4!}}-\cdots$
Assume the power series is
    ${\frac {e^{x}}{\cos(x)}}=c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+\cdots$
Then multiplication with the denominator and substitution of the series of the cosine yields
    $e^{x}$ $={\bigc_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+\cdots {\big )}\cos(x)$ $=\left(c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+c_{4}x^{4}+\cdots \right)\left(1-{\frac {x^{2}}{2!}}+{\frac {x^{4}}{4!}}-\cdots \right)$ $=c_{0}-{\frac {c_{0}}{2}}x^{2}+{\frac {c_{0}}{4!}}x^{4}+c_{1}x-{\frac {c_{1}}{2}}x^{3}+{\frac {c_{1}}{4!}}x^{5}+c_{2}x^{2}-{\frac {c_{2}}{2}}x^{4}+{\frac {c_{2}}{4!}}x^{6}+c_{3}x^{3}-{\frac {c_{3}}{2}}x^{5}+{\frac {c_{3}}{4!}}x^{7}+\cdots$
Collecting the terms up to fourth order yields
    $=c_{0}+c_{1}x+\left(c_{2}-{\frac {c_{0}}{2}}\right)x^{2}+\left(c_{3}-{\frac {c_{1}}{2}}\right)x^{3}+\left(c_{4}+{\frac {c_{0}}{4!}}-{\frac {c_{2}}{2}}\right)x^{4}+\cdots$
Comparing coefficients with the above series of the exponential function yields the desired Taylor series
    ${\frac {e^{x}}{\cos(x)}}=1+x+x^{2}+{\frac {2x^{3}}{3}}+{\frac {x^{4}}{2}}+\cdots$

## Generalized Mean Value Theorem

This page or section of Calculus is a stub. You can help Wikibooks by expanding it.

# Power Series

The study of power series is aimed at investigating series which can approximate some function over a certain interval.

## Motivations

Elementary calculus (differentiation) is used to obtain information on a line which touches a curve at one point (i.e. a tangent). This is done by calculating the gradient, or slope of the curve, at a single point. However, this does not provide us with reliable information on the curve's actual value at given points in a wider interval. This is where the concept of power series becomes useful.

### An example

Consider the curve of $y=\cos(x)$ , about the point $x=0$ . A naïve approximation would be the line $y=1$ . However, for a more accurate approximation, observe that $\cos(x)$ looks like an inverted parabola around $x=0$ - therefore, we might think about which parabola could approximate the shape of $\cos(x)$ near this point. This curve might well come to mind:
    $y=1-{\frac {x^{2}}{2}}$
In fact, this is the best estimate for $\cos(x)$ which uses polynomials of degree 2 (i.e. a highest term of $x^{2}$) - but how do we know this is true? This is the study of power series: finding optimal approximations to functions using polynomials.

## Definition

A power series (in one variable) is a infinite series of the form
    $f(x)=a_{0}(x-c)^{0}+a_{1}(x-c)^{1}+a_{2}(x-c)^{2}+\cdots$ (where $c$ is a constant)
or, equivalently,
    $f(x)=\sum _{n=0}^{\infty }a_{n}(x-c)^{n}$

## Radius of convergence

When using a power series as an alternative method of calculating a function's value, the equation
    $f(x)=\sum _{n=0}^{\infty }a_{n}(x-c)^{n}$
can only be used to study $f(x)$ where the power series converges - this may happen for a finite range, or for all real numbers.
The size of the interval (around its center) in which the power series converges to the function is known as the radius of convergence.

### An example

    ${\frac {1}{1-x}}=\sum _{n=0}^{\infty }x^{n}$ (a geometric series)
this converges when $|x|<1$ , the range $f(x)-1<x<1$ , so the radius of convergence - centered at 0 - is 1. It should also be observed that at the extremities of the radius, that is where $x=1$ and $x=-1$ , the power series does not converge.

### Another example

    $e^{x}=\sum _{n=0}^{\infty }{\frac {x^{n}}{n!}}$
Using the ratio test, this series converges when the ratio of successive terms is less than one:
    $\lim _{n\to \infty }\left|{\frac {x^{n+1}}{(n+1)!}}{\frac {n!}{x^{n}}}\right|<1$
    $=\lim _{n\to \infty }\left|{\frac {x^{n}x^{1}}{n!(n+1)}}{\frac {n!}{x^{n}}}\right|<1$
    $=\lim _{n\to \infty }\left|{\frac {x}{n+1}}\right|<1$
which is always true - therefore, this power series has an infinite radius of convergence. In effect, this means that the power series can always be used as a valid alternative to the original function, $e^{x}$ .

### Abstraction

If we use the ratio test on an arbitrary power series, we find it converges when
    $\lim _{n\to \infty }{\frac {|a_{n+1}x|}{|a_{n}|}}<1$
and diverges when
    $\lim _{n\to \infty }{\frac {|a_{n+1}x|}{|a_{n}|}}>1$
The radius of convergence is therefore
    $r=\lim _{n\to \infty }{\frac {|a_{n}|}{|a_{n+1}|}}$
If this limit diverges to infinity, the series has an infinite radius of convergence.

## Differentiation and Integration

Within its radius of convergence, a power series can be differentiated and integrated term by term.
    ${\frac {d}{dx}}\left[\sum _{n=0}^{\infty }a_{n}x^{n}\right]=\sum _{n=0}^{\infty }a_{n+1}(n+1)(x-c)^{n}$
    $\int \sum _{n=0}^{\infty }a_{n}(x-c)^{n}dx=\sum _{n=1}^{\infty }{\frac {a_{n-1}(x-c)^{n}}{n}}+k$
Both the differential and the integral have the same radius of convergence as the original series.
This allows us to sum exactly suitable power series. For example,
    ${\frac {1}{1+x}}=1-x+x^{2}-x^{3}\pm \cdots$
This is a geometric series, which converges for $|x|<1$ . Integrating both sides, we get
    $\ln(1+x)=x-{\frac {x^{2}}{2}}+{\frac {x^{3}}{3}}\pm \cdots$
which will also converge for $|x|<1$ . When $x=-1$ this is the harmonic series, which diverges; when $x=1$ this is an alternating series with diminishing terms, which converges to $\ln(2)$ - this is testing the extremities.
It also lets us write series for integrals we cannot do exactly such as the error function:
    $e^{-x^{2}}=\sum (-1)^{n}{\frac {x^{2n}}{n!}}$
The left hand side can not be integrated exactly, but the right hand side can be.
    $\int \limits _{0}^{z}e^{-x^{2}}dx=\sum {\frac {(-1)^{n}z^{2n+1}}{(2n+1)n!}}$
This gives us a series for the sum, which has an infinite radius of convergence, letting us approximate the integral as closely as we like.
Note that this is not a power series, as the power of $z$ is not the index.

## Further reading

* "Decoding the Rosetta Stone" article by Jack W. Crenshaw 2005-10-12

## Exercises

The following exercises test your understanding of infinite sequences and series. You may want to review that material before trying these problems.
Each question is followed by a "Hint" (usually a quick indication of the most efficient way to work the problem), the "Answer only" (what it sounds like), and finally a "Full solution" (showing all the steps required to get to the right answer). These should show up as "collapsed" or "hidden" sections (click on the title to display the contents), but some older web browsers might not be able to display them correctly (i.e., showing the content when it should be hidden). If this is true for your browser (or if you're looking at a printed version), you should take care not to "see too much" before you start thinking of how to work each problem.

## Sequences

Consider the infinite sequence
    $a_{n}=n/2^{n},\ n=1,\ldots ,\infty .$
* Is the sequence monotonically increasing or decreasing?
$a_{n+1}$
$a_{n}$
$a_{n}$
$n$
Algebraically, since
    $a_{n+1}-a_{n}={\frac {n+1}{2^{n+1}}}-{\frac {n}{2^{n}}}={\frac {n+1}{2^{n+1}}}-{\frac {2n}{2^{n+1}}}={\frac {1-n}{2^{n+1}}},$
we see that $a_{n+1}<a_{n}$ for $n>1$. That is, starting from the second term, the sequence is strictly decreasing. It is easy to check how the first two terms compare by just plugging in $n=1$ and $n=2$:
    $a_{1}=1/2$
    $a_{2}=2/4=1/2$
The first two terms are equal and thereafter the terms are strictly decreasing. Therefore, the sequence is monotonically decreasing.
Using calculus,
    ${\frac {d}{dn}}\,{\frac {n}{2^{n}}}={\frac {2^{n}\cdot 1-n\cdot 2^{n}\ln 2}{(2^{n})^{2}}}={\frac {2^{n}(1-n\ln 2)}{2^{2n}}}={\frac {1-n\ln 2}{2^{n}}},$
$n>1/\ln 2\approx 1.44>1$
$a_{n+1}$
$a_{n}$
$a_{n}$
$n$
Algebraically, since
    $a_{n+1}-a_{n}={\frac {n+1}{2^{n+1}}}-{\frac {n}{2^{n}}}={\frac {n+1}{2^{n+1}}}-{\frac {2n}{2^{n+1}}}={\frac {1-n}{2^{n+1}}},$
we see that $a_{n+1}<a_{n}$ for $n>1$. That is, starting from the second term, the sequence is strictly decreasing. It is easy to check how the first two terms compare by just plugging in $n=1$ and $n=2$:
    $a_{1}=1/2$
    $a_{2}=2/4=1/2$
The first two terms are equal and thereafter the terms are strictly decreasing. Therefore, the sequence is monotonically decreasing.
Using calculus,
    ${\frac {d}{dn}}\,{\frac {n}{2^{n}}}={\frac {2^{n}\cdot 1-n\cdot 2^{n}\ln 2}{(2^{n})^{2}}}={\frac {2^{n}(1-n\ln 2)}{2^{2n}}}={\frac {1-n\ln 2}{2^{n}}},$
$n>1/\ln 2\approx 1.44>1$
* Is the sequence bounded from below, from above, both, or neither?
$n$
$n$
* Does the sequence converge or diverge?
To show this directly, consider the limit
    $\lim _{n\to \infty }{\frac {n}{2^{n}}}=\lim _{n\to \infty }{\frac {1}{2^{n}\ln 2}}=0.$
The two limits are equal by L'Hôpital's Rule, since the numerator and denominator of the expression in the first limit both grow to infinity.
To show this directly, consider the limit
    $\lim _{n\to \infty }{\frac {n}{2^{n}}}=\lim _{n\to \infty }{\frac {1}{2^{n}\ln 2}}=0.$
The two limits are equal by L'Hôpital's Rule, since the numerator and denominator of the expression in the first limit both grow to infinity.

## Partial sums

Assume that the nth partial sum of a series is given by $s_{n}=2-{\frac {1}{3^{n}}}.$
* Does the series converge? If so, to what value?
    $s=\lim _{n\to \infty }s_{n}=\lim _{n\to \infty }\left(2-{\frac {1}{3^{n}}}\right)=2.$
    $s=\lim _{n\to \infty }s_{n}=\lim _{n\to \infty }\left(2-{\frac {1}{3^{n}}}\right)=2.$
* What is the formula for the nth term of the series?
$s_{n}=a_{1}+\cdots +a_{n-1}+a_{n}=s_{n-1}+a_{n}$
$s_{n}=a_{1}+\cdots +a_{n-1}+a_{n}=s_{n-1}+a_{n}$
$a_{n}={\frac {2}{3^{n}}}$
$a_{n}={\frac {2}{3^{n}}}$
$a_{n}=s_{n}-s_{n-1}=\left(2-{\frac {1}{3^{n}}}\right)-\left(2-{\frac {1}{3^{n-1}}}\right)={\frac {1}{3^{n-1}}}-{\frac {1}{3^{n}}}={\frac {3}{3^{n}}}-{\frac {1}{3^{n}}}={\frac {2}{3^{n}}}$
Note that the series turns out to be geometric, since
    $a_{n}=2\,(1/3)^{n}=a\,r^{n}.$
$a_{n}=s_{n}-s_{n-1}=\left(2-{\frac {1}{3^{n}}}\right)-\left(2-{\frac {1}{3^{n-1}}}\right)={\frac {1}{3^{n-1}}}-{\frac {1}{3^{n}}}={\frac {3}{3^{n}}}-{\frac {1}{3^{n}}}={\frac {2}{3^{n}}}$
Note that the series turns out to be geometric, since
    $a_{n}=2\,(1/3)^{n}=a\,r^{n}.$

## Sums of infinite series

Find the value to which each of the following series converges.
* $\sum _{n=0}^{\infty }{\frac {3}{4^{n}}}$
    $\sum _{n=0}^{\infty }3\left({\frac {1}{4}}\right)^{n}$
and so is geometric with first term $a=3$ and common ratio $r=1/4$. So
    $s={\frac {a}{1-r}}={\frac {3}{1-1/4}}=4.$
    $\sum _{n=0}^{\infty }3\left({\frac {1}{4}}\right)^{n}$
and so is geometric with first term $a=3$ and common ratio $r=1/4$. So
    $s={\frac {a}{1-r}}={\frac {3}{1-1/4}}=4.$
* $\sum _{n=1}^{\infty }\left({\frac {2}{e}}\right)^{n}$
${\frac {2}{e-2}}$
${\frac {2}{e-2}}$
$s={\frac {2/e}{1-2/e}}={\frac {2}{e-2}}$
$s={\frac {2/e}{1-2/e}}={\frac {2}{e-2}}$
* $\sum _{n=2}^{\infty }{\frac {1}{n^{2}-n}}$
    $\sum _{n=2}^{\infty }{\frac {1}{n^{2}-n}}=\sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}=\sum _{n=2}^{\infty }\left({\frac {1}{n-1}}-{\frac {1}{n}}\right)$
by partial fractions. So
    $s=\lim _{N\to \infty }s_{N}=\lim _{N\to \infty }\left(1-{\frac {1}{2}}\right)+\left({\frac {1}{2}}-{\frac {1}{3}}\right)+\left({\frac {1}{3}}-{\frac {1}{4}}\right)+\ldots +\left({\frac {1}{N-1}}-{\frac {1}{N}}\right).$
All but the first and last terms cancel out, so
    $s=\lim _{N\to \infty }\left(1-{\frac {1}{N}}\right)=1.$
    $\sum _{n=2}^{\infty }{\frac {1}{n^{2}-n}}=\sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}=\sum _{n=2}^{\infty }\left({\frac {1}{n-1}}-{\frac {1}{n}}\right)$
by partial fractions. So
    $s=\lim _{N\to \infty }s_{N}=\lim _{N\to \infty }\left(1-{\frac {1}{2}}\right)+\left({\frac {1}{2}}-{\frac {1}{3}}\right)+\left({\frac {1}{3}}-{\frac {1}{4}}\right)+\ldots +\left({\frac {1}{N-1}}-{\frac {1}{N}}\right).$
All but the first and last terms cancel out, so
    $s=\lim _{N\to \infty }\left(1-{\frac {1}{N}}\right)=1.$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n-1}}{3^{n}}}$
    $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n}}{3^{n}\cdot 2}}=\sum _{n=1}^{\infty }{\frac {1}{2}}\left({\frac {-2}{3}}\right)^{n}$
and so is geometric with common ratio $r=-2/3$ and first term $-1/3$. Thus
    $s={\frac {-1/3}{1-(-2/3)}}=-1/5.$
    $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n}}{3^{n}\cdot 2}}=\sum _{n=1}^{\infty }{\frac {1}{2}}\left({\frac {-2}{3}}\right)^{n}$
and so is geometric with common ratio $r=-2/3$ and first term $-1/3$. Thus
    $s={\frac {-1/3}{1-(-2/3)}}=-1/5.$

## Convergence and divergence of infinite series

Determine whether each of the following series converges or diverges. (Note: Each "Hint" gives the convergence/divergence test required to draw a conclusion.)
* $\sum _{n=1}^{\infty }{\frac {1}{n^{2}}}$
$p=2$
$p>1$
$p=2$
$p>1$
* $\sum _{n=0}^{\infty }{\frac {1}{2^{n}}}$
$r=1/2$
$|r|<1$
$r=1/2$
$|r|<1$
* $\sum _{n=1}^{\infty }{\frac {n}{n^{2}+1}}$
    $\sum _{n=1}^{\infty }{\frac {n}{n^{2}+1}}\sim \sum _{n=1}^{\infty }{\frac {n}{n^{2}}}=\sum _{n=1}^{\infty }{\frac {1}{n}}$
The $\sim$ symbol means the two series are "asymptotically equivalent"—that is, they either both converge or both diverge because their terms behave so similarly when summed as n gets very large. This can be shown by the limit comparison test:
    $\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\div {\frac {1}{n}}\right)=\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\cdot {\frac {n}{1}}\right)=\lim _{n\to \infty }{\frac {n^{2}}{n^{2}+1}}=1$
$p=1$
    $\sum _{n=1}^{\infty }{\frac {n}{n^{2}+1}}\sim \sum _{n=1}^{\infty }{\frac {n}{n^{2}}}=\sum _{n=1}^{\infty }{\frac {1}{n}}$
The $\sim$ symbol means the two series are "asymptotically equivalent"—that is, they either both converge or both diverge because their terms behave so similarly when summed as n gets very large. This can be shown by the limit comparison test:
    $\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\div {\frac {1}{n}}\right)=\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\cdot {\frac {n}{1}}\right)=\lim _{n\to \infty }{\frac {n^{2}}{n^{2}+1}}=1$
$p=1$
* $\sum _{n=2}^{\infty }{\frac {1}{\ln n}}$
    $\sum _{n=2}^{\infty }{\frac {1}{\ln n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
$p=1$
    $\sum _{n=2}^{\infty }{\frac {1}{\ln n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
$p=1$
* $\sum _{n=0}^{\infty }{\frac {n!}{2^{n}}}$
$n>1$
    ${\frac {n!}{2^{n}}}={\frac {n}{2}}\cdot \left[{\frac {n-1}{2}}\cdot {\frac {n-2}{2}}\dots {\frac {2}{2}}\right]\cdot {\frac {1}{2}}\geq {\frac {n}{2}}\cdot (1)\cdot {\frac {1}{2}}={\frac {n}{4}}$
To see why the inequality holds, consider that when $n=2$ none of the fractions in the square brackets above are actually there; when $n=3$ only 2/2 (which is the same as $[n-1]/2$) is in the brackets; when $n=4$ only 3/2 (equal to $[n-1]/2$) and 2/2 (equal to $[n-2]/2$) are there; when $n=5$, only 4/2, 3/2, and 2/2 are there; and so forth. Clearly none of these fractions are less than 1 and they never will be, no matter what $n>1$ is used.
The fact that
    $\lim _{n\to \infty }{\frac {n}{4}}=\infty$
then implies that
    $\lim _{n\to \infty }{\frac {n!}{2^{n}}}=\infty$
$n>1$
    ${\frac {n!}{2^{n}}}={\frac {n}{2}}\cdot \left[{\frac {n-1}{2}}\cdot {\frac {n-2}{2}}\dots {\frac {2}{2}}\right]\cdot {\frac {1}{2}}\geq {\frac {n}{2}}\cdot (1)\cdot {\frac {1}{2}}={\frac {n}{4}}$
To see why the inequality holds, consider that when $n=2$ none of the fractions in the square brackets above are actually there; when $n=3$ only 2/2 (which is the same as $[n-1]/2$) is in the brackets; when $n=4$ only 3/2 (equal to $[n-1]/2$) and 2/2 (equal to $[n-2]/2$) are there; when $n=5$, only 4/2, 3/2, and 2/2 are there; and so forth. Clearly none of these fractions are less than 1 and they never will be, no matter what $n>1$ is used.
The fact that
    $\lim _{n\to \infty }{\frac {n}{4}}=\infty$
then implies that
    $\lim _{n\to \infty }{\frac {n!}{2^{n}}}=\infty$
* $\sum _{n=1}^{\infty }{\frac {\cos \pi n}{n}}$
    $\sum _{n=1}^{\infty }{\frac {\cos \pi n}{n}}=\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{n}}$
Since the sequence
    $|a_{n}|={\frac {1}{n}}$
    $\sum _{n=1}^{\infty }{\frac {\cos \pi n}{n}}=\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{n}}$
Since the sequence
    $|a_{n}|={\frac {1}{n}}$
* $\sum _{n=2}^{\infty }{\frac {(-1)^{n}}{n\ln n-1}}$
    $|a_{n}|={\frac {1}{n\ln n-1}}$
$\ln n$
$n\geq 2$
    $|a_{n}|={\frac {1}{n\ln n-1}}$
$\ln n$
$n\geq 2$

## Absolute and conditional convergence

Determine whether each of the following series converges conditionally, converges absolutely, or diverges. (Note: Each "Hint" gives the test or tests that most easily lead to the final conclusion.)
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{\sqrt {n}}}$
    $|a_{n}|={\frac {1}{\sqrt {n}}}$
Since this sequence is clearly decreasing to zero, the original series is convergent by the alternating series test. Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}$
This new series can be compared to a p-series:
    $\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}\geq \sum _{n=1}^{\infty }{\frac {1}{n}}$
    $|a_{n}|={\frac {1}{\sqrt {n}}}$
Since this sequence is clearly decreasing to zero, the original series is convergent by the alternating series test. Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}$
This new series can be compared to a p-series:
    $\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}\geq \sum _{n=1}^{\infty }{\frac {1}{n}}$
* $\sum _{n=2}^{\infty }{\frac {(-1)^{n}\ln n}{n}}$
    $|a_{n}|={\frac {\ln n}{n}}$
This sequence has a limit of zero by, for example, L'Hospital's Rule.
    $\lim _{n\to \infty }{\frac {\ln n}{n}}=\lim _{n\to \infty }{\frac {1/n}{1}}=0$
That the sequence is decreasing can be verified by, for example, showing that as a continuous function of x, its derivative is negative.
    ${\frac {d}{dx}}\,{\frac {\ln x}{x}}={\frac {1-\ln x}{x^{2}}}<0{\mbox{ if }}x>e$
This means that the terms definitely decrease starting with the second term ($n=3$). Thus, the series starting at $n=3$ is convergent by the alternating series test; clearly, then, the series starting at $n=2$ also converges (since the two series only differ by one term). Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=2}^{\infty }{\frac {\ln n}{n}}$
This new series of positive terms only can be compared to a p-series:
    $\sum _{n=2}^{\infty }{\frac {\ln n}{n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
Since the smaller series diverges, the larger one diverges. Alternatively, the integral test can be used to test the convergence of the series of positive terms, since $f(x)={\frac {\ln x}{x}}$ is clearly a continuous, positive function on $[2,\infty )$ and, as we have just verified, is also decreasing:
    $\int _{2}^{\infty }{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{2}^{t}{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{\ln 2}^{\ln t}u\,du$
by the substitution $u=\ln x$; and this last expression becomes
    $\lim _{t\to \infty }{\Bigl{\frac {1}{2}}u^{2}{\bigr |}_{\ln 2}^{\ln t}{\Bigr )}=\lim _{t\to \infty }{\frac {1}{2}}(\ln t)^{2}-{\frac {1}{2}}(\ln 2)^{2}=\infty$
Since the improper integral diverges, the series of positive terms diverges.
    $|a_{n}|={\frac {\ln n}{n}}$
This sequence has a limit of zero by, for example, L'Hospital's Rule.
    $\lim _{n\to \infty }{\frac {\ln n}{n}}=\lim _{n\to \infty }{\frac {1/n}{1}}=0$
That the sequence is decreasing can be verified by, for example, showing that as a continuous function of x, its derivative is negative.
    ${\frac {d}{dx}}\,{\frac {\ln x}{x}}={\frac {1-\ln x}{x^{2}}}<0{\mbox{ if }}x>e$
This means that the terms definitely decrease starting with the second term ($n=3$). Thus, the series starting at $n=3$ is convergent by the alternating series test; clearly, then, the series starting at $n=2$ also converges (since the two series only differ by one term). Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=2}^{\infty }{\frac {\ln n}{n}}$
This new series of positive terms only can be compared to a p-series:
    $\sum _{n=2}^{\infty }{\frac {\ln n}{n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
Since the smaller series diverges, the larger one diverges. Alternatively, the integral test can be used to test the convergence of the series of positive terms, since $f(x)={\frac {\ln x}{x}}$ is clearly a continuous, positive function on $[2,\infty )$ and, as we have just verified, is also decreasing:
    $\int _{2}^{\infty }{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{2}^{t}{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{\ln 2}^{\ln t}u\,du$
by the substitution $u=\ln x$; and this last expression becomes
    $\lim _{t\to \infty }{\Bigl{\frac {1}{2}}u^{2}{\bigr |}_{\ln 2}^{\ln t}{\Bigr )}=\lim _{t\to \infty }{\frac {1}{2}}(\ln t)^{2}-{\frac {1}{2}}(\ln 2)^{2}=\infty$
Since the improper integral diverges, the series of positive terms diverges.
* $\sum _{n=2}^{\infty }{\frac {(-1)^{n}n}{(\ln n)^{2}}}$
    $\lim _{n\to \infty }{\frac {n}{(\ln n)^{2}}}=\lim _{n\to \infty }{\frac {1}{2(\ln n)(1/n)}}=\lim _{n\to \infty }{\frac {n}{2\ln n}}$
    ${\mbox{ }}=\lim _{n\to \infty }{\frac {1}{2/n}}=\lim _{n\to \infty }{\frac {n}{2}}=\infty$
Which implies that
    $\lim _{n\to \infty }{\frac {(-1)^{n}n}{(\ln n)^{2}}}$
    $\lim _{n\to \infty }{\frac {n}{(\ln n)^{2}}}=\lim _{n\to \infty }{\frac {1}{2(\ln n)(1/n)}}=\lim _{n\to \infty }{\frac {n}{2\ln n}}$
    ${\mbox{ }}=\lim _{n\to \infty }{\frac {1}{2/n}}=\lim _{n\to \infty }{\frac {n}{2}}=\infty$
Which implies that
    $\lim _{n\to \infty }{\frac {(-1)^{n}n}{(\ln n)^{2}}}$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n}}{e^{n}-1}}$
    $\sum _{n=1}^{\infty }|a_{n}|=\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}$
This series of positive terms is asymptotically geometric with $r=2/e$:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\sim \sum _{n=1}^{\infty }(2/e)^{n}$
The equivalence of these series is shown by using a limit comparison test:
    $\lim _{n\to \infty }\left[{\frac {2^{n}}{e^{n}-1}}\div (2/e)^{n}\right]=\lim _{n\to \infty }\left({\frac {2^{n}}{2^{n}}}\cdot {\frac {e^{n}}{e^{n}-1}}\right)=\lim _{n\to \infty }{\frac {1}{1-1/e^{n}}}=1$
Since the limit is positive and finite, and since the simpler series converges because it geometric with $r=2/e$ (the absolute value of which is less than 1), then the series of positive terms converges by the limit comparison test. Thus the original alternating series is absolutely convergent.
Note, by the way, that a direct comparison test in this case is more difficult (although still possible to do), since
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\geq \sum _{n=1}^{\infty }(2/e)^{n}$
and we need the inequality to go the other way to get a conclusion, since the geometric series converges.
This can be fixed by choosing the new series more carefully:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\leq \sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-.5e^{n}}}=\sum _{n=1}^{\infty }{\frac {2^{n}}{.5e^{n}}}=\sum _{n=1}^{\infty }2(2/e)^{n}$
    $\sum _{n=1}^{\infty }|a_{n}|=\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}$
This series of positive terms is asymptotically geometric with $r=2/e$:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\sim \sum _{n=1}^{\infty }(2/e)^{n}$
The equivalence of these series is shown by using a limit comparison test:
    $\lim _{n\to \infty }\left[{\frac {2^{n}}{e^{n}-1}}\div (2/e)^{n}\right]=\lim _{n\to \infty }\left({\frac {2^{n}}{2^{n}}}\cdot {\frac {e^{n}}{e^{n}-1}}\right)=\lim _{n\to \infty }{\frac {1}{1-1/e^{n}}}=1$
Since the limit is positive and finite, and since the simpler series converges because it geometric with $r=2/e$ (the absolute value of which is less than 1), then the series of positive terms converges by the limit comparison test. Thus the original alternating series is absolutely convergent.
Note, by the way, that a direct comparison test in this case is more difficult (although still possible to do), since
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\geq \sum _{n=1}^{\infty }(2/e)^{n}$
and we need the inequality to go the other way to get a conclusion, since the geometric series converges.
This can be fixed by choosing the new series more carefully:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\leq \sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-.5e^{n}}}=\sum _{n=1}^{\infty }{\frac {2^{n}}{.5e^{n}}}=\sum _{n=1}^{\infty }2(2/e)^{n}$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{\sin ^{2}n}}$
    $|a_{n}|={\frac {1}{\sin ^{2}n}}$
Because
    $\lim _{n\to \infty }\sin ^{2}n$
does not exist (since it continually oscillates within the interval $[0,1]$ as n gets larger)
    $\lim _{n\to \infty }{\frac {1}{\sin ^{2}n}}$
doesn't exist either. Thus the alternating series test fails (it is inconclusive).
However, in such a situation we can use the divergence test instead. Since
    $\lim _{n\to \infty }{\frac {(-1)^{n}}{\sin ^{2}n}}$
    $|a_{n}|={\frac {1}{\sin ^{2}n}}$
Because
    $\lim _{n\to \infty }\sin ^{2}n$
does not exist (since it continually oscillates within the interval $[0,1]$ as n gets larger)
    $\lim _{n\to \infty }{\frac {1}{\sin ^{2}n}}$
doesn't exist either. Thus the alternating series test fails (it is inconclusive).
However, in such a situation we can use the divergence test instead. Since
    $\lim _{n\to \infty }{\frac {(-1)^{n}}{\sin ^{2}n}}$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}n!}{(2n)!}}$
    $\lim _{n\to \infty }\left|{\frac {(-1)^{n+1}(n+1)!}{[2(n+1)]!}}\div {\frac {(-1)^{n}n!}{(2n)!}}\right|=\lim _{n\to \infty }{\frac {(n+1)!}{n!}}\cdot {\frac {(2n)!}{(2n+2)!}}=\lim _{n\to \infty }{\frac {(n+1)}{(2n+2)(2n+1)}}=\lim _{n\to \infty }{\frac {1}{2(2n+1)}}=0$
    $\lim _{n\to \infty }\left|{\frac {(-1)^{n+1}(n+1)!}{[2(n+1)]!}}\div {\frac {(-1)^{n}n!}{(2n)!}}\right|=\lim _{n\to \infty }{\frac {(n+1)!}{n!}}\cdot {\frac {(2n)!}{(2n+2)!}}=\lim _{n\to \infty }{\frac {(n+1)}{(2n+2)(2n+1)}}=\lim _{n\to \infty }{\frac {1}{2(2n+1)}}=0$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}e^{1/n}}{\arctan n}}$
Note that
    $\lim _{n\to \infty }{\frac {e^{1/n}}{\arctan n}}={\frac {e^{0}}{\pi /2}}={\frac {2}{\pi }}\neq 0$
Thus
    $\lim _{n\to \infty }{\frac {(-1)^{n}e^{1/n}}{\arctan n}}\neq 0$
Note that
    $\lim _{n\to \infty }{\frac {e^{1/n}}{\arctan n}}={\frac {e^{0}}{\pi /2}}={\frac {2}{\pi }}\neq 0$
Thus
    $\lim _{n\to \infty }{\frac {(-1)^{n}e^{1/n}}{\arctan n}}\neq 0$

## Taylor series

Find the Taylor series for the following functions centered at the given values.
* $f(x)=(1+3x)^{2},\ a=1$
$f(x)=16+24(x-1)+9(x-1)^{2}$
$f(x)=16+24(x-1)+9(x-1)^{2}$
    $f(a)=16$
    $f'(x)=2(1+3x)(3)=6(1+3x)\longrightarrow f'(a)=24$
    $f''(x)=6(3)=18\longrightarrow f''(a)=18$
    $f'''(x)=0\longrightarrow f'''(a)=0$
All higher derivatives are also zero, so the Taylor expansion of the function:
    $f(x)=f(a)+f'(a)(x-a)+{\frac {f''(a)}{2!}}(x-a)^{2}+{\frac {f'''(a)}{3!}}(x-a)^{3}+\dots$
becomes simply:
    $f(x)=16+24(x-1)+{\frac {18}{2}}(x-1)^{2}$
    $=16+24(x-1)+9(x-1)^{2}$
    $f(a)=16$
    $f'(x)=2(1+3x)(3)=6(1+3x)\longrightarrow f'(a)=24$
    $f''(x)=6(3)=18\longrightarrow f''(a)=18$
    $f'''(x)=0\longrightarrow f'''(a)=0$
All higher derivatives are also zero, so the Taylor expansion of the function:
    $f(x)=f(a)+f'(a)(x-a)+{\frac {f''(a)}{2!}}(x-a)^{2}+{\frac {f'''(a)}{3!}}(x-a)^{3}+\dots$
becomes simply:
    $f(x)=16+24(x-1)+{\frac {18}{2}}(x-1)^{2}$
    $=16+24(x-1)+9(x-1)^{2}$
* $f(x)={\frac {1}{5-2x}},\ a=2$
$f(x)=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
$f(x)=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
    $f(x)=(5-2x)^{-1}$
The answer is better written in summation form because the Taylor expansion does not terminate. It is convenient to keep the numbers resulting from the power rule separate from the numbers resulting from the chain rule, so we can see the pattern:
    $f(a)=1$
    $f'(x)=(-1)(5-2x)^{-2}(-2)=(1)(5-2x)^{-2}(2)\longrightarrow f'(a)=1\cdot 2$
    $f''(x)=(-1)(-2)(5-2x)^{-3}(-2)(-2)=(1\cdot 2)(5-2x)^{-3}(2^{2})\longrightarrow f''(a)=(1\cdot 2)(2^{2})$
    $f'''(x)=(-1)(-2)(-3)(5-2x)^{-4}(-2)(-2)(-2)=(1\cdot 2\cdot 3)(5-2x)^{-4}(2^{3})\longrightarrow f'''(a)=(1\cdot 2\cdot 3)(2^{3})$
    $f^{(4)}(x)=(-1)(-2)(-3)(-4)(5-2x)^{-4}(-2)(-2)(-2)(-2)=(1\cdot 2\cdot 3\cdot 4)(5-2x)^{-4}(2^{4})\longrightarrow f^{(4)}(a)=(1\cdot 2\cdot 3\cdot 4)(2^{4})$
The pattern in the derivative values is:
    $f^{(n)}(a)=n!\,2^{n}$
So the Taylor series is:
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}=\sum _{n=0}^{\infty }{\frac {n!\,2^{n}}{n!}}(x-2)^{n}$
    $=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
    $f(x)=(5-2x)^{-1}$
The answer is better written in summation form because the Taylor expansion does not terminate. It is convenient to keep the numbers resulting from the power rule separate from the numbers resulting from the chain rule, so we can see the pattern:
    $f(a)=1$
    $f'(x)=(-1)(5-2x)^{-2}(-2)=(1)(5-2x)^{-2}(2)\longrightarrow f'(a)=1\cdot 2$
    $f''(x)=(-1)(-2)(5-2x)^{-3}(-2)(-2)=(1\cdot 2)(5-2x)^{-3}(2^{2})\longrightarrow f''(a)=(1\cdot 2)(2^{2})$
    $f'''(x)=(-1)(-2)(-3)(5-2x)^{-4}(-2)(-2)(-2)=(1\cdot 2\cdot 3)(5-2x)^{-4}(2^{3})\longrightarrow f'''(a)=(1\cdot 2\cdot 3)(2^{3})$
    $f^{(4)}(x)=(-1)(-2)(-3)(-4)(5-2x)^{-4}(-2)(-2)(-2)(-2)=(1\cdot 2\cdot 3\cdot 4)(5-2x)^{-4}(2^{4})\longrightarrow f^{(4)}(a)=(1\cdot 2\cdot 3\cdot 4)(2^{4})$
The pattern in the derivative values is:
    $f^{(n)}(a)=n!\,2^{n}$
So the Taylor series is:
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}=\sum _{n=0}^{\infty }{\frac {n!\,2^{n}}{n!}}(x-2)^{n}$
    $=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
* $f(x)=\sin ^{2}3x,\ a={\frac {\pi }{4}}$
$={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$
$={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$
    $f(x)={\frac {1}{2}}-{\frac {1}{2}}\cos 6x$
Thus:
    $f(a)=(1/2)-(1/2)\cos(3\pi /2)=1/2$
    $f'(x)=(1/2)(\sin 6x)(6)\longrightarrow f'(a)=(1/2)(-1)(6)$
    $f''(x)=(1/2)(\cos 6x)(6^{2})\longrightarrow f''(a)=0$
    $f'''(x)=(1/2)(-\sin 6x)(6^{3})\longrightarrow f'''(a)=(1/2)(1)(6^{3})$
    $f^{(4)}(x)=(1/2)(-\cos 6x)(6^{4})\longrightarrow f'''(a)=0$
    $f^{(5)}(x)=(1/2)(\sin 6x)(6^{5})\longrightarrow f'''(a)=(1/2)(-1)(6^{5})$
The pattern in the derivative values is tricky:
    $f^{(n)}(a)={\begin{cases}1/2&{\text{if }}n=0\\(1/2)(-1)^{(n+1)/2}(6^{n})&{\text{if }}n>0{\text{ and odd}}\\0&{\text{if }}n>0{\text{ and even}}\end{cases}}$
This is quite an awkward formula for the nth derivative. Don't worry at this point about the expression (−1)$^{(n+1)/2}$ in the middle case; we're going to use a simpler version in the final series. Do, however, note the following:
* The n = 0 case [i.e., f(a)] doesn't match the rest of the pattern.
* When n is positive and even, the value is 0, so the "even-derivative" terms don't contribute anything to the series.
This means we can rewrite Taylor's formula
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}$
as
    $f(x)=f(a)+\sum _{n=1}^{\infty }{\frac {f^{(2n+1)}(a)}{(2n+1)!}}(x-a)^{2n+1}$
where
    $f^{(2n+1)}(a)=(1/2)(-1)^{n+1}(6^{2n+1})$
Note that the expression 2n + 1 is always odd and starts with the value 3 when n is 1. Thus n = 1 corresponds to the third derivative, n = 2 the fifth derivative, and so on. It should be clear that (−1)$^{n+1}$ gives the correct signs for these derivative values.
Therefore the Taylor series is:
    $f(x)=1/2+\sum _{n=1}^{\infty }{\frac {(1/2)(-1)^{n+1}(6^{2n+1})}{(2n+1)!}}(x-\pi /4)^{2n+1}$
    $={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$
    $f(x)={\frac {1}{2}}-{\frac {1}{2}}\cos 6x$
Thus:
    $f(a)=(1/2)-(1/2)\cos(3\pi /2)=1/2$
    $f'(x)=(1/2)(\sin 6x)(6)\longrightarrow f'(a)=(1/2)(-1)(6)$
    $f''(x)=(1/2)(\cos 6x)(6^{2})\longrightarrow f''(a)=0$
    $f'''(x)=(1/2)(-\sin 6x)(6^{3})\longrightarrow f'''(a)=(1/2)(1)(6^{3})$
    $f^{(4)}(x)=(1/2)(-\cos 6x)(6^{4})\longrightarrow f'''(a)=0$
    $f^{(5)}(x)=(1/2)(\sin 6x)(6^{5})\longrightarrow f'''(a)=(1/2)(-1)(6^{5})$
The pattern in the derivative values is tricky:
    $f^{(n)}(a)={\begin{cases}1/2&{\text{if }}n=0\\(1/2)(-1)^{(n+1)/2}(6^{n})&{\text{if }}n>0{\text{ and odd}}\\0&{\text{if }}n>0{\text{ and even}}\end{cases}}$
This is quite an awkward formula for the nth derivative. Don't worry at this point about the expression (−1)$^{(n+1)/2}$ in the middle case; we're going to use a simpler version in the final series. Do, however, note the following:
* The n = 0 case [i.e., f(a)] doesn't match the rest of the pattern.
* When n is positive and even, the value is 0, so the "even-derivative" terms don't contribute anything to the series.
This means we can rewrite Taylor's formula
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}$
as
    $f(x)=f(a)+\sum _{n=1}^{\infty }{\frac {f^{(2n+1)}(a)}{(2n+1)!}}(x-a)^{2n+1}$
where
    $f^{(2n+1)}(a)=(1/2)(-1)^{n+1}(6^{2n+1})$
Note that the expression 2n + 1 is always odd and starts with the value 3 when n is 1. Thus n = 1 corresponds to the third derivative, n = 2 the fifth derivative, and so on. It should be clear that (−1)$^{n+1}$ gives the correct signs for these derivative values.
Therefore the Taylor series is:
    $f(x)=1/2+\sum _{n=1}^{\infty }{\frac {(1/2)(-1)^{n+1}(6^{2n+1})}{(2n+1)!}}(x-\pi /4)^{2n+1}$
    $={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$

# Vectors

Calculus/Vectors

# Lines and Planes in Space

Calculus/Lines and Planes in Space

# Multivariable & Differential Calculus

Calculus/Multivariable calculus

# Ordinary Differential Equations

Calculus/Ordinary differential equations

# Partial Differential Equations

Calculus/Partial differential equations <noinclude>

## Exercises

Calculus/Multivariable and differential calculus:Solutions </noinclude>

# Systems of Ordinary Differential Equations

We have already examined cases where we have a single differential equation and found several methods to aid us in finding solutions to these equations. But what happens if we have two or more differential equations that depend on each other? For example, consider the case where
    $D_{t}x(t)=3y(t)^{2}+x(t)t$
and
    $D_{t}y(t)=x(t)+y(t)$
Such a set of differential equations is said to be coupled. Systems of ordinary differential equations such as these are what we will look into in this section.

## First order systems

A general system of differential equations can be written in the form
    $D_{t}\mathbf {x} =\mathbf {F} (\mathbf {x} ,t)$
Instead of writing the set of equations in a vector, we can write out each equation explicitly, in the form:
    $D_{t}x_{1}=F_{1}(x_{1},\ldots ,x_{n},t)$
          $\vdots \!\;$
    $D_{t}x_{i}=F_{i}(x_{1},\ldots ,x_{n},t)$
If we have the system at the very beginning, we can write it as:
    $D_{t}\mathbf {x} =\mathbf {G} (\mathbf {x} ,t)$
where
    $\mathbf {x} =(x(t),y(t))=(x,y)$
and
    $\mathbf {G} (\mathbf {x} ,t)=(3y^{2}+xt,x+y)$
or write each equation out as shown above.
Why are these forms important? Often, this arises as a single, higher order differential equation that is changed into a simpler form in a system. For example, with the same example,
    $D_{t}x(t)=3y(t)^{2}+x(t)t$
    $D_{t}y(t)=x(t)+y(t)$
we can write this as a higher order differential equation by simple substitution.
    $D_{t}y(t)-y(t)=x(t)$
then
    $D_{t}x(t)=3y(t)^{2}+(D_{t}y(t)-y(t))t$
    $D_{t}x(t)=3y(t)^{2}+tD_{t}y(t)-ty(t)$
Notice now that the vector form of the system is dependent on t since
    $\mathbf {G} (\mathbf {x} ,t)=(3y^{2}+xt,x+y)$
the first component is dependent on t. However, if instead we had
    $\mathbf {H} (\mathbf {x} )=(3y^{2}+x,x+y)$
notice the vector field is no longer dependent on t. We call such systems autonomous. They appear in the form
    $D_{t}\mathbf {x} =\mathbf {H} (\mathbf {x} )$
We can convert between an autonomous system and a non-autonomous one by simply making a substitution that involves t, such as y=(x, t), to get a system:
    $D_{t}\mathbf {y} =(\mathbf {F} (\mathbf {y} ),1)=(\mathbf {F} (\mathbf {x} ,t),1)$
In vector form, we may be able to separate F in a linear fashion to get something that looks like:
    $\mathbf {F} (\mathbf {x} ,t)=A(t)\mathbf {x} +\mathbf {b} (t)$
where A(t) is a matrix and b is a vector. The matrix could contain functions or constants, clearly, depending on whether the matrix depends on t or not.

# Real numbers

Calculus/Real numbers

# Complex Numbers

Calculus/Complex numbers

# Advanced Integration Techniques
## Integration by Complexifying

Calculus/Integration techniques/Integration by Complexifying

# Appendix
### Calculus/Choosing delta

Calculus/Choosing delta

# Algebra Solutions

Calculus/Algebra/Solutions

# Precalculus Cumulative Exercise Set Solutions

Calculus/Precalculus/Solutions Template:Newpage

# Limit Solutions

Template:Newpage

# Infinite Limits/Infinity is not a number Solutions

Calculus/Infinite Limits/Infinity is not a number/Solutions Template:Newpage

# Limits Cumulative Exercise Set Solutions

Calculus/Limits/Solutions Template:Newpage

# Differentiation Solutions

Template:Newpage

# Differentiation Defined Solutions

Calculus/Differentiation/Differentiation Defined/Solutions Template:Newpage

# Chain Rule Solutions

Calculus/Chain Rule/Solutions Template:Newpage

# Some Important Theorems Solutions

Calculus/Some Important Theorems/Solutions Template:Newpage

# Basics of Differentiation Cumulative Exercise Set Solutions

Calculus/Differentiation/Basics of Differentiation/Solutions Template:Newpage

# L'Hôpital's Rule Solutions

Calculus/L'Hôpital's rule/Solutions Template:Newpage

# Related Rates Solutions

Calculus/Related Rates/Solutions Template:Newpage

# Applications of Derivatives Cumulative Exercise Set Solutions

Calculus/Differentiation/Applications of Derivatives/Solutions Template:Newpage

## Integration Solutions

Template:Newpage

# Indefinite Integral Solutions

Calculus/Indefinite integral/Solutions Template:Newpage

# Definite Integral Solutions

Calculus/Definite integral/Solutions Template:Newpage

# Integration Cumulative Exercise Set Solutions

Calculus/Integration/Solutions Template:Newpage <noinclude>

## Sequences and Series Solutions

Calculus/Sequences and Series/Solutions </noinclude> <noinclude>

## Multivariable and Differential Calculus Solutions

Calculus/Multivariable and differential calculus/Solutions </noinclude>

# Table of Trigonometry

Calculus/Table of Trigonometry

# Summation notation

Calculus/Summation notation

# Tables of Integrals

Calculus/Tables of Integrals

# Tables of Derivatives

Calculus/Tables of Derivatives

# Acknowledgements and Further Reading

Calculus/Acknowledgements

## References

<references />