Differentiating $\frac{t \, e^{\tan t}}{\ln(3t+1)}$? I've tried to differentiate the following function:
$$f(t)=\frac{t \, e^{\tan (t)}}{\ln(3t+1)}$$
But I am confused at what I should do (and perhaps I forgot some identities too), I've learned the rudiments of differential calculus, I've learned about the sum/product/division of derivatives and the chain rule. My understanding of these operations is that they are tools that allow one to decompose complicated derivatives in various pieces so one can derive the simplest derivatives one by one.
I've tried the following: Using the chain rule, I guess that I should differentiate $e^{\tan (t)}$ first, the derivative of $f(x)=e^x$ is $f'(x)=e^x$, but I got confused at  how to proceed later, I've differentiated part of the $\tan x$ in a similar fashion to this. At the moment, my guess is that I should finishing doing the derivative of $\tan (x)$, which is $\sec ^2(x)$ then apply the chain rule, obtaining:
$$e^{\tan (t)}\sec^2(t)$$
Now I guess I should use the product's rule to multiply $t$ by $e^{\tan (t)}\sec^2(t)$, obtaining:
$$1 \cdot e^{\tan (t)}+t\cdot e^{\tan (t)}\sec^2(t)$$
And now I guess I should use the quotient rule on:
$$\frac{1 \cdot e^{\tan (t)}+t\cdot e^{\tan (t)}\sec^2(t)}{\ln(3t+1)}$$
But I feel this is getting too lengthy and that perhaps I'm doing something wrong. Is my reasoning until this point correct?
 A: You can make this problem easier by logarithmic differentiation. If 
$$y=\frac{t e^{\tan(t)}}{\ln(3t+1)}$$ 
then using the rules of logarithms
$$\ln(y) = \ln(t) + \tan(t) - \ln(\ln(3t+1)).$$
This is easier to differentiate than what you started with, because you don't have to do anything with the product or quotient rules. When you differentiate this, you get $\frac{y'}{y}$, so
$$y' = y \frac{d}{dt} \left ( \ln(y) \right )$$
A caveat: this only works for $t>0$, whereas the given function is also defined and differentiable when $-1/3 < t < 0$. You can still use this method for $t<0$ by writing $\frac{t}{\ln(3t+1)} = \frac{-t}{-\ln(3t+1)}$ and then doing the same procedure.
A: The method you are using is correct up until you try to use the quotient rule.  The mistake is that you already took the derivative of the numerator.  The quotient rule is:
$$\frac{d}{dx}\frac{f}{g}=\frac{f'g-fg'}{g^2}  $$
Some times it's easier to cast the expression as a product instead of a quotient...i.e.
$$ \frac{d}{dt}te^{\tan(t)}(\ln(3t+1))^{-1}  $$
And then just use the product rule.
EDIT
I will first demonstrate the method for using the quotient rule.
$$ \frac{d}{dt}\frac{te^{\tan(t)}}{\ln(3t+1)}=\frac{\left(te^{\tan t}\right)'\ln(3t+1)-te^{\tan t}\left(\ln(3t+1) \right)'}{\ln^2(3t+1)}  $$
Then, using the chain rule and product rule on the first and second derivative terms in the numerator (chain and product rule within the quotient rule):
$$ \frac{\left(e^{\tan t}+te^{\tan t}\sec^2t\right)\ln(3t+1)-\frac{3te^{\tan t}}{3t+1}}{\ln^2(3t+1)}  $$
We can then go on to simplify the expression which I leave you to do.
An alternate method is casting the entire expression as a product like I did in the original post.  Here we would have using the chain and product rule:
$$ \frac{d}{dt}te^{\tan t}(\ln(3t+1))^{-1}=e^{\tan t}(\ln(3t+1))^{-1}+te^{\tan t}\sec^2(t)(\ln(3t+1))^{-1}\dots-te^{\tan t}(\ln(3t+1))^{-2}\frac{3}{3t+1}  $$
A: $$\begin{equation}\begin{split}f(t)=\dfrac{t\exp(\tan t)}{\log(3t+1)}=\dfrac{g(t)}{h(t)},\end{split}\end{equation}$$
$$\begin{equation}\begin{split}\dfrac{\mathrm{d}f(t)}{\mathrm{d}t}&=\dfrac{\dfrac{\mathrm{d}g(t)}{\mathrm{d}t}h(t)-\dfrac{\mathrm{d}h(t)}{\mathrm{d}t}g(t)}{h^2(t)},\\&=\dfrac{\mathrm{d}g(t)}{\mathrm{d}t}\dfrac{1}{h(t)}-\dfrac{\mathrm{d}h(t)}{\mathrm{d}t}\dfrac{g(t)}{h^2(t)}.\end{split}\end{equation}$$
Now: $$\dfrac{\mathrm{d}g(t)}{\mathrm{d}t}=\exp(\tan t)+t(1+\tan^2t)\exp(\tan t).$$
$$\dfrac{\mathrm{d}h(t)}{\mathrm{d}t}=\dfrac{3}{3t+1}.$$
A: While others have already mentioned a couple of different approaches that can be applied to your problem, I wanted to emphasize how top-down thinking can be applied to solve problems like this.
We start with the quotient $\dfrac{te^{\tan t}}{\ln(3t+1)}$; this is of the form $\frac fg$, where $f(t) = te^{\tan t}$ and $g(t) = \ln(3t+1)$.  We know that the result will be $\frac{gf'-fg'}{g^2}$, so we know that we need to compute $f'$ and $g'$.
Let's look at $f$ first: $f(t) = te^{\tan t}$.  This has the form $f=f_1f_2$, where $f_1(t) = t$ and $f_2=e^{\tan t}$, and the derivative will be $f'=f_1'f_2+f_2'f_1$, so we need to compute $f_1'$ and $f_2'$.  Fortunately, $f_1'$ is trivial: $\frac{df_1(t)}{dt} = 1$.  
Meanwhile, $f_2$ has the form $f_2=f_{21}(f_{22}(t))$, with $f_{21}(t) = e^t$ and $f_{22}(t) =\tan t$; the derivative will be $f_2'(t) = f_{22}'(t)f_{21}'(f_{22}(t))$, so we need to find the derivatives of $f_{21}$ and $f_{22}$.
And so on: you can turn this into a completely mechanical procedure for finding the derivative of an (elementary) function by breaking it repeatedly into constituent pieces.  Once you've found the derivatives of all of the individual chunks, you can start reassembling them to find the derivatives of your intermediate pieces, etc.; it can even help to write this out physically as a tree so that you don't lose track of what to do with any given piece.
