Docsity

Theoretical Computer Science Cheat Sheet: Identities, Calculus, and Finite Calculus, Cheat Sheet of Computer Science

Toggle sidebar
bg1
Theoretical Computer Science Cheat Sheet
Definitions Series
f(n) = O(g(n)) iff ∃positive c, n0such that
0≤f(n)≤cg(n)∀n≥n0.
n
X
i=1
i=n(n+ 1)
2,
n
X
i=1
i2=n(n+ 1)(2n+ 1)
6,
n
X
i=1
i3=n2(n+ 1)2
4.
In general:
n
X
i=1
im=1
m+ 1(n+ 1)m+1 −1−
n
X
i=1 (i+ 1)m+1 −im+1 −(m+ 1)im
n−1
X
i=1
im=1
m+ 1
m
X
k=0 m+ 1
kBknm+1−k.
Geometric series:
n
X
i=0
ci=cn+1 −1
c−1, c 6= 1,∞
X
i=0
ci=1
1−c,∞
X
i=1
ci=c
1−c,|c|<1,
n
X
i=0
ici=ncn+2 −(n+ 1)cn+1 +c
(c−1)2, c 6= 1,∞
X
i=0
ici=c
(1 −c)2,|c|<1.
Harmonic series:
Hn=
n
X
i=1
1
i,
n
X
i=1
iHi=n(n+ 1)
2Hn−n(n−1)
4.
n
X
i=1
Hi= (n+ 1)Hn−n,
n
X
i=1 i
mHi=n+ 1
m+ 1Hn+1 −1
m+ 1 .
f(n) = Ω(g(n)) iff ∃positive c, n0such that
f(n)≥cg(n)≥0∀n≥n0.
f(n) = Θ(g(n)) iff f(n) = O(g(n)) and
f(n) = Ω(g(n)).
f(n) = o(g(n)) iff limn→∞ f(n)/g(n) = 0.
lim
n→∞ an=aiff ∀ǫ > 0, ∃n0such that
|an−a|< ǫ,∀n≥n0.
sup Sleast b∈Rsuch that b≥s,
∀s∈S.
inf Sgreatest b∈Rsuch that b≤
s,∀s∈S.
lim inf
n→∞ anlim
n→∞ inf{ai|i≥n, i ∈N}.
lim sup
n→∞
anlim
n→∞ sup{ai|i≥n, i ∈N}.
n
kCombinations: Size ksub-
sets of a size nset.
n
kStirling numbers (1st kind):
Arrangements of an nele-
ment set into kcycles.
1. n
k=n!
(n−k)!k!,2.
n
X
k=0 n
k= 2n,3. n
k=n
n−k,
4. n
k=n
kn−1
k−1,5. n
k=n−1
k+n−1
k−1,
6. n
mm
k=n
kn−k
m−k,7.
n
X
k=0 r+k
k=r+n+ 1
n,
8.
n
X
k=0 k
m=n+ 1
m+ 1,9.
n
X
k=0 r
k s
n−k=r+s
n,
10. n
k= (−1)kk−n−1
k,11. n
1=n
n= 1,
12. n
2= 2n−1−1,13. n
k=kn−1
k+n−1
k−1,
n
kStirling numbers (2nd kind):
Partitions of an nelement
set into knon-empty sets.
n
k1st order Eulerian numbers:
Permutations π1π2...πnon
{1,2,...,n}with kascents.
n
k 2nd order Eulerian numbers.
CnCatalan Numbers: Binary
trees with n+ 1 vertices.
14. n
1= (n−1)!,15. n
2= (n−1)!Hn−1,16. n
n= 1,17. n
k≥n
k,
18. n
k= (n−1)n−1
k+n−1
k−1,19. n
n−1=n
n−1=n
2,20.
n
X
k=0 n
k=n!,21. Cn=1
n+ 12n
n,
22. n
0=n
n−1= 1,23. n
k=n
n−1−k,24. n
k= (k+ 1)n−1
k+ (n−k)n−1
k−1,
25. 0
k=n1 if k= 0,
0 otherwise 26. n
1= 2n−n−1,27. n
2= 3n−(n+ 1)2n+n+ 1
2,
28. xn=
n
X
k=0 n
kx+k
n,29. n
m=
m
X
k=0 n+ 1
k(m+ 1 −k)n(−1)k,30. m!n
m=
n
X
k=0 n
k k
n−m,
31. n
m=
n
X
k=0 n
kn−k
m(−1)n−k−mk!,32. n
0= 1,33. n
n= 0 for n6= 0,
34. n
k= (k+ 1)n−1
k+ (2n−1−k)n−1
k−1,35.
n
X
k=0 n
k=(2n)n
2n,
36. x
x−n=
n
X
k=0 n
kx+n−1−k
2n,37. n+ 1
m+ 1 =X
kn
kk
m=
n
X
k=0 k
m(m+ 1)n−k,
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Theoretical Computer Science Cheat Sheet: Identities, Calculus, and Finite Calculus and more Cheat Sheet Computer Science in PDF only on Docsity!

