Jump to content

Wikipedia:Reference desk/Mathematics: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 528: Line 528:


If I can achive X% Average return, does that mean I can always take out X% of the princaple each year? [[User:12.183.203.184|12.183.203.184]] 03:52, 28 April 2006 (UTC)
If I can achive X% Average return, does that mean I can always take out X% of the princaple each year? [[User:12.183.203.184|12.183.203.184]] 03:52, 28 April 2006 (UTC)

<pre>

How to calculate various interest rate problem
----------------------------------------------

It came as a surprise to me to learn that there are people who
are not able to perform simple interest rate calculations. For
example, about 4 years ago, I went into a bank to open a term
deposit account for my dad. I was shocked when the bank cashier was
unable to calculate for me the amount of money I should put into
the term deposit account in order to obtain a sum of $5000 at
the end of a three year period.

So here it is, here is how to calculate those interest. I didn't
learn any of this from any text book. I learn some of them from
my dad and calculated the rest from first principles.


Indentities
===========

a*(1 - r^n)
a + a*r + a*r^2 + a*r^3 + ... + a*r^(n-1) = -----------
1 - r

r - r^(n+1)
r + r^2 + r^3 + ... + r^n = -----------
1 - r


Abbreviations of terms used in equations
========================================

In order to ensure precise definitions are used in the equations
of various financial formulas, I am using my own brand of "PITY"
abbreviations of the four common financial terms. I have chosen
the "PITY" abbreviations because I had (taken) PITY (on) the poor
fellows out there who have trouble remembering various "non-sensical"
terms. The abbreviations are:

P Principal
I Interest rate
T Terms
Y paYment


Principal is the original amount of money used in an investment or
could be used for an investment.

Interest rate is the rate an (investment or debt) grows or shrinks.
The rate MUST be given in relation to a time unit. In the formulas
used below, the interest rate is chosen to be in units of
"unit value per unit Term". Example "0.0024 per month" where
the unit Term is one month. For those who are used to percentage
(which is just about everyone else), it is very easy to convert
from percentage to unit value. The chart below shows the
relationship.

Percentage Unit Value
1% 0.01
2% 0.02
10% 0.10
78% 0.78
100% 1.00

Term is the smallest indivisible unit of time used in the
calculation of the financial compound interest equations.

paYment is the regular amount paid in an annuity, mortgage or
other forms of regular payments.

Worked examples
===============

1) Really really really easy interest calculation

What is the final amount of money for an account with the initial
amount of $1234 with an interest of 7% per year calculated(and
credited) yearly after a period of 1 year.

Principal P = $1234
Interest I = 0.07 per year(Note 0.07 is 7%)
Terms T = 1 year

Solution:

Final amount = Principal * Growth

Let F be the final amount
Let P be the principal
Let G be the growth

F = P * G

but we know that the growth is 7% per year for 1 year. Here I use
the term "Base" to denote the base of growth ie 1.0

G = (Base + Interest) ^ Terms
G = (1.0 + 0.07) ^ 1
G = 1.07

So we have the formula

F = P*(1+I)

F = $1234 * 1.07
= $1320.38


2) Easy compound interest calculation

What is the final amount of money for an account with the initial
amount of $6543 with an interest of 6.5% per year calculated(and
credited) yearly after a period of 8 year.

Principal P = $6543
Interest I = 0.065 per year (Note 0.065 is 6.5%)
Terms T = 8 year

Solution:

F = P * (1 + I)^T
= $6543 * (1+0.065)^8
= $6543 * (1.065)^8
= $6543 * 1.65499
= $10828.64

3) Compound interest calculation

What is the final amount of money for an account with the initial
amount of $8361 with an interest of 4.9% per year calculated(and
credited) monthly after a period of 17 year.

Principal P = $8361
Interest I = 0.049/12 per month (Note 0.049 is 4.9%. Since interest is
calculated monthly, we must divide the yearly
interest by 12 to get the interest per month)
Terms T = 17 * 12 = 204 months (because interest is calculated
monthly)

Solution:

F = P * (1 + I)^T
= $8361 * (1+0.049/12)^204
= $8361 * (1.00408333)^204
= $8361 * 2.29631
= $19199.46

4) Compound interest calculation

What is the final amount of money for an account with the initial
amount of $2973 with an interest of 2.9% per year calculated(and
credited) daily after a period of 4 year.

Principal = $2973
Interest = 0.029/365.25 per day
(Note 0.029 is 2.9%. Since interest is
calculated daily, we must divide the yearly
interest by 365.25 to get the interest per day)
Terms = 4 * 365.25 = 1461 days (because interest is calculated
daily)

Solution:

F = P * (1 + I)^T
= $2973 * (1+0.029/365.25)^1461
= $2973 * (1.00007939767)^1461
= $2973 * 1.1229907
= $3338.65


5) Compound interest calculation

What is the final amount of money for an account with the initial
amount of $2973 with an interest of 2.9% per year calculated(and
credited) instantanously after a period of 4 year.

Principal P = $2973
Interest I = 0.029 per year (Note 0.029 is 2.9%. Since interest is
calculated instantanously, we must leave it at 2.9%)
Terms T = 4 years

Solution:

F = P * (e^I)^T Note: e= 2.71828182846
= $2973 * (e^0.029)^4
= $2973 * 1.0294245^4
= $2973 * 1.1229958
= $3338.66

or

F = P * (e^(I*T))

6. Annuity with a payment of $500 made at the end of each year.
The interest is 6.7% per year. What is the amount after 3
years?

Interest I = 0.067 per year
Term T = 3 years
Payment Y = $500

Solution:

F = Y * ( (1+I)^T - 1 ) / I
= $500 * ( (1.067)^3 - 1 ) / 0.067
= $500 * ( 1.214767 - 1 ) / 0.067
= $500 * 0.214767 / 0.067
= $500 * 3.2054
= $1602.74

Proof:

F = Y*(1+I)^0 + Y*(1+I)^1 + Y*(1+I)^2
let r = (1+I)
= Y * (r^0 + r^1 + r^2)
= Y * ( 1 + r^1 + r^2)

in general
F = Y * ( 1 + r^1 + r^2 + r^3 + ... + r^(T-1) )

Y * ( 1 - r^T)
= --------------
1 - r

but r^T = (1 + I)^T

1 - r^T 1 - (1+I)^T
thus ------- = ---------------
1 - r 1 - ( 1 + I )

1 - (1+I)^T
= -----------
-I

(1 + I)^T - 1
= ---------------
I

Y * (1 + I)^T - 1
F = -------------------
I

7. Annuity with a payment of $500 made at the beginning of each year.
The interest is 6.7% per year. What is the amount after 3
years?

Interest I = 0.067 per year
Term T = 3 years
Payment Y = $500

Solution:

F = Y * ( (1+I)^(T+1) - (1+I) ) / I
= $500 * ( 1.067^4 - 1.067) / 0.067
= $500 * ( 1.29615 - 1.067) / 0.067
= $500 * 0.22915 / 0.067
= $500 * 3.42
= $1710.07

Proof:

F = Y*(1+I)^1 + Y*(1+I)^2 + Y*(1+I)^3
= Y * ( (1+I)^1 + (1+I)^2 + (1+I)^3 )

in general
F = Y * ( (1+I)^1 + (1+I)^2 + ... + (1+I)^T )
let r = (1+I)
F = Y * ( r^1 + r^2 + ... + r^T )
= Y * ( r - r^(T+1) ) / ( 1 - r )
= Y * ( (1+I) - (1+I)^(T+1) ) / ( 1 - (1+I) )
= Y * ( (1+I)^(T+1) - (1+I) ) / I

8. The family court orders you to give your former wife a payment of $500
made at the end of each year for 3 years. The interest is 6.7% per year.
You would like to buy out the obligation by paying her a lump sum
instead. How much should you pay in the lump sum?

Interest I = 0.067 per year
Term T = 3 years
Payment Y = $500

Solution:

Y * ( 1 - 1/(1+I)^T )
F = ----------------------
I

$500 ( 1 - 1/1.067^3 )
= ----------------------
0.067

$500 ( 1 - 1/1.21477 )
= ----------------------
0.067

$500 * 0.17680
= ---------------
0.067

= $1319.38

Proof:

The amount you need to pay is equivalent to an amount which you put
into an interest account which your wife can withdraw the payment
at the end of each year. The account should be empty when she made
the last payment withdraw.

Since she makes 3 withdraws, assume the amount needed at the start of
the period to pay for each withdraw are F1,F2 and F3.
Thus we have

let x = (1 + I)

F1 * x = Y
F1 = Y / x

F2 * x^2 = Y
F2 = Y / x^2

F3 * x^3 = Y
F3 = Y / x^3

Therefore the amount you need to put into the interest account at the
start of the period is

F = F1 + F2 + F3
= Y ( 1/x + 1/x^2 + 1/x^3 )
let r = (1/x)
= Y ( r + r^2 + r^3)

in general
F = Y * ( r^1 + r^2 + ... + r^T )

Y * ( r - r^(T+1) )
= -------------------
1 - r

Y * ( 1/x - 1/x^(T+1) )
= -----------------------
1 - 1/x

Y * ( 1 - 1/x^T )
= -----------------
x - 1

Y * ( 1 - 1/(1+I)^T )
= ---------------------
(1+I) - 1

Y * ( 1 - 1/(1+I)^T )
= ----------------------
I

9. The family court orders you to give your former wife a payment of $500
made at the beginning of each year for 3 years. The interest is 6.7% per
year. You would like to buy out the obligation by paying her a lump sum
instead. How much should you pay in the lump sum?

Interest I = 0.067 per year
Term T = 3 years
Payment Y = $500

Solution:

Y * ( (1+I) - 1/(1+I)^(T-1) )
F = ------------------------------
I

$500 ( 1.067 - 1/1.067^2 )
= --------------------------
0.067

$500 ( 1.067 - 1/1.13849 )
= --------------------------
0.067

$500 * 0.18864
= ---------------
0.067

= $1407.78

Proof:

The amount you need to pay is equivalent to an amount which you put
into an interest account which your wife can withdraw the payment
at the beginning of each year. The account should be empty when she
made the last payment withdraw.

Since she makes 3 withdraws, assume the amount needed at the start of
the period to pay for each withdraw are F1,F2 and F3.
Thus we have

let x = (1 + I)

F1 * 1 = Y
F1 = Y / 1

F2 * x = Y
F2 = Y / x

F3 * x^2 = Y
F3 = Y / x^2

Therefore the amount you need to put into the interest account at the
start of the period is

F = F1 + F2 + F3
= Y ( 1/1 + 1/x + 1/x^2 )
let r = (1/x)
= Y ( 1 + r + r^2)

in general
F = Y * ( 1 + r + ... + r^(T-1) )

Y * ( 1 - r^T )
= ---------------
1 - r

Y * ( 1 - 1/x^T )
= -----------------
1 - 1/x

Y * ( x - 1/x^(T-1) )
= ---------------------
x - 1

Y * ( (1+I) - 1/(1+I)^(T-1) )
= -----------------------------
(1+I) - 1

Y * ( (1+I) - 1/(1+I)^(T-1) )
= -----------------------------
I

10. You are an evil used car salesman who charges 18% interest per annum.
There is a customer who wants to buy a $8000 car from you, you manage
to get her to agree to a finance deal whereby she pays for car in
32 months installments payable at the end of each month. How much
does she have to pay you each month?

Principle P = $8000
Interest I = 0.18/12 = 0.015 per month
Term T = 32 months

Solution:

P * I
F = ---------------------
1 - ( 1 / (1+I)^T )

$8000 * 0.015
= ---------------------
1 - ( 1 / 1.015^32 )

$120
= ---------------------
1 - ( 1 / 1.610324 )

$120
= ---------------------
1 - 0.6209929

= $316.61

Proof:

At the end of 32 months, the amount you received from her must be
equal to the price of the car plus interest for 32 months.

Y * ((1+I)^T - 1)
P * (1+I)^T = ----------------- ( from formula/problem no 6 )
I

