Advertisement

Maclaurin series for reciprocal function

Started by October 16, 2014 12:12 PM
3 comments, last by JohnnyCode 10 years, 4 months ago

I wonder what would be Maclaurin polynome aproximating f(x)=1/x function, starting at x=0 and going to good accuracy of large x values (10000+). Coulld I even achieve this with reasonable amount of degrees? (like 9 or 11th degree). I am going to jump to this soon but your suggestions would help me so much.

That's not defined at x = 0 ;)

You'll have to use the Taylor series approximation around a suitable point (probably x = 1).

What's wrong with just using 1/x? It's going to be a lot more efficient than calculating a power series expansion...

EDIT: It also has a very narrow radius of convergence ( abs(1-x) < 1 when centred on 1). So it's pretty much useless... See http://www.wolframalpha.com/input/?i=taylor+series+1%2Fx+a%3D1&lk=4

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
Advertisement

You'll have to use the Taylor series approximation around a suitable point (probably x = 1).

Thanks, I think it would be good to start from 1.0 to aproximate, thanks a lot.

The thing is that I would want to find a reciprocal of a number between 0.000001 to high values like 100000.0 of floating range from 24 bit to like 16 bit. Is reciprocal function unlikely to aproximate like that?

I have used tylor series for goniometric functions on PI perioda being extremly exact at very low degree of polynome , I would so love to have it for 1/x fucntion on large scale of defintion.

The interval of convergence is too small.

Are you using floating point or fixed point, I don't understand what you mean by this: of floating range from 24 bit to like 16 bit.

Using 1/x is going to be a lot more accurate than a (poor) approximation which is what the Taylor Series expansion about 1 will give you. Some functions aren't approximated very well at all by Taylor Series (of which McLaurin series is just a special case), e.g. sqrt(x).

Or you could use the Laurent Series, f(x) = x-1 biggrin.png

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

1/x and x1/2 . Nice to meet you. We are the most used and demanded curves in universe and forget about aproximating us silly brat, even around a small interval! Even in 16 bit floating resolution! (whe-whee-whaaaa!aaa!whaaa! sad.png )

This topic is closed to new replies.

Advertisement