# All Engineering Mathmatics formula

Document Sample

Theoretical Computer Science Cheat Sheet Deﬁnitions f (n) = O(g(n)) f (n) = Ω(g(n)) f (n) = Θ(g(n)) f (n) = o(g(n))
n→∞

Series
n

iﬀ ∃ positive c, n0 such that 0 ≤ f (n) ≤ cg(n) ∀n ≥ n0 . iﬀ ∃ positive c, n0 such that f (n) ≥ cg(n) ≥ 0 ∀n ≥ n0 . iﬀ f (n) = O(g(n)) and f (n) = Ω(g(n)). iﬀ limn→∞ f (n)/g(n) = 0. iﬀ ∀ > 0, ∃n0 such that |an − a| < , ∀n ≥ n0 . least b ∈ R such that b ≥ s, ∀s ∈ S. greatest b ∈ R such that b ≤ s, ∀s ∈ S.
n→∞ n→∞

i=
i=1 n

n(n + 1) , 2

n i=1

i2 =

n(n + 1)(2n + 1) , 6
n

n i=1

i3 =

n2 (n + 1)2 . 4

In general: im =
i=1 n−1

1 (i + 1)m+1 − im+1 − (m + 1)im (n + 1)m+1 − 1 − m+1 i=1 1 m+1
m k=0

im =
i=1

m+1 Bk nm+1−k . k
∞

lim an = a sup S inf S lim inf an
n→∞

Geometric series: n cn+1 − 1 , ci = c−1 i=0
n

c = 1,
i=0

ci =

1 , 1−c

∞

ci =
i=1 ∞

c , 1−c c , (1 − c)2

|c| < 1, |c| < 1.

ici =
i=0

ncn+2 − (n + 1)cn+1 + c , (c − 1)2
n

c = 1,
i=0

ici =

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

Harmonic series: Hn =
i=1 n

lim sup an
n→∞ n k n k

1 , i

n

iHi =
i=1 n i=1

n(n + 1) n(n − 1) Hn − . 2 4 n+1 m+1 3. = Hn+1 − n k = 1 m+1 .

Combinations: Size k subsets of a size n set. Stirling numbers (1st kind): Arrangements of an n element set into k cycles. Stirling numbers (2nd kind): Partitions of an n element set into k non-empty sets. 1st order Eulerian numbers: Permutations π1 π2 . . . πn on {1, 2, . . . , n} with k ascents. 2nd order Eulerian numbers. Catalan Numbers: Binary trees with n + 1 vertices.

Hi = (n + 1)Hn − n,
i=1

i Hi = m
n

1. 4. 6. 8.

n k n k n m
n k=0

=

n! , (n − k)!k!

2.
k=0

n k

= 2n , 5. n k
n

n , n−k

n k

n n−1 , = k k−1 m k k m = = n k

n−1 n−1 + , k k−1 = r+n+1 , n = = + r+s , n n n = 1,

n k

n−k , m−k

7.
k=0 n

r+k k r k 11.

n+1 , m+1
k

9.
k=0

s n−k n 1

n k

10. 12.

n k n 2

= (−1)

k−n−1 , k 13.

14. 18. 22. 25. 28. 31. 34. 36.

n−1 , k−1 n n n n n = (n − 1)!, 15. = (n − 1)!Hn−1 , 16. = 1, 17. ≥ , 1 2 n k k n 2n n 1 n n−1 n−1 n n n , = n!, 21. Cn = = (n − 1) + , 19. = = , 20. n+1 n k k k k−1 n−1 n−1 2 k=0 n n n n n n−1 n−1 = = 1, 23. = , 24. = (k + 1) + (n − k) , 0 n−1 k n−1−k k k k−1 n n+1 0 n 1 if k = 0, 27. = 3n − (n + 1)2n + , = 26. = 2n − n − 1, 2 2 k 1 0 otherwise n m n n n x+k n n+1 n k 30. m! = , 29. = (m + 1 − k)n (−1)k , , xn = m k n m k k n−m = 2n−1 − 1, n k =k
k=0

Cn

n−1 k

n m n k

n k=0

=

n k

n−k (−1)n−k−m k!, m n−1 k n k + (2n − 1 − k)

k=0

k=0

32. n−1 k−1 ,

n 0

= 1,

33. 35.

n n
n k=0 n

=0 n k

for n = 0, = (2n)n , 2n

= (k + 1)
n

x x−n

=
k=0

x+n−1−k , 2n

37.

n+1 m+1

=
k

n k

k m

=
k=0

k (m + 1)n−k , m

Theoretical Computer Science Cheat Sheet Identities Cont. 38. 40. 42. 44. 46. 48. n+1 = m+1 n m =
k

Trees 39. 41. 43. x = x−n
n k=0

k

n k n k =
k=0

k m

n

=
k=0

k n−k = n! n m

n k=0

1 k , k! m

n k

x+k , 2n

k+1 (−1)n−k , m+1
m

n = m

k

n+1 k+1
m

k (−1)m−k , m n+k , k

m+n+1 m n m =
k

n+k k , k k (−1)m−k , m m+n n+k k
k

m+n+1 = m n+1 k+1

k(n + k)
k=0

n+1 k+1 =
k

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

=
k

k (−1)m−k , m m−n m+k m+n n+k k
k

for n ≥ m, m+k , k n−k m n . k

Every tree with n vertices has n − 1 edges. Kraft inequality: If the depths of the leaves of a binary tree are d1 , . . . , dn :
n

n n−m n +m

m−n m+k =

2−di ≤ 1,

n = n−m n +m

i=1

+m

n−k m

k

49.

+m

=

and equality holds only if every internal node has 2 sons.

Recurrences Master method: T (n) = aT (n/b) + f (n), a ≥ 1, b > 1 1 T (n) − 3T (n/2) = n 3 T (n/2) − 3T (n/4) = n/2 . . . . . . . . . 3log2 n−1 T (2) − 3T (1) = 2 Let m = log2 n. Summing the left side we get T (n) − 3m T (1) = T (n) − 3m = T (n) − nk where k = log2 3 ≈ 1.58496. Summing the right side we get m−1 m−1 n i 3 i 3 =n . 2 2i i=0 i=0 Let c = 3 . Then we have 2
m−1

If ∃ > 0 such that f (n) = O(nlogb a− ) then T (n) = Θ(nlogb a ). If f (n) = Θ(nlogb a ) then T (n) = Θ(nlogb a log2 n). If ∃ > 0 such that f (n) = Ω(nlogb 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 i Ti+1 = 22 · Ti2 , T1 = 2. Note that Ti is always a power of two. Let ti = log2 Ti . Then we have ti+1 = 2i + 2ti , t1 = 1. Let ui = ti /2i . Dividing both sides of the previous equation by 2i+1 we get 2i ti ti+1 = i+1 + i . i+1 2 2 2 Substituting we ﬁnd u1 = 1 , ui+1 = 1 + ui , 2 2 which is simply ui = i/2. So we ﬁnd i−1 that Ti has the closed form Ti = 2i2 . 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) − 3T (n/2) = n. Now expand the recurrence, and choose a factor which makes the left side “telescope”

Generating functions: 1. Multiply both sides of the equation by xi . 2. Sum both sides over all i for which the equation is valid. 3. Choose a generating function ∞ G(x). Usually G(x) = i=0 xi gi . 3. Rewrite the equation in terms of the generating function G(x). 4. Solve for G(x). 5. The coeﬃcient of xi in G(x) is gi . Example: gi+1 = 2gi + 1, g0 = 0. Multiply and sum: gi+1 xi = 2gi xi +
i≥0 i≥0 i≥0

n
i=0

c =n

i

c −1 c−1
m

xi .

= 2n(clog2 n − 1) = 2n(c(k−1) logc n − 1) = 2nk − 2n, and so T (n) = 3n − 2n. Full history recurrences can often be changed to limited history ones (example): Consider
k i−1

We choose G(x) = i≥0 xi gi . Rewrite in terms of G(x): G(x) − g0 = 2G(x) + xi . x
i≥0

Simplify: 1 G(x) = 2G(x) + . x 1−x Solve for G(x): x . G(x) = (1 − x)(1 − 2x) Expand this using partial fractions: 1 2 − G(x) = x 1 − 2x 1 − x  

Ti = 1 +
j=0

Tj ,

T0 = 1.

Note that Ti+1 = 1 +

i

Tj .
j=0

Subtracting we ﬁnd
i i−1

= x 2 Tj
i≥0

2i xi −
i≥0 i+1

xi  .

Ti+1 − Ti = 1 +
j=0

Tj − 1 −
j=0

=
i≥0

(2

− 1)x

i+1

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

So gi = 2i − 1.

Theoretical Computer Science Cheat Sheet π ≈ 3.14159, i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2i 2 4 8 16 32 64 128 256 512 1,024 2,048 4,096 8,192 16,384 32,768 65,536 131,072 262,144 524,288 1,048,576 2,097,152 4,194,304 8,388,608 16,777,216 33,554,432 67,108,864 134,217,728 268,435,456 536,870,912 1,073,741,824 2,147,483,648 4,294,967,296 Pascal’s Triangle 1 11 121 1331 14641 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 1 9 36 84 126 126 84 36 9 1 1 10 45 120 210 252 210 120 45 10 1 e ≈ 2.71828, pi 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 γ ≈ 0.57721, General Bernoulli Numbers (Bi = 0, odd i = 1): B2 = B4 = B0 = 1, B1 = 1 1 5 B6 = 42 , B8 = − 30 , B10 = 66 . Change of base, quadratic formula: √ −b ± b2 − 4ac loga x , . logb x = loga b 2a Euler’s number e: e=1+
1 1 + 24 + 120 + · · · x n = ex . lim 1 + n→∞ n 1 n 1 n+1 . 1+ n <e< 1+ n 1 2 1 −2, 1 6, 1 − 30 ,

φ=

√ 1+ 5 2

≈ 1.61803,

ˆ φ=

√ 1− 5 2

≈ −.61803

Probability Continuous distributions: If
b

Pr[a < X < b] =
a

p(x) dx,

+

1 6

then p is the probability density function of X. If Pr[X < a] = P (a), then P is the distribution function of X. If P and p both exist then
a

P (a) =
−∞

p(x) dx.

Expectation: If X is discrete E[g(X)] =
x

g(x) Pr[X = x].
∞

1 11e e + =e− −O 1+ . 2 2n 24n n3 Harmonic numbers: 1, 3 , 11 , 25 , 137 , 49 , 363 , 761 , 7129 , . . . 2 6 12 60 20 140 280 2520
1 n n

If X continuous then
∞

E[g(X)] =

g(x)p(x) dx =
−∞

g(x) dP (x).
−∞

ln n < Hn < ln n + 1, 1 Hn = ln n + γ + O . n Factorial, Stirling’s approximation:
1, 2, 6, 24, 120, 720, 5040, 40320, 362880,