rearrange the equation

P * I * (1+I)^T
Y = ---------------
(1+I)^T - 1

P * I
Y = ---------------------
1 - ( 1 / (1+I)^T )

11. You are an evil used car salesman who charges 18% interest per annum.
There is a customer who wants to buy a $8000 car from you, you manage
to get her to agree to a finance deal whereby she pays for car in
32 months installments payable at the beginning of each month. How much
does she have to pay you each month?

Principle P = $8000
Interest I = 0.18/12 = 0.015 per month
Term T = 32 months

Solution:

P * I * (1+I)^(T-1)
F = -------------------
(1+I)^T - 1

$8000 * 0.015 * 1.015^31
= ------------------------
1.015^32 - 1

$8000 * 0.015 * 1.586526
= ------------------------
1.610324 - 1

$190.383120
= -----------
0.610324

= $311.93

Proof:

At the end of T-1 (31) months, the amount you received from her must be
equal to the price of the car plus interest for T-1 (31) months. Note:
on the last month, she pays at the beginning of the month, ie you
don't any interest for the last month.

Y * ((1+I)^T - 1)
P * (1+I)^(T-1) = ----------------- ( from Appendix A )
I

let r= 1+I

Y * (r^T - 1)
P * r^(T-1) = -------------
I

rearrange the equation

P * I * r^(T-1)
Y = ---------------
r^T - 1

P * I * (1+I)^(T-1)
Y = -------------------
(1+I)^T - 1

12. You are an evil used car salesman who charges 18% interest per annum.
There is a customer who wants to buy a $8000 car from you, you manage
to get her to agree to a finance deal whereby she pays for car in
installments of $300 payable at the end of each month. For how many
months does she have give you $300?

Principle P = $8000
Interest I = 0.18/12 = 0.015 per month
Payment Y = $300

Solution:

LOG Y - LOG(Y - P*I)
F = --------------------
LOG(1+I)

LOG $300 - LOG($300 - $8000 * 0.015)
= ------------------------------------
LOG 1.015

2.477121 - LOG 180
= ---------------------
0.00646604

2.477121 - 2.255272
= ---------------------
0.00646604

0.221848
= ----------
0.00646604

= 34.3 months

= 35 months (rounding up)

Proof:

At the end of T months, the amount you received from her must be
equal to the price of the car plus interest for T months.

Y * ((1+I)^T - 1)
P * (1+I)^T = ----------------- ( from formula/problem no 6 )
I

rearrange the equation


(1+I)^T * ( P*I - Y ) = -Y

(1+I)^T = Y / (Y - P*I)

take log of both sides

T * LOG(1+I) = LOG Y - LOG(Y - P*I)

LOG Y - LOG(Y - P*I)
T = --------------------
LOG(1+I)

13. You are an evil used car salesman who charges 18% interest per annum.
There is a customer who wants to buy a $8000 car from you, you manage
to get her to agree to a finance deal whereby she pays for car in
installments of $300 payable at the beginning of each month. For how many
months does she have give you $300?

Principle P = $8000
Interest I = 0.18/12 = 0.015 per month
Payment Y = $300

Solution:

LOG (Y) - LOG(Y - P*I/(1+I))
F = ------------------------
LOG(1+I)

LOG($300) - LOG($300 - $8000 * 0.015/1.015)
= -------------------------------------------------
LOG 1.015

LOG 300 - LOG 181.77
= ---------------------
0.00646604

2.47712 - 2.25953
= ---------------------
0.00646604

0.217591
= ----------
0.00646604

= 33.65 months

= 34 months (rounding up)

Proof:

At the end of T-1 months, the amount you received from her must be
equal to the price of the car plus interest for T-1 months. Note:
on the last month, she pays at the beginning of the month, ie you
don't any interest for the last month.

Y * ((1+I)^T - 1)
P * (1+I)^(T-1) = ----------------- ( from Appendix A )
I

let r= 1+I

Y * (r^T - 1)
P * r^(T-1) = -------------
I

rearrange the equation

r^T * ( Y - P*I/r ) = Y

r^T = Y / (Y - P*I/r)

take log of both sides

T * LOG(1+I) = LOG(Y) - LOG(Y - P*I/(1+I))

LOG (Y) - LOG(Y - P*I/(1+I))
T = ------------------------
LOG(1+I)

14. You are an evil used car salesman who has a customer buying a
$8000 car from you. You manage to get her to agree to a finance
deal whereby she pays an installment of $300 at the end of each
month for 38 months to own the car. What evil interest rate are
you charging her?

Principle P = $8000
Term T = 38 months
Payment Y = $300

Solution:

Y 1
Inew = - * ( 1 - ------------ )
P (1 + Iold)^T

n In
===========================
0 1.0
1 0.03700
2 0.02824
3 0.02448
4 0.02254
5 0.02142
6 0.02074
7 0.02031
8 0.02003
9 0.01985
10 0.01973
11 0.01965
12 0.01960
13 0.01956
14 0.01954
15 0.01953
16 0.01952
17 0.01951
18 0.01950
19 0.01950
20 0.01950

answer is 0.01950 per month or 0.2340 per year (23.4% per annum)

Proof:

At the end of T months, the amount you received from her must be
equal to the price of the car plus interest for T months.

Y * ((1+I)^T - 1)
P * (1+I)^T = ----------------- ( from formula/problem no 6 )
I

rearrange the equation

(1+I)^T * Y - Y
I = ---------------
(1+I)^T * P

Y Y
I = --- - ----------
P P*(1+I)^T

Y 1
I = --- * ( 1 - ------- )
P (1+I)^T

We must use the iterative numerical method to solve the above equation
because the equation is non-linear and attempts to solve it by
approximating the equation into simpler polynomials leads to an
ill-conditioned polynomial equation that gives the wrong answers.

15. You are an evil used car salesman who has a customer buying a
$8000 car from you. You manage to get her to agree to a finance
deal whereby she pays an installment of $300 at the beginning of each
month for 38 months to own the car. What evil interest rate are
you charging her?

Principle P = $8000
Term T = 38 months
Payment Y = $300

Solution:

Y 1
Inew = --- * ( 1+Iold - -------------- )
P (1+Iold)^(T-1)

n In
===========================
0 1.0
1 0.07500
2 0.03773
3 0.02939
4 0.02576
5 0.02383
6 0.02271
7 0.02201
8 0.02157
9 0.02128
10 0.02109
11 0.02097
12 0.02089
13 0.02083
14 0.02079
15 0.02077
16 0.02075
17 0.02074
18 0.02073
19 0.02073
20 0.02072
21 0.02072
22 0.02072
23 0.02072

answer is 0.02072 per month or 0.2486 per year (24.9% per annum)

Proof:

At the end of T-1 (37) months, the amount you received from her must be
equal to the price of the car plus interest for T-1 (37) months. Note:
on the last month, she pays at the beginning of the month, ie you
don't any interest for the last month.

Y * ((1+I)^T - 1)
P * (1+I)^(T-1) = ----------------- ( from Appendix A )
I

rearrange the equation

(1+I)^T * Y - Y
I = ---------------
(1+I)^(T-1) * P

Y *(1+I) Y
I = --------- - --------------
P P*(1+I)^(T-1)

Y 1
I = --- * ( 1+I - ----------- )
P (1+I)^(T-1)

We must use the iterative numerical method to solve the above equation
because the equation is non-linear and attempts to solve it by
approximating the equation into simpler polynomials leads to an
ill-conditioned polynomial equation that gives the wrong answers.


==========================================================================


Most common errors and mistakes
===============================

Below the are most common mistakes made in the calculation of
financial equations. They are provided below in the hope that
people would learn from the mistakes that others made.

1) Confusing the interest rate per year with interest rate per month.

What is the final amount of money for an account with the initial
amount of $8361 with an interest of 4.9% per year calculated(and
credited) monthly after a period of 7 year.

Principal = $8361
Interest = 0.049
Terms = 7*12=84

Solution:

F = P * (1 + I)^T
= $8361 * (1+0.049)^84
= $8361 * 55.6084
= $464942.48 WRONG!!!

2) Confusing the terms in months with terms in years and using the
yearly interest rate instead of monthly.

What is the final amount of money for an account with the initial
amount of $8361 with an interest of 4.9% per year calculated(and
credited) monthly after a period of 7 year.

Principal = $8361
Interest = 0.049
Terms = 7

Solution:

F = P * (1 + I)^T
= $8361 * (1+0.049)^7
= $8361 * 1.3977
= $11686.56 WRONG!!!

3) Using the interest rate in percentage instead of in unit value.

What is the final amount of money for an account with the initial
amount of $8361 with an interest of 4.9% per year calculated(and
credited) monthly after a period of 7 year.

Principal = $8361
Interest = 4.9/12 = 0.4083
Terms = 7*12 = 84

Solution:

F = P * (1 + I)^T
= $8361 * (1+0.4083)^84
= $8361 * 3093107826969
= $25861474541289200 WRONG!!!

4) Confusing the terms in months with terms in years.

What is the final amount of money for an account with the initial
amount of $8361 with an interest of 4.9% per year calculated(and
credited) monthly after a period of 7 year.

Principal = $8361
Interest = 0.049/12 = 0.004083
Terms = 7

Solution:

F = P * (1 + I)^T
= $8361 * (1+0.004083)^7
= $8361 * 1.0289
= $8602.63 WRONG!!!

5) Misunderstanding the terms "Calculated monthly" and the term
"Credited monthly". Confusing the formulas provided with actual
formulas used by banks, finance companies or institutions.

This is perhaps one of the greatest mistakes made by people when
they use the formulas provided in this article. While it is true
that all the formulas provided here are correct, it does not mean
that this the exact formula a financial institution will use to
calculate your interest, mortgage, overdraft or payment.

The exact formula used will depend on the term and conditions of the
financial agreement. For example, there is no reason why a bank must
pay you interest every month. It could pay the interest on a half
yearly basis, on the calculatations of your minimum balance for each
month. In other words, interest is calculated monthly on lowest
balance and only paid into your account every six months.

This is precisely why the term "Calculated" and "Credited" are
important in interest rate calculations.

The term "Calculated monthly" refers to the fact that the amount of
interest you received is calculated at an monthly interval (usually
end of the month), however it does not tell you when will receive any
interest owing to you.

The term "Credited monthly" refers to the fact that you will receive
the amount of interest own to you on a monthly basis. Once you
received the interest, they will be used in the calculation for your
next interest thereby resulting in compound interest. That's why in
the equation for compound interest the Term always uses the same time
unit as the time unit for Crediting.

==========================================================================


Appendix A
============

How much money would you have at the START of the 4th month if you put
$200 into an account at the beginning of each month and the interest
rate is 0.005 per month.

I = 0.005 per month
T = 4 months
Y = $200

(1+I)^T - 1
F = Y * -----------
I

1.005^4 - 1
= $200 * -----------
0.005

1.02015 - 1
= $200 * -----------
0.005

= $200 * 4.0301

= $806.02

Proof

F = Y + Y*(1+I) + Y*(1+I)^2 + Y*(1+I)^3

in general

F = Y + Y*(1+I) + Y*(1+I)^2 + ... + Y*(1+I)^(T-1)

let r=1+I and rearrange

F = Y * (1+r+r^2+...+r^(T-1))

1-r^T
F = Y * -----
1-r

1 - (1+I)^T
F = Y * -----------
1 - (1+I)

(1+I)^T - 1
F = Y * -----------
I

</pre>

Revision as of 09:02, 28 April 2006

