Finding the tangent line of a piecewise-defined function

2.4k Views Asked by At

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?

2

There are 2 best solutions below

0
On

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$$

0
On

This is a fantastic question. Beyond the calculations it's also important to consider the teaching purpose of the original question.

ajotatxe's point that h is never zero is the key to understanding what is going on with this function. What happens to the function at x=0? Is the function continuous? If it is not continuous, is it differentiable? If it is not differentiable, could we trust our answer to a derivative calcuation?

I'm not saying that the function is or is not differentiable at x=0, but that is what the question wants you to think about. It's encouraging you to go back to the ideas that you originally learned concerning under what conditions derivatives do and do not exist and to think about them here.

The same applies to the tangent line. What if the function is not continuous at x=0 -- can you even have a tangent line? Is it possible for a line to touch only one point on a curve when that point is a discontinuity? This is encouraging you to go back and look at your basic understandings of a tangent line as well.

Is it possible that, after considering all this, the only possible answer is "does not exist"? Or does it?

These are interesting things to consider.