Variance, standard deviation: VAR[X] = E[X 2 ] − E[X]2 , σ = VAR[X]. For events A and B: Pr[A ∨ B] = Pr[A] + Pr[B] − Pr[A ∧ B] Pr[A ∧ B] = Pr[A] · Pr[B], iﬀ A and B are independent. Pr[A ∧ B] Pr[A|B] = Pr[B] For random variables X and Y : E[X · Y ] = E[X] · E[Y ], if X and Y are independent. E[X + Y ] = E[X] + E[Y ], E[cX] = c E[X]. Bayes’ theorem: Pr[B|Ai ] Pr[Ai ] . Pr[Ai |B] = n j=1 Pr[Aj ] Pr[B|Aj ] Inclusion-exclusion:
n n

...

n 1 . 1+Θ e n Ackermann’s function and inverse:  i=1  2j a(i, j) = a(i − 1, 2) j=1  a(i − 1, a(i, j − 1)) i, j ≥ 2 n! = 2πn α(i) = min{j | a(j, j) ≥ i}. Binomial distribution: n k n−k , Pr[X = k] = p q k
n

√

n

q = 1 − p,

E[X] =
k=1

k

n k n−k p q = np. k

Poisson distribution: e−λ λk , E[X] = λ. Pr[X = k] = k! Normal (Gaussian) distribution: 2 2 1 e−(x−µ) /2σ , E[X] = µ. p(x) = √ 2πσ The “coupon collector”: We are given a random coupon each day, and there are n diﬀerent types of coupons. The distribution of coupons is uniform. The expected number of days to pass before we to collect all n types is nHn .

Pr
i=1

Xi =
i=1 n

Pr[Xi ] +
k

(−1)k+1
k=2 ii <···<ik

Pr
j=1

Xij .

Moment inequalities: Pr |X| ≥ λ E[X] ≤ 1 , λ 1 . λ2

Pr X − E[X] ≥ λ · σ ≤ Geometric distribution: Pr[X = k] = pq k−1 ,
∞

q = 1 − p, 1 . p

E[X] =
k=1

kpq k−1 =

Theoretical Computer Science Cheat Sheet Trigonometry Multiplication:
(0,1)
n

Matrices

More Trig. C

b A c C
(-1,0) (0,-1)

C = A · B, (cos θ, sin θ)
(1,0)

ci,j =
k=1

ai,k bk,j .

b

h

a B

θ

a B Pythagorean theorem: C 2 = A2 + B 2 . Deﬁnitions: sin a = A/C, csc a = C/A, A sin a = , tan a = cos a B Area, radius of inscribed
1 2 AB,

Determinants: det A = 0 iﬀ A is non-singular. det A · B = det A · det B,
n

A c Law of cosines:

det A =
π i=1

sign(π)ai,π(i) .

c2 = a2 +b2 −2ab cos C. Area: A = 1 hc, 2

cos a = B/C, sec a = C/B, cos a B cot a = = . sin a A circle: AB . A+B+C cos x = 1 , sec x

2 × 2 and 3 × 3 determinant: a b = ad − bc, c d a b d e g h c b f =g e i = Permanents:
n

= 1 ab sin C, 2 =

c a c a b −h +i f d f d e aei + bf g + cdh − ceg − f ha − ibd. ai,π(i) .
π i=1

c2 sin A sin B . 2 sin C Heron’s formula: √ A = s · sa · sb · sc , s = 1 (a + b + c), 2 sa = s − a, sb = s − b, sc = s − c.

Identities: 1 , sin x = csc x 1 , tan x = cot x 1 + tan2 x = sec2 x, sin x = cos
π 2

perm A =

Hyperbolic Functions Deﬁnitions: ex − e−x , sinh x = 2 x −x e −e tanh x = x , e + e−x 1 , sech x = cosh x Identities: cosh2 x − sinh2 x = 1, coth2 x − csch2 x = 1, cosh(−x) = cosh x, tanh2 x + sech2 x = 1, sinh(−x) = − sinh x, tanh(−x) = − tanh x, e +e , 2 1 , csch x = sinh x 1 coth x = . tanh x cosh x =
x −x

sin2 x + cos2 x = 1, 1 + cot2 x = csc2 x, sin x = sin(π − x), tan x = cot
π 2

−x ,

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

−x ,

csc x = cot x − cot x, 2

sin(x ± y) = sin x cos y ± cos x sin y, cos(x ± y) = cos x cos y tan(x ± y) = sin x sin y, tan x ± tan y , 1 tan x tan y cot x cot y 1 , cot(x ± y) = cot x ± cot y

sinh(x + y) = sinh x cosh y + cosh x sinh y, cosh(x + y) = cosh x cosh y + sinh x sinh y, sin 2x = sinh 2x = 2 sinh x cosh x, cosh 2x = cosh2 x + sinh2 x, cosh x + sinh x = ex , cosh x − sinh x = e−x , n ∈ Z,

sin 2x = 2 sin x cos x, cos 2x = cos2 x − sin2 x, cos 2x = 1 − 2 sin2 x,

2 tan x , 1 + tan2 x cos 2x = 2 cos2 x − 1, cos 2x = 1 − tan2 x , 1 + tan2 x

cot2 x − 1 2 tan x , cot 2x = tan 2x = 2 , 2 cot x 1 − tan x sin(x + y) sin(x − y) = sin2 x − sin2 y, cos(x + y) cos(x − y) = cos2 x − sin2 y. Euler’s equation: eix = cos x + i sin x, e
iπ

