Wednesday, May 23, 2012

Area of an Ellipse

Blog Entry #104. (I thought I use a different font this time. I like Arial, but change is good, at least every once in a while. )

Objective of this blog entry: calculate the area of an ellipse (Fig. A), and then a section of an ellipse (Fig. B).

Normally, the equation given for an ellipse is:

x^2/a^2 + y^2/b^2 = 1

I am going to use the parametric form

x = a cos t
y = b sin t
with 0 ≤ t ≤ 2 π

Let θ be the upper limit (angle) and the area is:

θ
∫ y dx =
0

θ
∫ y(t) x'(t) dt =
0

θ
∫ (b sin t) (a sin t) dt =
0

θ
∫ a b sin^2 t dt
0


Note: the antiderviatve of sin^2 t is 1/2 ( t - sin t cos t ).

Then:

θ
∫ a b sin^2 t dt =
0

a b [ 1/2 ( θ - sin θ cos θ ) - 1/2 ( 0 - sin 0 cos 0 ) ] =

1/2 a b ( θ - sin θ cos θ )

The area of an ellipse (up to angle θ , see Fig. B) is:
1/2 a b ( θ - sin θ cos θ )

To find the area of the entire ellipse, let θ = 2 π. Then:

A = 1/2 a b (2 π - sin (2 π) cos (2 π)) = π a b

That concludes is blog entry. Before I go, and before I forget: THANK YOU U.S. TROOPS FOR ALL YOU DO!!!!

Eddie

Right Cylinders and Skewed Cylinders

Blog Entry # 103: One of my favorite things to do in mathematics is to find areas and volumes of unusual shapes.

Volume of a Right Cylinder (Figure A)

V = π R^2 H

R = radius
H = height

Volume of a Skewed Cylinder at Angle θ (Figure B)

H resembles the measure from the base to the top of the skewed cylinder. However, to calculate the volume, we will need the length X, not H.

Using trigonometry:

cos θ = H / X

implies that

X = H / (cos θ)

The volume of the skewed cylinder is:

V = π R^2 H sec θ



Until next time, Eddie

Monday, May 21, 2012

Arc length of sin(x) - Curve Approximation

Blog Entry #102

The Arc Length of a Sine Curve

The sine curve is one the most interesting curves in mathematics.

Let

y = a * sin x ,

Where a is the amplitude of the sine curve.

We can find the arc length of a curve between limits x1 and x2 by the integral:

x2
∫ √ (1 + (dy/dx)^2) dx
x1

For the sine curve:

y = a sin x

dy/dx = a cos x

(dy/dx)^2 = a^2 cos^x

And the arc length is:

x2
∫ √(1 + a^2 cos^x) dx
x1

There is no anti-derivative for √(1 + a^2 cos^x). Therefore, numerical methods must be used.

Finding an Approximate Curve

Using a TI nSpire CX CAS, I used the Spreadsheet, curve fitting, and graphing features to determine an approximate polynomial. The arc length is from the origin (0,0) to (π, 0).

Note: x1 = 0, x2 = π

Here is a shot summary of what I did:

1. Created a spreadsheet with the following columns:

Column A: A sequence of numbers from 0.25 to 5 in increments of 0.25. The resulting list is named amplist.

Column B: Use the nSpire's arcLen function to get the arc length of the sine curve using amplist as the values for a. This list is named arc1.

2. Pressing the menu key allowed me to access the Statistics menu. Using the Stat Calculations option, I used different types of regression, including power and quartic regression. What I was looking for was which regression had the best coefficient of determination (R^2). In general, the closer R^2 is to 1, the better the fit.

I ended up choosing the quartic regression (4th degree polynomial) with R^2 ≈ 0.9999919.

The approximate polynomial is

y = .0081196317102889 x^4 - .11577326164517 x^3 + .63914882375794 x^2 + .2071162669684 x + 3.0881429428239

This polynomial was save to the function f1(x).

3. I created a graphs page and made two plots:

* Scatter plot where x = amplist, y = arc1. (The dots in red)
* The function f1(x) (see step 2). (The curve in blue)

Setting zoom to fit the data, the curve looks like a good fit.

You can create a similar graph with the Data & Statstics module, but I thought I would be different this time.

How good of a fit is the polynomial?

4. I went back to the spreadsheet and added two more columns.

Column C: est1 = f1(amplist). (estimate arc lengths)
Column D: err1 = abs(arc1 - est1)

By scrolling down Column D, the quartic polynomial was accurate in estimating the arc length of the sine curve from 0 to π to at least two decimal places.

Conclusion

We have been looking to find the arc length of the curve y = a sin x from x = 0 to x = π.

The exact value is:

π
∫ √ (1 + a^2 cos^2 x ) dx
0

However, a good estimate can be found (to 2-3 decimal places) with the polynomial:

y = .0081196317102889 x^4 - .11577326164517 x^3 + .63914882375794 x^2 + .2071162669684 x + 3.0881429428239


Thanks as always and talk to you soon!


Eddie



This blog is property of Edward Shore. © 2012

Thursday, May 17, 2012

Financial Calculators: Finding a Balance

Blog Entry #101

The Balance of an Annuity

If you have a financial calculator, chances are that you have a Amortization function, which assists you in finding the interest and principal paid and the balance after a set of payments.

Another quick way way to find the balance is to calculate the future value (FV).

Example:

A 20-year loan for $100,000 is issued at 5% annual interest. Find the monthly payment.

Known:
PV (Present Value) = 100,000
I/YR (Annual Interest) = 5%
Periodic Interest = 5/12 %
N (number of payments) = 20 * 12 = 240
FV (Future Value) = 0

Computed (HP 10bII+):
PMT (Payment) = -659.955739217 (-659.96 rounded to 2 places)

Two Ways to Find the Balance

Amortization Function

Enter the range of payments you want to amortize and execute the amortization function/spreadsheet.

For the HP 10bII+, to amortize the first k payments, press:

1 [INPUT] k [Down shift key] [FV] (AMORT)

The HP 10bII+ will display the range of payments to be amortized. Confirm this by pressing the equals key. [ = ].

The total principal paid is given. Press [ = ] to get the total interest paid. Press [ = ] one more time to get the balance.

In short, for the balance of the first n payments:
1 [INPUT] k [Down shift key] [FV] (AMORT) [ = ] [ = ] [ = ]

Future Value Method

To find the balance after the first k payments, enter k as N and compute future value (FV).

For example, if I want to find the balance of a loan after 12 payments, I enter 12 as N, and compute FV.

This is an alternate method, and a possible work-around for anyone having a finance calculator sans an amortization feature.

Remember: The TVM functions uses the cash-flow convention: positive numbers for receipts and negative numbers for payments.

A Comparison of Methods

A recap of the data in our example:

Known:
PV (Present Value) = 100,000
I/YR (Annual Interest) = 5%
Periodic Interest = 5/12 %
N (number of payments) = 20 * 12 = 240
FV (Future Value) = 0

Computed (HP 10bII+):
PMT (Payment) = -659.955739217 (-659.96 rounded to 2 places)

*Note: Signs will be ignored.

Balance after 60 payments:
Amortization Method: 83,454.57
FV Method: 83,454.86

Balance after 120 payments:
Amortization Method: 62,220.85
FV Method: 62,221.52

Balance after 180 payments:
Amortization Method: 34,970.35
FV Method: 34,971.35

I find similar results by using the Hewlett Packard HP 10bII+, Texas Instruments BA II Plus, and the Casio FC-200V.

Why is there a difference?

The TVM module uses a master equation involving N, I/YR, P/Y, PMT, PV, and FV and the financial calculator calls on this master equation to solve for the desired variable.

When using the amortization method, the financial calculator uses a different set of formulas. The formulas have this format:

Interest for the Period = Previous Balance * I/YR% * P/Y^-1

Principal for the Period = Payment - Interest for the Period

New Balance = Previous Balance - Principal for the Period

Prior to calculation, payment and interest are rounded.

For the exact formulas, consult the calculator financial manuals. Casio, Texas Instruments, and Hewlett Packard all provide formulas for TVM and amortization.

Link to the HP 10BII+ Manual: Check the Appendix

Thank you and take care!

Eddie


2012

Thursday, May 10, 2012

Calculus Revisited Links (1-21)


Introduction

This blog entry will contain links to all 21 parts of the Calculus Revisited Series. Each link will open a new window.

**Some posts are out of order date wise - so please keep this page open if you want to go through the parts sequentially.

I hope this review is helpful to you, whenever you are studying for the final exam, want to review, or just want a refresher.

Thanks as always!

Eddie

Pages

#1: Functions
http://edspi31415.blogspot.com/2012/04/calculus-revisited-1-functions.html

#2: Trig Functions
http://edspi31415.blogspot.com/2012/04/calculus-revisited-2-working-with.html

#3: Logarithm and Exponential Functions
http://edspi31415.blogspot.com/2012/04/calculus-revisited-3-logarithmic-and.html

#4: Limits
http://edspi31415.blogspot.com/2012/04/calculus-revisited-4-limits.html

#5: Derivatives
http://edspi31415.blogspot.com/2012/04/calculus-revisited-5-derivatives.html

#6: Chain Rule
http://edspi31415.blogspot.com/2012/04/calculus-revisited-6-chain-rule.html

#7: Finding Extrema
http://edspi31415.blogspot.com/2012/04/calculus-revisited-7-finding-extrema.html

#8: Related Rates
http://edspi31415.blogspot.com/2012/04/calculus-revisited-8-related-rates.html

#9: Newton's Method
http://edspi31415.blogspot.com/2012/05/calculus-revisited-9-newton-method.html

#10: Integration Basics
http://edspi31415.blogspot.com/2012/04/calculus-revisited-10-integration.html

#11: Integration by Substitution
http://edspi31415.blogspot.com/2012/05/calculus-revisited-11-integration-by.html

#12: Integration by Parts
http://edspi31415.blogspot.com/2012/05/calculus-revisited-12-integration-by.html

#13: Integration Using Trig Identities
http://edspi31415.blogspot.com/2012/05/calculus-revisited-13-integrals.html

#14: Integration Using Partial Fractions
http://edspi31415.blogspot.com/2012/05/calculus-revisited-14-integration.html

#15: Infinite Limits
http://edspi31415.blogspot.com/2012/05/calculus-revisited-15-infinite-limits.html

#16: Improper Integrals
http://edspi31415.blogspot.com/2012/05/calculus-revisited-16-improper.html

#17: Sequences
http://edspi31415.blogspot.com/2012/05/calculus-revisited-17-sequences.html

#18: Series
http://edspi31415.blogspot.com/2012/05/calculus-revisited-18-series.html

#19: Tests of Convergence
http://edspi31415.blogspot.com/2012/05/calculus-revisited-19-tests-of.html

# 20: Taylor Series and Maclaurin Series
http://edspi31415.blogspot.com/2012/04/calculus-revisited-20-taylor-series-and.html

#21: The Catch All (Other Topics)
http://edspi31415.blogspot.com/2012/05/calculus-revisited-21-catch-all.html

Calculus Revisited #21: The Catch All

Welcome to Part 21 of our 21 part series on Calculus Series. Here are some interesting facts about calculus that were not discussed in the first 20 parts, but are worth paying attention to:

Implicit Differentiation

The key here is that when you are differentiating, you differentiate with respect to the specific variable. All other variables are treated as constants.

So for the function f(x,y):

d/dx f(x,y) means differentiate with respect to x, y is held constant

d/dy f(x,y) means differentiate with respect to y, x is held constant

Example: Let f(x,y) = ln(x + 2y) + y^2

d/dx f(x,y)
= d/dx ln(x + 2y) + d/dx y^2
= 1/(x + 2y) + 0
= 1/(x + 2y)

