# Polar Calculus

This triangle is important for solving many problems related to polar coordinates.

From it we get the following important relationships:

x=r*cos(theta)

y=r*sin(theta)

r^2=x^2+y^2

tan(theta)=y/x

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

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

f(x)=x^(-1)

f'(x)=-1*x^(-2)

f”(x)=2*x^(-3)

f”(x)=-6*x^(-4)

f^((4))(x)=24*x^(-5)

f^((5))(x)=-144*x^(-6)

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):

0.0001<=(24*(1)^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

ln(2)~~0.69314718

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))
~~0.690653430481824215252268721472608478928428119821791431288…

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

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.

# A number theory story

A friend asked me to investigate how to write algorithmically generated fraction addition problems where the sum would always be reducible or irreducible. Why? It seems unfair, in a testing situation, to have one addition problem lead to a reducible sum while another is irreducible.

# Diophantine Equations and Fraction Sums

Considering the fraction addition problem a/c+b/d=(au+bv)/(LCM(c,d)), if the sum reduces then it is by a factor of the GCD(c,d). So, au+bv=n, where n is a multiple of a factor of the GCD.

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

ax+by=gnx+gmy=g

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.

# Trigonometric Substitution

Examples

1. int sqrt(1-x^2)dx
2. int sqrt(1+x^2)dx
3. int 1/(x sqrt(x^2-16)dx

Homework

1. int 1/sqrt(81+x^2) dx
2. int_-16^16 1/(256+x^2) dx
3. int_0^2 1/sqrt(16-x^2) dx
4. int sqrt(9-t^2) dt
5. int sqrt(y^2-81)/y dy
6. int 1/(x^2 sqrt(x^2-64)) dx
7. int_0^35 (4x)/sqrt(x^2+1) dx
8. int x^3/sqrt(x^2+121) dx

# Section 7.3 Hyperbolic Trigonometric Functions

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

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

d/dx[cosh(x)]=(e^x-e^-x)/2=sinh(x)

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

d/dx[sinh(x)]=(e^x+e^-x)/2=cosh(x)

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)

#### Examples

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)]

Findd/dx[sinh^-1(cot(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

#### Proof

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

lcm=LCM(c,d)
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.

gcd=GCD(c,d)
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)

Alternatively,

lcm/c=d/gcd(2)

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

# Fraction Sum Exploration

A common method for adding fractions is to find the lowest common multiple of the denominators. This is called the LCD algorithm, Lowest Common Denominator. Even though we have the smallest possible denominator that allows us to combine the fractions, sometimes the sum will still reduce. I have always wondered why.

Consider 1/3+1/6. The LCD = 6, so the sum becomes 2/6+1/6=3/6 or 1/2. This is reducible.

Now consider 1/3+1/2. The LCD = 6, so the sum becomes 2/6+3/6=5/6. This is clearly not reducible.

I finally found an article explaining the theory behind when a fraction sum is reducible or irreducible.

Biscuits of Number Theory by Arthur T. Benjamin, Ezra Brown, 2006, MAA
URL

Originally published as:
Reducing the Sum of Two Fractions
Shultz, Harris S. and Ray C. Shiflett. Mathematics Teacher. vol. 98, no. 7 (March 2005): pp.486-490.
URL

If the denominators have a commom prime power in the prime factorizations, then some sums are reducible, otherwise, the sums are always irreducible. For denominators 12=2^2*3 and 15=3*5 there exist numerators for which the sum will reduce since they have a common prime power of 3^1, and, for example, 1/12+1/15=9/60 = 3/20. For denominators 8=2^3 and 12=2^2*3 there are no numerators for which the sum reduces, since they do not have a common prime power. Here I am assuming that the numerators are relatively prime to their denominators, i.e., they have a gcd of 1.

Even better, if the common prime power is based on 2, then the sums are always reducible. Otherwise, there exist numerators for which the sum will reduce. The problem then becomes finding those numerators.

10 vs 5 1 2 3 4
1 3/10 1/2 7/10 9/10
3 1/2 7/10 9/10 11/10
7 9/10 11/10 13/10 3/2
9 11/10 13/10 3/2 17/10