(cosh x + sinh x)n = cosh nx + sinh nx, 2 sinh2 x 2 θ 0
π 6 π 4 π 3 π 2

= cosh x − 1, cos θ
√

2 cosh2 x 2

= cosh x + 1.

sin θ 0
1 2 √ 2 2 √ 3 2

tan θ
√

1

0
3 3

= −1.

v2.02 c 1994 by Steve Seiden sseiden@acm.org http://www.csc.lsu.edu/~seiden

3 2 √ 2 2 1 2

1

0

1 √ 3 ∞

. . . in mathematics you don’t understand things, you just get used to them. – J. von Neumann

More identities: 1 − cos x , sin x = 2 2 1 + cos x , cos x = 2 2 1 − cos x , tan x = 2 1 + cos x 1 − cos x , = sin x sin x , = 1 + cos x 1 + cos x , cot x = 2 1 − cos x 1 + cos x , = sin x sin x , = 1 − cos x eix − e−ix , sin x = 2i eix + e−ix , cos x = 2 eix − e−ix , tan x = −i ix e + e−ix e2ix − 1 , = −i 2ix e +1 sinh ix , sin x = i cos x = cosh ix, tanh ix . tan x = i

Theoretical Computer Science Cheat Sheet Number Theory The Chinese remainder theorem: There exists a number C such that: mod m1 . . . C ≡ rn mod mn if mi and mj are relatively prime for i = j. Euler’s function: φ(x) is the number of positive integers less than x relatively n prime to x. If i=1 pei is the prime faci torization of x then
n

Graph Theory Deﬁnitions: Loop Directed Simple Walk Trail Path Connected An edge connecting a vertex to itself. Each edge has a direction. Graph with no loops or multi-edges. A sequence v0 e1 v1 . . . e v . A walk with distinct edges. A trail with distinct vertices. A graph where there exists a path between any two vertices. A maximal connected subgraph. A connected acyclic graph. A tree with no root. Directed acyclic graph. Graph with a trail visiting each edge exactly once. Graph with a cycle visiting each vertex exactly once. A set of edges whose removal increases the number of components. A minimal cut. A size 1 cut. A graph connected with the removal of any k − 1 vertices. ∀S ⊆ V, S = ∅ we have k · c(G − S) ≤ |S|. A graph where all vertices have degree k. A k-regular spanning subgraph. A set of edges, no two of which are adjacent. A set of vertices, all of which are adjacent. A set of vertices, none of which are adjacent. A set of vertices which cover all edges. A graph which can be embeded in the plane. An embedding of a planar graph. deg(v) = 2m.
v∈V

C ≡ r1 . . . . . .

φ(x) =
i=1

e pi i −1 (pi − 1).

Component Tree Free tree DAG Eulerian Hamiltonian Cut

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 Complement graph Gc Complete graph Kn Kn1 ,n2 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 = 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: (x1 − x0 )2 + (y1 − y0 )2 , |x1 − x0 |p + |y1 − y0 |p
p→∞ 1/p

Euler’s theorem: If a and b are relatively prime then 1 ≡ aφ(b) mod b. Fermat’s theorem: 1 ≡ ap−1 mod p. The Euclidean algorithm: if a > b are integers then gcd(a, b) = gcd(a mod b, b). If i=1 pei is the prime factorization of x i then n e pi i +1 − 1 . d= S(x) = pi − 1 i=1
d|x n

Cut-set Cut edge k-Connected

, .

lim |x1 − x0 |p + |y1 − y0 |

p 1/p

Perfect Numbers: x is an even perfect number iﬀ x = 2n−1 (2n −1) and 2n −1 is prime. Wilson’s theorem: n is a prime iﬀ (n − 1)! ≡ −1 mod n. M¨bius  o inversion: if i = 1. 1  0 if i is not square-free. µ(i) = (−1)r if i is the product of   r distinct primes. If G(a) =
d|a

k-Tough k-Regular k-Factor Matching Clique

Area of triangle (x0 , y0 ), (x1 , y1 ) and (x2 , y2 ): x1 − x0 y1 − y0 1 . 2 abs x − x 2 0 y2 − y0 Angle formed by three points: (x2 , y2 )
2

F (d),

Ind. set Vertex cover Planar graph Plane graph

then F (a) =
d|a

θ (x1 , y1 ) (0, 0) 1 (x1 , y1 ) · (x2 , y2 ) cos θ = .
1 2

µ(d)G

a . d

Line through two points (x0 , y0 ) and (x1 , y1 ): x y 1 x0 y0 1 = 0. x1 y1 1 Area of circle, volume of sphere: A = πr2 , V = 4 πr3 . 3

Prime numbers: ln ln n pn = n ln n + n ln ln n − n + n ln n n , +O ln n n 2!n n + + π(n) = ln n (ln n)2 (ln n)3 n +O . (ln n)4

If G is planar then n − m + f = 2, so f ≤ 2n − 4, m ≤ 3n − 6. Any planar graph has a vertex with degree ≤ 5.

If I have seen farther than others, it is because I have stood on the shoulders of giants. – Issac Newton

Theoretical Computer Science Cheat Sheet π Wallis’ identity: 2 · 2 · 4 · 4 · 6 · 6··· π =2· 1 · 3 · 3 · 5 · 5 · 7··· Brouncker’s continued fraction expansion: 12 π 4 =1+ 32 2+ 52
2+
2+ 72 2+···