Definitions Series

f (n) = O(g(n)) iff ∃ positive c, n 0 such that

0 ≤ f (n) ≤ cg(n) ∀n ≥ n 0.

n ∑

i=

i =

n(n + 1)

n ∑

i=

i

2

n(n + 1)(2n + 1)

n ∑

i=

i

3

n

2 (n + 1)

2

In general:

n ∑

i=

i

m

m + 1

[

(n + 1)

m+ − 1 −

n ∑

i=

(i + 1)

m+ − i

m+ − (m + 1)i

m

]

n− 1 ∑

i=

i

m

m + 1

m ∑

k=

m + 1

k

Bkn

m+1−k .

Geometric series: n ∑

i=

c

i

c

n+ − 1

c − 1

, c 6 = 1,

∞ ∑

i=

c

i

1 − c

∞ ∑

i=

c

i

c

1 − c

, |c| < 1 ,

n ∑

i=

ic

i

nc

n+ − (n + 1)c

n+

  • c

(c − 1) 2

, c 6 = 1,

∞ ∑

i=

ic

i

c

(1 − c) 2

, |c| < 1.

Harmonic series:

Hn =

n ∑

i=

i

n ∑

i=

iHi =

n(n + 1)

Hn −

n(n − 1)

n ∑

i=

Hi = (n + 1)Hn − n,

n ∑

i=

i

m

Hi =

n + 1

m + 1

Hn+1 −

m + 1

f (n) = Ω(g(n)) iff ∃ positive c, n 0 such that

f (n) ≥ cg(n) ≥ 0 ∀n ≥ n 0.

f (n) = Θ(g(n)) iff f (n) = O(g(n)) and

f (n) = Ω(g(n)).

f (n) = o(g(n)) iff limn→∞ f (n)/g(n) = 0.

lim n→∞

an = a iff ∀ǫ > 0, ∃n 0 such that

|an − a| < ǫ, ∀n ≥ n 0.

sup S least b ∈ R such that b ≥ s,

∀s ∈ S.

inf S greatest b ∈ R such that b ≤

s, ∀s ∈ S.

lim inf n→∞

an lim n→∞

inf{ai | i ≥ n, i ∈ N}.

lim sup n→∞

an lim n→∞

sup{ai | i ≥ n, i ∈ N}.

n k

Combinations: Size k sub-

sets of a size n set. [ n k

]

Stirling numbers (1st kind):

Arrangements of an n ele-

ment set into k cycles.

n

k

n!

(n − k)!k!

n ∑

k=

n

k

n , 3.

n

k

n

n − k

n

k

n

k

n − 1

k − 1

n

k

n − 1

k

n − 1

k − 1

n

m

m

k

n

k

n − k

m − k

n ∑

k=

r + k

k

r + n + 1

n

n ∑

k=

k

m

n + 1

m + 1

n ∑

k=

r

k

s

n − k

r + s

n

n

k

k

k − n − 1

k

n

n

n

n

n− 1 − 1 , 13.

n

k

= k

n − 1

k

n − 1

k − 1

n k

Stirling numbers (2nd kind):

Partitions of an n element

set into k non-empty sets.

〈 n k

1st order Eulerian numbers:

Permutations π 1 π 2... πn on

{ 1 , 2 ,... , n} with k ascents.

〈〈 n k

2nd order Eulerian numbers.

Cn Catalan Numbers: Binary

trees with n + 1 vertices.

[

n

]

= (n − 1)!, 15.

[

n

]

= (n − 1)!Hn− 1 , 16.

[

n

n

]

[

n

k

]

n

k

[

n

k

]

= (n − 1)

[

n − 1

k

]

[

n − 1

k − 1

]

n

n − 1

[

n

n − 1

]

n

n ∑

k=

[

n

k

]

= n!, 21. Cn =

n + 1

2 n

n

n

n

n − 1

n

k

n

n − 1 − k

n

k

= (k + 1)

n − 1

k

  • (n − k)

n − 1

k − 1

k

1 if k = 0,

0 otherwise

n

n − n − 1 , 27.

n

n − (n + 1)

n

n + 1

  1. x

n

n ∑

k=

n

k

x + k

n

n

m

m ∑

k=

n + 1

k

(m + 1 − k)

n (−1)

k , 30. m!

n

m

n ∑

k=

n

k

k

n − m

n

m

n ∑

k=

n

k

n − k

m

n−k−m k!, 32.

n

n

n

= 0 for n 6 = 0,

n

k

= (k + 1)

n − 1

k

  • (2n − 1 − k)

n − 1

k − 1

n ∑

k=

n

k

(2n) n

n

x

x − n

n ∑

k=

n

k

x + n − 1 − k

2 n

n + 1

m + 1

k

n

k

k

m

n ∑

k=

k

m

(m + 1)

n−k ,

Identities Cont. Trees

[

n + 1

m + 1

]

k

