Differential and Integral Calculus Review and Tutorial
Differential and Integral Calculus Review and Tutorial
x
_
0
e
x
2
d x (1.1)
1.2 Dierential Calculus
Fast Facts:
1. Denition: f
(x) = lim
h0
f(x+h)f(x)
h
.
2. Derivative is an operator (it operates on functions).
3. In particular, the derviative is the slope operator. Thus, it represents a rate of change. When the
independent variable is time, the derivative becomes a time rate of change. The time rate of change of
position is velocity, the time rate of change of velocity is acceleration, and the time rate of change of
acceleration is jerk. It can be readily seen that the units of the time derivative of f are f/time.
4. The inverse operator is the antiderivative or integral (This is the Fundamental Theorem of Calculus).
5. The Integral is the Area Operator.
6. The Derivative of any Elementary Function is an Elementary Function.
1.2.1 Some Derivatives
Here is a very short table of derivatives:
Function Derivative
x
n
nx
n1
e
x
e
x
ln(x)
1
x
sin(x) cos(x)
cos(x) sin(x)
sin(x) cos(x)
cos(x) sin(x)
One may notice that the derivatives for sin and cos follow a simple pattern (and that this pattern reminds
one of the unit circle):
Calculus Review by A. A. Tovar, Ph. D., Created Jan. 2009, not Amended. 2
sin x
cos x
cos x
sin x
Integration
Differentiation
1.2.2 Basic Theorems
Theorem Name Theorem
Chain Rule
d
dx
(A(B(x)) =
dA(B)
dB
dB(x)
dx
Linearity
d
dx
(aA(x) + bB(x)) = a
dA
dx
+ b
dB
dx
Product Rule
d
dx
(A(x)B(x)) = A(x)
dB
dx
+
dA
dx
B(x)
Quotient Rule
d
dx
_
A(x)
B(x)
_
=
B(x)
dA
dx
A(x)
dB
dx
B
2
(x)
1.2.3 Implicit Dierentiation
Implicit dierentiation is used when you do not have an explicit solution for the dependent variable of
interest. Here is an example:
Find dy/dx of the following function (its the equation of a circle):
x
2
+ y
2
= 1 (1.2)
Dierentiating each of the terms yields
2xdx + 2ydy = 0 (1.3)
or
dy
dx
= x/y (1.4)
A typical application would be the max/min problem, which could be accomplished by setting dy/dx = 0
which yields x = 0. This occurs when y
2
= 1 or y = 1, as expected.
1.2.4 Logarithmic Dierentiation
One would like to extend the product rule for more than two functions. This can be achieved with Logarithmic
Dierentiation. Suppose you want to nd the derivative of
y(x) = A(x)B(x)C(x)D(x) (1.5)
You could apply the product rule many times, or take the logarithm of both sides rst:
ln(y(x)) = ln(A(x)) + ln(B(x)) + ln(C(x)) + ln(D(x)) (1.6)
where a simple property of the logarithm has been used. Now, taking the derivative of both sides yields
1
y(x)
dy
dx
=
1
A(x)
dA
dx
+
1
B(x)
dB
dx
+
1
C(x)
dC
dx
+
1
D(x)
dD
dx
(1.7)
Finally, multiplying both sides by y(x) yields
dy
dx
= B(x)C(x)D(x)
dA
dx
+ A(x)C(x)D(x)
dB
dx
+ A(x)B(x)D(x)
dC
dx
+ A(x)B(x)C(x)
dD
dx
(1.8)
Calculus Review by A. A. Tovar, Ph. D., Created Jan. 2009, not Amended. 3
Of course, if one is so inclined, one could generalize the results. If y(x) is written
y(x) =
N
i=1
A
i
(x) (1.9)
then
dy
dx
=
N
j=1
1
A
j
(x)
dA
j
(x)
dx
N
i=1
A
i
(x) (1.10)
1.2.5 Pascals Triangle
Consider Pascals Triangle:
Each of the numbers are obtained by adding the two adjacent numbers in the row above it. For example,
10 is below its adjacent 4 and 6.
The rows of Pascals Triangle represent the binomial coecients, so that
(a + b)
3
= 1 a
3
b
0
+3 a
2
b
1
+3 a
1
b
2
+1 a
0
b
3
(1.11)
or more simply
(a + b)
3
= a
3
+ 3a
2
b + 3ab
2
+ b
3
(1.12)
There is a formula for the binomial coecients, given the Choose Function:
_
n
k
_
=
n!
k!(n k)!
(1.13)
where n is the row and k goes from 1 to n. For example, the third number on the 5th row of Pascals Triangle
is a 10, but
_
5
3
_
=
5!
3!(5 3)!
=
5 4
2 1
= 10 (1.14)
Note that the top solitary 1 is considered to be in the zeroth row and that 0! = 1 by convention.
This relates to dierential calculus, because there is a similar relationship that applies to the product
rule to multiple derivatives. Suppose we are interested in the 4
th
derivative of a product:
y
(4)
(x) = (A(x)B(x))
(1.15)
While the derivative terms that must exist are straightforward, it also happens that the coecients of the
derivatives are given by Pascals Triangle, so that in this case
y
(4)
(x) = A
(x)B(x) + 4A
(x)B
(x) + 6A
(x)B
(x) + 4A
(x)B
(x) + A(x)B
(x) (1.16)
Thus, by inspection it can be seen that the 4
th
derivative of xe
x
is
d
4
dx
4
(xe
x
) = (4 + x)e
x
(1.17)
Calculus Review by A. A. Tovar, Ph. D., Created Jan. 2009, not Amended. 4
as the rst 3 terms are zero. By inspection, can you determine the 4
th
derivative of x
2
e
x
? (See Bottom of
Page for answer)
1
The general case for the n
th
derivative of a product of two functions A(x) and B(x) may be written
y
(n)
(x) =
n
k=0
_
n
k
_
A
(k)
(x)B
(n)
(x) (1.18)
It is left for the enthusiastic reader to obtain a general expression for the n
th
derivative of the product
of m functions.
1.3 Integral Calculus
Fast Facts:
1. Denition of a Denite Integral:
_
b
a
f(x)dx = lim
N
_
ba
N
_
N1
0
f
_
a + i
_
ba
N
__
.
2. Denition of an Indenite Integral:
_
f(x)dx =
_
x
a
f( x)d x + C
3. The Indenite Integral is an operator (it operates on functions).
4. In particular, the Indenite Integral is the Accumulated Area Operator. The area is achieved by
summing many rectangles of length x = (b a)/N and height f(a + ix). Thus, the units of
_
b
a
f(x)dx is the units of f(x) multiplied by the units of x. The integral introduces the peculiar-to-
some idea of Negative Area. For example in integral calculus the area of a circle centered at the
origin is NOT r
2
, its ZERO as the bottom half of the circle is said to have negative area!
5. The Indenite Integral of any Elementary Function may or may not be an Elementary Function.
1.3.1 Some Integrals
Function Simple Form Advanced Form
x
n
(n = 1)
x
n+1
n+1
_
f
n
(x)
df
dx
dx =
f
n+1
(x)
n+1
x
1
ln|x|
_
df/dx
f
dx = ln|f(x)|
e
x
e
x
_
e
f(x) df
dx
dx = e
f(x)
ln(x) xln(x) x
_
ln(f(x))
df
dx
dx = f(x)ln(f(x)) f(x)
sin(x) cos(x)
_
sin(f(x))
df
dx
dx = cos(f(x))
cos(x) sin(x)
sin(x) cos(x)
cos(x) sin(x)
1.3.2 Techniques of Integration
Technique When to Use
u-Substitution When its obvious or when youre stuck.
Integration by Parts When you have a product of two functions, and you know
the derivative of one and the integral of the other.
Trigonometric Substitution When you have (a + x
2
) or (a x
2
) terms (especially in the denominator).
Synthetic Division/Partial Fraction When you have a ratio of polynomials.
Series Solution When you stuck but realize a Taylor Series is easy to calculate.
As you may recall, the formula for integration by parts is
_
udv = uv
_
vdu (1.19)
1
(12 + 8x + x
2
)e
x
Calculus Review by A. A. Tovar, Ph. D., Created Jan. 2009, not Amended. 5
A common mistake when using integration by parts on a denite integral is to forget to evaluate the uv term
with the integration limits.
1.3.3 Examples of Integration Techniques
Example (Advanced Forms)
_
x
2
1 + x
3
dx =
1
3
_
3x
2
1 + x
3
dx =
1
3
ln|1 + x
3
| + C (1.20)
Comment: The Advanced Forms involve what I call the Hope Method. You see a complicated function
and hope that the derivative of the inside of the equation is sitting on top. In this case it is. One is sometimes
taught to use u-Substitution here, but this integral should be done in your head. Notice how the integral
would be much harder if it is
_
1
1+x
3
dx. Thats why its the Hope method, you hope that derivative is there!
Example (Advanced Forms)
_
x
5
ln(x)dx =
1
6
_
x
5
ln(x
6
)dx =
1
36
_
6x
5
ln(x
6
)dx =
1
36
_
x
6
ln|x
6
| x
6
=
1
36
_
6x
6
ln|x| x
6
+C (1.21)
Comment: One of my favorite integrals. By using the properties of the logarithm, we can make the derivative
show up by just multiplying by a constant. The integral could be done by integrating by parts, but it would
be longer and much less cool!!
Example (Integration by Parts)
_
x
..
u
e
x
dx
..
dv
= x
..
u
e
x
..
v
_
e
x
..
v
dx
..
du
= e
x
(x 1) + C (1.22)
Comment: You can see that if we had
_
x
n
e
x
dx we would perform integration by parts n times, as the power
of the monomial decreases by 1 every time, but the exponential stays rm. It is a good idea to take the
derivative of your result to insure a correct answer. In this case the derivative is obtained by the product
rule: e
x
(1) + (x 1)e
x
= xe
x
as it must.
Example (Synthetic Division)
_
x
3
+ 2x
2
+ 2x + 1
x + 2
dx =
_
x
2
+ 2
3
x + 2
dx =
x
3
3
+ 2x 3ln|x + 2| + C (1.23)
Comment: Use synthetic division on a rational function when the degree of the polynomial on top is greater
than or equal to that on the bottom. Some students havent done synthetic division in a while. Its just
the same as long division you rst learned in grade school. Unfortunately, you may have not done that in a
while either!
Example (Partial Fraction Expansion)
The integrand of
_
1
x
2
+ 6x + 8
dx (1.24)
can be reduced by using a technique in ALGEBRA known as Partial Fraction Expansion. In particular, the
integrand can be rewritten
1
x
2
+ 6x + 8
=
1
(x + 2)(x + 4)
=
A
x + 2
+
B
x + 4
(1.25)
Calculus Review by A. A. Tovar, Ph. D., Created Jan. 2009, not Amended. 6
Solving for A and B yields A = 1/2, B = 1/2. The solution is
_
1
x
2
+ 6x + 8
dx =
1
2
[ln|x + 2| ln|x + 4|] =
1
2
ln
x + 2
x + 4
+ C (1.26)
Comment: For the integral of a fth degree polynomial divided by a second degree polynomial, one would
use synthetic division rst, and use Partial Fractions on the remaining integral. There is a technique where
the partial fractions coecients can be determined by inspection.
Example (Series Solution)
The following integral does not exist as a nite elementary function:
_
e
x
2
dx (1.27)
However, we may proceed by noting that the Taylor Series expansion for an exponential function is
e
x
=
n=0
x
n
n!
(1.28)
Thus, the integral becomes
_
e
x
2
dx =
_
n=0
(x
2
)
n
n!
dx =
n=0
(1)
n
n!
_
x
2n
dx =
n=0
(1)
n
n!
x
2n+1
2n + 1
(1.29)
Comment: If you multiply our result by 2/
_
r
2
r
2
cos
2
()(rsin())d = 2r
2
0
_
sin
2
())d = 2r
2
0
_
_
1
2
1
2
cos(2)
_
d = r
2
(1.31)
Comment: Trig sub gives expected answer.
Example (Bonus Fun - Coordinate System Conversion)
y
0
=
_
0
e
x
2
dx =
_
0
e
y
2
dy (1.32)
Thus
y
2
0
=
_
0
e
x
2
dx
_
0
e
y
2
dy =
_
0
_
0
e
x
2
e
y
2
dxdy (1.33)
Calculus Review by A. A. Tovar, Ph. D., Created Jan. 2009, not Amended. 7
Using a rectangular to polar conversion yields
y
2
0
=
_
0
/2
_
0
e
r
2
rddr =
2
_
1
2
_
_
0
e
r
2
(2r)dr =
4
(1.34)
or
y
0
=
2
(1.35)
Comment: You can see why erf(x) has the
2
1+(
df
dx
)
2
3/2
d
2
f
dx
2
Average of a function
1
ba
_
b
a
f(x)dx
RMS of a function
_
1
ba
_
b
a
f
2
(x)dx
Center of Mass
_
b
a
xf(x)dx
Variance (Second Central Moment)
_
b
a
(x x)
2
f(x)dx
Skewness (Third Central Moment)
_
b
a
(x x)
3
f(x)dx
Kurtosis (Fourth Central Moment)
_
b
a
(x x)
4
f(x)dx
Function Squared Norm
_
b
a
|f(x)|
2
dx
Fourier Transform
1
2
_
f(t)e
it
dt
Convolution Integral
_
f()g(t )d
Taylor Coecients
1
n!
d
n
f
dx
n
|
x=a
Fourier Sine Series
1
f(t)sin(nt)dt
Fourier Cosine Series
1
f(t)cos(nt)dt
Calculus Review by A. A. Tovar, Ph. D., Created Jan. 2009, not Amended. 9