Calculus Derivatives: 1. 4. 7. 9. 11. 13. 15. du d(cu) =c , dx dx du d(un ) = nun−1 , dx dx du d(cu ) = (ln c)cu , dx dx du d(sin u) = cos u , dx dx du d(tan u) = sec2 u , dx dx du d(sec u) = tan u sec u , dx dx 14. 16. 10. 12. 2. d(u + v) du dv = + , dx dx dx v du − u d(u/v) dx 5. = dx v2 3.
dv dx

d(uv) dv du =u +v , dx dx dx 6. du d(ecu ) = cecu , dx dx d(ln u) 1 du = , dx u dx

,

8.

Gregrory’s series: π 1 4 =1− 3 + Newton’s series:

1 5

−

1 7

+

1 9

− ···

d(cos u) du = − sin u , dx dx d(cot u) du = csc2 u , dx dx

1 1 1·3 π 6 = 2 + 2 · 3 · 23 + 2 · 4 · 5 · 25 + · · · Sharp’s series:
π 6

d(csc u) du = − cot u csc u , dx dx

1 1 1 1 + 2 − 3 +··· = √ 1− 1 3 ·3 3 ·5 3 ·7 3

Euler’s series:
π2 6 π2 8 π2 12

1 du d(arcsin u) =√ , 2 dx dx 1−u 1 du d(arctan u) = , 17. dx 1 + u2 dx 1 du d(arcsec u) = √ , 2 dx dx u 1−u du d(sinh u) = cosh u , 21. dx dx 19. 23. 25. 27. du d(tanh u) = sech2 u , dx dx du d(sech u) = − sech u tanh u , dx dx 26.

d(arccos u) −1 du =√ , dx 1 − u2 dx d(arccot u) −1 du 18. = , dx 1 + u2 dx d(arccsc u) −1 du = √ , 2 dx dx u 1−u d(cosh u) du 22. = sinh u , dx dx d(coth u) du = − csch2 u , dx dx

= = =

1 12 1 12 1 12

+ + −

1 22 1 32 1 22

+ + +

1 32 1 52 1 32

+ + −

1 42 1 72 1 42

+ + +

1 52 1 92 1 52

+ ··· + ··· − ···

20.

Partial Fractions Let N (x) and D(x) be polynomial functions of x. We can break down N (x)/D(x) using partial fraction expansion. First, if the degree of N is greater than or equal to the degree of D, divide N by D, obtaining N (x) N (x) = Q(x) + , D(x) D(x) where the degree of N is less than that of D. Second, factor D(x). Use the following rules: For a non-repeated factor: A N (x) N (x) = + , (x − a)D(x) x−a D(x) where A= N (x) D(x) .
x=a

24.

d(csch u) du = − csch u coth u , dx dx d(arccosh u) 1 du =√ , 2 − 1 dx dx u d(arccoth u) 1 du 30. = 2 , dx u − 1 dx d(arccsch u) −1 du √ = . dx |u| 1 + u2 dx

1 du d(arcsinh u) =√ , 2 dx dx 1+u 1 du d(arctanh u) = , 29. dx 1 − u2 dx −1 du d(arcsech u) = √ , dx u 1 − u2 dx Integrals: 31. 1. 3. 6. 8. 10. 12. 14. cu dx = c xn dx = u dx, n = −1, 4.

28.

32.

2.

(u + v) dx = 1 dx = ln x, x 7. u 5.

u dx +

v dx,

1 xn+1 , n+1

ex dx = ex , v du dx, dx

For a repeated factor: m−1 Ak N (x) N (x) = , + (x − a)m D(x) (x − a)m−k D(x)
k=0

dx = arctan x, 1 + x2 sin x dx = − cos x, tan x dx = − ln | cos x|, sec x dx = ln | sec x + tan x|, arcsin x dx = arcsin x + a a a2 − x2 , 13.

dv dx = uv − dx 9.

cos x dx = sin x,

where Ak =

1 dk k! dxk

N (x) D(x)

.
x=a

11.

cot x dx = ln | cos x|,

The reasonable man adapts himself to the world; the unreasonable persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable. – George Bernard Shaw

csc x dx = ln | csc x + cot x|,

a > 0,

Theoretical Computer Science Cheat Sheet Calculus Cont. 15. 17. 19. 21. 23. 25. 26. 29. 33. 36. 38. 39. 40. 42. 43. 46. 48. 50. 52. 54. 56. 58. 60. arccos x dx = arccos x − a a sin2 (ax)dx =
1 2a

a2 − x2 ,

a > 0,

16.

arctan x dx = x arctan x − a a 18. cos2 (ax)dx =
1 2a

a 2

ln(a2 + x2 ),

a > 0,

ax − sin(ax) cos(ax) ,

ax + sin(ax) cos(ax) , csc2 x dx = − cot x, cosn−2 x dx, n = 1,

sec2 x dx = tan x, sinn x dx = − tann x dx = secn x dx = sinn−1 x cos x n − 1 + n n tann−2 x dx, sinn−2 x dx, n = 1, n = 1, n = 1, 27. sinh x dx = cosh x, 22. 24. cosn x dx =

20.

cosn−1 x sin x n − 1 + n n cotn−1 x − n−1

tann−1 x − n−1

cotn x dx = −

cotn−2 x dx,

tan x secn−1 x n − 2 + n−1 n−1 cot x cscn−1 x n − 2 + n−1 n−1