[

n

k

](

k

m

n ∑

k=

[

k

m

]

n

n−k = n!

n ∑

k=

k!

[

k

m

]

[

x

x − n

]

n ∑

k=

n

k

x + k

2 n

n

m

k

n

k

k + 1

m + 1

n−k , 41.

[

n

m

]

k

[

n + 1

k + 1

](

k

m

m−k ,

m + n + 1

m

m ∑

k=

k

n + k

k

[

m + n + 1

m

]

m ∑

k=

k(n + k)

[

n + k

k

]

n

m

k

n + 1

k + 1

}[

k

m

]

m−k , 45. (n − m)!

n

m

k

[

n + 1

k + 1

]{

k

m

m−k , for n ≥ m,

n

n − m

k

m − n

m + k

m + n

n + k

)[

m + k

k

]

[

n

n − m

]

k

m − n

m + k

m + n

n + k

m + k

k

n

ℓ + m

ℓ + m

k

k

n − k

m

n

k

[

n

ℓ + m

](

ℓ + m

k

[

k

][

n − k

m

](

n

k

Every tree with n

vertices has n − 1

edges.

Kraft inequal-

ity: If the depths

of the leaves of

a binary tree are

d 1 ,... , dn: n ∑

i=

−di ≤ 1 ,

and equality holds

only if every in-

ternal node has 2

sons.

Recurrences

Master method:

T (n) = aT (n/b) + f (n), a ≥ 1 , b > 1

If ∃ǫ > 0 such that f (n) = O(n

logb a−ǫ )

then

T (n) = Θ(n

logb a ).

If f (n) = Θ(n logb a ) then

T (n) = Θ(n

logb a log 2 n).

If ∃ǫ > 0 such that f (n) = Ω(n logb a+ǫ ),

and ∃c < 1 such that af (n/b) ≤ cf (n)

for large n, then

T (n) = Θ(f (n)).

Substitution (example): Consider the

following recurrence

Ti+1 = 2

2 i · T

2 i

, T 1 = 2.

Note that Ti is always a power of two.

Let ti = log 2 Ti. Then we have

ti+1 = 2

i

  • 2ti, t 1 = 1.

Let ui = ti/ 2 i

. Dividing both sides of

the previous equation by 2 i+ we get

ti+

i+

i

i+

ti

i

Substituting we find

ui+1 =

1 2

  • ui, u 1 =

1 2

which is simply ui = i/2. So we find

that Ti has the closed form Ti = 2

i 2 i− 1 .

Summing factors (example): Consider

the following recurrence

T (n) = 3T (n/2) + n, T (1) = 1.

Rewrite so that all terms involving T

are on the left side

T (n) − 3 T (n/2) = n.

Now expand the recurrence, and choose

a factor which makes the left side “tele-

scope”

T (n) − 3 T (n/2) = n

T (n/2) − 3 T (n/4) = n/ 2

log 2 n− 1

T (2) − 3 T (1) = 2

Let m = log 2 n. Summing the left side

we get T (n) − 3 m T (1) = T (n) − 3 m =

T (n) − n k where k = log 2

Summing the right side we get m− 1 ∑

i=

n

i

i = n

m− 1 ∑

i=

3 2

)i .

Let c =

3 2

. Then we have

n

m− 1 ∑

i=

c

i = n

c

m − 1

c − 1

= 2n(c

log 2 n − 1)

= 2n(c

(k−1) logc n − 1)

= 2n

k − 2 n,

and so T (n) = 3n k − 2 n. Full history re-

currences can often be changed to limited

history ones (example): Consider

Ti = 1 +

i− 1 ∑

j=

Tj , T 0 = 1.

Note that

Ti+1 = 1 +

i ∑

j=

Tj.

Subtracting we find

Ti+1 − Ti = 1 +

i ∑

j=

Tj − 1 −

i− 1 ∑

j=

Tj

= Ti.

And so Ti+1 = 2Ti = 2 i+ .

Generating functions:

  1. Multiply both sides of the equa-

tion by x

i .

  1. Sum both sides over all i for

which the equation is valid.

  1. Choose a generating function

G(x). Usually G(x) =

i= x i gi.

  1. Rewrite the equation in terms of

the generating function G(x).

  1. Solve for G(x).
  2. The coefficient of x i in G(x) is gi.

Example:

gi+1 = 2gi + 1, g 0 = 0.

Multiply and sum: ∑

i≥ 0

gi+1x

i

i≥ 0

2 gix

i

i≥ 0

x

i .

We choose G(x) =

i≥ 0 x

i gi. Rewrite

in terms of G(x):

G(x) − g 0

x

= 2G(x) +

i≥ 0

x

i .

Simplify:

G(x)

x

= 2G(x) +

1 − x

Solve for G(x):

G(x) =

x

(1 − x)(1 − 2 x)

Expand this using partial fractions:

G(x) = x

1 − 2 x

1 − x

= x

i≥ 0

i x

i −

i≥ 0

x

i

i≥ 0

i+ − 1)x

i+ .

So gi = 2 i − 1.

Trigonometry Matrices More Trig.

θ A

c

B

a

b

C

(0,-1)

(0,1)

(-1,0) (1,0)

(cos θ, sin θ)

Pythagorean theorem:

C

2 = A

2

  • B

2 .

Definitions:

sin a = A/C, cos a = B/C,

csc a = C/A, sec a = C/B,

tan a =

sin a

cos a

A

B

, cot a =

cos a

sin a

B

A

Area, radius of inscribed circle:

1 2

AB,

AB

A + B + C

Identities:

sin x =

csc x

, cos x =

sec x

tan x =

cot x

, sin

2 x + cos

2 x = 1,

1 + tan

2 x = sec

2 x, 1 + cot

2 x = csc

2 x,

sin x = cos

π 2

− x

, sin x = sin(π − x),

cos x = − cos(π − x), tan x = cot

π 2

− x

cot x = − cot(π − x), csc x = cot

x 2

− cot x,

sin(x ± y) = sin x cos y ± cos x sin y,

cos(x ± y) = cos x cos y ∓ sin x sin y,

tan(x ± y) =

tan x ± tan y

1 ∓ tan x tan y

cot(x ± y) =

cot x cot y ∓ 1

cot x ± cot y

sin 2x = 2 sin x cos x, sin 2x =

2 tan x

1 + tan

2 x

cos 2x = cos

2 x − sin

2 x, cos 2x = 2 cos

2 x − 1 ,

cos 2x = 1 − 2 sin

2 x, cos 2x =

1 − tan

2 x

1 + tan

2 x

tan 2x =

2 tan x

1 − tan

2 x

, cot 2x =

cot

2 x − 1

2 cot x

sin(x + y) sin(x − y) = sin

2 x − sin

2 y,

cos(x + y) cos(x − y) = cos

2 x − sin

2 y.

Euler’s equation:

e

ix = cos x + i sin x, e

iπ = − 1.

Multiplication:

C = A · B, ci,j =

n ∑

k=

ai,kbk,j.

Determinants: det A 6 = 0 iff A is non-singular.

det A · B = det A · det B,

det A =

π

n ∏

i=

sign(π)ai,π(i).

2 × 2 and 3 × 3 determinant: ∣ ∣ ∣ ∣

a b

c d

= ad − bc,

a b c

d e f

g h i

= g

b c

e f

− h

a c

d f

  • i

a b

d e

aei + bf g + cdh

− ceg − f ha − ibd.

Permanents:

perm A =

π

n ∏

i=

ai,π(i).

h

A

a

c

b

B

C

Law of cosines:

c

2 = a

2 +b

2 − 2 ab cos C.

Area:

A =

1 2

hc,

1 2

ab sin C,

c

2 sin A sin B

2 sin C

Heron’s formula:

A =

s · sa · sb · sc,

s =

1 2 (a + b + c),

sa = s − a,

sb = s − b,

sc = s − c.

More identities:

sin

x 2

1 − cos x

cos

x 2

1 + cos x

tan x 2

1 − cos x

1 + cos x

1 − cos x

sin x

sin x

1 + cos x

cot

x 2

1 + cos x

1 − cos x

1 + cos x

sin x

sin x

1 − cos x

sin x =

e ix − e −ix

2 i

cos x =

e

ix

  • e

−ix

tan x = −i

e

ix − e

−ix

eix^ + e−ix^

= −i

e 2 ix − 1

e 2 ix

  • 1

sin x =

sinh ix

i

cos x = cosh ix,

tan x =

tanh ix

i

Hyperbolic Functions

Definitions:

sinh x =

e x − e −x

, cosh x =

e x

  • e −x

tanh x =

e

x − e

−x

ex^ + e−x^

, csch x =

sinh x

sech x =

cosh x

, coth x =

tanh x

Identities:

cosh

2 x − sinh

2 x = 1, tanh

2 x + sech

2 x = 1,

coth

2 x − csch

2 x = 1, sinh(−x) = − sinh x,

cosh(−x) = cosh x, tanh(−x) = − tanh x,

sinh(x + y) = sinh x cosh y + cosh x sinh y,

cosh(x + y) = cosh x cosh y + sinh x sinh y,

sinh 2x = 2 sinh x cosh x,

cosh 2x = cosh

2 x + sinh

2 x,

cosh x + sinh x = e

x , cosh x − sinh x = e

−x ,

(cosh x + sinh x)

n = cosh nx + sinh nx, n ∈ Z,

2 sinh

2 x 2

= cosh x − 1 , 2 cosh

2 x 2

= cosh x + 1.

θ sin θ cos θ tan θ

π 6

1 2

√ 3 2

√ 3 3

π 4

√ 2 2

√ 2 2

π 3

√ 3 2

1 2

π 2

... in mathematics

you don’t under-

stand things, you

just get used to

them.

v2.02 ©c1994 by Steve Seiden – J. von Neumann

[email protected]

http://www.csc.lsu.edu/~seiden

Number Theory Graph Theory

The Chinese remainder theorem: There ex-

ists a number C such that:

C ≡ r 1 mod m 1

C ≡ rn mod mn

if mi and mj are relatively prime for i 6 = j.

Euler’s function: φ(x) is the number of

positive integers less than x relatively

prime to x. If

∏n

i= p

ei i is the prime fac-

torization of x then

φ(x) =

n ∏

i=

p

ei− 1 i (pi^ −^ 1).

Euler’s theorem: If a and b are relatively

prime then

1 ≡ a

φ(b) mod b.

Fermat’s theorem:

1 ≡ a

p− 1 mod p.

The Euclidean algorithm: if a > b are in-

tegers then

gcd(a, b) = gcd(a mod b, b).

If

n i= p

ei i is the prime factorization of x

then

S(x) =

d|x

d =

n ∏

i=

p

ei + i

pi − 1

Perfect Numbers: x is an even perfect num-

ber iff x = 2 n− 1 ( n −1) and 2 n −1 is prime.

Wilson’s theorem: n is a prime iff

(n − 1)! ≡ −1 mod n.

M¨obius inversion:

μ(i) =

1 if i = 1.

0 if i is not square-free.

(−1)

r if i is the product of

r distinct primes.

If

G(a) =

d|a

F (d),

then

F (a) =

d|a

μ(d)G

a

d

Prime numbers:

pn = n ln n + n ln ln n − n + n

ln ln n

ln n

+ O

n

ln n

π(n) =

n

ln n

n

(ln n)^2

2!n

(ln n)^3

+ O

n

(ln n) 4

Definitions:

Loop An edge connecting a ver-

tex to itself.

Directed Each edge has a direction.

Simple Graph with no loops or

multi-edges.

Walk A sequence v 0 e 1 v 1... eℓvℓ.

Trail A walk with distinct edges.

Path A trail with distinct

vertices.

Connected A graph where there exists

a path between any two

vertices.

Component A maximal connected

subgraph.

Tree A connected acyclic graph.

Free tree A tree with no root.

DAG Directed acyclic graph.

Eulerian Graph with a trail visiting

each edge exactly once.

Hamiltonian Graph with a cycle visiting

each vertex exactly once.

Cut A set of edges whose re-

moval increases the num-

ber of components.

Cut-set A minimal cut.

Cut edge A size 1 cut.

k-Connected A graph connected with

the removal of any k − 1

vertices.

k-Tough ∀S ⊆ V, S 6 = ∅ we have

k · c(G − S) ≤ |S|.

k-Regular A graph where all vertices

have degree k.

k-Factor A k-regular spanning

subgraph.

Matching A set of edges, no two of

which are adjacent.

Clique A set of vertices, all of

which are adjacent.

Ind. set A set of vertices, none of

which are adjacent.

Vertex cover A set of vertices which

cover all edges.

Planar graph A graph which can be em-

beded in the plane.

Plane graph An embedding of a planar

graph.

∑

v∈V

deg(v) = 2m.

If G is planar then n − m + f = 2, so

f ≤ 2 n − 4 , m ≤ 3 n − 6.

Any planar graph has a vertex with de-

gree ≤ 5.

Notation:

E(G) Edge set

V (G) Vertex set

c(G) Number of components

G[S] Induced subgraph

deg(v) Degree of v

∆(G) Maximum degree

δ(G) Minimum degree

χ(G) Chromatic number

χE (G) Edge chromatic number

G

c Complement graph

Kn Complete graph

Kn 1 ,n 2 Complete bipartite graph

r(k, ℓ) Ramsey number

Geometry

Projective coordinates: triples

(x, y, z), not all x, y and z zero.

(x, y, z) = (cx, cy, cz) ∀c 6 = 0.

Cartesian Projective

(x, y) (x, y, 1)

y = mx + b (m, − 1 , b)

x = c (1, 0 , −c)

Distance formula, Lp and L∞

metric: √ (x 1 − x 0 ) 2

  • (y 1 − y 0 ) 2 ,

[ |x 1 − x 0 |

p

  • |y 1 − y 0 |

p

] 1 /p ,

lim p→∞

[

|x 1 − x 0 |

p

  • |y 1 − y 0 |

p

] 1 /p .

Area of triangle (x 0 , y 0 ), (x 1 , y 1 )

and (x 2 , y 2 ):

1 2

abs

x 1 − x 0 y 1 − y 0

x 2 − x 0 y 2 − y 0

Angle formed by three points:

θ

(x 1 , y 1 )

(x 2 , y 2 )

cos θ =

(x 1 , y 1 ) · (x 2 , y 2 )

Line through two points (x 0 , y 0 )

and (x 1 , y 1 ): ∣ ∣ ∣ ∣ ∣ ∣ x y 1

x 0 y 0 1

x 1 y 1 1

Area of circle, volume of sphere:

A = πr

2 , V =

4 3 πr

3 .

If I have seen farther than others,

it is because I have stood on the

shoulders of giants.

  • Issac Newton

Calculus Cont.

arccos

x a

dx = arccos

x a

a 2 − x 2 , a > 0 , 16.

arctan

x a

dx = x arctan

x a

a 2

ln(a

2

  • x

2 ), a > 0 ,

sin

2 (ax)dx =

1 2 a

ax − sin(ax) cos(ax)

cos

2 (ax)dx =

1 2 a

ax + sin(ax) cos(ax)

sec

2 x dx = tan x, 20.

csc

2 x dx = − cot x,

sin

n x dx = −

sin

n− 1 x cos x

n

n − 1

n

sin

n− 2 x dx, 22.

cos

n x dx =

cos n− 1 x sin x

n

n − 1

n

cos

n− 2 x dx,

tan

n x dx =

tan

n− 1 x

n − 1

tan

n− 2 x dx, n 6 = 1, 24.

cot

n x dx = −

cot

n− 1 x

n − 1

cot

n− 2 x dx, n 6 = 1,

sec

n x dx =

tan x sec

n− 1 x

n − 1

n − 2

n − 1

sec

n− 2 x dx, n 6 = 1,

csc

n x dx = −

cot x csc

n− 1 x

n − 1

n − 2

n − 1

csc

n− 2 x dx, n 6 = 1, 27.

sinh x dx = cosh x, 28.

cosh x dx = sinh x,

tanh x dx = ln | cosh x|, 30.

coth x dx = ln | sinh x|, 31.

sech x dx = arctan sinh x, 32.

csch x dx = ln

∣tanh x 2

sinh

2 x dx =

1 4

sinh(2x) −

1 2

x, 34.

cosh

2 x dx =

1 4

sinh(2x) +

1 2

x, 35.

sech

2 x dx = tanh x,

arcsinh

x a

dx = x arcsinh

x a

x 2

  • a 2 , a > 0 , 37.

arctanh

x a

dx = x arctanh

x a

a 2

ln |a

2 − x

2 |,

arccosh

x a

dx =

x arccosh

x

a

x 2

  • a 2 , if arccosh

x a > 0 and a > 0,

x arccosh

x

a

x 2

  • a 2 , if arccosh

x a < 0 and a > 0,

dx √ a 2

  • x 2

= ln

x +

a 2

  • x 2

, a > 0 ,

dx

a 2

  • x 2

1 a

arctan

x a

, a > 0 , 41.

a 2 − x 2 dx =

x 2

a 2 − x 2

a 2

2

arcsin

x a

, a > 0 ,

(a

2 − x

2 )

3 / 2 dx =

x 8 (5a

2 − 2 x

2 )

a 2 − x 2

3 a 4

8 arcsin

x a , a > 0 ,

dx √ a 2 − x 2

= arcsin

x a , a > 0 , 44.

dx

a 2 − x 2

2 a

ln

a + x

a − x

dx

(a 2 − x 2 ) 3 / 2

x

a 2

a 2 − x 2

a 2 ± x 2 dx =

x 2

a 2 ± x 2 ±

a 2

2 ln

∣x +

a 2 ± x 2

dx √ x 2 − a 2

= ln

∣x +

x 2 − a 2

∣ , a > 0 ,

dx

ax^2 + bx

a

ln

x

a + bx

x

a + bx dx =

2(3bx − 2 a)(a + bx)

3 / 2

15 b^2

a + bx

x

dx = 2

a + bx + a

x

a + bx

dx, 51.

x √ a + bx

dx =

ln

a + bx −

a √ a + bx +

a

, a > 0 ,

a 2 − x 2

x

dx =

a^2 − x^2 − a ln

a +

a 2 − x 2

x

x

a^2 − x^2 dx = −

1 3

(a

2 − x

2 )

3 / 2 ,

x

2

a 2 − x 2 dx =

x 8

(2x

2 − a

2 )

a 2 − x 2

a 4

8

arcsin

x a

, a > 0 , 55.

dx √ a 2 − x 2

1 a

ln

a +

a 2 − x 2

x

x dx √ a 2 − x 2

a 2 − x 2 , 57.

x 2 dx √ a 2 − x 2

x 2

a 2 − x 2

a 2

2

arcsin

x a,

a > 0 ,

a 2

  • x 2

x

dx =

a 2

  • x 2 − a ln

a +

a 2

  • x 2

x

x 2 − a 2

x

dx =

x 2 − a 2 − a arccos

a |x| , a > 0 ,

x

x 2 ± a 2 dx =

1 3 (x

2 ± a

2 )

3 / 2 , 61.

dx

x

x 2

  • a 2

1 a ln

x

a +

a 2

  • x 2

Calculus Cont. Finite Calculus

dx

x

x 2 − a 2

1 a

arccos

a |x|

, a > 0 , 63.

dx

x 2

x 2 ± a 2

x^2 ± a^2

a 2 x

x dx √ x 2 ± a 2

x 2 ± a 2 , 65.

x 2 ± a 2

x 4

dx = ∓

(x 2

  • a 2 ) 3 / 2

3 a 2 x 3

dx

ax 2

  • bx + c

b 2 − 4 ac

ln

2 ax + b −

b 2 − 4 ac

2 ax + b +

b 2 − 4 ac

, if b

2 > 4 ac,

4 ac − b 2

arctan

2 ax + b √ 4 ac − b 2

, if b

2 < 4 ac,

dx √ ax 2

  • bx + c

a

ln

∣^2 ax^ +^ b^ + 2

a

ax 2

  • bx + c

∣ ,^ if^ a >^ 0,

−a

arcsin

− 2 ax − b √ b 2 − 4 ac

, if a < 0,

ax 2

  • bx + c dx =

2 ax + b

4 a

ax 2

  • bx + c +

4 ax − b 2

8 a

dx √ ax 2

  • bx + c

x dx √ ax 2

  • bx + c

ax 2

  • bx + c

a

b

2 a

dx √ ax 2

  • bx + c

dx

x

ax 2

  • bx + c

c

ln

c

ax 2

  • bx + c + bx + 2c

x

, if c > 0,

−c

arcsin

bx + 2c

|x|

b 2 − 4 ac

, if c < 0,

x

3

x 2

  • a 2 dx = (

1 3 x

2 −

2 15 a

2 )(x

2

  • a

2 )

3 / 2 ,

x

n sin(ax) dx = −

1 a x

n cos(ax) +

n a

x

n− 1 cos(ax) dx,

x

n cos(ax) dx =

1 a x

n sin(ax) −

n a

x

n− 1 sin(ax) dx,

x

n e

ax dx =

x

n e

ax

a

n a

x

n− 1 e

ax dx,

x

n ln(ax) dx = x

n+

ln(ax)

n + 1

(n + 1) 2

x

n (ln ax)

m dx =

x

n+

n + 1

(ln ax)

m −

m

n + 1

x

n (ln ax)

m− 1 dx.

Difference, shift operators:

∆f (x) = f (x + 1) − f (x),

E f (x) = f (x + 1).

Fundamental Theorem:

f (x) = ∆F (x) ⇔

f (x)δx = F (x) + C.

b ∑

a

f (x)δx =

b− 1 ∑

i=a

f (i).

Differences:

∆(cu) = c∆u, ∆(u + v) = ∆u + ∆v,

∆(uv) = u∆v + E v∆u,

∆(x

n ) = nx

n− 1 ,

∆(Hx) = x

− 1 , ∆(

x ) = 2

x ,

∆(c

x ) = (c − 1)c

x , ∆

x m

x m− 1

Sums: ∑ cu δx = c

u δx,

∑ (u + v) δx =

u δx +

v δx,

∑ u∆v δx = uv −

E v∆u δx,

∑ x

n δx =

x

n+

m+

x

− 1 δx = Hx,

∑ c

x δx =

c x

c− 1

∑ (^

x m

δx =

x m+

Falling Factorial Powers:

x

n = x(x − 1) · · · (x − n + 1), n > 0 ,

x

0 = 1,

x

n

(x + 1) · · · (x + |n|)

, n < 0 ,

x

n+m = x

m (x − m)

n .

Rising Factorial Powers:

x

n = x(x + 1) · · · (x + n − 1), n > 0 ,

x

0 = 1,

x

n

(x − 1) · · · (x − |n|)

, n < 0 ,

x

n+m = x

m (x + m)

n .

Conversion:

x

n = (−1)

n (−x)

n = (x − n + 1)

n

= 1/(x + 1)

−n ,

x

n = (−1)

n (−x)

n = (x + n − 1)

n

= 1/(x − 1)

−n ,

x

n

n ∑

k=

n

k

x

k

n ∑

k=

n

k

n−k x

k ,

x

n

n ∑

k=

[

n

k

]

n−k x

k ,

x

n

n ∑

k=

[

n

k

]

x

k .

x

1 = x

1 = x

1

x

2 = x

2

  • x

1 = x

2 − x

1

x

3 = x

3

  • 3x

2

  • x

1 = x

3 − 3 x

2

  • x

1

x

4 = x

4

  • 6x

3

  • 7x

2

  • x

1 = x

4 − 6 x

3

  • 7x

2 − x

1

x

5 = x

5

  • 15x

4

  • 25x

3

  • 10x

2

  • x

1 = x

5 − 15 x

4

  • 25x

3 − 10 x

2

  • x

1

x

1 = x

1 x

1 = x

1

x 2 = x 2

  • x 1 x 2 = x 2 − x 1

x 3 = x 3

  • 3x 2
  • 2x 1 x 3 = x 3 − 3 x 2
  • 2x 1

x 4 = x 4

  • 6x 3
  • 11x 2
  • 6x 1 x 4 = x 4 − 6 x 3
  • 11x 2 − 6 x 1

x 5 = x 5

  • 10x 4
  • 35x 3
  • 50x 2
  • 24x 1 x 5 = x 5 − 10 x 4
  • 35x 3 − 50 x 2
  • 24x 1

Series Escher’s Knot

Expansions:

(1 − x) n+

ln

1 − x

∞ ∑

i=

(Hn+i − Hn)

n + i

i

x

i ,

x

)−n

∞ ∑

i=

i

n

x

i ,

x

n

∞ ∑

i=

[

n

i

]

x

i , (e

x − 1)

n

∞ ∑

i=

i

n

n!x

i

i!

ln

1 − x

)n

