Find limit without L' hoptials rule I am currently stuck on trying to find the limit of the following function as it goes towards infinity:
$f(x)=x-\log(\cosh(x))$
I know from wolfram alpha that the limit is log(2), but i do not know how to find that answer.
My thoughts were that i could find the limit of cosh(x) (infinity) and log of something tending towards infinity and then subtracting with x. But that just gives 0 which makes no sense.
 A: $\cosh x = \frac{e^{2x} + 1}{2e^x}$. So
\begin{align}
\lim_{x \to \infty} x - \log(\frac{e^{2x} + 1}{2e^x}) &= \lim_{x \to \infty} 
\log(e^x) - \log(\frac{e^{2x} + 1}{2e^x})\\
&= \log(\lim_{x \to \infty} \frac{2e^{2x}}{e^{2x} + 1})
\end{align}
Let $a = e^x$
\begin{align}
\log(\lim_{x \to \infty} \frac{2e^{2x}}{e^{2x} + 1}) &= \log(\lim_{a \to \infty }\frac{2a^2}{a^2 + 1}) \
\end{align}
This is a rational function with both polynomials having the same degree, its limit as $a$ approaches infinity is the ratio of the terms with the highest degree
\begin{align}
\log(\lim_{a \to \infty }\frac{2a^2}{a^2 + 1}) = \log(2)
\end{align}
A: Ok,
basically with the two hints from the comments you should already arrive to the answer. But for the sake of completeness, let me give you the result. I will only write $\lim$ meaning $\lim_{x\rightarrow\infty}$.
At first, let us rewrite 
$\lim\left( x -\log\left(\cosh(x) \right)\right) = \lim \left(\log\frac{e^x}{\cosh(x)}\right)=-\lim\left(\log\frac{\cosh(x)}{e^x}\right)$, 
where we used $log(y)=-log(y^{-1})$. We can rewrite $\cosh(x)=1/2\left(e^x-e^{-x}\right)$, giving us $-\lim \left( \log \left(\frac{1}{2} \left(\frac{e^x}{e^x} - \frac{e^{-x}}{e^x}\right)\right)\right) = -\log\left(\lim\left(\frac{1}{2}\left(1-e^{-2x}\right)\right)\right)$. The second part converges to zero leaving only the first one and using the above relation we get $-\log(1/2)=\log(2)$.
EDIT: @Jeevan Devaranjan, you won xD if you're right, accept his answer, he was first :D
A: Hint
$$\cosh x = \frac{e^{x} +e^{-x} }{2}=\frac{e^x}2(1+e^{-2x}) $$ $$\log(\cosh(x))=x-\log(2)+\log(1+e^{-2x})$$ $$A=x-\log(\cosh(x))=\log(2)-\log(1+e^{-2x})$$ SInce $x\to\infty$, the last term tends  $\log(1)=0$ and hence the limit.
You could even go further using $$\log(1+e^{-2x})=\log(1+\frac 1 {e^{2x}})\approx \frac 1 {e^{2x}}$$ which makes $$A\approx \log(2)-\frac 1 {e^{2x}}$$ which shows the limit and how it is approached.