secn−2 x dx, cscn−2 x dx,

cscn x dx = −

28.

cosh x dx = sinh x,

tanh x dx = ln | cosh x|, 30. sinh2 x dx =
1 4

coth x dx = ln | sinh x|, 31. 34. x2 + a2 , a > 0, cosh2 x dx =

sech x dx = arctan sinh x, 32.
1 4

csch x dx = ln tanh x , 2 35. sech2 x dx = tanh x,
a 2

sinh(2x) − 1 x, 2

sinh(2x) + 1 x, 2 37.

arcsinh x dx = x arcsinh x − a a

arctanh x dx = x arctanh x + a a

ln |a2 − x2 |,

 x  x arccosh − x2 + a2 , if arccosh x > 0 and a > 0, a a x arccosh a dx = x  x arccosh + x2 + a2 , if arccosh x < 0 and a > 0, a a dx √ = ln x + a2 + x2 , a > 0, a2 + x2 dx 1 = a arctan x , a > 0, 41. a2 − x2 dx = a a2 + x2 (a2 − x2 )3/2 dx = x (5a2 − 2x2 ) a2 − x2 + 8 √ a2 dx = arcsin x , a − x2
x 2 3a4 8

x 2

a2 − x2 +

a2 2

arcsin x , a

a > 0,

arcsin x , a a2

a > 0, 45. (a2 x dx = √ , 2 )3/2 2 a2 − x2 −x a

a > 0,
a2 2

44. ln x +

1 dx a+x ln = , 2 −x 2a a−x 47.

a2 ± x2 dx =

a2 ± x2 ±

a2 ± x2 ,

x 1 dx , = ln ax2 + bx a a + bx √ √ a + bx 1 √ dx = 2 a + bx + a dx, x x a + bx √ √ a + a2 − x2 a2 − x2 , dx = a2 − x2 − a ln x x x
2

51.

dx √ = ln x + x2 − a2 , a > 0, 2 − a2 x √ 2(3bx − 2a)(a + bx)3/2 49. x a + bx dx = , 15b2 √ √ x 1 a + bx − a √ dx = √ ln √ √ , a > 0, a + bx a + bx + a 2 53. x a2 − x2 dx = − 1 (a2 − x2 )3/2 , 3 √ a+ dx 1 = − a ln 2 − x2 a √ a2 − x2 , x a > 0, a > 0,

a2

−

x2

dx =

2 x 8 (2x

−a )

2

a2

−

x2

+

a4 8

arcsin

x a,

a > 0, 57. 59.

55.

x dx √ = − a2 − x2 , a2 − x2 √ √ a + a2 + x2 a2 + x2 2 + x2 − a ln , dx = a x x x x2 ± a2 dx = 1 (x2 ± a2 )3/2 , 3

2 x2 dx x √ = − x a2 − x2 + a arcsin a, 2 2 2 − x2 a √ x2 − a2 a dx = x2 − a2 − a arccos |x| , x

61.

dx √ = x x2 + a2

1 a

ln

a+

√

x , a2 + x2

Theoretical Computer Science Cheat Sheet Calculus Cont. 62. 64. dx dx 1 a √ √ = a arccos |x| , a > 0, 63. = 2 − a2 2 x2 ± a2 x x x √ x2 ± a2 (x2 + a2 )3/2 x dx √ = x2 ± a2 , 65. dx = , x4 3a2 x3 x2 ± a2  √  2ax + b − b2 − 4ac 1  √ √ , if b2 > 4ac, ln  dx b2 − 4ac 2ax + b + b2 − 4ac =  ax2 + bx + c  2ax + b √ 2  arctan √ , if b2 < 4ac, 4ac − b2 4ac − b2  1  √ ln 2ax + b + 2√a ax2 + bx + c , if a > 0,   a dx √ = −2ax − b ax2 + bx + c  √1 arcsin √   , if a < 0, −a b2 − 4ac 2ax + b ax2 + bx + c dx = 4a x dx √ = 2 + bx + c ax √ 4ax − b2 ax2 + bx + c + 8a dx √ , 2 + bx + c ax if c > 0, if c < 0, dx √ , 2 + bx + c ax √ x2 ± a2 , a2 x Finite Calculus Diﬀerence, shift operators: ∆f (x) = f (x + 1) − f (x), E f (x) = f (x + 1). Fundamental Theorem: f (x) = ∆F (x) ⇔
b

f (x)δx = F (x) + C.
b−1

66.

f (x)δx =
a i=a

f (i).

Diﬀerences: ∆(cu) = c∆u, ∆(xn ) = nxn−1 , ∆(Hx ) = x−1 , ∆(cx ) = (c − 1)cx , Sums: cu δx = c (u + v) δx = u∆v δx = uv − xn δx =
x m+1 ,
x n+1

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

67.

∆(uv) = u∆v + E v∆u, ∆(2x ) = 2x , ∆
x m

68.

=

x m−1

.

69.

b ax2 + bx + c − a 2a

u δx, u δx + v δx,

70.

 √ √ 2  −1  √ ln 2 c ax + bx + c + bx + 2c ,   c x dx √ = 2 + bx + c  1 x ax bx   √ arcsin √ + 2c ,  −c |x| b2 − 4ac x3 x2 + a2 dx = ( 1 x2 − 3
2 2 2 15 a )(x n a

E v∆u δx, x−1 δx = Hx ,

71. 72. 73. 74. 75. 76.

+ a2 )3/2 , xn−1 cos(ax) dx, x
n−1

x x c cx δx = c−1 , m δx = m+1 . Falling Factorial Powers: xn = x(x − 1) · · · (x − n + 1), n > 0,

1 xn sin(ax) dx = − a xn cos(ax) +

x0 = 1, xn = 1 , (x + 1) · · · (x + |n|) n < 0,

x cos(ax) dx = xn eax dx =

n

1 n ax

sin(ax) −
n a

n a

sin(ax) dx,

xn eax − a

xn−1 eax dx, 1 ln(ax) − n+1 (n + 1)2 , xn (ln ax)m−1 dx.

xn+m = xm (x − m)n . Rising Factorial Powers: xn = x(x + 1) · · · (x + n − 1), x0 = 1, xn = 1 , (x − 1) · · · (x − |n|) n < 0, n > 0,

xn ln(ax) dx = xn+1 xn (ln ax)m dx =
n+1

x m (ln ax)m − n+1 n+1

x1 = x2 = x3 = x4 = x5 = x1 = x2 = x = x4 = x =
5 5 3 3 4

x1 x2 + x1 x3 + 3x2 + x1 4 x + 6x3 + 7x2 + x1 x5 + 15x4 + 25x3 + 10x2 + x1 x1 x + x1
2

= = = = = x1 = x2 =
1

x1 x2 − x1 x3 − 3x2 + x1 4 x − 6x3 + 7x2 − x1 x5 − 15x4 + 25x3 − 10x2 + x1 x1 x − x1
2

xn+m = xm (x + m)n . Conversion: xn = (−1)n (−x)n = (x − n + 1)n = 1/(x + 1)−n , xn = (−1)n (−x)n = (x + n − 1)n = 1/(x − 1)−n ,
n

xn =
k=1 n

n k x = k

n k=1

n (−1)n−k xk , k

x + 3x + 2x x + 6x3 + 11x2 + 6x1 x + 10x + 35x + 50x + 24x
4 3 2 1

2

x = x4 = x =
5 5

3

x − 3x + 2x x − 6x3 + 11x2 − 6x1
4

3

2

1

xn =
k=1 n 1

n (−1)n−k xk , k n k x . k

x − 10x + 35x − 50x + 24x

4

3

2

xn =
k=1

Theoretical Computer Science Cheat Sheet Series Taylor’s series: (x − a)i (i) (x − a)2 f (a) + · · · = f (a). f (x) = f (a) + (x − a)f (a) + 2 i! i=0 Expansions: ∞ 1 = 1 + x + x2 + x3 + x4 + · · · = xi , 1−x i=0 1 1 − cx 1 1 − xn x (1 − x)2 xk dn dxn e 1 1−x
x ∞

Ordinary power series:
∞

A(x) =
i=0 ∞

ai xi .

Exponential power series: A(x) =
i=0 ∞

= 1 + cx + c2 x2 + c3 x3 + · · · =1+x +x
n 2n

∞

ai

xi . i!

=
i=0 ∞

ci xi , x ,
i=0 ∞ ni

Dirichlet power series: A(x) =
i=1

+x

3n

+ ···

= =
i=0 ∞

ai . ix

= x + 2x2 + 3x3 + 4x4 + · · ·

ixi , in xi ,
i=0 ∞

Binomial theorem:
n

(x + y)n =
k=0

n n−k k y . x k
n−1

= x + 2n x2 + 3n x3 + 4n x4 + · · · = =1+x+
1 2 2x

Diﬀerence of like powers: xn − y n = (x − y)
k=0 ∞

+

1 3 6x

+ ···

=
i=0 ∞

xi , i!

xn−1−k y k .

ln(1 + x) 1 ln 1−x sin x cos x tan
−1

= x − 1 x2 + 1 x3 − 1 x4 − · · · 2 3 4 = x + 1 x2 + 1 x3 + 1 x4 + · · · 2 3 4

xi = (−1)i+1 , i i=1
∞

For ordinary power series: αA(x) + βB(x) =
i=0 ∞

=
i=1 ∞

xi , i

(αai + βbi )xi , ai−k xi ,
i=k i ∞

x2i+1 1 1 1 , (−1)i = x − 3! x3 + 5! x5 − 7! x7 + · · · = (2i + 1)! i=0 =1− x =x−
1 2 2! x 1 3 3x

xk A(x) = A(x) −
k−1 i=0 xk

+ +

1 4 4! x 1 5 5x

−

1 6 6! x

+ ···

−

1 7 7x

+ ···

x2i+1 , = (−1) (2i + 1) i=0
i ∞

x2i , = (−1)i (2i)! i=0
∞

∞

ai x

=
∞ i=0

ai+k xi , ci ai xi ,

A(cx) =
i=0 ∞

(1 + x)n 1 (1 − x)n+1 ex x −1

= 1 + nx +

n(n−1) 2 x 2

+ ···

=
i=0 ∞ i=0 ∞

n i x, i i+n i x, i Bi x , i! 2i i 1 x, i+1 i 2i i x, i 2i + n i x, i Hi xi ,
i

A (x) =
i=0 ∞

(i + 1)ai+1 xi , iai xi ,
i=1 ∞

= 1 + (n + 1)x + = 1 − 1x + 2
1 2 12 x

n+2 2

x2 + · · · = + ··· =

xA (x) = A(x) dx = A(x) + A(−x) = 2 A(x) − A(−x) = 2
i=1 ∞ i=0 ∞ i=0

−

1 4 720 x