∞ ∑

i=

[

i

n

]

n!x i

i!

, x cot x =

∞ ∑

i=

i B 2 ix 2 i

(2i)!

tan x =

∞ ∑

i=

i− 1

2 i ( 2 i − 1)B 2 ix 2 i− 1

(2i)!

, ζ(x) =

∞ ∑

i=

i x

ζ(x)

∞ ∑

i=

μ(i)

i x

ζ(x − 1)

ζ(x)

∞ ∑

i=

φ(i)

i x

ζ(x) = (^) Stieltjes Integration

p

1 − p −x

ζ

2 (x) =

∞ ∑

i=

d(i)

x i

where d(n) =

d|n

ζ(x)ζ(x − 1) =

∞ ∑

i=

S(i)

x i

where S(n) =

d|n d,

ζ(2n) =

2 n− 1 |B 2 n|

(2n)!

π

2 n , n ∈ N,

x

sin x

∞ ∑

i=

i− 1

i − 2)B 2 ix

2 i

(2i)!

1 − 4 x

2 x

)n

∞ ∑

i=

n(2i + n − 1)!

i!(n + i)!

x

i ,

e

x sin x =

∞ ∑

i=

i/ 2 sin

iπ 4

i!

x

i ,

1 − x

x

∞ ∑

i=

