Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics and Econometrics book
Mathematics

Maclaurin Series: Approximating eˣ, sin x and ln(1 + x), with a Continuous Compounding Case

How much does continuous compounding really add? Use a Maclaurin series to find out to the cent, with error bounds, worked examples and exam practice.

In 30 seconds
  • A Maclaurin series rewrites a function as an infinite polynomial built from its value and derivatives at \( x = 0 \): \( f(x) \) \( = f(0) + f'(0)x + \dfrac{f”(0)}{2!}x^2 + \cdots \)
  • Cut it off after a few terms and you get a polynomial that is very accurate near 0, which is where interest rates, small angles and small errors live.
  • Case: $10,000 at 5% compounded continuously grows to \( 10000e^{0.05} \). Three terms, \( 1 + x + \tfrac{x^2}{2} \), give $10,512.50, just 21 cents short; four terms are correct to the cent.
  • The Lagrange error bound tells you, before you compute anything, how many terms you need.
  • Exam point: memorise the series for \( e^x \), \( \sin x \), \( \cos x \) and \( \ln(1 + x) \), and build new ones by substituting, multiplying or differentiating.

The case: how much does continuous compounding really add?

A savings app advertises 5% a year, “compounded continuously”. You deposit $10,000 for one year. With continuous compounding the balance after \( t \) years at rate \( r \) is \( 10000e^{rt} \), so after one year you will have \( 10000e^{0.05} \). (The app and the rate are illustrative; the formula is the standard one.)[5]

Simple interest at 5% would give $10,500. Continuous compounding gives a little more, but how much more? And a second question comes with it: a rival bank quotes 6% compounded once a year. What continuous rate is that equivalent to? That is the \( c \) with \( e^{c} = 1.06 \), so \( c = \ln 1.06 \).

A calculator answers both instantly. But the questions here are sharper: why is the extra so small, can we find it by hand, and how do we know our hand answer is accurate to the cent? The tool that answers all three is the Maclaurin series.

The concept: a polynomial that copies a function near zero

Polynomials are the easiest functions there are: you only need to add and multiply. Functions such as \( e^x \), \( \sin x \) and \( \ln(1 + x) \) are much harder to evaluate. The idea of a Maclaurin series is to find a polynomial that behaves like the hard function near \( x = 0 \).

How do you make a polynomial “behave like” a function? Make it match, one feature at a time. First match the value at 0, so the graphs meet. Then match the gradient at 0, so they leave that point in the same direction. Then match the second derivative, so they bend by the same amount, and so on. Each extra matched derivative keeps the polynomial close to the function for a little longer, as Figure 1 shows.[1]

Key termMaclaurin series: the power series of a function about \( x = 0 \), in which the coefficient of \( x^n \) is \( f^{(n)}(0)/n! \). It is the special case, centred at 0, of a Taylor series, which can be centred at any point \( a \). Stopping after the \( x^n \) term gives the Maclaurin polynomial \( P_n(x) \).
\[ f(x) = f(0) + f'(0)\,x + \frac{f”(0)}{2!}x^2 + \frac{f”'(0)}{3!}x^3 + \cdots \]

Here \( f^{(n)}(0) \) is the \( n \)th derivative of \( f \) evaluated at \( x = 0 \), and \( n! = 1 \times 2 \times \cdots \times n \). The factorials are there because differentiating \( x^n \) \( n \) times produces \( n! \); dividing by \( n! \) cancels it, so the polynomial’s \( n \)th derivative at 0 comes out equal to \( f^{(n)}(0) \). The four series you should know by heart are

\[ e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots \quad (\text{all } x) \] \[ \sin x = x-\frac{x^3}{3!} + \frac{x^5}{5!}-\cdots \quad (\text{all } x) \] \[ \cos x = 1-\frac{x^2}{2!} + \frac{x^4}{4!}-\cdots \quad (\text{all } x) \] \[ \ln(1 + x) = x-\frac{x^2}{2} + \frac{x^3}{3}-\cdots \quad (-1 < x \le 1) \]

To know how good a cut-off is, use the Lagrange error bound. If \( |f^{(n+1)}(t)| \le M \) for every \( t \) between 0 and \( x \), then