d/dx f(x,y)
= d/dy ln(x + 2y) + d/dy y^2
= 2/(x + 2y) + 2y

Arc Length

The arc length of a function f(x) is given by the integral:

b
∫ √( 1 + (f'(x))^2 ) dx
a

Usually, you will be finding the arc length by numerical methods and/or the calculator.

A numerical example: The arc length of f(x) = sin x from x = 0 to x = π/2 (to seven decimal places)

f(x) = sin x
f'(x) = cos x
(f'(x))^2 = cos^2 x

Then:

π/2
∫ (1 + cos^2 x) dx ≈ 1.9100989 (by calcualtor)

A Numerical Method of Integration: Simpson's Rule

For n partitions (n is even):

b
∫ f(x) dx
a

≈ (b - a)/3n * (f(a) + 4*f(x1) + 2*f(x2) + 4*f(x3) + 2*f(x4) + ... + 4*f(x_2k+1) + 2*f(x_2k+2) + .... + 4*f(x_n-1) + f(b))

where x_k = a + (b - a)/n * k

Error:

At maximum (b - a)^5/(180 * (2n)^4) * max|f''''(x)|

In general, the more complex the integral, the more terms needed

Example:
Use the Simpsons rule to calculate

2
∫ e^x dx with n = 4 (7 decimal places)
1

(b - a)/n = (2 - 1)/4 = 1/4

The integral is approximately:

≈ (2 - 1)/(3 * 4) * (f(1) + 4 * f(1.25) + 2 * f(1.5) + 4 * (1.75) + f(2))
≈ 4.6708749

(actual value is about 4.6707743)

Area Between Curves

Let f(x) and g(x) be two functions where f(x) ≥ g(x). The area between curves f(x) and g(x) is:

b
∫ f(x) - g(x) dx
a

Often a and b will be intersection points of f(x) and/or g(x).

Example:

Let f(x) = x^2 and g(x) = x. Find the area between the curves from x = 0 to x = 5.

When 0 ≤ x ≤ 5, f(x) ≥ g(x). Then the area between the curves is:

5
∫ x^2 - x dx = 175/6 ≈ 29.1666667
0

Volume of a Solid - Disk Method

The volume of a solid of revolution - method of discs revolving around the x-axis is:

b
∫ π * (f(x))^2 dx
a

Like arc length, you may be finding the volumes numerically and/or by calculator (like I will do by this example).

Example: Let f(x) = sin x from x = 0 to x = π

Then the volume is:

π
∫ π * sin^2 x dx ≈ 4.9348022 = π^2/2
0

If you are finding a volume with discs revolving around the y-axis then the volume would be:

b
∫ π * (g(y))^2 dy
a

where a and b are y-values.

Polar Equations and Polar Integral

To convert functions to their polar form and back, use the following:

x = r cos θ
y = r sin θ

r^2 = x^2 + y^2
θ = atan (y/x)

The Polar Integral is:

θ2
∫ 1/2 * (r(θ))^2 dθ
θ1

Example: Let r(θ) = 2 θ . Find the polar integral from θ = 0 to θ = 2π

Area:


∫ 1/2 * (2 θ)^2 dθ = 16 π^3/ 3 ≈ 165.3668090
0


Parametric Equations

Parametric equations are in the form of ( x(t), y(t) ), where t is the independent variable and x and y are dependent variables. Each part can be separately differentiated and integrated.

Arc length of a parametric curve from t = a to t = b:

b
∫ √( (x'(t))^2 + (y'(t))^2 ) dt
a

Let:
x(t) = 2t
y(t) = t^3

Find (x, y) at t = 0 and t = 1. Find the arc length.

x(0) = 0, y(0) = 0
x(1) = 2, y(1) = 1

Arc length:

x'(t) = 2
y'(t) = 3t^2

(x'(t))^2 = 4
(y'(t))^2 = 9t^4

1
∫ √(4 + 9t^4) dt ≈ 2.3650656
0

Tips for Sketching a Curve y = f(x)

Find out where the extrema of f(x) are. Recall the critical points are found when:

f'(x) = 0

Let c be the critical points.

If f''(c) > 0, then x = c is strict minimum.

If f''(c) < 0, then x = c is a strict maximum.

If f'(c) > 0 when both f'(x) > 0 for x < c and x > c OR
f'(c) < 0 when both f'(x) < 0 for x < c and x > c,
then x = c is an inflection point.

When f'(x) > 0, f(x) is increasing.

When f'(x) < 0, f(x) is decreasing.

When f''(x) > 0, f(x) is concave up (holding water).

When f''(x) < 0, f(x) is concave down (spilling water).

If f(x) → +∞ or -∞ when x → a, then f(x) has a vertical asymptote at x = a.

If f(x) → b when x → +∞ or -∞, then f(x) has a horizontal asymptote at y = b.

Thank you as always. I hope you enjoyed the Calculus Revisited Series.

To all the students who are in calculus, good luck in finals!

Until next time,

Eddie

This blog is property of Edward Shore. © 2012

Calculus Revisited #19: Tests of Convergence

Welcome to Part 19 of our 21 Part series: Calculus Revisited. We are in the middle of working with series. Today's session: Tests of Convergence.

In a calculus course, you are often asked if certain series converge - that is, does the series have a sum. You are not necessarily asked to find the sum itself, just to say if the series has one.

Hint: This is good to know, the p-series.

For a series


∑ 1/n^p
n = 1

this series converges when p > 1 and diverges when p ≤ 1.


Now for the tests:

Comparison Test:

Give the infinite series ∑ a(n), find another comparable infinite series ∑ b(n). The series used for comparison dominates the series in question. Or:

b_n ≥ a_n for each n an integer

In addition, all terms both series, ∑ a(n) and ∑ b(n), are positive.

If ∑ b(n) converges, so does ∑ a(n).

However, if ∑ a(n) diverges, so does ∑ b(n).

There is a variant of the comparison test call the limit test. That is if

lim ( a_n / b_n) = L as n → ∞,

If ∑ b(n) converges and L < ∞, ∑ a(n) converges.
If ∑ b(n) diverges and L > 0, ∑ a(n) diverges.

Ratio Test:

For a given infinite series ∑ a(n), if

lim | a_n+1 / a_n | = L as n → ∞, and

L < 1,

then ∑ a(n) is absolutely convergent. If L = 1, the test is inconclusive. If L > 1, the series diverges.

Note: A series is absolutely convergent if

∑ |a(n)| = | a(1) | + | a(2) | + | a(3) | + ....

is convergent.

If ∑ a(n) converges but ∑ | a(n) | does not, then the series is said to be conditionally convergent.


Root Test:

For a given infinite series ∑ a(n), if

lim | a_n |^(1/n) = L as n → ∞, and

L < 1,

then ∑ a(n) is absolutely convergent. If L = 1, the test is inconclusive. If L > 1, the series diverges.

Alternating Series Test:

For the existing series:

∑ (-1)^n * a(n),

if the sequence {a_n} (ignoring the (-1)^n) is a strictly decreasing sequence of positive numbers (that is a_n+1 < a_n for all n), and

lim a_n = 0 as n → ∞,

the the alternating series is (at least) conditionally convergent.

Problems

1. Does this series converge?


∑ n^2 / (2n - 1)!
n = 1

Use the ratio test. Then:

a_n = n^2 / (2n - 1)!

a_n+1 = (n + 1)^2 / (2(n + 1) - 1)! = (n + 1)^2 / (2n + 1)!

a_n+1 / a_n
= (n + 1)^2 / (2n + 1)! * (2n - 1)! / n^2
= (n + 1)^2 / (n^2 * (2n + 1)(2n))
= (n^2 + 2n + 1) / (4n^4 + 2n^3)

As n → ∞, a_n+1 / a_n → 0 < 1.

By the ratio test, this series converges.

Sometimes reasoning will be necessary.

2. Does this series converge?


∑ 1 / (n * n^(1/n))
n = 1

Note that:
1 / (n * n^(1/n))
= 1 / (n^1 * n^(1/n))
= 1 / (n^(1 + 1/n))

Compare the series to the harmonic series:


∑ 1/n
n = 1

where 1/n ≥ 1/(n^(1 + 1/n))

By Limit test:

lim ( 1/(n^(1 + 1/n)) / (1/n) ) as n → ∞
= lim ( n / n^(1+ 1/n) ) as n → ∞

As n grows large, 1 + 1/n → 1
Hence, n / n^(1 + 1/n) → n / n → 1

Since ∑ (1/n) diverges, so does ∑ 1/ (n * n^(1/n))

3. Does this series converge?


∑ 1/(4n - 3)
n = 1

Use the limit test. Compare it to the harmonic series, which is known to diverge, and:

1/n ≥ 1/(4n - 3)

lim ( (1/(4n - 3)) / (1/n) ) as → ∞
= lim ( n / (4n - 3) ) as → ∞
= 1/4 > 0

Hence, the series in question diverges.

4. Does this series converge?

1 - 1/√3 + 1/√5 - 1/√7 + .... + (-1)^n/√(2n+1) + ....

Use the Alternating Series test.

Let a_n = 1/√(2n+1)

First a_n strictly decreases. Second, a_n → 0 as n → ∞.

By alternating series, the series conditionally convergent.

5. Does this series converge?

1/(2 ln 2) - 1/(3 ln 3) + 1/(4 ln 4) - 1/(5 ln 5) + ... + (-1)^n/(n ln n) + ....

Use the Alternating Series Test

Let a_n = 1/(n ln n),

a_n strictly decreases and a_n → 0 as n → ∞.

By alternating series, the series is conditionally convergent.


Next time we work with Taylor Series.

See you soon!

Eddie

This blog is property of Edward Shore. © 2012

Calculus Revisited #18: Series

Welcome to Part 18 of our wonderful 21 part of our Calculus Revisited Series. I hope you are enjoying this series. An announcement: Part 21 will be a "catch all" section - covering some of the topics we don't get to in detail in this series.

The next three blog entries will be about series. Today, the basics.

Series:

A series is a sum of terms in a sequence. The series can be finite or infinite. An infinite series is convergent (has a value) if the following is true:


∑ a_n = S
n=i

and S < ∞

Here are some famous series:

Arithmetic Series:

a + (a + d) + (a + 2d) + (a + 3d) + ...

Sum for a finite arithmetic series:

n-1
∑ a + k * d
k=0

= a * n + (d * n * (n -1))/2

Geometric Series:

a + a * r + a * r^2 + a * r^3 + ...

Sum for an infinite geometric series, provided that |r| < 1:


∑ a * r^k = a / (1 - r)
k = 0

Harmonic Series:


∑ 1/n
n=1

= 1 + 1/2 + 1/3 + 1/4 + 1/5 + ....

There is no closed formula for a finite harmonic series. In addition the infinite harmonic series diverges (has no sum).

Series Properties:

∑ c * a(n) = c * ∑ a(n) (c is a constant)

∑ a(n) + b(n) = ∑ a(n) + ∑ b(n)

n
∑ k = n * (n + 1)/2
k=1

n
∑ k^2 = n * (n + 1) * (2n + 1)/6
k = 1

n
∑ k^3 = n^2 *(n + 1)^2 / 4
k = 1


Subtracting from a whole:
If t > 1:

k
∑ a(n) =
n = t

∑( a(n) for n = 1 to k) - ∑( a(n) for n = 1 to t - 1)


Problems

1. Calculate

6
∑ 50 - 2k
k = 0

This is an arithmetic series with n = 6 + 1 = 7, a = 50, and d = -2.

Then the sum is:
(50)(7) + (-2 * 7 * 6)/2 = 308


2. Show why the (infinite) harmonic series is divergent.

Here is one way:

Let S be the sum of the harmonic series, that is:

S = 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + 1/8 + ...

Note that:
1 + 1/2 > 2/2
1/3 + 1/4 > 2/4
1/5 + 1/6 > 2/6
1/7 + 1/8 > 2/8
and so on...

Then we have 2/2 + 2/4 + 2/6 + 2/8 + ....

Which simplifies to 1 + 1/2 + 1/3 + 1/4 + .... = S

Which implies S > S, which is impossible.

The harmonic series is divergent.

3. Find the sum:


∑ .5^n + .3^n
n=0

We can first break the sum up:

∑(.5^n for n=0 to ∞) + ∑(.3^n for n=0 to ∞)

Both terms are geometric series. r = .5 for the first term and r = .3 for the second term.

Then:

∑(.5^n for n=0 to ∞) + ∑(.3^n for n=0 to ∞)
= 1 / (1 - .5) + 1 / (1 - .3)
= 1 / .5 - 1 / .7
= 24/7 ≈ 3.42857

4. Find the sum:


∑ 2 / (5^n)
n = 1

This looks like a geometric series with r = 1/5. If we can put the sum into it's proper form, perhaps by adding and subtracting 2 / 5^0:

∑( 2 / (5^n) for n = 1 to ∞)
= ∑ ( 2 / (5^n) for n = 0 to ∞) - 2 / 5^0
= ∑ ( 2 / (5^n) for n = 0 to ∞) - 2
= 2 / ( 1 - 1/5) - 2
= 2 / (4/5) - 2
= 5/2 - 2 = 1/2

5. Find the sum:

20
∑ k^2
k=10

Again, looks like a k^2 series, but use the subtraction from the whole technique and:

∑( k^2 for k = 10 to 20)
= ∑(k^2 for k = 1 to 20) - ∑(k^2 for k = 1 to 10 - 1)
= (20)(20 + 1)(2 * 20 + 1)/6 - (9)(9 + 1)(2 * 9 + 1)/6
= 17220 / 6 + 1710 / 6
= 15510 / 6 = 2585

Thank you once again for joining us. Next time we will work some series convergence tests.

Eddie

This blog is property of Edward Shore. © 2012

Wednesday, May 9, 2012

Calculus Revisited #17: Sequences

This Part 17 of the Calculus Revisited series. Today we are dealing with sequences.

Sequence:

A sequence of numbers is exactly what you think of, a list of numbers. An infinite sequence is a list of numbers that goes on forever. In calculus, it is understood that unless specified, a sequence is an infinite one.

{a_n} = a_1, a_2, a_3, .... , a_n; n is an integer

Convergent Sequence:

A sequence {a_n} converges when

lim a_n = L
n → ∞

when L < ∞.

If the above condition is not met, then the sequence is said to diverge.

Bounded Sequence:

A sequence {a_n} is bounded if there exists a C such that

-C ≤ a_N ≤ C (alternatively |a_n| ≤ C)

If the above condition is not true, then the sequence is said to be unbounded.

Problems

1. Write the first five terms of the sequence {a_n} = 1 / n^3. Does this sequence converge?

a_1 = 1 / 1^3 = 1
a_2 = 1 / 2^3 = 1/8
a_3 = 1 / 3^3 = 1/27
a_4 = 1 / 4^3 = 1/64
a_5 = 1 / 5^3 = 1/125

lim 1 / n^3 = 0 as n → ∞. Conclude that the sequence converges.

Note that the sequence is also bounded. | 1 / n^3 | ≤ 1

2. Write the first five terms of {a_n} = (-1)^(n-1) * n^2. Does this sequence converge.

a_1 = (-1)^(1-1) * 1^2 = 1
a_2 = (-1)^(2-1) * 2^2 = -4
a_3 = (-1)^(3-1) * 3^2 = 9
a_4 = (-1)^(4-1) * 4^2 = -16
a_5 = (-1)^(5-1) * 5^2 = 25

lim (-1)^(n-2) * n^2 as n → ∞:

(-1)^(n-2) is bounded between -1 and 1.
However, n^2 grows to infinity.

Hence (-1)^(n-2) * n^2 → ∞ as n → ∞, the sequence diverges.

Also the sequence is unbounded.

3. Find the first six terms of the sequence {a_n} defined by the recursion formula:

a_0 = 1; a_n = 3 * a_n-1 + 2

a_0 = 1
a_1 = 3 (0) + 2 = 2
a_2 = 3 (2) + 2 = 8
a_3 = 3 (8) + 2 = 26
a_4 = 3 (26) + 2 = 80
a_5 = 3 (80) + 2 = 242
a_6 = 3 (242) + 2 = 728

Coming up: Series!

Eddie

This blog is property of Edward Shore. © 2012


Tuesday, May 8, 2012

Calculus Revisited #16: Improper Integrals

Welcome to Part 16 of our 21 part Calculus Revisited series. Today we got down, dirty, and improper.

Improper Integrals


(I)


∫ f(x) dx =
a

lim ( ∫(f(x) dx, a, t) as t → ∞

If f(r) is undefined:

(II)

a
∫ f(x) dx =
r

lim ( ∫f(x) dx, t, a) as t → r+ (t approaches r from the right side)

(III)

r
∫ f(x) dx =
a

lim ( ∫(f(x) dx, a, t) as t → r- (t approaches r from the left side)


Problems

1. Calculate:

4
∫ 2/(x - 2) dx
2

Note 2/(x - 2) is defined at x = 2. This is an improper integral.

∫( 2/(x - 2) dx, 2, 4)
= lim ∫( 2/(x - 2) dx, t, 4) as t → 2+
= lim (2 ln(4 - 2) - 2 ln(t - 2)) as t → 2+

Note: ln t has no limit as t → 0

Therefore the integral has no finite answer. Yes, that can happen.

2. Calculate:

3
∫ dx / √(3 -x)
0

Note that 1/√(3 - x) is undefined at x = 3. Another improper integral.

∫( 1 / √(3 - x) dx, 0, 3)
= lim ∫( 1 / √(3 - x) dx, 0, t) as t → 3-
= lim (- 2 * √(3 - t) + 2 * √(3 - 0) ) as t → 3-
= lim ( -2 * √(3 - t) + 2√3) as t → 3-
= 2√3 ≈ 3.46410

3. Calculate:


∫ e^-x/2 dx
0

So:
∫ (e^(-x/2) dx, 0, ∞)
= lim (e^(-x/2) dx, 0, t) as t → ∞
= lim (-1/2* e^(-t/2) + 1/2 * e^0 ) as t → ∞
= 0 + 1/2
= 1/2

Next time we are going to work with sequences.

Until then, have a great day!

Eddie

This blog is property of Edward Shore. © 2012


Monday, May 7, 2012

Calculus Revisited #15: Infinite Limits

We have arrived at the 15th blog entry of the 21 entry series of Calculus Revisited. It is all about infinity today, and some quick tips with deal with infinity and limits.

Infinite Limits

General Rules for Polynomials

Let p(x) be a polynomial with degree n. The lead term of p(x) is a_n*x^n.

If n is even and a_n is positive:
* p(x) →+∞ as x → +∞
* p(x) → +∞ as x → -∞

If n is even and a_n is negative:
* p(x) → -∞ as x → +∞
* p(x) → -∞ as x → -∞

If n is odd and a_n is positive:
* p(x) → +∞ as x → +∞
* p(x) → -∞ as x → -∞

If n is odd and a_n is negative:
* p(x) → -∞ as x → +∞
* p(x) → +∞ as x → -∞

Generally: 1 / p(x) → 0 as x → +∞ or x → -∞

If p(x)/q(x) have the same degree, then

p(x)/q(x) → (lead coefficient of p(x)) / (lead coefficient of q(x))

as x → +∞ or x → -∞

General Rules for Other Functions

ln x → -∞ as x → -∞
ln x → +∞ as x → +∞

e^x → 0 as x → -∞
e^x → +∞ as x → +∞

e^-x → +∞ as x → -∞
e^-x → 0 as x → +∞

sin x has no limit as x → +∞ or x → -∞

cos x has no limit as x → +∞ or x → -∞

tan x has no limit as x → +∞ or x → -∞

Note that sin x and cos x are both bounded between -1 and 1.

L'Hospital's Rule

For indeterminate forms 0/0, +∞/+∞, -∞/-∞ you can use the rule:

lim f(x)/g(x) =
x → a

lim f'(x)/g'(x)
x → a

Let's go over some problems.

Problems

1. Find: lim (1/x * sin) as x → ∞

We know that:

lim 1/x = 0 as x → ∞ and sin x is bounded.

Then the overall limit is 0 * (a number between -1 and 1) = 0

2. Find lim (e^(-x^2)) as x → ∞

In general, e^-x → 0 as x → ∞

Even though x^2 grows, e^-x shrinks faster and is dominant.

Hence lim (e^(-x^2)) = 0 as x → ∞.

The next three problems uses the p(x)/q(x) rules.

3. lim (x^2 + 1)/(x - 2) as x → ∞

Degree of numerator = 2
Degree of denominator = 1

Numerator will grow faster than the denominator.

Then lim (x^2 + 1)/(x - 2) → ∞ as x → ∞

4. lim (x^2 + 1)/(x^2 - 1) as x → ∞

Degree of numerator = 2
Degree of denominator = 2

Then lim (x^2 + 1)/(x^2 - 1) = 1/1 = 1 as x → ∞

5. lim (x^2 + 1)/(x^3 - 1) as x → ∞

Degree of numerator = 2
Degree of denominator = 3

Denominator will faster than numerator.

Then lim (x^2 + 1)/(x^3 - 1) = 0 as x → ∞

The next two problems uses L'Hospital's Rule.

6. lim (x^2 / e^x) as x → ∞

lim (x^2 / e^x) as → ∞ = ∞/∞ (Indeterminate form)

Applying the rule:

lim (2x / e^x ) as x → ∞ = ∞/∞ (Indeterminate form)

One more time:

lim (2 / e^x) as x → ∞ = 0

Therefore, lim (x^2 / e^x) = 0 as x → ∞

7. lim (sin x / x) as x → 0

lim (sin x / x) as x → 0 = 0/0 (Indeterminate form)

Applying the rule:

lim (cos x/1) as x→ 0 = 1/1 = 1

Therefore, lim (sin x / x) = 1 as x → 0

This concludes today's session. Next time we work with improper integrals (yes, there are such things!).

Have a great day,

Eddie

This blog is property of Edward Shore. © 2012

Sunday, May 6, 2012

The Integral of ∫ √x * √(1-x) dx


I was recently asked by Mike Grigsby to integrate:

∫ √x √(1-x) dx

-----
Make the substitution:

x = sin^2 θ


Note:

√x = sin θ ,
θ = asin x ,
dx = 2 sin θ cos θ dθ ,
and
cos θ = √(1 - sin^2 θ )
-----

Hence:

∫ √x √(1-x) dx (x to θ)
= ∫ sin θ * √(1 - sin^2 θ )* 2 *sin θ * cos θ dθ
= 2 ∫ sin^2 θ cos^2 θ dθ
= 2 ∫ (1 - cos^2 θ ) * cos^2 θ dθ
= 2 ∫ cos^2 θ - cos^4 θ dθ
= 2 ∫ 1/8 - 1/8 * cos (4θ) dθ (See Note A)
= 2 ( θ/8 - 1/8 * 1/4* sin (4θ))
= 2 ( θ/8 - 1/32 * sin (4θ))
= 2 ( θ / 8 - 1/32 * [8 sin θ cos^3 θ - 4 sin θ cos θ]) (See Note B)
(θ to x)
= 2 ( asin √x / 8 - 1/32 * [8 √x (1 - x)^3/2 - 4 √x √(1-x)] )
= 2 ( asin √x / 8 - (√x √(1-x) (2 - 2x - 1))/8 )
= asin √x / 4 - (√x √(1-x) (1 - 2x)) / 4

Final:

∫ √x √(1-x) dx = 1/4 * ( asin √x - (√x √(1-x) (1 - 2x)) + C
for some constant C


-----
Note A

cos 2a = 2 cos^2 a - 1
cos^2 a = 1/2 * (cos 2a + 1)

cos^4 a
= [1/2 * (cos 2a + 1)]^2
= 1/4 * (cos^2 2a + 2 cos 2a + 1)
= 1/4 * ( (cos 4a + 1)/2 + 2 cos 2a + 1)
= 1/8 * (cos 4a + 4 cos 2a + 3)
= 1/8 * cos 4a + 1/2 * cos 2a + 3/8

cos^2 a - cos^4 a
= (1/2 * cos 2a + 1/2) - (1/8 * cos 4a + 1/2 * cos 2a + 3/8)
= 1/8 - 1/8 * cos 4a
-----

-----
Note B

sin 2a = 2 sin a cos a

sin 4a
= 2 sin 2a cos 2a
= 8 sin a cos^3 a - 4 sin a cos a

Using the triangle from above:

sin θ = √x
cos θ = √(1-x)
-----


This blog is property of Edward Shore. © 2012


Thursday, May 3, 2012

Calculus Revisited #14: Integration - Decomposition of Fractions

Welcome to Part 14 of our 21 part of our Calculus Revisited. Today's blog entry involves integration using decomposition of fractions.

Decomposition of Fractions

Here is the general strategy.

If the denominator has (x - c)^r then:

α / (x - c)^r = A1 / (x - c) + A2 / (x - c)^2 + ... + Ar / (x - c)^r

If the denominator has (x^2 + cx + d)^r then:

β / (x^2 + cx + d) = (A1x + B1) / (x^2 + cx + d) + (A2 x + B2) / (x^2 + cx + d)^2 + ... + (Ar x + Br) / (x^2 + cx + d)^r

Here are some examples.

Problems

Sometimes polynomial division is all you need.

1. ∫ (8x - 3) / (4x + 1) dx

First execute the division (8x - 3) / (4x + 1).

(8x - 3) / (4x + 1) = 2 - 5 / (4x + 1)

So

∫ (8x - 3) / (4x + 1) dx
= ∫ 2 - 5 / (4x + 1) dx
= 2x - 5/4 * ln(4x + 1)

Final: ∫ (8x - 3) / (4x + 1) dx = 2x - 5/4 * ln(4x+ 1) + C


Now here are two basic examples of decomposition of fractions.

2. ∫ dx / ((x + 1)(2x + 3))

Then:

A / (x + 1) + B / (2x + 3 ) = 1 / ((x + 1)(2x + 3))

A (2x + 3) + B (x + 1) = 1

2A(x) + 3A + B(x) + B = 1 + 0(x)

Look at the coefficients and match them.

Constant: 3A + B = 1
Coef. of x: 2A + B = 0

The next task is to solve for A and B.

3A + B = 1
2A + B = 0

Subtract the second equation from the first equation

A = 1

Find B

Using the first equation:
3(1) + B = 1
B = 1 -3
B = -2

Using the second equation:
2(1) + B = 0
2 + B = 0
B = -2

Conclude A = 1, B = -2

Back to our integral:

∫ dx / ((x + 1)(2x + 3))
= ∫ A / (x + 1) + B / (2x + 3) dx
= ∫ 1 / (x + 1) - 2 / (2x + 3) dx
= ln(x + 1) - ln(2x + 3)
= ln( (x + 1) / (2x + 3) )

Final: ∫ dx / ((x + 1)(2x + 3)) = = ln( (x + 1) / (2x + 3) ) + C

3. ∫ (2x + 1) / ( (x^2 + 1) (x - 1) ) dx

Decomposing:

(2x + 1) / ( (x^2 + 1) (x - 1) ) = (Ax + B) / (x^2 + 1) + C / (x - 1)

Then:

(Ax + B) (x - 1) + C (x^2 + 1) = 2x + 1
A(x^2) - A(x) + B(x) - B + C(x^2) + C = 2x + 1 + 0(x^2)
(A + C)x^2 + (-A + B)x + (-B + C) = (0)x^2 + (2)x + 1

Matching up terms of x^2, x, and the constant:
A + C = 0
-A + B = 2
-B + C = 1


From the first equation, C = -A (alternatively A = -C)

Using the second and third equations:
-A + B = 2
-B + C = 1

-A + B = 2
-B + (-A) = 1

-A + B = 2
-A - B = 1

Add the two equations together to get

-2A = 3
A = -3/2

Then: -A - B = 1
-(-3/2) - B = 1
- B = 1 - 3/2
B = 3/2 - 1
B = 1/2

So A = -3/2, B = 1/2, and C = 3/2

And:
∫ (2x + 1) / ( (x^2 + 1) (x - 1) ) dx
= ∫ (Ax + B) / (x^2 + 1) + C / (x - 1) dx
= ∫ ((-3/2)x + 1/2) / (x^2 + 1) + (3/2) / (x - 1) dx
= ∫ (-3/2)x / (x^2 + 1) + (1/2) / (x^2 + 1) + (3/2) / (x - 1) dx
= (-3/4) ln(x^2 + 1) + (1/2) atan x + (3/2) ln (x - 1)

Final:
∫ (2x + 1) / ( (x^2 + 1) (x - 1) ) dx = (-3/4) ln(x^2 + 1) + (1/2) atan x + (3/2) ln (x - 1) + C

That concludes our integration techniques section. Next time we move to infinite limits.

Until next time, take care,

Eddie

This blog is property of Edward Shore. © 2012

Calculus Revisited #13: Integrals Involving Trigonometric Identities

We are at Part 13 of a 21 part series. This time we will work with integrals involving trigonometric identities.

Problems
All problems today will be indefinite integrals. Problems with definite integrals will be handled similarly.

Identities Involving
sin^2 x + cos^2 x = 1
cos (2x) = 1 - 2 sin^2 x
sin (2x) = 2 sin x cos x
sin^2 x = (1 - cos 2x)/2
cos^2 x = (1 + cos 2x)/2


1. ∫ cos^2 x dx

∫ cos^2 x dx
= ∫ 1 - sin^2 x dx
= ∫ 1 dx - ∫ sin^2 x dx
= x - ∫ 1/2 - 1/2 * cos 2x dx
= x - ( ∫ 1/2 dx - ∫ 1/2 * cos 2x dx )
= x - 1/2* x + 1/2 * ∫ cos 2x dx
= 1/2 * x + 1/2 * sin 2x * 1/2
= 1/2 * x + 1/4 * sin 2x

Final: ∫ cos^2 x dx = 1/2 * x + 1/4 * sin 2x + C

Note:
∫ cos (ax) dx = sin (ax)/a
∫ sin (ax) dx = -cos (ax)/a


2. ∫ sin^2 x cos^2 x dx

∫ sin^2 x cos^2 x dx
= ∫ (1 - cos 2x)/2 * (1 + cos 2x)/2 dx
= ∫ 1/4 * (1^2 - cos^2 (2x)) dx
= 1/4 * ( ∫ 1 - cos^2 (2x) dx )
= 1/4 * ( ∫ 1 - (1 + cos 4x)/2) dx )
= 1/4 * ( ∫ 1/2 - 1/2 * cos 4x dx)
= 1/4 * (1/2 * x - 1/8 * sin 4x)

Final: ∫ sin^2 x cos^2 x dx = 1/4 * (1/2 *x - 1/8 * sin 4x) + C

Trigonometric Substitutions
If the integrand has...

√(a^2 - x^2): use the substitution x = a sin u, dx = a cos u du

√(a^2 + x^2): use the substitution x = a tan u, dx = a sec^2 u du

√(x^2 - a^2): use the substitution x = a sec u, dx = a tan u sec u du

These can get messy!

Identity: 1 + tan^2 x = sec^2 x

3. ∫ 1 / √(4 - x^2) dx

a^2 = 4
a = 2
x = 2 sin u
dx = 2 cos u du

∫ 1/√(4 - x^2) dx
= ∫ (2 cos u) / √(4 - 4 sin^2 u) du
= ∫ (2 cos u) / (√4 * √(1 - sin^2 u) ) du
= ∫ (2 cos u) / (2 * √( cos^2 u ) ) du
= ∫ (2 cos u) / (2 * cos u) du
= ∫ 1 du
= u

x = 2 sin u implies that u = asin(x/2)

= asin(x/2)

Final: ∫ 1 / √(4 - x^2) dx = asin(x/2) + C

4. ∫ 1/ √(x^2 + 64) dx

a^2 = 64
a = 8
x = 8 tan u
dx = 8 sec^2 u du
u = atan(x/8)

∫ 1/ √(x^2 + 64) dx
= ∫ (8 sec^2 u)/(√(64 * tan^2 u + 64) du
= ∫ (8 sec^2 u)/(8 * √(sec^2 u)) du
= ∫ (8 sec^2 u)/(8 * sec u) du
= ∫ sec u du

∫ sec x dx = ln |sec x + tan x|

= ln |sec u + tan u|
= ln | sec(atan(x/8)) + tan(atan(x/8)) |

Refer to the right triangle below:




u = atan (x/8)

tan u = x/8

cos u = 8/√(x^2 + 64)

sec u = √(x^2 + 64)/8


Then:

ln | sec(atan(x/8)) + tan(atan(x/8)) |
= ln | √(x^2 + 64)/8 + x/8 |
= ln | √(x^2 + 64) + x | - ln 8

Final:
∫ 1 / √(x^2 + 64) dx
= ln | √(x^2 + 64) + x | - ln 8 + C

Note that ln 8 + C is a constant. Then.

∫ 1 / √(x^2 + 64) dx
= ln | √(x^2 + 64) + x | + C

5. ∫ 1 / (x^2 - 25)^(3/2) dx

a^2 = 25
a = 5
x = 5 sec u
u = asec(x/5) = acos(5/x)
dx = 5 sec u tan u du

1 + tan^2 x = sec^ x

Then:
∫ 1 / (x^2 - 25)^(3/2) dx
= ∫ (5 sec u tan u) / ( 25 sec^2 u - 25 )^(3/2) du
= ∫ (5 sec u tan u) / ( 25 tan^2 u )^(3/2) du
= ∫ (5 sec u tan u) / ( 25^(3/2) * tan^3 u ) du
= 5 / 25^(3/2) * ∫ (sec u tan u) / tan^3 u du
= 1/25 * ∫ cos u/sin^2 u du
= 1/25 * ∫ cot u csc u du

∫ cot x csc x dx = -csc x

5 / 25^(3/2) = 5 / ((5^2)^(3/2)) = 5 / (5^3) = 1 / 5^2 = 1/25

= 1/25 * -csc u
= -1/25 * csc(acos(5/x))

Refer to the triangle below:


x = 5 sec u

x/5 = sec u

5/x = cos u

√(x^2 - 25)/x = sin u

x/√(x^2 - 25) = csc u


Then:

-1/25 * csc(acos(5/x))
= -1/25 * x/√(x^2 - 25)

Final:
∫ 1 / (x^2 - 25)^(3/2) dx = -1/25 * x / √(x^2 - 25) + C

That concludes Part 13 of our series. Next time we will work with decomposition of fractions.

Have a good day,

Eddie


This blog is property of Edward Shore. © 2012

Numworks (Python): Determining Earth’s Acceleration of Gravity

Numworks (Python): Determining Earth’s Acceleration of Gravity Introduction Note: We will only be using SI units on this blog en...