Author Archives: gparker


What is Probability?

The measure of our belief that an event will happen.

So, how do we measure this belief?

  1. We watch and count.
    Watch how often Gary rides down a certain hill and keep track of when he falls and when he doesn’t. Suppose he rode down the hill 100 times and fell 3 times. Then we could say that he fell 3 out of 100 times and the chance that he falls is `3/100` or 3%.
  2. We can claim to have complete knowledge of a situation.
    We all seem to believe that a quarter is fair when flipped, meaning that it is just a likely to land with heads facing up as tails. Since there is one head and two possible outcomes, then we could say that the chance of getting a head is `1/2` or 50%.
  3. It could also be a wild ass guess.
    There is a 50% chance that I will pass the test tomorrow.
  4. Or maybe it is an educated guess

Random thoughts

probability, chance, likelyhood
Dice, cards, coins, weather, sports
event, simple event, sample space
mutually exlusive
certainty, 1
uncertainty, 0
tree diagrams


Polar Calculus

This triangle is important for solving many problems related to polar coordinates. Polar Rectangular Triangle showing x, y, r, and theta

From it we get the following important relationships:





In polar coordinates we write `r` as a function of `theta`, `r=f(theta)`.

Now consider the equation `x=r*cos(theta)`. If we differentiate with respect to `theta`, the we get `(dx)/(d theta)=(dr)/(d theta)*cos(theta)-r*sin(theta)`.

Similarly, `(dy)/(d theta)=(dr)/(d theta)*sin(theta)+r*cos(theta)`.

These relationships will be useful when looking at slope and arc length, which are concepts from rectangular coordinates.

Simpson’s Rule (Riemann Sums with Parabolas)

`int_a^b f(x) dx ~~ (h/3)((y_0+4y_1+y_2)+(y_2+4y_3+y_4)+…+(y_(n-2)+4y_(n-1)+y_n))`

`int_a^b f(x) dx ~~ (h/3)(y_0+4y_1+2y_2+4y_3+2y_4+…+2y_(n-2)+4y_(n-1)+y_n)`

`int_a^b f(x) dx ~~ sum_(j=1)^(n/2) (h/3)(f(x_(2j-2))+4f(x_(2j-1))+f(x_(2j)))`

where `h=(b-a)/n` and the error is `|E_S|<=(M(b-a)^5)/(180*n^4)` and `M` is an upper bound for `|f^((4))|` on `[a,b]`.

Ln with parabola

Example 1:

Evaluate `int_5^7 5x dx` using Simpson’s rule with `n=4`

`x_0` through `x_4` are `{5, 5.5, 6, 6.5, 7}` and `h=2/4=1/2`

Area `~~ 1/6*(5(5)+4*5(5.5)+2*5(6)+4*5(6.5)+5(7))=60`

Since `f'(x)=5` and `f”(x)=0`, then `f^((4))(x)=0` and the error is zero here.

Example 2:

Consider `int_-1^1 (x^2+5) dx` with `n=4`

`h=2/4=1/2` so `x_k=-1+k/2`, which is the set `{-1,-1/2,0,1/2,1}`

Area `~~1/6(((-1)^2+5)+4((-1/2)^2+5)+2((0)^2+5)+4((1/2)^2+5)+((1)^2+5))`

Area`=10 2/3`

Since `f^((4))(x)=0` the error here is also zero.

Example 3:

`int_0^2 (5t^3+8t) dt` with `n=4`

`h=2/4=1/2` and `x_k=0+k/2`, so the x-values are `{0,1/2,1,1 1/2,2}`

Area `~~ 1/6((5(0)^3+8(0))+4(5(1/2)^3+8(1/2))+2(5(1)^3+8(1))+4(5(1 1/2)^3+8(1 1/2))+(5(2)^3+8(2)))`

Area `=36`

Since `f^((4))(x)=0`, the error is zero here.

Example 4:

`int_3^9 4/s^2 ds` with `n=4`

`h=6/4=3/2` and `x_k=3+3k/2`, so the x-values are `{3, 4.5, 6, 7.5, 9}`

Area `~~1/2*(4/3^2+4*4/4.5^2+2*4/6^2+4*4/7.5^2+4/9^2)`

Example 5:

How many intervals are needed to estimate `int_1^2 1/x dx` to within 0.0001 square units of the actual area?

Recall the error is `|E_S|<=(M(b-a)^5)/(180*n^4)` and `M` is an upper bound for `|f^((4))|` on `[a,b]`.







I found the 5th derivative to show that `f^((4))(x)` is decreasing, since its derivative is negative on the interval `[1,2]`. So, `f^((4))(1)=24` is the maximum needed for the error estimation.

Plugging into `|E_S|<=(M(b-a)^5)/(180*n^4)`:


Solving for `n` we get `n <=((24)/(180*0.0001))^(1/4)~~6.04`

`A_(S_6) = 1/3*1/6*(1/1+4*1/(1 1/6)+2*1/(1 2/6)+4*1/(1 3/6)+2*1/(1 4/6)+4*1/(1 5/6)+1/2)~~0.693169`

