Author Topic: How to recenter the Taylor series?  (Read 5262 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to recenter the Taylor series?
« on: April 20, 2009, 12:59:32 PM »
Quote
Note that the infinite series there has a radius of convergence of 1/e. That means it only gives the right answer if x < 1/e. If x > 1/e, you have to recenter the Taylor series, which isn't something I'll get into here. Also, it only gives one of the valid solutions. Just like sqrt(4) gives 2, which is one valid solution.

Yep, The reguler taylor series only works from -(1/e) to (1/e).
How do I  "recenter" it?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to recenter the Taylor series?
« Reply #1 on: April 20, 2009, 01:46:15 PM »
Actually, there's probably a better way.  It was probably a mistake showing you the Taylor series and not these methods right away:

clicky.

Basically you compute a (wrong) answer, and then plug it back into the algorithm and it gives you a more correct answer.  And you keep doing it until you get some arbitrary precision or you run out of time.


Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to recenter the Taylor series?
« Reply #2 on: April 20, 2009, 04:50:01 PM »
I know what you mean (although I don't understand "Python" at all, I was thinking of writing something like that in vb)

Basically It guesses x++ for every "x ^ x = c" where c is the value given (starting from x=0). If it goes over c, it goes back one, then it does x = x + 0.1 same thing. Then x = x + 0.01  etc.

But, what I want to understand is how to do it the long way, meaning the Taylor series way...  

An interesting thing I notice is it can't go below ln(0.4~ ^ 0.4~)
« Last Edit: April 20, 2009, 05:07:10 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to recenter the Taylor series?
« Reply #3 on: April 20, 2009, 09:18:23 PM »
Well the taylor series is constructed usually using derivatives.  I dunno if you've had the calc background necessary to make it make sense.  And LambertW is a peculiar enough function I can't even necessarily guarantee what would happen if you try and recenter it.

Anyway, the iterative method is a bit more complex than you're giving it credit for.  It's derivation also lives in calc and derivatives, but basically it's using Newton's method to determine which direction to move in next, and by how much.

The only thing you might not understand looking at that python snippet is the ** operator, which means the same thing as the ^ operator in VB.  Everything else should be reasonably understandable.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
How to recenter the Taylor series?
« Reply #4 on: April 25, 2009, 01:30:38 PM »
Looks like I will have to solve it the  "Russian Way"

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
How to recenter the Taylor series?
« Reply #5 on: April 25, 2009, 01:41:46 PM »
The only Russian method I know of involves ballet.