I have $ f(x) = \begin{cases} \frac{e^x-1}{log(x+1)} & \quad \text{if } x>-1 ,&x\not=0 \\ 1 & \quad \text{if } x= 0\\ \end{cases} $
I need the tangent line of the function at $x=0$. I think i'm missing something, I apply the formula: $y=f'(0)(x-0)+f(0)$ $$$$But when i analize $f'(0)$, My $f$ at $0$ is $1$, so $f(0)=1$ and $f'(0) $ for $x=1$ is $0$. I get $$y=1$$ as tangent line, i'm sure i'm doing wrong. How should analize the situation?
To compute $$f'(0)=\lim_{h\to0}\frac{f(h)-f(0)}h$$ we need to have in mind that, in that expression, $f(h)=\frac{e^h-1}{\log(h+1)}$, because since $h\to 0$, $h$ is never $0$.
Therefore $$f'(0)=\lim_{h\to 0}\frac{\frac{e^h-1}{\log(h+1)}-1}h=\lim_{h\to0}\frac{e^h-1-\log(h+1)}{h\log(h+1)}$$
Applying l'Hopital's rule twice,
$$f'(0)=\lim_{h\to0}\frac{e^h-\frac1{h+1}}{\log(h+1)+\frac h{h+1}}=\lim_{h\to0}\frac{e^h+\frac1{(h+1)^2}}{\frac1{h+1}+\frac1{(h+1)^2}}=1$$