(4i)!

i

2(2i)!(2i + 1)!

x

i ,

arcsin x

x

2

=

∞ ∑

i=

i i!

2

(i + 1)(2i + 1)!

x

2 i .

If G is continuous in the interval [a, b] and F is nondecreasing then ∫ (^) b

a

G(x) dF (x)

exists. If a ≤ b ≤ c then ∫ (^) c

a

G(x) dF (x) =

∫ (^) b

a

G(x) dF (x) +

∫ (^) c

b

G(x) dF (x).

If the integrals involved exist ∫ (^) b

a

G(x) + H(x)

dF (x) =

∫ (^) b

a

G(x) dF (x) +

∫ (^) b

a

H(x) dF (x),

∫ (^) b

a

G(x) d

F (x) + H(x)

∫ (^) b

a

G(x) dF (x) +

∫ (^) b

a

G(x) dH(x),

∫ (^) b

a

c · G(x) dF (x) =

∫ (^) b

a

G(x) d

c · F (x)

= c

∫ (^) b

a

G(x) dF (x),

∫ (^) b

a

G(x) dF (x) = G(b)F (b) − G(a)F (a) −

∫ (^) b

a

F (x) dG(x).

If the integrals involved exist, and F possesses a derivative F

′ at every

point in [a, b] then ∫ (^) b