Science Mathematics Computing/IT Humanities
Language Entertainment Miscellaneous Archives
How to ask a question
  • Search first. It's quicker, because you can find the answer in our online encyclopedia instead of waiting for a volunteer to respond. Search Wikipedia using the searchbox. A web search could help too. Common questions about Wikipedia itself, such as how to cite Wikipedia and who owns Wikipedia, are answered in Wikipedia:FAQ.
  • Sign your question. Type ~~~~ at its end.
  • Be specific. Explain your question in detail if necessary, addressing exactly what you'd like answered. For information that changes from country to country (or from state to state), such as legal, fiscal or institutional matters, please specify the jurisdiction you're interested in.
  • Include both a title and a question. The title (top box) should specify the topic of your question. The complete details should be in the bottom box.
  • Do your own homework. If you need help with a specific part or concept of your homework, feel free to ask, but please don't post entire homework questions and expect us to give you the answers.
  • Be patient. Questions are answered by other users, and a user who can answer may not be reading the page immediately. A complete answer to your question may be developed over a period of up to seven days.
  • Do not include your e-mail address. Questions aren't normally answered by e-mail. Be aware that the content on Wikipedia is extensively copied to many websites; making your e-mail address public here may make it very public throughout the Internet.
  • Edit your question for more discussion. Click the [edit] link on right side of its header line. Please do not start multiple sections about the same topic.
  • Archived questions If you cannot find your question on the reference desks, please see the Archives.
  • Unanswered questions If you find that your question has been archived before being answered, you may copy your question from the Archives into a new section on the reference desk.
  • Do not request medical or legal advice.
    Ask a doctor or lawyer instead.
After reading the above, you may
ask a new question by clicking here.

Your question will be added at the bottom of the page.
How to answer a question
  • Be thorough. Please provide as much of the answer as you are able to.
  • Be concise, not terse. Please write in a clear and easily understood manner. Keep your answer within the scope of the question as stated.
  • Link to articles which may have further information relevant to the question.
  • Be polite to users, especially ones new to Wikipedia. A little fun is fine, but don't be rude.
  • The reference desk is not a soapbox. Please avoid debating about politics, religion, or other sensitive issues.

April 21

RSA and prime numbers

Please can someone explain to a non-mathematician why prime numbers are needed to create keys for RSA cryptosystems. Wouldn't any sufficiently large number be o.k.?

There are two reasons.
  1. Security. It is easier to factorize a number that is a product of many smaller numbers than a number that is only a product of two large ones (at least with some methods). There are also other attacks on RSA that work better if the modulus has small factors.
  2. Practical reason: Some of the mathematics involved in the cryptosystem relies on the numbers being prime. Basically, if p and q aren't prime you can't rely on the decrypt-operation being the inverse of the encrypt-operation. For a workable example, let p=3, q=8. Then the modulus is pq=24 and the totient is (p-1)(q-1)=16. 3 is relatively prime to 16, so we can choose that as the public key and 11 is the inverse modulo 16, so that will be our private key. Let us transmit the message "5". We encrypt: 5^3(mod 24)=5, and decrypt: 13^11(mod 24)=5. That worked! But now let us transmit "4": Encryption: 4^3 (mod 24)=16, decryption:16^11(mod 24)=16. That didn't work!
You can generalize the RSA-system to using more than two primes (which is "sort of" the same as just using arbitrary large numbers). That is called multi-prime RSA. Rasmus (talk) 12:53, 21 April 2006 (UTC)[reply]
The core idea behind the RSA version of public key cryptography are that we have a public key/private key pair based on prime factorization. Previous cryptography depended on a strictly private key, which caused a practical problem: how to securely transmit the key to wherever it was needed. The ability to have public keys revolutionized cryptography. Number theory is used to construct a pair such that the public key can be used to encrypt, the private key can be used to decrypt, but knowing the public key does not make it possible to decrypt nor to discover the private key.
One piece of the public key is the product of two large prime numbers. It is relatively easy to multiply p and q to get their product n; but if p, q, and n are sufficiently large, it is extremely timeconsuming to factor n to recover p and q. The technical details of the encryption and decryption don't actually require n to be a product of two large primes, but the security of the overall scheme relies upon it.
Any integer n greater than 1 is a product of some number of prime factors. The methods used to find the factors typically find small factors quickly. So a very large n like
2187250724783011924372502227117621365353169430893212436425770606409952999199375923223513177023053824,
even though it has 100 digits, can be factored almost instantly, because it is a product of 2s. But the number
2269868715257204734612142004082495122481735606947863309410992763455491328649178167436710530263617567,
which also has 100 digits, is the product of two random 50-digit primes, and considerably harder to factor. --KSmrqT 20:22, 21 April 2006 (UTC)[reply]
While the fact that the first number equals 2330 is obvious to a computer, the point might be made even clearer by choosing an example that is more easily factored by humans, such as, say,
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.
That's also a 100-digit number, but I doubt anyone here has any trouble factoring that. —Ilmari Karonen (talk) 22:48, 21 April 2006 (UTC)[reply]
True, except for the Lewis Carroll problem:
  • "Can you do Addition?" the White Queen asked. "What's one and one and one and one and one and one and one and one and one and one?"
  • "I don't know," said Alice. "I lost count."
  • "She can't do Addition," the Red Queen interrupted.
It's a quotation that always makes me smile. :-) --KSmrqT 00:43, 22 April 2006 (UTC)[reply]

Thanks for your help guys, I still don't think I understand. Probably because I stopped learning maths aged 14 (now 29). Please can you recommend a good primer on this?EmperorMoo 20:53, 21 April 2006 (UTC)[reply]

This is the good primer, along with the RSA article and its links. Can you condense your confusion into a clear followup question? --KSmrqT 00:33, 22 April 2006 (UTC)[reply]

Thanks everyone, I think I'm going to have to read more maths background before I'm able to understand. EmperorMoo 12:48, 23 April 2006 (UTC)[reply]

One thing I think that wasn't obvious in the above explanations that I wish to add is that somebody who knows all the prime factors of n (one part of the public key) can easily calculate the private key, but the cipher works with just knowing n and not the factors. This is why you have to make n hard to factor and also why you need large primes. Jeltz talk 14:54, 24 April 2006 (UTC)[reply]
And perhaps it is because RSA use modular arithmetic and rely on some very slightly advanced theorem in this field, for example, fermat's little theorem. You may want to have an in-depth understanding of this before thinking about RSA. Try searching on wikibooks for modular arithmetic also. --Lemontea 02:49, 28 April 2006 (UTC)[reply]

O genius Wikipedians, I pray to thee to give a helping hand to a fellow bemused user. This is a homework question, I apologize - but I'm not asking for the answer (as it is given), but more so the best way about going about the question in order to get the answer. If possible pls put this into proper Maths syntax, and give me a link to how to write in maths syntax:

A person wishes to walk from (0,0) to (1,1) in the x-y plane in the shortest possible time. The nature of the ground is such that the max. speed of walking is given by "v=v0(1 + αy)" where v0 and α are constants. Show that the path taken is the integral between 0 and 1 of √(1 + (y′)2) / (v0(1 + αy)). The next bit of the question is "Show that the path taken should be an arc of a circle with centre on the line y = −1/α". Please give me a nudge in the right direction. All help is completely appreciated. --Dangherous 13:31, 21 April 2006 (UTC) [reply]

You want to minimize the time. So given a path, let's find its time. If you know velocity and distance, then time = distance/velocity. For a curved path, this becomes
Then the total time is
simply by substituting the arc length formula and the velocity. To solve for the path, write the Euler-Lagrange equations for this quantity. For help on marking up math formulas, see meta:Help:Formula. -lethe talk + 14:46, 21 April 2006 (UTC)[reply]

April 22

Finding a given mean

I am having trouble with a specific problem from my statistics homework. I'd appreciate any help given.

Suppose you own a basketball team. Suppose also that in the NBA the average salary of players is $5,000,000. The lowest salary you can offer is $385,000. You plan to sign 15 players.

Construct a set of 15 data elements that have a mean of $5,000,000 spending the least amount of money possible.

Is there a formulaic way to solve such a problem? Or is the only way to fiddle around with various numbers? --Impaciente 02:25, 22 April 2006 (UTC)[reply]

Is that really the exact statement of the problem? It reads as if you always have to spend exactly $75,000,000 (to get a mean of 5 million among 15 people) but have many ways of doing so, the easiest being giving 5 million to each. Kusma (討論) 02:46, 22 April 2006 (UTC)[reply]
(after edit conflict) You want 15 numbers, none less than 385,000, with a mean of 5 million. I don't understand the bit about spending the least amount of money possible, since the total will always be 15*5 million = 75 million. To make it really simple, you could have 15 numbers, each exactly 5 million, or you could offer 1 million to each of 14 players, and 75-14 million = 61 million to one player.-gadfium 02:48, 22 April 2006 (UTC)[reply]
Yes, that was the wording of the problem. Come to think of it, it sounds sort of self-explanatory. But thanks a lot, to both of you. For future reference, anytime that a mean is given, the sum of the elements is also (implicitly) given as well? --Impaciente 02:54, 22 April 2006 (UTC)[reply]
So long as you know the number of elements, yes.-gadfium 03:34, 22 April 2006 (UTC)[reply]

Geometric Naming Conventions

What does the "kis" particle mean in the names of the following geometric figures (and others)?

I've noticed that all the figures in question have triangular faces, but I don't understand what the number (tria, tetra etc) represents. --72.140.146.246 03:34, 22 April 2006 (UTC)[reply]

They're from the Greek words for "three times", "four times", etc. In an n-akis polyhedron, each of the faces is replaced by n congruent isoceles triangles. For example, a pentakis dodecahedron is a dodecahedron with each pentagonal face replaced by five triangles. —Keenan Pepper 04:16, 22 April 2006 (UTC)[reply]
The Greek triakis means thrice, triple, three times, 3-fold; similarly for the others. Consider the triakis octahedron; each triangular face of the original octahedron is multiplied by raising a center point and creating a face for each edge, three altogether. Thus the triakis octahedron is a "tripled" octahedron, with 24 faces instead of 8. Similarly, the pentakis dodecahedron multiplies each original pentagonal face of a dodecahedron by raising a center point and creating five new faces.
With so many polyhedra to name, it's a challenge inventing systematic, meaningful, and distinct choices, nevermind memorable! --KSmrqT 05:06, 22 April 2006 (UTC)[reply]

Thank you. This is exactly what I wanted to know. But what about "disdyakis"? --72.140.146.246 12:55, 22 April 2006 (UTC)[reply]

I believe that's "double double", but check the articles for confirmation. --KSmrqT 22:33, 22 April 2006 (UTC)[reply]

Thanks. I did some investigation, and found that the disdyakis dodecahedron can be formed from a rhombic dodecahedron by quartering each face and raising the center point (as tetrakis). It was the rhombic part that got me. --72.140.146.246 20:56, 24 April 2006 (UTC)[reply]

possiblity of 10 events occurring

(No question.)

The probability of ten independent events with identical probability occurring is P^10, where P is the probability (from 0.0 to 1.0) of each individual event occurring. If the probability of each event is different, multiply all those probabilities to get the answer. StuRat 20:42, 22 April 2006 (UTC)[reply]
That's assuming the events are independent of eachother. --BluePlatypus 20:57, 22 April 2006 (UTC)[reply]
Hence my inclusion of the word "independent", LOL. StuRat 22:10, 22 April 2006 (UTC)[reply]

Try Poisson distribution. linas 00:28, 23 April 2006 (UTC)[reply]

April 23

Physics: A Dynamics Problem

A 20 kg box rests on a table. What is the weight of the box and the normal force acting on it? b) A 10 kg box is placed on top of the 20 kg box. Determine the normal force that the table exerts on the 20 kg box and the normal force that the 20 kg box exerts on the 10 kg box.

First I did: a)

   W = mg
   W = 20(9.81)
   W = 196.2 N (DOWN)
   ΣFy = ma

Since there is no movement in the vertical direction, Fy = 0

  FN - FG = 0
  FN = FG
  FN = 196.2 N (UP) 

This part was easy, but my question concerns the second part. I did:

b)

  ΣFy = ma

This equals zero again...and this where I'm unsure (FN2 = 10 kg object, FN1 20kg object)

  FN2? + FN1 - FG = 0
  FN1 = FG - FN2
  FN1 = 9.91(20) - 9.81(10)
  FN1 = 98.1 N (UP)

And the second part of part b...

  ΣF = ma
  FN - FG = 0
  FN = FG
  FN = 10(9.81)
  FN = 98.1 N (UP)

I'm not sure about this, that's what I have up there so if anyone can point me in the correct direction or explain to me why I'm right (I think I am, but I am not sure, and I need to be sure of the concept) it would be greatly appreciated. Thanks


C-c-c-c 04:02, 23 April 2006 (UTC)[reply]

For the second part, I assume you meant 98.1 N, which is correct. For the first part, there are two forces pushing the 20 kg box down, its own weight, and the weight of the box on top of it. The normal force from the table must cancel both of those. You can think of it as if the two together were a single 30 kg box. —Keenan Pepper 04:18, 23 April 2006 (UTC)[reply]

Right, I changed that. So, wait, have I done it right? I'm starting to think I haven't since I didn't include the FG for the 10kg box in the first part of question b. Instead should it be:

 ΣFy = ma
 FN1 + FN2 - FG1 -FG2 = 0
 FN1 = FG1 + FG2 - FN2
 FN1 = 9.81(20) + 9.81(10) - 9.81(10)
 FN1 = 196.2N (UP)

This doesn't seem right either, since it's the same as up top.... Help, utterly confused! C-c-c-c 04:26, 23 April 2006 (UTC)[reply]

FN2 is acting on the 10 kg box, not the 20 kg box. —Keenan Pepper 04:38, 23 April 2006 (UTC)[reply]

Isn't that what I have there? I have FN2 = 9.81(10) C-c-c-c 04:44, 23 April 2006 (UTC)[reply]

Yes, but you have FN1 + FN2 - FG1 - FG2 = 0. Why should the sum of those forces be zero if they are not all acting on the same object? —Keenan Pepper 04:53, 23 April 2006 (UTC)[reply]

But isn't that an entire system, can't you do it like that too? C-c-c-c 04:55, 23 April 2006 (UTC)[reply]

If you're considering both boxes together as a 30 kg object, then the weight is 30 kg * 9.8 m/s2 and you wouldn't include the normal force FN2 because that's internal to the object. The top box is pushing down just as hard as the bottom box is pushing up. —Keenan Pepper 05:47, 23 April 2006 (UTC)[reply]


Oh, I didn't know you didn't include internal forces. Okay that makes sense, thank you so much for you taking the time to going back and forth and helping me, I appreciate it! Thanks a bunch again. C-c-c-c 06:08, 23 April 2006 (UTC)[reply]

ISBN Checksum question

After explaining the process of determining the checksum of an ISBN, the ISBN article says, "Since 11 is a prime number, this scheme ensures that a single error (in the form of an altered digit or two transposed digits) can always be detected." How does 11's being prime affect its usefulness for checksumming? 139.55.22.138 19:54, 23 April 2006 (UTC)[reply]

If the modulus were a composite number, then some multipliers could be factors of the modulus, in which case some single-digit errors would not be detected. For example, if the modulus were 10 and the 5th digit were changed by 2, then that digit's contribution to the checksum would be changed by 2 * 5 = 10, so the total checksum would be the same. If the modulus is prime, that guarantees that none of the multipliers are factors. —Keenan Pepper 20:04, 23 April 2006 (UTC)[reply]

Stochastic Processes

How can I compute E[Max(X,Y)] (Mathematical Expectation)?! ‍‍‍‍‍Armandeh 22:07, 23 April 2006 (UTC)[reply]

Given what? —Keenan Pepper 15:32, 24 April 2006 (UTC)[reply]
With some assumptions, it is
-- Meni Rosenfeld (talk) 18:27, 24 April 2006 (UTC)[reply]
Just to clarify and fix typos (hoping that I don't offend by overwriting Keenan's edit-conflicting post that asked for them): the lowercase letters are probability density functions, and the uppercase letters are cumulative distribution functions. f/F go with X, and g/G with Y (or vice versa, of course). The assumptions are that X and Y are real and independent, unless I'm mistaken and you need more than those. Of course, the stuff in parentheses there is useful outside this formula as well, since it's just the PDF of .
If X and Y are codependent, you have to consider a PDF , and then you can calculate . To get a more fundamental result -- the PDF for T in this case -- note that , so (neglecting infinitessimal probabilities that will clearly contribute nothing) . For the case of , one recovers the above. --Tardis 21:18, 24 April 2006 (UTC)[reply]
A good assumption to add is that f and g exist to begin with, that is, F and G are differentiable. Depending on how strict our definition of the integral is, we can weaken this condition somewhat. -- Meni Rosenfeld (talk) 15:07, 26 April 2006 (UTC)[reply]

April 24

Vinogradov's version of the big O notation in TEX

Does anyone know what the control sequence for Vinogradov's version of the big O notation is? The closest I can find is , but the right "<" should be cut off where the left one ends. Often found in books on analytic number theory. Mon4 00:16, 24 April 2006 (UTC)[reply]

I think it is \lll as defined in the mathabx package. Unfortunately, the AMS packages also define \lll but for a different symbol (the same as but with three smaller-than symbols), so you'll need to do something special if you want use both packages. -- Jitse Niesen (talk) 02:05, 24 April 2006 (UTC)[reply]
If 's not the exact symbol you want, look at how \lll is defined in the mathabx package and if it's an appropriate definition, copy it over to your TeX file. Dysprosia 02:36, 24 April 2006 (UTC)[reply]
Perhaps the Unicode character "" (U+2AA1, LessLess, [DOUBLE NESTED LESS-THAN]) is what you seek. (Shown here at twice life size.) Your fonts may not include higher code points like this, so here's a link with an image. Of course, convincing your TeX to use it is another matter. --KSmrqT 04:21, 24 April 2006 (UTC)[reply]
This is the symbol I'm looking for. Indeed, it is not properly displayed in my browser. What font does render this character correctly? And, does anybody have an idea on how to use it on Wikipedia within a <math> formula? Mon4 11:18, 24 April 2006 (UTC)[reply]
As it's not exactly standard notation, you probably shouldn't use it on Wikipedia. Use instead. Dysprosia 14:26, 24 April 2006 (UTC)[reply]
It isn't non-standard but rather archaic. It used to be used common (Hardy and Wright use it in their number theory textbook for example) and is still used by some authors. However, Big-O notation is more common now (at least in math written in English) Dysprosia is correct. JoshuaZ 14:34, 24 April 2006 (UTC)[reply]
I have seen being used instead of the little o notation, I guess it is a matter of choice where the right < ends (similar to ).--gwaihir 08:06, 24 April 2006 (UTC)[reply]

Programming Languages

Hello. I'm a beginning programmer. Two years ago, I tried to learn Visual C++ .NET. That was really, really hard. I wasn't able to do anything besides the tutorial in the book, so I quit. About four months ago, I picked up Liberty BASIC. I am able to do a lot and understand the language. I really enjoy it and am doing a lot of fun stuff. I wondered if anyone had any suggestions on other languages to try next or any suggestions about a good progression of languages for a learning programmer. Any stories about what you did, what you wish you did, or just simply any advice you have would be great. Thanks for your help. --Think Fast 01:23, 24 April 2006 (UTC)[reply]

Python. It's simple but powerful, it runs on all major platforms, and there's good free documentation at http://docs.python.org/Keenan Pepper 02:04, 24 April 2006 (UTC)[reply]
Shift attention from programming languages to algorithms and data structures. A warmly recommended text is Cormen, Leiserson, Rivest, Stein, Introduction to Algorithms, 2/e, ISBN 0262032937. --KSmrqT 09:24, 24 April 2006 (UTC)[reply]

A lot depends on what you want to do. Different programing languages are better at different tasks. Do you want to write

Microsoft Windows programs with graphical user interfaces
try revisiting Visual C++ you may understand it better, now. Java is not too bad (debatable).
Web programming
Perl, Python, PHP all do good job on the server side, javascript on the client side. Wikipedia is done using PHP. Ajax is the current buzzword.
Databases
MySQL a very different way of thinking about programming, very useful skill.

In terms of your programming development getting some Object-oriented programming under your belt is a good idea. You might like to look at Slashdot where the pros and cons of different languages are endlessly debated. --Salix alba (talk) 10:12, 24 April 2006 (UTC)[reply]

Oil API Gravity

Can you please explain how this formula was formulated?

(141.5/SG at 60degF)-131.5

this formual is used to calculate the API gravity of cude oil.


thanks

From the API gravity article, the formula appears to be an arbitrary definition. Its motivation is due to a historical error in measuring instruments. Melchoir 23:56, 24 April 2006 (UTC)[reply]


thank you Melchoir....... anyone has more??

O genius Wikipedians, I pray to thee to give a helping hand to a fellow bemused user. This is a homework question, I apologize - but I'm not asking for the answer (as it is given), but more so the best way about going about the question in order to get the answer. If possible pls put this into proper Maths syntax, and give me a link to how to write in maths syntax:

A person wishes to walk from (0,0) to (1,1) in the x-y plane in the shortest possible time. The nature of the ground is such that the max. speed of walking is given by "v=v0(1 + αy)" where v0 and α are constants. Show that the path taken is the integral between 0 and 1 of √(1 + (y′)2) / (v0(1 + αy)). The next bit of the question is "Show that the path taken should be an arc of a circle with centre on the line y = −1/α". Please give me a nudge in the right direction. All help is completely appreciated. --Dangherous 13:31, 21 April 2006 (UTC) [reply]

You want to minimize the time. So given a path, let's find its time. If you know velocity and distance, then time = distance/velocity. For a curved path, this becomes
Then the total time is
simply by substituting the arc length formula and the velocity. To solve for the path, write the Euler-Lagrange equations for this quantity. For help on marking up math formulas, see meta:Help:Formula. -lethe talk + 14:46, 21 April 2006 (UTC)[reply]

Following on from this, how would I show that the path taken should be an arc of a circle with centre on the line y = -1/α? When I've tried this, I've done about 5 pages of working out, which is far too much I'm sure. What's the quickest way to get to the answer? Thanks awfully. --Dangherous 11:26, 24 April 2006 (UTC)[reply]

The Euler-Lagrange equation for is

with the boundary conditions . Multiply by ,

Integrate,

Can anyone check my math and finish it from here? (Igny 12:59, 24 April 2006 (UTC))[reply]

I looked through your steps and didn't see any mistakes. The resulting equation looks depressingly unlike the equation for a circle, though I'm not up for wading into it at the moment. -lethe talk + 01:21, 25 April 2006 (UTC)[reply]

Thanks for checking the steps so far. The previous equation is equivalent to

where . Then solving it for results in

Denote and get

Integrate,

, therefore

This looks like a circle. The unknown constants can be found from the boundary conditions on y. The center is on the line . Again I am not 100% sure I got all the steps right.(Igny 02:45, 25 April 2006 (UTC))[reply]

Latex to Microsoft Equation Editor

I have a huge number of equations in Latex, and I need to make a presentation in Powerpoint. Is there a way to convert equations from Latex to the equation editor format used in Powerpoint? I seriously hope there is! Thanks :) deeptrivia (talk) 14:06, 24 April 2006 (UTC) PS: I know about Texpoint, but it doesn't seem to work for me. deeptrivia (talk) 14:10, 24 April 2006 (UTC)[reply]

Why don't you take screenshots and snip out the images of equations? Or perhaps use Texvc to possibly do the job? Equation Editor is quite intensely horrible and cannot handle everything that TeX can, so you're bound to run into problems. Dysprosia 14:23, 24 April 2006 (UTC)[reply]
A great way to make presentations from Latex is Ppower4 (see http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/)

They also look a lot like Powerpoint.

Texpoint isn't working for me either. It works for my advisor, so I am confused. moink 02:17, 25 April 2006 (UTC)[reply]

Another approach is to use TeX4ht to convert to OpenOffice format (which stores the equations in MathML). OpenOffice can then export the document in MicroSoft formats, although it also includes a presentation package of its own (Impress). -- Avenue 10:32, 26 April 2006 (UTC)[reply]

Simultaneous equation

Solve this simultaneous equation?

Find the value for a + t if:

4a=8t-12
a=9-t

You may use this equation to help you:

a=2t-3
easy then, since a=2t-3 and a=9-t, then 2t-3=9-t, so 3t = 12, so t= 12/3 = 4.
with this knowledge, 4a=8t-12=36-12=24, so a=24/4 =6
thus t=4, a=6. hope this helps! UkPaolo/talk 21:14, 24 April 2006 (UTC)[reply]
This reeks of being a homework question, about which the directions at the top of this page have comments both the asker and the answerer should read. --KSmrqT 21:26, 24 April 2006 (UTC)[reply]
Yes, it does seem like a homework question. I have read the directions at the top of this page, but I was assuming good faith and helping nonetheless, since simultaneous equations was clearly something the poster was having difficulty with, and I thought a worked example might help. UkPaolo/talk 07:34, 25 April 2006 (UTC)[reply]
Um, 8*4 isn't 36, so the answerer technically didn't help with the homework. Of course, the silly thing is that the last equation is simply the first equation divided by 4; why is it even given as part of the homework? --Tardis 21:30, 24 April 2006 (UTC)[reply]
Yes, I made a mistake, as you pointed out 8*4 isn't 36, and a is thus in fact 5 (as could have been worked out easier as a=9-t, so a=9-4 =5). Still, you got the idea... (and also learnt a valuable lesson to always check stuff!) UkPaolo/talk 07:34, 25 April 2006 (UTC)[reply]

The web can solve it for you. http://home.ubalt.edu/ntsbarsh/Business-stat/otherapplets/SysEq.htm

Gauss-Jordan_elimination or System_of_linear_equations

Ohanian 23:24, 24 April 2006 (UTC)[reply]

It pays to actually read the question. It asked to solve the equation not for "a", or "t", but for "a+t". That can be simply obtained by ignoring the first equation and looking at the second. If a=9-t, then a+t = 9. QED. If you were asked this question in an exam, and then went off on a tangent working out the individual values of a and t, you would be marked down (and particularly if you worked out that a=6 when it actually equals 5.) JackofOz 01:13, 25 April 2006 (UTC)[reply]

What kind of stupid exam question would ask for a+t? And if you know a and you know t then logically you would know a+t, it sounds like an exam question purely for the sake of an exam question without any real use in real life. Ohanian 03:09, 25 April 2006 (UTC)[reply]

Exam questions aren't motivated by real life? Noooooo! I... I won't believe it! Let me out! Melchoir 03:12, 25 April 2006 (UTC)[reply]
One that was testing your ability to identify which bits of information are important and which unimportant. Which does make more sense of the "you may use the fact that you can divide the first equation by four to help you" bit, if it's just to obfuscate the fact that the first equation is completely irrelevant. --Bth 07:27, 25 April 2006 (UTC)[reply]
Heh. Actually, I presumed that the poster just used + in place of an &, since it seemed unlikely that you'd ever want to solve the equations for a+t. Incidentally, I don't know about elsewhere in the world, but in British exams you certainly wouldn't loose marks if you worked out (correctly) the individual values of a and t and then added them, even if there was an easier way to finding the answer. UkPaolo/talk 07:34, 25 April 2006 (UTC)[reply]
The poster said "the value for a+t", not "the values of a+t". And because this was a mathematical question, using a + sign if they really meant "and" would be obviously very ambiguous, so I discount that possibility. I think he definitely wanted one answer, not two. The use of the term "simultaneous equation" was a red herring, probably deliberately put there to see if the student was awake.JackofOz 09:07, 25 April 2006 (UTC)[reply]
Seems the British educational system has gone the same way as other western systems - deskilling students about answering the question that was asked, rather than what they assume the questioner must have meant. JackofOz 09:07, 25 April 2006 (UTC)[reply]
How so? If it asks for a+t and you answer 9, correctly, you should surely get full marks howsoever you achieved that answer. UkPaolo/talk 09:27, 25 April 2006 (UTC)[reply]
Maybe I've just become a crusty, hard-hearted curmudgeon (not the Nirvana one, the other one). JackofOz 09:37, 25 April 2006 (UTC)[reply]
Note that even if the student isn't marked down for doing a problem "the hard way", it still takes longer that way so could cost them on a timed test. StuRat 12:54, 25 April 2006 (UTC)[reply]
  • I don't see why asking for a+t has any less real-life use than asking for a and t. There can very well be real-life problems where you have equations describing a and t, and what you ultimately need to solve the problem is a+t.
  • Asking for a+t or the like is probably characteristic of SAT-style exams (though I don't know about SAT itself, only Israel's psychometric exam), in an attmpt to trick the student. Of course, failing to notice the object of the question in such multiple-choice exams is deadliest.
-- Meni Rosenfeld (talk) 15:26, 26 April 2006 (UTC)[reply]

April 25

What is this surface?

Does the surface with equation z = xy have a name? I'm curious because it looks a little like a hyperbolic paraboloid, and the equation is similar to the reciprocal function xy = k (ie y = k/x), which is a hyperbola. --72.140.146.246 01:00, 25 April 2006 (UTC)[reply]

There is a name for each class of quadric surface. And you're right about this one. It is a hyperbolic paraboloid, if you rotate your coordinates about the z-axis, you'll get z=x2y2. -lethe talk + 01:20, 25 April 2006 (UTC)[reply]
Rearrange into implicit form xyz = 0, and notice that x, y, and z form a multivariate polynomial of maximum total degree 2. So we know immediately that this is a quadric, a quadratic surface. Holding x constant we get lines on the surface as y varies, and holding y constant we get lines as x varies; so this is a doubly ruled surface. We could call it a bilinear surface. Slicing it with the plane y = x gives a parabola, z = x2. All of this supports the identification of this as a hyperbolic paraboloid. The canonical equation for such given in the article is
We have already observed that yx produces a parabola (cupped upward); so does y+x (cupped downward). So we make the substitution X = yx, Y = y+x, Z = z/2, and let a = b = 2. (As lethe says, we rotate 90° around the Z axis. Essentially, we are diagonalizing the bilinear form of the quadratic xy.) The canonical equation transforms into −xy+z = 0, which yields the original formula. --KSmrqT 02:42, 25 April 2006 (UTC)[reply]

Names for

The group theory I did in my computer science courses is getting amazingly rusty. I know that is the group of all of the numbers from 1 to (p - 1) under multiplication, and has a lot of nice properties, but I can't remember the other names for it. Could someone point me to the article on that group? I'll be happy to create some redirects from Zp* or Z_p^*, to make finding the article easier. Thanks! -- Creidieki 01:01, 25 April 2006 (UTC)[reply]

Multiplicative group of integers modulo n treats the general case where n doesn't have to be prime. I don't think there's an article specializing on the prime case. Melchoir 01:20, 25 April 2006 (UTC)[reply]
If n is prime, it's simply the cyclic group of order n−1, right? All cyclic groups of a given order are isomorphic. So, the appropriate article would seem to be cyclic group. —Keenan Pepper 02:37, 25 April 2006 (UTC)[reply]
So the group that Multiplicative group of integers modulo n is talking about is just in other notation? They don't use that notation in the article, but I can certainly add it. -- Creidieki 03:54, 25 April 2006 (UTC)[reply]
Yep. The article doesn't use the exact notation, but it does use , which I consider a trivial variant of the notation you prefer. But yes, it's not bad to mention alternative notations, so I encourage you to add a mention of alternatives. -lethe talk + 04:05, 25 April 2006 (UTC)[reply]

Relearning How to Walk (Metaphorically Speaking).

Long, long ago, when the Internet was still young and lived under the name of Sanders (or at the very least with a sign out front reading "COMMERCIAL INTERESTS WILL"), I obtained undergraduate degrees in computer science and applied mathematics. In the case of the math degree, I'd already completed some advanced coursework in high school, so I entered college taking courses in linear algebra and differential equations. None of that is intended to impress anyone; in fact, just the opposite, because after I wasted the next ten years trying in vain to convince myself that a lucrative career in the computer industry was the route to happiness and financial success, I finally gave up (just wasn't good at programming for a living -- I'm too social). Before long I found myself tutoring at the local community college, and I've discovered that while I'm very good at helping students learn pre-algebra, algebra, and geometry, when the topic turns to more advanced matters, like trig or calculus, I start to falter... and pretty much everything I learned in college I've now forgotten. Diff EQ's, Linear, abstract, even advanced calc -- gone from, or buried somewhere in, my brain.

Now I'm considering teaching math for a living, preferably at the high school level, and I have a feeling I'm going to have to pursue an advanced math degree at some point. But I don't have any of my old textbooks, which makes it harder to re-learn all that stuff. And that brings me to my question: besides the Wikibooks and the stuff in this portal, which strike me as neither complete (yet) nor conveniently set up for structured learning (yet), where can I go online, or what books should I buy? If I need to start investing in textbooks again (my wallet trembles at the idea), which ones do you recommend?

Thanks for any advice you can offer! --Jay (Histrion) (talkcontribs) 20:02, 25 April 2006 (UTC)[reply]

Several suggestions; they may or may not help. (1) Visit a bookstore that (also) sells used textbooks, preferably one that serves more than one college. Near (or shortly) after the end of the academic year, superseded editions of textbooks may be sold at firesale prices. For your purpose, it doesn't matter whether you're getting the latest edition. (2) Go to a bookstore with a good collection of math books, and check out the books reprinted by Dover, but make sure that the material, terminology, and notations are reasonably modern. (3) Collect freely distributed lecture notes and tutorials from the Internet. Try a combination of search terms like "www.math" "edu" "lecture notes". That should give you links to lecture notes on a web page hosted by a math department. With some luck, you may be able to find something on the topics you're interested in. --68.238.254.236 01:24, 26 April 2006 (UTC)[reply]
The Web has become the electronic equivalent of a large, strange, wonderful public library. Some links:
If you are interested in specific topics, or general culture questions, ask for more focused guidance. --KSmrqT 03:51, 26 April 2006 (UTC)[reply]

Hi, i'm currently doing a maths degree (although i'm guessing on the other side of the atlantic) and i find that the schaum's outline series are very helpful and very cheap. they are appaulingly edited but all things considered they're superb.

April 26

Integration based on constant endpoints vs. varying intermediate points

Let's say Q = arctan(.5*tan(P)). Generally speaking,

However, if P equals either 0 or 90°, then Q = P. Now consider

and

If Pm = 45°, Qm ≈ 26.565°. If you wanted to integrate between Qf and Qc, but using even spacing (i.e., so that Qm = .5*[Qf + Qc]), how would you define/describe it? Does either the integral or interval have a special name? ~Kaimbridge~12:47, 26 April 2006 (UTC)[reply]

