Site hosted by Angelfire.com: Build your free website today!

BonusC++

Program Bonus 11

Program 11K.Dzwonkiewicz

 

 

 

EXAMINE THE FOLLOWING DEFINITIONS

Euler’s Constant: The number defined by

                  *         =

                              =

is called Euler’s Constant. Approximate Euler’s Constant by finding the value of

 

for n = 10,000. [Note:For comparison, the value of * to ten decimal places is 0.5772156649]

Write the C++ programs to calculate Euler’s constants:

1)      Above

2)      Below

 


Value of n          Value of n

1                        2

10                      2.59374246

100                    2.704813829

1,000                 2.716923932

10,000               2.718145927

100,000             2.718268237

1,000,000          2.718280469

10,000,000        2.718281693

 

 

 

 

 

 

 

 


The irrational number  is often used in applications that involve circles. Another irrational number called e is useful for applications that involve the growth of a population or radioactive decay. Using the techniques developed in calculus, it can be shown that as n,

ne

The letter e was chosen in honor of Leonhard Euler (1707-1783). He was able to compute e to several decimal places by using large values of n to evaluate (1+1/n)n. The entries in the table to the left illustrate the process. The value of e accurate to eight places is 2.71828183.


The Natural Exponential Function

For all real numbers x, the function defined by f(x)=ex is called the natural exponential function.