\[ \left|f(x)-P_n(x)\right| \le \frac{M\,|x|^{n+1}}{(n+1)!}. \]
Mathematics Made Simple textbook coverChapter 20 of Mathematics Made Simple builds Taylor and Maclaurin series, with error bounds, from first principles.Get the textbook · $12

Why this formula fits the case

The case has exactly the feature that makes a Maclaurin series shine: the input is small. Interest rates written as decimals, such as 0.05 or 0.06, are close to 0, and the series is built to be accurate near 0. Better still, each term is far smaller than the one before. For \( x = 0.05 \), the terms of \( e^x \) are 1, 0.05, 0.00125, 0.0000208, … Each extra term adds at least one more correct decimal place, so a handful of terms is plenty.

The series also explains the size of the answer, which a calculator never does. Since \( e^x \approx 1 + x + \tfrac{x^2}{2} \), continuous compounding gives you simple interest \( x \) plus about \( \tfrac{x^2}{2} \). At 5% that is an extra \( 0.05^2/2 = 0.00125 \), or about $12.50 on $10,000. That is why continuous compounding adds so little at ordinary rates.

When is a Maclaurin series the wrong tool? When \( x \) is far from 0: you would need many terms, and for some functions the series stops working altogether. The series for \( \ln(1 + x) \) only converges for \( -1 < x \le 1 \), so it cannot give \( \ln 5 \) directly. In that case, centre a Taylor series somewhere nearer, or rewrite the problem so that the input is small.

Setting it up

QuantityMeaningIn the case
\( f(x) \)Function to approximate\( e^x \) for the balance; \( \ln(1 + x) \) for the equivalent rate
\( x \)Small input\( rt = 0.05 \times 1 = 0.05 \) (a decimal, not 5); and \( x = 0.06 \)
\( P_n(x) \)Cut-off polynomial\( P_2 \) or \( P_3 \)
\( M \)Bound on the next derivativeEvery derivative of \( e^x \) is \( e^x \), and \( e^{0.05} < 1.1 \), so \( M = 1.1 \)
Target accuracyHow close is close enoughOne cent on $10,000, so an error in \( e^{0.05} \) below 0.000001

That last line matters. Multiplying by $10,000 multiplies the error by 10,000 too, so to be right to the cent we need \( e^{0.05} \) correct to about six decimal places.

Solving it

Worked example

Build the Maclaurin series of \( e^x \), use \( P_2 \) and then \( P_3 \) to estimate the balance \( 10000e^{0.05} \), and use the error bound to decide how many terms are needed for accuracy to the cent.

Step 1Every derivative of \( e^x \) is \( e^x \), so \( f(0) \) \( = f'(0) \) \( = f”(0) \) \( = \cdots \) \( = e^0 \) \( = 1 \).
Step 2The coefficients are \( 1/n! \): \( e^x = 1 + x + \dfrac{x^2}{2} + \dfrac{x^3}{6} + \cdots \)
Step 3\( P_2(0.05) \) \( = 1 + 0.05 + \dfrac{0.0025}{2} \) \( = 1.05125 \), so the balance is about $10,512.50.
Step 4Error bound for \( P_2 \): \( \dfrac{1.1 \times 0.05^3}{3!} \) \( = \dfrac{1.1 \times 0.000125}{6} \) \( \approx 0.0000229 \). On $10,000 that is at most about 23 cents.
Step 5Add the next term: \( P_3(0.05) \) \( = 1.05125 + \dfrac{0.000125}{6} \) \( = 1.05125 + 0.0000208 \) \( = 1.0512708 \), a balance of $10,512.71.
Step 6Error bound for \( P_3 \): \( \dfrac{1.1 \times 0.05^4}{4!} \) \( = \dfrac{1.1 \times 0.00000625}{24} \) \( \approx 0.00000029 \), at most 0.3 cents. So four terms are enough.

The calculator value is \( 10000e^{0.05} = 10512.7110 \), to 4 d.p. \( P_2 \) was 21 cents short, inside its 23-cent bound, and \( P_3 \) rounds to the right cent.

Now the second question: the continuous rate equivalent to 6% a year.

Worked example

Find the Maclaurin series of \( \ln(1 + x) \) and use three terms to estimate \( \ln 1.06 \). Bound the error.

Step 1\( f(x) = \ln(1 + x) \): \( f(0) = 0 \).
Step 2\( f'(x) = (1 + x)^{-1} \), \( f”(x) = -(1 + x)^{-2} \), \( f”'(x) = 2(1 + x)^{-3} \), so \( f'(0) = 1 \), \( f”(0) = -1 \), \( f”'(0) = 2 \).
Step 3Coefficients: \( 1 \), \( -\tfrac{1}{2!} = -\tfrac{1}{2} \), \( \tfrac{2}{3!} = \tfrac{1}{3} \). So \( \ln(1 + x) = x-\dfrac{x^2}{2} + \dfrac{x^3}{3}-\cdots \)
Step 4With \( x = 0.06 \): \( 0.06-\dfrac{0.0036}{2} + \dfrac{0.000216}{3} \) \( = 0.06-0.0018 + 0.000072 \) \( = 0.058272 \).
Step 5The series alternates in sign with shrinking terms, so the error is less than the first term left out: \( \dfrac{0.06^4}{4} = 0.00000324 \).

So 6% compounded annually is the same as about 5.827% compounded continuously (the true value is 0.0582689, within the bound).

In exams you rarely differentiate from scratch. Instead you combine series you already know.

Worked example

Find the Maclaurin series of \( e^x\cos x \) up to and including the term in \( x^3 \).

Step 1Write each series to \( x^3 \): \( e^x = 1 + x + \tfrac{1}{2}x^2 + \tfrac{1}{6}x^3 \) and \( \cos x = 1-\tfrac{1}{2}x^2 \).
Step 2Multiply, keeping only powers up to \( x^3 \): \( (1 + x + \tfrac{1}{2}x^2 + \tfrac{1}{6}x^3)(1-\tfrac{1}{2}x^2) \).
Step 3Constant: 1. \( x \): \( x \). \( x^2 \): \( \tfrac{1}{2}x^2-\tfrac{1}{2}x^2 = 0 \). \( x^3 \): \( \tfrac{1}{6}x^3-\tfrac{1}{2}x^3 = -\tfrac{1}{3}x^3 \).
Step 4So \( e^x\cos x = 1 + x-\tfrac{1}{3}x^3 + \cdots \)

Notice the \( x^2 \) term vanishes. Finding all those derivatives of \( e^x\cos x \) by the product rule would have taken far longer.

Mathematics Made Simple Practice Questions coverDrill series until they are second nature: the Practice Questions book has fully worked answers for every question.Get 1,565 questions · $9

What the answer tells us

In the case’s terms. Continuous compounding at 5% earns $512.71, compared with $500 of simple interest. Of the extra $12.71, the \( \tfrac{x^2}{2} \) term explains $12.50 and the \( \tfrac{x^3}{6} \) term another 21 cents. The series turns a mysterious exponential into a clear story: simple interest, plus a small “interest on interest” correction, plus an even smaller one.

Going the other way, 6% annual equals 5.827% continuous. The continuous rate is always a little lower, because \( \ln(1 + x) \approx x-\tfrac{x^2}{2} \): you subtract about half the square of the rate.

eˣ and its first three Maclaurin polynomials
eˣP₁ = 1 + xP₂ = 1 + x + x²/2P₃ = 1 + x + x²/2 + x³/6
−2−1.5−1−0.50.511.52−112345670xyx = 0.05 (5% for one year)
Figure 1. Near x = 0 all three polynomials hug eˣ; further out, each extra term keeps the polynomial close for longer. At x = 0.05 the curves are indistinguishable at this scale, which is why two or three terms are enough for interest-rate work.

Is it reasonable? The estimate should be just above $10,500 (continuous compounding beats simple interest) and only slightly above, since the rate is small. $10,512.71 fits. The error bounds also behaved: the actual \( P_2 \) error (21 cents) sat inside its bound (23 cents).

Sensitivity. The error of \( P_2 \) grows like \( x^3 \). At 20% for one year, \( P_2(0.2) = 1.22 \) while \( e^{0.2} = 1.221403 \), so on $10,000 the three-term estimate is about $14 short, not 21 cents. Larger inputs need more terms. That is why the method works so well for interest rates and small angles, and why software first shrinks a large input before using a polynomial.

Common mistakePutting the rate in as a percentage. With \( x = 5 \) instead of \( 0.05 \), the series gives nonsense, and every term is larger than the last. Interest-rate work always uses decimals: 5% means \( x = 0.05 \).
Common mistakeDropping the factorials, or using the series outside where it is valid. The coefficient of \( x^3 \) in \( e^x \) is \( \tfrac{1}{6} \), not \( \tfrac{1}{3} \). And \( \ln(1 + x) = x-\tfrac{x^2}{2} + \cdots \) only works for \( -1 < x \le 1 \); plugging in \( x = 2 \) gives terms that grow without limit.
Exam tipMaclaurin and Taylor series are part of AP Calculus BC Unit 10 (topics 10.11 to 10.15: Taylor polynomials, the Lagrange error bound, radius and interval of convergence, and finding series),[2] and of IB Mathematics: analysis and approaches HL, topic 5.19.[3] They are not in Cambridge 9709, although the binomial expansion of \( (1 + x)^n \) for rational \( n \) in Pure Mathematics 3 is a special case of the same idea. In AP free-response questions, write the general term or at least four terms, show where each coefficient comes from, and always state the value of \( M \) you use in the error bound.

To see series built up from limits and sequences through to the error bound, the Mathematics Made Simple textbook covers them in Chapter 20, with the economics uses in Appendix B. For repetition, the Mathematics Made Simple practice book has series questions graded from routine to exam level.

Mathematics Made Simple bundle coverFrom the chain rule to Maclaurin series: get both Mathematics Made Simple books for $16.Both books · $16

Practice questions

Give decimals to the accuracy asked for and keep full accuracy in between.

EasyQ1. Use the first four terms of the series for \( e^x \) to estimate \( e^{0.1} \) to 7 decimal places, and compare with the calculator value. Show worked answer
\( 1 + 0.1 + \dfrac{0.01}{2} + \dfrac{0.001}{6} \) \( = 1 + 0.1 + 0.005 + 0.0001667 \) \( = 1.1051667 \).
Calculator: \( e^{0.1} = 1.1051709 \). The error is about 0.0000043.
EasyQ2. By substituting into a standard series, find the first three non-zero terms of the Maclaurin series for \( e^{-x^2} \). Show worked answer
Replace \( x \) with \( -x^2 \) in \( e^x = 1 + x + \dfrac{x^2}{2} + \cdots \):
\( e^{-x^2} = 1-x^2 + \dfrac{x^4}{2}-\cdots \)
MediumQ3. Use \( \sin x \approx x-\dfrac{x^3}{6} + \dfrac{x^5}{120} \) to estimate \( \sin 0.5 \) (radians) to 7 decimal places, and give a bound for the error. Show worked answer
\( 0.5-\dfrac{0.125}{6} + \dfrac{0.03125}{120} \) \( = 0.5-0.0208333 + 0.0002604 \) \( = 0.4794271 \).
The series alternates with shrinking terms, so the error is less than the next term: \( \dfrac{0.5^7}{7!} \) \( = \dfrac{0.0078125}{5040} \) \( \approx 0.0000016 \).
(Calculator: \( \sin 0.5 = 0.4794255 \).)
MediumQ4. Find the Maclaurin series of \( \ln(1 + 2x) \) up to the term in \( x^3 \), and state the values of \( x \) for which it is valid. Show worked answer
Replace \( x \) with \( 2x \): \( 2x-\dfrac{(2x)^2}{2} + \dfrac{(2x)^3}{3} \) \( = 2x-2x^2 + \dfrac{8}{3}x^3 \).
Valid for \( -1 < 2x \le 1 \), that is \( -\tfrac{1}{2} < x \le \tfrac{1}{2} \).
ExamQ5. (a) Using the Maclaurin series for \( e^x \) and \( \sin x \), show that \( e^x\sin x = x + x^2 + \tfrac{1}{3}x^3 + \cdots \) [3] (b) Hence find \( \displaystyle\lim_{x \to 0} \frac{e^x\sin x-x}{x^2} \). [2] (c) Use the series in (a) to estimate \( \displaystyle\int_0^{0.2} e^x\sin x\,dx \), giving your answer to 4 decimal places. [3] Show worked answer
(a) \( (1 \) \( + x \) \( + \tfrac{1}{2}x^2 \) \( + \cdots)(x \) \(-\tfrac{1}{6}x^3 \) \( + \cdots) \) [1]. Collect: \( x \); \( x^2 \); \( x^3 \): \( \tfrac{1}{2}-\tfrac{1}{6} = \tfrac{1}{3} \) [1]. So \( x + x^2 + \tfrac{1}{3}x^3 \). [1]
(b) \( \dfrac{x^2 + \tfrac{1}{3}x^3 + \cdots}{x^2} = 1 + \tfrac{1}{3}x + \cdots \) [1] \( \to 1 \) as \( x \to 0 \). [1]
(c) \( \displaystyle\int_0^{0.2}\left(x + x^2 + \tfrac{1}{3}x^3\right)dx \) \( = \left[\tfrac{x^2}{2} + \tfrac{x^3}{3} + \tfrac{x^4}{12}\right]_0^{0.2} \) [1] \( = 0.02 + 0.0026667 + 0.0001333 \) [1] \( = 0.0228 \). [1] (The exact value is 0.022800 to 6 d.p.)

Frequently asked questions

What is the difference between a Maclaurin series and a Taylor series?

A Taylor series can be centred at any point \( a \), using powers of \( (x-a) \) and derivatives at \( a \). A Maclaurin series is simply a Taylor series centred at \( a = 0 \). Use a Maclaurin series when the inputs you care about are near 0.

How many terms of a Maclaurin series do I need?

Enough to make the error bound smaller than your tolerance. Work out \( M|x|^{n+1}/(n+1)! \) for increasing \( n \) until it is small enough; for an alternating series, the first omitted term does the same job. Small inputs need very few terms.

Do calculators use Maclaurin series?

Not in the raw form taught in class. Calculators and computer libraries use refined methods, often reducing the input to a small range first and then applying a carefully designed polynomial or another algorithm. The principle is the same one you learn here: replace a hard function by an easy one that is accurate on a small interval.

Why do Maclaurin series have factorials?

Differentiating \( x^n \) \( n \) times gives \( n! \). Dividing the coefficient by \( n! \) undoes that, so the polynomial’s derivatives at 0 match the function’s derivatives exactly.

References

  1. Strang, G. and Herman, E. (2016). Calculus Volume 2, Section 6.3 “Taylor and Maclaurin Series”. Houston: OpenStax. https://openstax.org/details/books/calculus-volume-2
  2. College Board (2020). AP Calculus AB and AP Calculus BC Course and Exam Description, Unit 10: Infinite Sequences and Series (BC only). https://apcentral.collegeboard.org/courses/ap-calculus-bc
  3. International Baccalaureate Organization (2019). Mathematics: analysis and approaches guide (first assessment 2021), topic 5.19. Cardiff: IBO.
  4. Stewart, J., Clegg, D. and Watson, S. (2021). Calculus: Early Transcendentals, 9th edn, Section 11.10 “Taylor and Maclaurin Series”. Boston: Cengage Learning.
  5. Sydsæter, K., Hammond, P., Strøm, A. and Carvajal, A. (2016). Essential Mathematics for Economic Analysis, 5th edn, chapter on interest rates and present values. Harlow: Pearson.
Mathematics Made Simple complete bundle cover
This topic has a full chapter in Mathematics Made Simple, with 1,565 fully worked practice questions in the bundle.Mathematics Made Simple Complete Bundle — Textbook + 1,565 Practice Questions
Get it for $16
E

The EconTutorials team writes clear, exam-focused lessons in economics and statistics for A-Level, IB, AP and university students, with more than 13 years of classroom teaching behind every guide and book in the Made Simple series.