It is somewhat similar to the substitution in
(Igny 15:18, 26 April 2006 (UTC))[reply]
I think you might be confused about the definition of an integral. Assuming we're talking about Riemann integrals, in order for a function to be Riemann integrable, every sequence of Riemann sums must converge to the same limit. If you sometimes get different limits depending on the partitions of the interval you take, then the function is not integrable. Therefore it doesn't matter if you use "even spacing" or uneven spacing, because the limits must be the same for the integral to exist. Please forgive me if I have misinterpreted your question. —Keenan Pepper 17:10, 26 April 2006 (UTC)[reply]
I think I know what the question is. One of the functions -- either P or Q, it doesn't matter which -- in some sense runs through its early values more quickly than the other. You could change the sample spacing in the Riemann integral while holding the nominal widths of the bins constant, but then it wouldn't be a Riemann integral any longer. (As Keenan Pepper points out, the true Riemann integral is constructed so that it doesn't care about spacing.) A more elegant solution is to simply weight those intermediate points in order to compensate for the speed at which they're being traversed. This technique does have a name: Integration by substitution, and the "weight" is the Jacobian. Melchoir 20:40, 26 April 2006 (UTC)[reply]

April 27

.gif versus .jpg

Which type of image has a better resolution and is sharper?Patchouli 05:06, 27 April 2006 (UTC)[reply]

Neither, as you would discover by a quick glance at the JPEG and GIF articles. In fact, this question is meaningless for most image formats. The JPEG format condenses photographic material better by using lossy compression, throwing away data that the eye notices less. The GIF format is a poor choice for photographs, and even for graphics it is inferior to PNG in compression, color control, and other desirable features. Resolution can be whatever you want. Consult the article on image file formats and the graphics file format summary. Graphics uploaded to Wikipedia now use SVG as well, for numerous benefits. --KSmrqT 05:40, 27 April 2006 (UTC)[reply]

Thank you.Patchouli 06:51, 27 April 2006 (UTC)[reply]

affine Varities and grobner bases..

What are affine varieties and how do they relate with grobner bases? Is there any other type(s) of varieties apart from affines if there what are they and how do they differ from the affine varieties? —The preceding unsigned comment was added by Nkomali (talkcontribs) .

You raise two related topics, neither of which is trivial. Back when the world was simpler (say, the nineteenth century), mathematicians investigated the relationship of geometry to algebra, where geometry was projective and algebra meant the zeros of homogeneous polynomials over the complex numbers. Some polynomials, like x2w2, split into factors (here xw and x+w). Others, like x2+y2w2, do not. (Notice that polynomials in multiple variables are quite different from polynomials in a single variable in this regard.)
When a polynomial factors, the zeros of the full polynomial are the union of the zeros of the factors; so we focus attention on the irreducible polynomials, those without factors. The geometric manifestation of an irreducible polynomial is a variety. Usually a variety would be a projective variety; affine varieties are the pieces we stitch together (like a manifold) to cover all the parts of the projective variety. These days algebraic geometry has wandered far from its humble and intuitive beginnings to varieties defined in highly abstract ways with much broader application, using concepts like "scheme" and allowing different kinds of fields besides the real or complex numbers.
Already in the classic work we notice quickly that the zeros of a polynomial are also zeros of all of its multiples, and so we shift algebraic attention from a single polynomial to an "ideal" in the ring of polynomials. It is not especially difficult to write a polynomial in a unique canonical form, but to do so we must order the variables and then order the terms. Thus we might order x before y and higher degree terms before lower, so that x2+xy+y2 is canonical while its reverse is not. Writing a canonical form for an ideal is more challenging, and it also depends on this kind of ordering. Given an ordering on terms, a Gröbner basis for an ideal is a route to a unique canonical form consisting of a list of polynomials. It has properties which are of great help in computations. --KSmrqT 09:50, 27 April 2006 (UTC)[reply]

sine and sine hyperbolic

If sine can be defined within a triangle,how about sine hyperbolic?? —The preceding unsigned comment was added by 210.212.194.215 (talkcontribs) .

The sine and cosine make up the coordinates of a point of a circle. Draw some line segments to the origin, and you get the triangle you're talking about, and the argument of the functions is an angle of the triangle. The hyperbolic sine and cosine make up the coordinates of a point of a hyperbola (hence the name!). If you draw the line segments to the origin, you only get your boring triangle again, though. In this case, the argument of the functions isn't an angle of the triangle, unless you're willing to consider a funny version of angle (if you endow your space with a funny metric (just putting a minus sign in the Pythagorean theorem will give you one way to do it), then the notion of angle gets replaced by something called rapidity, and you could say that the rapidity of your triangle is the argument of the functions. In this funny space, the hyperbola is a circle). To sum up, sine is the angle in a Euclidean triangle, hyperbolic sine is the angle in a non-Euclidean (hyperbolic) triangle. -lethe talk + 10:57, 27 April 2006 (UTC)[reply]

Easy way in Matlab

In Matlab, is there a loop-free way to create an nxn matrix with diagonal and upper-triangular entries equal to 1, and lower-triangular entries equal to 0?

eg. for n = 3:

[ 1 1 1;
  0 1 1;
  0 0 1]

Confusing Manifestation 12:45, 27 April 2006 (UTC)[reply]

toeplitz([1 zeros(1,n-1)], ones(n,1)); -- Jitse Niesen (talk) 13:39, 27 April 2006 (UTC)[reply]
Either of the following work in octave, so I suppose they should work in matlab too.
 repmat(1:n,n,1)'<=repmat(1:n,n,1),
 triu(ones(n)),
b_jonas 21:11, 27 April 2006 (UTC)[reply]
Other, wierder ways:
 cumsum(eye(n), 2),
 fliplr(hankel(ones(1,n))),
 inv(eye(n) - diag(ones(1, n - 1), 1)),
 !!(eye(n) + diag(ones(1, n - 1), 1))^n,
b_jonas 21:28, 27 April 2006 (UTC)[reply]

Thanks for all of those suggestions. I'll use Jitse's version just because at a quick glance it seems to be fairly simple, although it's nice to know the alternatives exist. (First rule of Matlab: there's almost always at least one loop-free way to do something.) Confusing Manifestation 00:31, 28 April 2006 (UTC)[reply]

Topology.

Is the continuos image of a complete metric space necessarily complete? (Prove or give counter example) Nkomali.

All the Cauchy sequences still converge, right? This shouldn't be that hard to prove... —Keenan Pepper 14:06, 27 April 2006 (UTC)[reply]
No, I think it isn't, and I've just seen a nice example today. Let's take with the usual metrics, and map it to the open interval with the function. This is continuous, but the image isn't complete. (I think it's true the other way: the continuous inverse image of a complete metric space is complete.) – b_jonas 20:57, 27 April 2006 (UTC)[reply]

Groebner bases

What are the properties and applications of groebner bases. --NkomaliNkomali 14:07, 27 April 2006 (UTC)[reply]

We are not a substitute for your brain and effort. Read the article (and the response to your earlier question). --KSmrqT 18:03, 27 April 2006 (UTC)[reply]

Topology

Show that the spaces l power alpha, the set of all bounded sequences aaaa9 in R or C with norm xn = sup{\xn\}, is a normed linear space. Show also that l power alpha is a complete normed linear space with the transition invariant d(x,y) = sup subscript j in N absolute value of the difference between epsilon j and mu of j.--Nkomali 14:26, 27 April 2006 (UTC)[reply]

Read the top of this page about homework. --KSmrqT 19:14, 27 April 2006 (UTC)[reply]

Chaos Theory

hi, can anyone explain to me what does the 'unpredictable, yet deterministic' behaviour of things in chaos theory means?... I don't get it :|, how can something be 'unpredictable yet deterministic'? If we find it's deterministic, aren't we somehow making it predictable?.--Cosmic girl 15:55, 27 April 2006 (UTC)[reply]

A chaotic system exhibits sensitivity to initial conditions to an extreme degree. Although the system is deterministic, in the sense that the laws that govern the evolution of the system are known exactly, small differences in initial conditions will lead to huge differences in long-term behaviour. Since there is a practical limit to the accuracy to which initial conditions can be known (and, in computer systems, a limit to the accuracy with which calculatuons can be carried out) this means that such systems are, in practice, unpredictable. See butterfly effect for a longer explanation. Gandalf61 16:21, 27 April 2006 (UTC)[reply]

Thank you! :) --Cosmic girl 19:41, 27 April 2006 (UTC)[reply]

With perfect mathematical precision, deterministic does imply predictable. Even without it we can say a great deal about the behavior of a chaotic system. So, yes, this language is more provocative than impeccable. Still, it conveys an essential germ of insight in contrasting the behavior of a chaotic system to more familiar ones. Consider the trajectory of a cannonball. Tip the cannon up a little and the ball lands in a slightly different place. Turn it to the side, and again the flight path and landing spot change only slightly. This is the predictability we expect of Newtonian dynamics, F = ma and all that. It applies to celestial mechanics, such as the orbits of planets, as well as to Earthly cannon balls. We can say with great confidence where Mars or Jupiter will be 2000 years from now. But long unsuspected, lurking within is a radically different possibility. In some planetary systems we have no ability to make longterm predictions, because small changes in the present scatter the distant future over a vast range of possible positions. Perhaps our measurements of the current position are microscopically in error; perhaps a comet wanders by; perhaps the mass of its star(s) is not exactly what we thought. A chaotic system spreads and folds the trajectories again and again, like a mixing machine, amplifying even the tiniest initial uncertainty. --KSmrqT 19:46, 27 April 2006 (UTC)[reply]

Charateristic functions

If I have a random variable Z = aX + bY, what is the characteristic function of Z in terms of the pdfs of X and Y? --HappyCamper 16:34, 27 April 2006 (UTC)[reply]

If X and Y are independent, then
or am I thinking of something completely different? — Arthur Rubin | (talk) 16:48, 27 April 2006 (UTC)[reply]
See characteristic function (probability theory). It specifically gives your example. If you want it in terms of the PDFs of X and Y rather than their characteristic functions, you'll need to first get the characteristics using the integrals also given on that page. --Tardis 17:35, 27 April 2006 (UTC)[reply]

April 28

WATER'S DEPTH

I HAVE A RECTANGULAR TANK MEASURING 55 METRES BY 48 METRES CONTAINING 33 LITERS OF WATER. HELP ME FIND THE DEPTH OF THE WATER. — Preceding unsigned comment added by 208.131.187.81 (talkcontribs) 02:22, 28 April 2006 (UTC)[reply]

First, don't write in all captical letter, this is considered shouting and rude. Second, it is obvious that this is a homework problem, please read the instruction on the top of this page. Simply put, Volume of rectangular prism is length times width times height. Just plug in the numbers, and divide to get the answer. Besure to use consistent unit. --Lemontea 02:57, 28 April 2006 (UTC)[reply]

Trig Identities

How would you go about doing the question below...

All I could think of was changing 2sin²θ-1 into -2cos²θ + 1. I can't change sinθcosθ (at least I don't think so). I tried the right hand side next, and I got:

By the way, I keep on getting Failed to parse (lexing error) whenever I try to properly write a fraction, I just copied and pasted one from this page and changed it to this question but it still doesn't work, sorry about that. Thanks

C-c-c-c 03:34, 28 April 2006 (UTC)[reply]

It parses now. Also, you're close. Compare the numerators of your two fractions --Deville (Talk) 03:43, 28 April 2006 (UTC)[reply]
Mhm, well I've actually located a little thing on the formula sheet, and noticed that 2cos²θ -1 = cos²θ - sin²θ(yes I should have looked earlier, but it had it as Cos2θ = 2cos²θ -1, Cos2θ = cos²θ - sin²θ and I didn't link cos²θ - sin²θ and 2cos²θ-1 together until then.) I have -2cos²θ +1 so that means it should be -(cos²θ - sin²θ) so it should be sin²θ - cos²θ. Yep it works, thanks a lot. --- C-c-c-c 04:02, 28 April 2006 (UTC)[reply]
Try using the definitions of tan and cot. Does that help? Confusing Manifestation 04:09, 28 April 2006 (UTC)[reply]

Retire

How much money do I need to retire? And what % return can I expect to get from investing?

If I can achive X% Average return, does that mean I can always take out X% of the princaple each year? 12.183.203.184 03:52, 28 April 2006 (UTC)[reply]


How to calculate various interest rate problem
----------------------------------------------

It came as a surprise to me to learn that there are people who
are not able to perform simple interest rate calculations. For
example, about 4 years ago, I went into a bank to open a term
deposit account for my dad. I was shocked when the bank cashier was
unable to calculate for me the amount of money I should put into
the term deposit account in order to obtain a sum of $5000 at
the end of a three year period.

So here it is, here is how to calculate those interest. I didn't
learn any of this from any text book. I learn some of them from
my dad and calculated the rest from first principles.


Indentities
===========

                                               a*(1 - r^n)
   a + a*r + a*r^2 + a*r^3 + ... + a*r^(n-1) = -----------
                                                  1 - r

                               r - r^(n+1)
   r + r^2 + r^3 + ... + r^n = -----------
                                  1 - r


Abbreviations of terms used in equations
========================================

In order to ensure precise definitions are used in the equations
of various financial formulas, I am using my own brand of "PITY"
abbreviations of the four common financial terms. I have chosen
the "PITY" abbreviations because I had (taken) PITY (on) the poor
fellows out there who have trouble remembering various "non-sensical"
terms. The abbreviations are:

    P    Principal
    I    Interest rate
    T    Terms
    Y    paYment


    Principal is the original amount of money used in an investment or
        could be used for an investment.

    Interest rate is the rate an (investment or debt) grows or shrinks.
        The rate MUST be given in relation to a time unit. In the formulas
        used below, the interest rate is chosen to be in units of
        "unit value per unit Term". Example "0.0024 per month" where
        the unit Term is one month. For those who are used to percentage
        (which is just about everyone else), it is very easy to convert
        from percentage to unit value. The chart below shows the
        relationship.

              Percentage               Unit Value
                   1%                     0.01
                   2%                     0.02
                  10%                     0.10
                  78%                     0.78
                 100%                     1.00

    Term is the smallest indivisible unit of time used in the
        calculation of the financial compound interest equations.

    paYment is the regular amount paid in an annuity, mortgage or
        other forms of regular payments.

Worked examples
===============

1) Really really really easy interest calculation

   What is the final amount of money for an account with the initial
   amount of $1234 with an interest of 7% per year calculated(and
   credited) yearly after a period of 1 year.

   Principal  P = $1234
   Interest   I = 0.07 per year(Note 0.07 is 7%)
   Terms      T = 1 year

   Solution:

   Final amount = Principal * Growth

   Let F be the final amount
   Let P be the principal
   Let G be the growth

   F = P * G

   but we know that the growth is 7% per year for 1 year. Here I use
   the term "Base" to denote the base of growth ie 1.0

   G = (Base + Interest) ^ Terms
   G = (1.0 + 0.07) ^ 1
   G = 1.07

   So we have the formula

   F = P*(1+I)

   F = $1234 * 1.07
     = $1320.38


2) Easy compound interest calculation

   What is the final amount of money for an account with the initial
   amount of $6543 with an interest of 6.5% per year calculated(and
   credited) yearly after a period of 8 year.

   Principal  P = $6543
   Interest   I = 0.065 per year (Note 0.065 is 6.5%)
   Terms      T = 8 year

   Solution:

   F = P * (1 + I)^T
     = $6543 * (1+0.065)^8
     = $6543 * (1.065)^8
     = $6543 * 1.65499
     = $10828.64

3) Compound interest calculation

   What is the final amount of money for an account with the initial
   amount of $8361 with an interest of 4.9% per year calculated(and
   credited) monthly after a period of 17 year.

   Principal  P = $8361
   Interest   I = 0.049/12 per month (Note 0.049 is 4.9%. Since interest is
                  calculated monthly, we must divide the yearly
                  interest by 12 to get the interest per month)
   Terms      T = 17 * 12 = 204 months (because interest is calculated
                  monthly)

   Solution:

   F = P * (1 + I)^T
     = $8361 * (1+0.049/12)^204
     = $8361 * (1.00408333)^204
     = $8361 * 2.29631
     = $19199.46

4) Compound interest calculation

   What is the final amount of money for an account with the initial
   amount of $2973 with an interest of 2.9% per year calculated(and
   credited) daily after a period of 4 year.

   Principal = $2973
   Interest  = 0.029/365.25 per day
               (Note 0.029 is 2.9%. Since interest is
               calculated daily, we must divide the yearly
               interest by 365.25 to get the interest per day)
   Terms     = 4 * 365.25 = 1461 days  (because interest is calculated
               daily)

   Solution:

   F = P * (1 + I)^T
     = $2973 * (1+0.029/365.25)^1461
     = $2973 * (1.00007939767)^1461
     = $2973 * 1.1229907
     = $3338.65


5) Compound interest calculation

   What is the final amount of money for an account with the initial
   amount of $2973 with an interest of 2.9% per year calculated(and
   credited) instantanously after a period of 4 year.

   Principal  P = $2973
   Interest   I = 0.029 per year (Note 0.029 is 2.9%. Since interest is
                  calculated instantanously, we must leave it at 2.9%)
   Terms      T = 4 years

   Solution:

   F = P * (e^I)^T            Note: e= 2.71828182846
     = $2973 * (e^0.029)^4
     = $2973 * 1.0294245^4
     = $2973 * 1.1229958
     = $3338.66

or

   F = P * (e^(I*T))

6. Annuity with a payment of $500 made at the end of each year.
   The interest is 6.7% per year. What is the amount after 3
   years?

   Interest    I = 0.067 per year
   Term        T = 3 years
   Payment     Y = $500

   Solution:

   F = Y * ( (1+I)^T - 1 ) / I
     = $500 * ( (1.067)^3 - 1 ) / 0.067
     = $500 * ( 1.214767 - 1 ) / 0.067
     = $500 * 0.214767 / 0.067
     = $500 * 3.2054
     = $1602.74

  Proof:

  F = Y*(1+I)^0 + Y*(1+I)^1 + Y*(1+I)^2
    let r = (1+I)
    = Y * (r^0 + r^1 + r^2)
    = Y * ( 1  + r^1 + r^2)

 in general
  F = Y * ( 1  + r^1 + r^2 + r^3 + ... + r^(T-1) )

      Y * ( 1 - r^T)
    = --------------
          1 - r

    but r^T = (1 + I)^T

          1 - r^T       1 - (1+I)^T
    thus  -------  =  ---------------
           1 - r      1  -  ( 1 + I )

                      1 - (1+I)^T
                   =  -----------
                          -I

                      (1 + I)^T  -  1
                   =  ---------------
                            I

       Y * (1 + I)^T  -  1
  F =  -------------------
                I

7. Annuity with a payment of $500 made at the beginning of each year.
   The interest is 6.7% per year. What is the amount after 3
   years?

   Interest    I = 0.067 per year
   Term        T = 3 years
   Payment     Y = $500

   Solution:

   F = Y * ( (1+I)^(T+1) - (1+I) ) / I
     = $500 * ( 1.067^4 - 1.067) / 0.067
     = $500 * ( 1.29615 - 1.067) / 0.067
     = $500 * 0.22915 / 0.067
     = $500 * 3.42
     = $1710.07

  Proof:

  F = Y*(1+I)^1 + Y*(1+I)^2 + Y*(1+I)^3
    = Y * ( (1+I)^1 + (1+I)^2 + (1+I)^3 )

 in general
  F = Y * ( (1+I)^1 + (1+I)^2 + ... + (1+I)^T )
  let r = (1+I)
  F = Y * ( r^1 + r^2 + ... + r^T )
    = Y * ( r - r^(T+1) ) / ( 1 - r )
    = Y * ( (1+I) - (1+I)^(T+1) ) / ( 1 - (1+I) )
    = Y * ( (1+I)^(T+1) - (1+I) ) / I

8. The family court orders you to give your former wife a payment of $500
   made at the end of each year for 3 years. The interest is 6.7% per year.
   You would like to buy out the obligation by paying her a lump sum
   instead. How much should you pay in the lump sum?

   Interest    I = 0.067 per year
   Term        T = 3 years
   Payment     Y = $500

   Solution:

       Y *  ( 1 - 1/(1+I)^T )
   F = ----------------------
                 I

       $500 ( 1 - 1/1.067^3 )
     = ----------------------
               0.067

       $500 ( 1 - 1/1.21477 )
     = ----------------------
               0.067

       $500 * 0.17680
     = ---------------
           0.067

     = $1319.38

  Proof:

  The amount you need to pay is equivalent to an amount which you put
  into an interest account which your wife can withdraw the payment
  at the end of each year. The account should be empty when she made
  the last payment withdraw.

  Since she makes 3 withdraws, assume the amount needed at the start of
  the period to pay for each withdraw are F1,F2 and F3.
  Thus we have

   let x = (1 + I)

   F1 * x   = Y
   F1 = Y / x

   F2 * x^2 = Y
   F2 = Y / x^2

   F3 * x^3 = Y
   F3 = Y / x^3

   Therefore the amount you need to put into the interest account at the
   start of the period is

   F = F1 + F2 + F3
     = Y ( 1/x  +  1/x^2  + 1/x^3 )
     let r = (1/x)
     = Y ( r + r^2 + r^3)

 in general
  F = Y * ( r^1 + r^2 + ... + r^T )

      Y * ( r - r^(T+1) )
    = -------------------
            1 - r

      Y * ( 1/x - 1/x^(T+1) )
    = -----------------------
            1 - 1/x

      Y * ( 1 - 1/x^T )
    = -----------------
            x - 1

      Y * ( 1 - 1/(1+I)^T )
    = ---------------------
            (1+I) - 1

      Y *  ( 1 - 1/(1+I)^T )
    = ----------------------
                I

9. The family court orders you to give your former wife a payment of $500
   made at the beginning of each year for 3 years. The interest is 6.7% per
   year. You would like to buy out the obligation by paying her a lump sum
   instead. How much should you pay in the lump sum?

   Interest    I = 0.067 per year
   Term        T = 3 years
   Payment     Y = $500

   Solution:

       Y *  ( (1+I) - 1/(1+I)^(T-1) )
   F = ------------------------------
                 I

       $500 ( 1.067 - 1/1.067^2 )
     = --------------------------
               0.067

       $500 ( 1.067 - 1/1.13849 )
     = --------------------------
               0.067

       $500 * 0.18864
     = ---------------
           0.067

     = $1407.78

  Proof:

  The amount you need to pay is equivalent to an amount which you put
  into an interest account which your wife can withdraw the payment
  at the beginning of each year. The account should be empty when she
  made the last payment withdraw.

  Since she makes 3 withdraws, assume the amount needed at the start of
  the period to pay for each withdraw are F1,F2 and F3.
  Thus we have

   let x = (1 + I)

   F1 * 1   = Y
   F1 = Y / 1

   F2 * x = Y
   F2 = Y / x

   F3 * x^2 = Y
   F3 = Y / x^2

   Therefore the amount you need to put into the interest account at the
   start of the period is

   F = F1 + F2 + F3
     = Y ( 1/1  +  1/x  + 1/x^2 )
     let r = (1/x)
     = Y ( 1 + r + r^2)

 in general
  F = Y * ( 1 + r + ... + r^(T-1) )

      Y * ( 1 - r^T )
    = ---------------
           1 - r

      Y * ( 1 - 1/x^T )
    = -----------------
            1 - 1/x

      Y * ( x - 1/x^(T-1) )
    = ---------------------
            x - 1

      Y * ( (1+I) - 1/(1+I)^(T-1) )
    = -----------------------------
            (1+I) - 1

      Y * ( (1+I) - 1/(1+I)^(T-1) )
    = -----------------------------
                I

10. You are an evil used car salesman who charges 18% interest per annum.
   There is a customer who wants to buy a $8000 car from you, you manage
   to get her to agree to a finance deal whereby she pays for car in
   32 months installments payable at the end of each month. How much
   does she have to pay you each month?

   Principle   P = $8000
   Interest    I = 0.18/12 = 0.015 per month
   Term        T = 32 months

   Solution:

              P * I
   F = ---------------------
        1 - ( 1 / (1+I)^T )

           $8000 * 0.015
     = ---------------------
        1 - ( 1 / 1.015^32 )

               $120
     = ---------------------
        1 - ( 1 / 1.610324 )

               $120
     = ---------------------
        1 - 0.6209929

     = $316.61

  Proof:

  At the end of 32 months, the amount you received from her must be
  equal to the price of the car plus interest for 32 months.

                Y * ((1+I)^T - 1)
  P * (1+I)^T = -----------------   ( from formula/problem no 6 )
                       I

  rearrange the equation

      P * I * (1+I)^T
  Y = ---------------
        (1+I)^T - 1

             P * I
  Y = ---------------------
       1 - ( 1 / (1+I)^T )

