Maclaurin series

Prerequisite – Taylor theorem and Taylor series

We know that formula for expansion of Taylor series is written as:

Now if we put a=0 in this formula we will get the formula for expansion of Maclaurin series. T
hus Maclaurin series expansion can be given by the formula –

Maclaurin series expansion of some elementary functions :

  1. Exponential function :
    Differentiating n times, f^n(x)=e^x.
    So we get f^n(0)=1
    Thus e^x = 1+\frac{x}{1!}+ \frac{x^2}{2!}+ \frac{x^3}{3!}+....+ \frac{x^{n-1}}{(n-1)!}+\frac{x^n}{n!}
  2. f(x) = cos x
    \cosx= 1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+…..
  3. f(x) = sin x
    \sinx = x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+....
  4. f(x) = (ax + b)^m
  5. f(x) = ln(1+x)
  6. f(x) = ln(1-x)

Find the first seven terms of f(x) = ln(sec x).

Explanation :
f(x) = ln(\secx)
f(0) = ln(\sec0)=0
Differentiating w.r.t. x,
f'(x)= (1/secx).\secx.\tanx = \tan x
f'(0)= \tan 0 = 0
f''(x)= \sec^2x\scriptstyle\implies f''(0) = \sec^20=1
f'''(x)= 2\secx.\secx.\tanx=2sec^2x.tanx\scriptstyle\implies f'''(0) = 0
f''''(x)= 4\sec^2x.\tan^2x+2\sec^4x\scriptstyle\implies f''''(0) = 0+2 = 2
f'''''(x)= 8\sec^2x.\tan^3x+16\sec4x.\tanx\scriptstyle\implies f'''''(0) = 0
f''''''(x)= 16\sec^2x.\tan^4x+88\sec4x.\tan^2x+16\sec^6x\scriptstyle\implies f''''''(0) = 16
Thus we get the Maclaurin series as –
f(x) = f(0)+f'(0).x/1!+f''(0).x^2/2!+f'''(0).x^3/3!+.... \text{upto 7 terms}

Evaluate Maclaurin series for tan x.

Explanation :
f(x) = \tan x, f(0)=0
f'(x) = \sec^2x \scriptstyle\implies f'(0)=1
f''(x) = 2\sec^x.\secx.\tanx=2\sec^2x.\tanx=2(\tanx+\tan^3x) \scriptstyle\implies f''(0)=0
f'''(x) = 2+8\tan^2x+6\tan^4x \scriptstyle\implies f'''(0)=2
f''''(x) = 16\tanx+40\tan^3x+24\tan^5x \scriptstyle\implies f''''(0)=0
f'''''(x) = 16\sec^2x+120\tan^2x.sec^2x+120\tan^4x\sec^2x \scriptstyle\implies f'''''(0)=16
Thus we get Maclaurin series as –

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.