Write a program to evaluate e by the series: e = 1 + 1 + 1/2! + 1/3! + 1/4! + 1/5! + ... Test your program as you increase the number of terms in the series. Determine how many significant digits of precision that you obtain in your answer as a function of the number of terms in the series. How many terms are necessary to reach machine precision?
Added by Robert H.
Close
Step 1
The correct series is: e = 1 + 1/1! + 1/2! + 1/3! + 1/4! + ... Now, let's write a program to evaluate e using this series: ```python import math def evaluate_e(n_terms): e = 0 for i in range(n_terms): e += 1 / math.factorial(i) return Show more…
Show all steps
Your feedback will help us improve your experience
Sri K and 95 other Calculus 3 educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Evaluate the power series expansion to show that ln(2) is the sum of the alternating harmonic series. Then use the alternating series test to determine how many terms of the sum are needed to estimate ln(2) accurate to within 0.001. Number of terms needed is:
Madhur L.
Use the Taylor series for the exponential function to approximate the expression to four decimal places. $e^{1 / 2}$
Ma. Theresa A.
The Natural Exponential Function The following series can be used to estimate the value of $e^{a}$ for any real number a: $$e^{a} \approx 1+a+\frac{a^{2}}{2 !}+\frac{a^{3}}{3 !}+\dots+\frac{a^{n}}{n !}$$ where $n !=1 \cdot 2 \cdot 3 \cdot 4 \cdot \cdots \cdot n$. Use the first eight terms of this series to approximate the given expression. Compare this estimate with the actual value. $$ e $$
Further Topics in Algebra
Series
Recommended Textbooks
Calculus: Early Transcendentals
Thomas Calculus
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD