A power approximation function

75 Views Asked by At

I am trying to construct a function that would approximate $a^b$ using Maclaurin series. Here are my reasoning:

Since $$a^b=e^{b\ln a}$$

and

$$e^x=\sum^{\infty}_{k=0} \frac{x^k}{k!}$$

it should follow that $$a^b=e^{b\ln a}=\sum^{\infty}_{k=0} \frac{(b\ln a)^k}{k!}$$

But, when I started to plug in numbers, up to 5 terms, it did appear to give the right answer. Where am I wrong?

EDIT Numbers I tried:

let $x=4\ln3$

$$1+x+x^2/2!+x^3/3!+x^4/4!+x^5/5!=58.39$$

1

There are 1 best solutions below

0
On BEST ANSWER

The next term in the expansion has value $\frac{(4 \log 3)^6}{6!}\approx 10$. You haven't summed enough terms. It is only when you get to $\frac {x^{10}}{10!}$ that they get below $1$