√ 1 (1 − 1 − 4x) 2x 1 √ 1 − 4x √ 1 − 1 − 4x 1 √ 2x 1 − 4x 1 1 ln 1−x 1−x 1 2 1 ln 1−x x 1 − x − x2 Fn x 1 − (Fn−1 + Fn+1 )x − (−1)n x2
2

= 1 + x + 2x2 + 5x3 + · · · = 1 + x + 2x + 6x + · · ·
n 2 3

i=0 ∞

ai−1 i x, i a2i x2i , a2i+1 x2i+1 .
i

=
i=0 ∞

=
i=0 ∞ i=0 ∞

= 1 + (2 + n)x + =x+
3 2 2x

4+n 2

x2 + · · · = + ··· =

+

11 3 6 x

+

25 4 12 x

= 1 x2 + 3 x3 + 2 4
2 3

11 4 24 x

i=1 ∞

+ ···
4

=
i=2 ∞

Hi−1 xi , i Fi x ,
i

Summation: If bi = j=0 ai then 1 A(x). B(x) = 1−x Convolution:  
∞

A(x)B(x) =
i=0



i

aj bi−j  xi .

j=0

= x + x + 2x + 3x + · · · = Fn x + F2n x + F3n x + · · ·
2 3

=
i=0 ∞

=
i=0

Fni x .

i

God made the natural numbers; all the rest is the work of man. – Leopold Kronecker

Theoretical Computer Science Cheat Sheet Series Expansions: 1 1 ln n+1 (1 − x) 1−x x
n n ∞

Escher’s Knot 1 x
x −n ∞

=
i=0 ∞

(Hn+i − Hn ) n i x, i i n!xi , n i! (−1)
i=1 ∞ 2i 2i i−1 2 (2

n+i i x, i

=
i=0 ∞ n

i xi , n i n!xi , i! n (−4)i B2i x2i , (2i)! 1 , ix φ(i) , ix Stieltjes Integration

=
i=0 ∞

(e − 1) x cot x − 1)B2i x2i−1 , (2i)! ζ(x)

=
i=0 ∞

1 ln 1−x tan x 1 ζ(x) ζ(x)
2

=
i=0 ∞

=
i=0 ∞

=

=
i=1 ∞

µ(i) = , ix i=1 1 = , 1 − p−x p
∞

ζ(x − 1) ζ(x)

=
i=1

If G is continuous in the interval [a, b] and F is nondecreasing then
d|n

ζ (x) ζ(x)ζ(x − 1) ζ(2n) x sin x √ 1 − 1 − 4x 2x e sin x 1− √ 1−x x
2 x

=
i=1 ∞

d(i) xi S(i) xi

where d(n) = where S(n) = n ∈ N,

1, d, exists. If a ≤ b ≤ c then
c a

b

G(x) dF (x)
b c

= = =
n i=0 ∞

d|n

i=1 2n−1

2

|B2n | 2n π , (2n)! (−1)
i i−1 (4

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

G(x) dF (x) +
b b

G(x) dF (x).
b

If the integrals involved exist G(x) + H(x) dF (x) =
a b a b

∞

− 2)B2i x2i , (2i)!

G(x) dF (x) +
a b

H(x) dF (x), G(x) dH(x),
a b

=
i=0 ∞

n(2i + n − 1)! i x, i!(n + i)! 2
i/2

G(x) d F (x) + H(x) =
a b a b a a

G(x) dF (x) +

=
i=1 ∞

sin i!

iπ 4

c · G(x) dF (x) =
a

b

G(x) d c · F (x) = c

G(x) dF (x),
a b

x,

i

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

F (x) dG(x).

=
i=0 ∞

(4i)! √ xi , i 2(2i)!(2i + 1)! 16 4i i!2 x2i . (i + 1)(2i + 1)!

If the integrals involved exist, and F possesses a derivative F at every point in [a, b] then
b b

arcsin x x

=
i=0

G(x) dF (x) =
a 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 a

G(x)F (x) dx. Fibonacci Numbers 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, . . . Deﬁnitions: Fi = Fi−1 +Fi−2 , F0 = F1 = 1, F−i = (−1)i−1 Fi , Fi =
1 √ 5

Cramer’s Rule If we have equations: a1,1 x1 + a1,2 x2 + · · · + a1,n xn = b1 a2,1 x1 + a2,2 x2 + · · · + a2,n xn = b2 . . . . . . . . . an,1 x1 + an,2 x2 + · · · + an,n xn = bn Let A = (ai,j ) and B be the column matrix (bi ). Then there is a unique solution iﬀ det A = 0. Let Ai be A with column i replaced by B. Then det Ai . xi = det A Improvement makes strait roads, but the crooked roads without Improvement, are roads of Genius. – William Blake (The Marriage of Heaven and Hell)

ˆ φi − φi ,

Cassini’s identity: for i > 0: Fi+1 Fi−1 − Fi2 = (−1)i . Additive rule: Fn+k = Fk Fn+1 + Fk−1 Fn , F2n = Fn Fn+1 + Fn−1 Fn . Calculation by matrices: 0 1 Fn−2 Fn−1 = Fn−1 Fn 1 1
n

The Fibonacci number system: Every integer n has a unique representation n = Fk1 + Fk2 + · · · + Fkm , where ki ≥ ki+1 + 2 for all i, 1 ≤ i < m and km ≥ 2.

.

DOCUMENT INFO
Categories:
Stats:
 views: 608 posted: 9/11/2009 language: English pages: 10
How are you planning on using Docstoc?