I am having trouble with understanding the following question:
Find the derivative of the given function: $f(x)=\frac{x}{2x+\frac{1}{3x+1}}$
I have always thought that in order for a function to have a derivative, it must be continuous. This function is clearly undefined for $f(-\frac{1}{3})$. So, how is it possible for it to have a derivative?
Ignoring that, I have tried to solve for the derivative but my textbook is disagreeing with me on the answer. Here's what I did
$f(x)=\frac{x}{2x+\frac{1}{3x+1}}$
$f(x)=\frac{x}{\frac{6x^2+2x+1}{3x+1}}$
$f(x)=\frac{x}{1}\cdot\frac{3x+1}{6x^2+2x+1}$
$f(x) =\frac{x}{1}\cdot\frac{3x+1}{2x(3x+1)+1}$
$f(x) =\frac{x}{1}\cdot\frac{1}{2x+1}$
$f(x) =\frac{x}{2x+1}$
$f'(x) =\frac{(2x+1)(x)'-(x)(2x+1)'}{(2x+1)^2}$
$f'(x) =\frac{1}{(2x+1)^2}$