Taylor Series (Generic function)

Hi, Im trying to illustrate a basic Taylor Series expansion example listed on document centre. http://wolfram.com/xid/0gipeq-u3o

Series[f[x], {x, a, 3}]

I obtain an answer with a function
(2^(-1-r) LerchPhi[(-1)^(1+r),1+r,1/2])+O[(2^(-1-r) LerchPhi[(-1)^(1+r),1+r,1/2])]^5

The correct answer should be f + f ’ (x-a) + 0.5 f " (x-a)^2 +…

How can I correct the input command to receive the output interms of f , instead of Lerchphi.

Hello Rashmil,
I believe that you have previousy assigned f or a

Try this:

Clear[f, a]

Series[f[x], {x, a, 3}]

f = Sin;

Series[f[x], {x, a, 3}]

a = Pi/6;

Series[f[x], {x, a, 3}]


I hope this is helpful.

It worked after Clearing variables
thanks