TITLE: Wrong application of L'Hôpital's rule?
QUESTION [6 upvotes]: I was trying to find the right oblique asymptote of the following function:
$$ g(x)= \frac{x^2+(x+2)\cosh(x)}{\sinh(x)}=\frac{x^2}{\sinh(x)}+(x+2)\coth (x)$$
Now since $\frac{x^2}{\sinh(x)}\to 0$ and $\coth(x)\to 1$ as $x\to \infty$, it is easy to see that this asymptote is $y=x+2$. However, when I try to find this asymptote using L'Hôpitals rule, I get a different result: 
$$\begin{align}
\lim_{x\to \infty}g(x) & =\lim_{x\to \infty} \frac{x^2+(x+2)\cosh(x)}{\sinh(x)} \\
& \stackrel{LH}{=}\lim_{x\to \infty}\frac{2x+\cosh(x)+(x+2)\sinh (x)}{\cosh(x)} \\
& =\lim_{x\to \infty} \frac{2x}{\cosh(x)}+1+(x+2)\tanh(x) \\
& =\lim_{x\to \infty} x+3
\end{align}$$
since $\frac{2x}{\cosh(x)}\to 0$ and $\tanh(x)\to 1$ as $x\to \infty$. This suggests that the asymptote is $y=x+3$ instead of $y=x+2$.
A quick look at the function using WolframAlpha shows that $y=x+2$ is indeed the correct asymptote, so I highly suspect that I somehow applied L'Hôpitals rule in a wrong way. I have however no clue as to what I did wrong. Could anyone enlighten me?

REPLY [7 votes]: You seem to be assuming that L'Hôpital preserves asymptotes, when it's not the case. 
Take for instance
$$
\frac{x^2(x+2)}{x^2},
$$
with the obvious asymptote $x+2$. If you take derivatives to use L'Hôpital, you get
$$
\frac{3x^2+4x}{2x}=\frac{3x+4}{2},
$$
and the asymptote is not the same.

REPLY [5 votes]: To find the asymptote:
$$y=mx+n$$
you should calculate separately the following limits:
$$m=\frac{g(x)}{x}$$
for the slope, and
$$n=g(x)-mx$$
for the intercept.
Take also a look here:
How to find the oblique asymptote of root of a function?