`A_(S_4) = 1/3*1/4*(1/1+4*1/(1 1/4)+2*1/(1 2/4)+4*1/(1 3/4)+1/2)~~0.693254`

`A_(S_2) = 1/3*1/2*(1+4*1/1.5+1/2)~~.694444`


The actual error from the 6th Simpson’s sum is about 0.00002.

`A_(S_20) = sum_(n=1)^10 1/(3*20)*(1/(1 + 1/20 (2 n – 2)) + 4/(1 + 1/20 (2 n – 1)) + 1/(1 + (2 n)/20)) = 5555158368718531/8014397185594800~~0.693147375`

For comparison, consider 100 terms with right endpoints: `sum_(k=1)^100 1/(100 (k/100 + 1))`

Or the Trapezoidal Rule with 50 intervals:
`A_(T_50)=sum_(k=1)^50 1/(2*50)*(1/(1+(K-1)/50)+1/(1+k/50))~~0.693172179`

Example 6:

Here is a picture of a parabola intersecting the reciprocal function at `x=1,2,3`

Ln with parabola

The parabola, `y=1/6*x^2-1*x+11/6`, is shown in red.
The beautiful thing about Simpson’s rule is that we don’t actually need to calculate the coefficients of any of these parabolas. The weighted sum does all of the work for us.

Relatively Prime Linear Combinations

If there exist x and y for which ax+by=GCD(a,b) then GCD(x,y)=1.

Let g=GCD(a,b) and x and y solutions to ax+by=g.

Since g|a and g|b, there exist integers n and m such that a=gn and b=gm.


So, nx+my=1

The GCD(n,m)=1 since g is the GCD(a,b).

Let d be a divisor of x. If d also divides my, then d must divide 1, which isn’t possible. So, GCD(x,y)=1.

Section 7.3 Hyperbolic Trigonometric Functions

`cosh(x) = (e^x+e^-x)/2`

which is the shape of a cable strung between two points.


`int cosh(x) dx =(e^x-e^-x)/2+c=sinh(x)+c`


`int sinh(x) dx =(e^x-e^-x)/2+c=cosh(x)+c`

`tanh(x) = sinh(x)/cosh(x) =(e^x-e^-x)/(e^x+e^-x)`

Alternatively, `tanh(x)=(e^(2x)-1)/(e^(2x)+1)`


Find `d/dx[tanh(x)]`

Simplify `cosh^2(x)-sinh^2(x)`

Find `int tanh(x) dx`

Find `cosh^-1(x)`

Find `tanh^-1(x)`

Find `d/dx[cosh^-1(x)]`


Find `int_(-ln(12))^(-ln(2)) 2 e^x cosh(x) dx`

Fraction Sum Divisors

Given a pair of reduced fractions, e.g., `1/30` and `1/42`, or `3/10` and `1/5`, we add them with the LCD Algorithm.

If the sum reduces, then it will reduce by a factor of the GCD of the denominators.

Example `1/30+1/42`

  • Find the LCM
    `30=2 * 3 * 5` and `42=2 * 3 * 7`
    so the LCM `=2 * 3 * 5 * 7 = 210` and the GCD `=2* 3=6`.
  • Modify the first fraction
    `210/30=7` so we rewrite `1/30 = (7*1)/(7*30) = 7/210`
  • Modify the second fraction
    `210/42=5` so `1/42 = (5*1)/(5*42) = 5/210`
  • Combine the fractions with the common denominator
    `1/30+1/42 = 7/210+5/210 = 12/210`
  • Notice if they reduce
    `12/210= (12 -: 6)/(210 -: 6) = 2/35`

Example `11/30+1/42`

`11/30+1/42 = 77/210+5/210 = 82/210= (82 -: 2)/(210 -: 2) = 41/105`


Applying the LCD algorithm `a/c+b/d=(au+bv)/lcm`

Note that the LCM of two numbers is the product of the highest power of each prime from the prime factorizations of the two numbers.

Note that the GCD is the lowest power of the primes common to the two numbers.

These sets of prime factors are disjoint and complementary to the product of the two numbers, i.e.,

`c* d = lcm * gcd `(1)



To apply the LCD Algorithm we need to find `u` and `v`, the complementary factors of the `lcm` for `c` and `d` respectively.

`u=lcm/c` and `v=lcm/d`(3)

Since `u=lcm/c=d/gcd`, then `u` is made from factors of `d` that are not common to `c`. Similarly, `v` is made from factors of `c` that are not common to `d`. Hence `u` and `v` have no common factors, i.e., `GCD(u,v)=1`.

Notice that `u*v = lcm/c * lcm/d` and `gcd=(c*d)/lcm`

Hence, `lcm = gcd * u * v`

so `a/c+b/d=(au+bv)/(gcd * u * v)`

If this sum is reducible, then there exists an Integer `n` such that

`(au+bv)/n` and `(gcd * u * v)/n`

If `n` divides `u` then n must divide `bv`. However, we know that `u` is relatively prime to `v`. Additionally, since `b` is relatively prime to `d`, `b` is also relatively prime to `u`. Hence `n` can’t divide `bv` and then must not divide `u`,

So if `n` is to be the GCD of the numerator and denominator of the sum, it must divide the `GCD(c,d)`.