a

G(x) dF (x) =

∫ (^) b

a

G(x)F

′ (x) dx.

Cramer’s Rule 00 47 18 76 29 93 85 34 61 52

86 11 57 28 70 39 94 45 02 63

95 80 22 67 38 71 49 56 13 04

59 96 81 33 07 48 72 60 24 15

73 69 90 82 44 17 58 01 35 26

68 74 09 91 83 55 27 12 46 30

37 08 75 19 92 84 66 23 50 41

14 25 36 40 51 62 03 77 88 99

21 32 43 54 65 06 10 89 97 78

42 53 64 05 16 20 31 98 79 87

Fibonacci Numbers

If we have equations:

a 1 , 1 x 1 + a 1 , 2 x 2 + · · · + a 1 ,nxn = b 1

a 2 , 1 x 1 + a 2 , 2 x 2 + · · · + a 2 ,nxn = b 2

an, 1 x 1 + an, 2 x 2 + · · · + an,nxn = bn

Let A = (ai,j ) and B be the column matrix (bi). Then

there is a unique solution iff det A 6 = 0. Let Ai be A

with column i replaced by B. Then

xi =

det Ai

det A

Definitions:

Fi = Fi− 1 +Fi− 2 , F 0 = F 1 = 1,

F−i = (−1)

i− 1 Fi,

Fi =

1 √ 5

φ

i −

φ

i

Cassini’s identity: for i > 0:

Fi+1Fi− 1 − F

2 i

i .

Additive rule:

Fn+k = FkFn+1 + Fk− 1 Fn,

F 2 n = FnFn+1 + Fn− 1 Fn.

Calculation by matrices: ( Fn− 2 Fn− 1

Fn− 1 Fn

)n

The Fibonacci number system:

Every integer n has a unique

representation

n = Fk 1

  • Fk 2
  • · · · + Fk m

where ki ≥ ki+1 + 2 for all i,

1 ≤ i < m and km ≥ 2.

Improvement makes strait roads, but the crooked

roads without Improvement, are roads of Genius.

  • William Blake (The Marriage of Heaven and Hell)