approximating a function near $0$ using Taylor series

34 Views Asked by At

I have a function f(x) which I want to approximate near $0$ using Taylor series: $$f(x)= (2x(1+\ln(1-x))-e^{2x}+1)/2x(e^{2x}-1)$$ Taylor expansion of $\ln(1-x)=-x-x^2/2-x^3/3,\quad$ $\:e^{2x}=1+2x+2x^2+4x^3/3$.
Both expansions are at $x=0$ as that's where I am approximating function and I substituted $\ln(1-x)$ and $e^{2x}$ in $f(x)$. Am I wrong anywhere?

1

There are 1 best solutions below

2
On

This is the way for the composition of Taylor series.

Considering $$f(x)=\frac{(2x(1+\ln(1-x))-e^{2x}+1) } {2x(e^{2x}-1) }$$ the first thing to do is to check the denominator; in your case, it is $4 x^2+O\left(x^3\right)$. So, if you were just concerned by the limit, it would be sufficient to expand the numerator to $O\left(x^3\right)$.

So, if you want to approximate the function, expand both numerator and denominator to $O\left(x^{n+1}\right)$ $(n \geq 2)$ and you will have something looking like $$f(x)=\frac{x^2 \left(\sum_{i=0}^{n-2} a_i x^i +O\left(x^{n-1}\right)\right)}{x^2 \left(\sum_{i=0}^{n-2} b_i x^i +O\left(x^{n-1}\right) \right)}$$ Simplify and perform the long division to get $$f(x)=\frac{a_0}{b_0}+\frac{ (a_1 b_0-a_0 b_1)}{b_0^2}x+O\left(x^{2}\right)$$ Depending on how far you want to go, add more terms in the expansions and push the long division accordingly.