11. You are an evil used car salesman who charges 18% interest per annum.
   There is a customer who wants to buy a $8000 car from you, you manage
   to get her to agree to a finance deal whereby she pays for car in
   32 months installments payable at the beginning of each month. How much
   does she have to pay you each month?

   Principle   P = $8000
   Interest    I = 0.18/12 = 0.015 per month
   Term        T = 32 months

   Solution:

       P * I * (1+I)^(T-1)
   F = -------------------
          (1+I)^T - 1

       $8000 * 0.015 * 1.015^31
     = ------------------------
             1.015^32 - 1

       $8000 * 0.015 * 1.586526
     = ------------------------
             1.610324 - 1

       $190.383120
     = -----------
        0.610324

     = $311.93

  Proof:

  At the end of T-1 (31) months, the amount you received from her must be
  equal to the price of the car plus interest for T-1 (31) months. Note:
  on the last month, she pays at the beginning of the month, ie you
  don't any interest for the last month.

                    Y * ((1+I)^T - 1)
  P * (1+I)^(T-1) = -----------------   ( from Appendix A )
                           I

  let r= 1+I

                Y * (r^T - 1)
  P * r^(T-1) = -------------
                      I

  rearrange the equation

      P * I * r^(T-1)
  Y = ---------------
         r^T - 1

      P * I * (1+I)^(T-1)
  Y = -------------------
         (1+I)^T - 1

12. You are an evil used car salesman who charges 18% interest per annum.
   There is a customer who wants to buy a $8000 car from you, you manage
   to get her to agree to a finance deal whereby she pays for car in
   installments of $300 payable at the end of each month. For how many
   months does she have give you $300?

   Principle   P = $8000
   Interest    I = 0.18/12 = 0.015 per month
   Payment     Y = $300

   Solution:

       LOG Y - LOG(Y - P*I)
   F = --------------------
            LOG(1+I)

       LOG $300 - LOG($300 - $8000 * 0.015)
     = ------------------------------------
            LOG 1.015

       2.477121 - LOG 180
     = ---------------------
            0.00646604

       2.477121 - 2.255272
     = ---------------------
            0.00646604

       0.221848
     = ----------
       0.00646604

     = 34.3 months

     = 35 months (rounding up)

  Proof:

  At the end of T months, the amount you received from her must be
  equal to the price of the car plus interest for T months.

                Y * ((1+I)^T - 1)
  P * (1+I)^T = -----------------   ( from formula/problem no 6 )
                       I

  rearrange the equation


  (1+I)^T * ( P*I - Y ) = -Y

  (1+I)^T = Y / (Y - P*I)

  take log of both sides

  T * LOG(1+I) = LOG Y - LOG(Y - P*I)

      LOG Y - LOG(Y - P*I)
  T = --------------------
           LOG(1+I)

13. You are an evil used car salesman who charges 18% interest per annum.
   There is a customer who wants to buy a $8000 car from you, you manage
   to get her to agree to a finance deal whereby she pays for car in
   installments of $300 payable at the beginning of each month. For how many
   months does she have give you $300?

   Principle   P = $8000
   Interest    I = 0.18/12 = 0.015 per month
   Payment     Y = $300

   Solution:

       LOG (Y) - LOG(Y - P*I/(1+I))
   F = ------------------------
              LOG(1+I)

       LOG($300) - LOG($300 - $8000 * 0.015/1.015)
     = -------------------------------------------------
            LOG 1.015

       LOG 300 - LOG 181.77
     = ---------------------
            0.00646604

       2.47712 - 2.25953
     = ---------------------
            0.00646604

       0.217591
     = ----------
       0.00646604

     = 33.65 months

     = 34 months (rounding up)

  Proof:

  At the end of T-1 months, the amount you received from her must be
  equal to the price of the car plus interest for T-1 months. Note:
  on the last month, she pays at the beginning of the month, ie you
  don't any interest for the last month.

                    Y * ((1+I)^T - 1)
  P * (1+I)^(T-1) = -----------------   ( from Appendix A )
                            I

  let r= 1+I

                Y * (r^T - 1)
  P * r^(T-1) = -------------
                        I

  rearrange the equation

  r^T * ( Y - P*I/r ) = Y

  r^T = Y / (Y - P*I/r)

  take log of both sides

  T * LOG(1+I) = LOG(Y) - LOG(Y - P*I/(1+I))

      LOG (Y) - LOG(Y - P*I/(1+I))
  T = ------------------------
             LOG(1+I)

14. You are an evil used car salesman who has a customer buying a
   $8000 car from you. You manage to get her to agree to a finance
   deal whereby she pays an installment of $300 at the end of each
   month for 38 months to own the car. What evil interest rate are
   you charging her?

   Principle   P = $8000
   Term        T = 38 months
   Payment     Y = $300

   Solution:

          Y              1
   Inew = - * ( 1 - ------------ )
          P         (1 + Iold)^T

    n       In
   ===========================
    0       1.0
    1       0.03700
    2       0.02824
    3       0.02448
    4       0.02254
    5       0.02142
    6       0.02074
    7       0.02031
    8       0.02003
    9       0.01985
   10       0.01973
   11       0.01965
   12       0.01960
   13       0.01956
   14       0.01954
   15       0.01953
   16       0.01952
   17       0.01951
   18       0.01950
   19       0.01950
   20       0.01950

   answer is 0.01950 per month or 0.2340 per year (23.4% per annum)

  Proof:

  At the end of T months, the amount you received from her must be
  equal to the price of the car plus interest for T months.

                Y * ((1+I)^T - 1)
  P * (1+I)^T = -----------------   ( from formula/problem no 6 )
                       I

  rearrange the equation

      (1+I)^T * Y - Y
  I = ---------------
      (1+I)^T * P

       Y          Y
  I = ---  -  ----------
       P      P*(1+I)^T

       Y             1
  I = --- * ( 1 - ------- )
       P          (1+I)^T

  We must use the iterative numerical method to solve the above equation
  because the equation is non-linear and attempts to solve it by
  approximating the equation into simpler polynomials leads to an
  ill-conditioned polynomial equation that gives the wrong answers.

15. You are an evil used car salesman who has a customer buying a
   $8000 car from you. You manage to get her to agree to a finance
   deal whereby she pays an installment of $300 at the beginning of each
   month for 38 months to own the car. What evil interest rate are
   you charging her?

   Principle   P = $8000
   Term        T = 38 months
   Payment     Y = $300

   Solution:

           Y                     1
   Inew = --- * ( 1+Iold - -------------- )
           P               (1+Iold)^(T-1)

    n       In
   ===========================
    0       1.0
    1       0.07500
    2       0.03773
    3       0.02939
    4       0.02576
    5       0.02383
    6       0.02271
    7       0.02201
    8       0.02157
    9       0.02128
   10       0.02109
   11       0.02097
   12       0.02089
   13       0.02083
   14       0.02079
   15       0.02077
   16       0.02075
   17       0.02074
   18       0.02073
   19       0.02073
   20       0.02072
   21       0.02072
   22       0.02072
   23       0.02072

   answer is 0.02072 per month or 0.2486 per year (24.9% per annum)

  Proof:

  At the end of T-1 (37) months, the amount you received from her must be
  equal to the price of the car plus interest for T-1 (37) months. Note:
  on the last month, she pays at the beginning of the month, ie you
  don't any interest for the last month.

                    Y * ((1+I)^T - 1)
  P * (1+I)^(T-1) = -----------------   ( from Appendix A )
                            I

  rearrange the equation

      (1+I)^T * Y - Y
  I = ---------------
      (1+I)^(T-1) * P

       Y *(1+I)          Y
  I = ---------  -  --------------
       P             P*(1+I)^(T-1)

       Y                 1
  I = --- * ( 1+I - ----------- )
       P            (1+I)^(T-1)

  We must use the iterative numerical method to solve the above equation
  because the equation is non-linear and attempts to solve it by
  approximating the equation into simpler polynomials leads to an
  ill-conditioned polynomial equation that gives the wrong answers.


==========================================================================


Most common errors and mistakes
===============================

Below the are most common mistakes made in the calculation of
financial equations. They are provided below in the hope that
people would learn from the mistakes that others made.

1) Confusing the interest rate per year with interest rate per month.

   What is the final amount of money for an account with the initial
   amount of $8361 with an interest of 4.9% per year calculated(and
   credited) monthly after a period of 7 year.

   Principal = $8361
   Interest  = 0.049
   Terms     = 7*12=84

   Solution:

   F = P * (1 + I)^T
     = $8361 * (1+0.049)^84
     = $8361 * 55.6084
     = $464942.48            WRONG!!!

2) Confusing the terms in months with terms in years and using the
   yearly interest rate instead of monthly.

   What is the final amount of money for an account with the initial
   amount of $8361 with an interest of 4.9% per year calculated(and
   credited) monthly after a period of 7 year.

   Principal = $8361
   Interest  = 0.049
   Terms     = 7

   Solution:

   F = P * (1 + I)^T
     = $8361 * (1+0.049)^7
     = $8361 * 1.3977
     = $11686.56             WRONG!!!

3) Using the interest rate in percentage instead of in unit value.

   What is the final amount of money for an account with the initial
   amount of $8361 with an interest of 4.9% per year calculated(and
   credited) monthly after a period of 7 year.

   Principal = $8361
   Interest  = 4.9/12 = 0.4083
   Terms     = 7*12 = 84

   Solution:

   F = P * (1 + I)^T
     = $8361 * (1+0.4083)^84
     = $8361 * 3093107826969
     = $25861474541289200    WRONG!!!

4) Confusing the terms in months with terms in years.

   What is the final amount of money for an account with the initial
   amount of $8361 with an interest of 4.9% per year calculated(and
   credited) monthly after a period of 7 year.

   Principal = $8361
   Interest  = 0.049/12 = 0.004083
   Terms     = 7

   Solution:

   F = P * (1 + I)^T
     = $8361 * (1+0.004083)^7
     = $8361 * 1.0289
     = $8602.63              WRONG!!!

5) Misunderstanding the terms "Calculated monthly" and the term
   "Credited monthly". Confusing the formulas provided with actual
   formulas used by banks, finance companies or institutions.

   This is perhaps one of the greatest mistakes made by people when
   they use the formulas provided in this article. While it is true
   that all the formulas provided here are correct, it does not mean
   that this the exact formula a financial institution will use to
   calculate your interest, mortgage, overdraft or payment.

   The exact formula used will depend on the term and conditions of the
   financial agreement. For example, there is no reason why a bank must
   pay you interest every month. It could pay the interest on a half
   yearly basis, on the calculatations of your minimum balance for each
   month. In other words, interest is calculated monthly on lowest
   balance and only paid into your account every six months.

   This is precisely why the term "Calculated" and "Credited" are
   important in interest rate calculations.

   The term "Calculated monthly" refers to the fact that the amount of
   interest you received is calculated at an monthly interval (usually
   end of the month), however it does not tell you when will receive any
   interest owing to you.

   The term "Credited monthly" refers to the fact that you will receive
   the amount of interest own to you on a monthly basis. Once you
   received the interest, they will be used in the calculation for your
   next interest thereby resulting in compound interest. That's why in
   the equation for compound interest the Term always uses the same time
   unit as the time unit for Crediting.

==========================================================================


Appendix  A
============

How much money would you have at the START of the 4th month if you put
$200 into an account at the beginning of each month and the interest
rate is 0.005 per month.

    I = 0.005 per month
    T = 4 months
    Y = $200

            (1+I)^T - 1
    F = Y * -----------
                 I

               1.005^4 - 1
      = $200 * -----------
                  0.005

               1.02015 - 1
      = $200 * -----------
                  0.005

      = $200 * 4.0301

      = $806.02

   Proof

   F = Y + Y*(1+I) + Y*(1+I)^2 + Y*(1+I)^3

   in general

   F = Y + Y*(1+I) + Y*(1+I)^2 + ... + Y*(1+I)^(T-1)

   let r=1+I and rearrange

   F = Y * (1+r+r^2+...+r^(T-1))

           1-r^T
   F = Y * -----
            1-r

           1 - (1+I)^T
   F = Y * -----------
            1 - (1+I)

           (1+I)^T - 1
   F = Y * -----------
                I