limit $ \lim_{x\to\infty} \left( (x+2017)^{1+\frac{1}{x}} \: -\: x^{1+\frac{1}{x+2017}} \right) $ Find the following limit:
$$
\lim_{x\to\infty}
\left(
(x+2017)^{1+\frac{1}{x}} \: -\: x^{1+\frac{1}{x+2017}}
\right)
$$

I tried to exchange the infinity to zero by $x:=\frac{1}{t}$ and then use $\lim_{t\to 0^+}t^t=1$, but it doesn't lead to anything, I can't avoid having $\infty-\infty$...

The answer is 2017, as graph showed.
 A: In this case you cannot avoid using $a^b=\exp(b\ln(a))$.
You will need also $\frac{\ln(x)}{x}\to 0$ when $x\to+\infty$.
$f(x)=(x+2017)\times(x+2017)^\frac1x-x\times x^\frac1{x+2017}=$
$(x+2017)\times\exp(\frac{\ln(x+2017)}{x})-x\times\exp(\frac{\ln(x)}{x+2017})=$
The quantities inside the exponentials are going to $0$ so both exponentials are going to $1$. 
If we simply use that : $(x+2017)\times(1+o(1))-x\times(1+o(1))=2017+o(x)\ $ 
then we cannot conclude because there is still a term that does not converge: $o(x)$ as $x\to+\infty$.

So we are forced to push the Taylor expansion forward, I'm afraid there is no shortcut this time.
$\exp\left(\frac{\ln(x+2017)}{x}\right)=
\exp\left(\frac{\ln(x)+\frac{2017}{x}+O(\frac{1}{x^2})}{x}\right)=
\exp\left(\frac{\ln(x)}{x}+O(\frac{1}{x^2})\right)=
1+\frac{\ln(x)}{x}+\frac{\ln(x)^2}{2x^2}+O(\frac{1}{x^2})$
$\exp\left(\frac{\ln(x)}{x+2017}\right)=
\exp\left(\frac{\ln(x)}{x}-\frac{2017\ln(x)}{x^2}+O(\frac{1}{x^2})\right)=
1+\frac{\ln(x)}{x}-\frac{2017\ln(x)}{x^2}+\frac{\ln(x)^2}{2x^2}+O(\frac{1}{x^2})$
And then report in $f(x)$.
$f(x)=(x+2017)\times\exp\left(\frac{\ln(x+2017)}{x}\right)-x\times\exp\left(\frac{\ln(x)}{x+2017}\right)=$
$x\times\left(0+O(\frac{1}{x^2})\right)+2017\times\left(1+\frac{\ln(x)^2}{2x^2}+O(\frac{1}{x^2})\right)=2017+O(\frac{1}{x})\to 2017$
Note: the term in $\frac{2017\ln(x)^2}{x^2}$ disappear because it is smaller than $O(\frac1x)$.
A: I generalize this problem
in two ways.
First,
replace $2017$ with $c$.
Second, 
make the exponents more general,
so that the problem is
$\lim_{x\to\infty}
\left(
(x+c)^{1+\frac{a}{x}} - x^{1+\frac{b}{x+c}}
\right)
$.
It turns out that 
the result is
$(a-b)\ln(x)+c+O(\frac{\ln^2(x)}{x})
$.
If $a=b$ (as in the original problem,
the limit is $c$.
Otherwise the result
goes to $+\infty$ if $a > b$
and
goes to $-\infty$ if $a < b$.
Let's look at the parts
as $x \to \infty$.
First.
$\begin{array}\\
(x+c)^{1+\frac{a}{x}}
&=(x+c)(x+c)^{\frac{a}{x}}\\
&=(x+c)x^{a/x}(1+c/x)^{\frac{a}{x}}\\
&=(x+c)e^{a\ln(x)/x}e^{a\ln(1+c/x)/x}\\
&=(x+c)(1+\frac{a\ln(x)}{x}+O(\frac{\ln^2(x)}{x^2})e^{(ac/x+O(1/x^2))/x}\\
&=(x+c)(1+\frac{a\ln(x)}{x}+O(\frac{\ln^2(x)}{x^2})e^{ac/x^2+O(1/x^3)}\\
&=(x+c)(1+\frac{a\ln(x)}{x}+O(\frac{\ln^2(x)}{x^2})(1+ac/x^2+O(1/x^3))\\
&=(x+c)(1+\frac{a\ln(x)}{x}+O(\frac{\ln^2(x)}{x^2}+O(1/x^2))\\
&=(x+c)(1+\frac{a\ln(x)}{x}+O(\frac{\ln^2(x)}{x^2}))\\
&=x+c+a\ln(x)+O(\frac{\ln^2(x)}{x} )\\
\end{array}
$
Second.
$\begin{array}\\
x^{1+\frac{b}{x+c}}
&=xe^{b\ln(x)/(x+c)}\\
\text{and}\\
\frac{b\ln(x)}{x+c}
&=\frac{b\ln(x)}{x}\frac1{1+c/x}\\
&=\frac{b\ln(x)}{x}(1-\frac{c}{x}+O(\frac1{x^2}))\\
&=\frac{b\ln(x)}{x}-\frac{bc\ln(x)}{x^2}+O(\frac{\ln(x)}{x^3})\\
\text{so}\\
e^{b\ln(x)/(x+c)}
&=1+\frac{b\ln(x)}{x}-\frac{bc\ln(x)}{x^2}+O(\frac{\ln(x)}{x^3}))
+O(\frac{\ln^2(x)}{x^2})\\
&=1+\frac{b\ln(x)}{x}
+O(\frac{\ln^2(x)}{x^2})\\
\text{so that}\\
x^{1+\frac{b}{x+c}}
&=x+b\ln(x)+O(\frac{\ln^2(x)}{x})\\
\end{array}
$
Taking their difference,
the $x$ cancels out
and we get
$(a-b)\ln(x)+c+O(\frac{\ln^2(x)}{x})
$.
Note:
Wolfy confirms the difference as
$2017 + 2017 \frac{1 + 2 log(x)}{x} + O((1/x)^2)
$.
A: Making the problem more general, let us consider $$(x+a)^{1+\frac{1}{x}} \: -\: x^{1+\frac{1}{x+a}} $$ and define $$A=(x+a)^{1+\frac{1}{x}}\qquad\text{and}\qquad B=x^{1+\frac{1}{x+a}} $$ $$\log(A)=(1+\frac{1}{x})\log(x+a)=\left(1+\frac{1}{x}\right)\left(\log(x)+\log\left(1+\frac a x\right)\right)$$ Using Taylor series $$\log(A)=\log \left({x}\right)+\frac{a+\log
   \left({x}\right)}{x}+O\left(\frac{1}{x^2
   }\right)$$ Taylor again $$A=e^{\log(A)}=x+a+\log
   \left({x}\right)+O\left(\frac{1}{x}\right)$$ Doing the same for $B$
$$\log(B)= \left(1+\frac{1}{x+a}\right)\log(x)=\log \left({x}\right)+\frac{\log
   \left({x}\right)}{x}+O\left(\frac{1}{x^2}\right)$$ $$B=e^{\log(B)}=x+\log(x)+O\left(\frac{1}{x}\right)$$ So $$A-B=a+O\left(\frac{1}{x}\right)$$ 
Using one more term in the expansions, you would obtain $$A-B=a+a\frac{1+2  \log
   \left({x}\right)}{x}+O\left(\frac{1}{x^2}\right)$$
A: The number $2017$ just reminds that the question appeared in a test conducted in year $2017$. To simplify typing it is best to use a generic symbol $k$ instead of $2017$. We can then proceed as follows
\begin{align} 
L&= \lim_{x\to\infty} (x+k) ^{1+1/x}-x^{1+1/(x+k)}\notag\\
&=\lim_{x\to\infty}(x+k) (x+k) ^{1/x}-x\cdot x^{1/(x+k)}\notag\\
&=\lim_{x\to\infty} k(x+k) ^{1/x}+x\{(x+k)^{1/x}-x^{1/(x+k)}\}\notag\\
&=k+\lim_{x\to\infty}x(e^{a}-e^{b})\notag\\
&=k+\lim_{x\to\infty}xe^{b}\cdot\frac{e^{a-b}-1}{a-b}\cdot(a-b)\notag\\
&=k+\lim_{x\to\infty}x(a-b)\notag\\
&=k+\lim_{x\to\infty}x\left(\frac{\log(x+k)}{x}-\frac{\log x} {x+k} \right) \notag\\
&=k+\lim_{x\to\infty} x\log x\left(\frac{1}{x}-\frac{1}{x+k}\right)+\log(1+(k/x))\notag\\
&=k+\lim_{x\to\infty}k\cdot\frac{\log x} {x+k} +0\notag\\
&=k+k\cdot 0=k\notag
\end{align}
and hence the desired answer is $k=2017$. Note that $a, b$ tend to $0$ as $x\to\infty$ and we have used the following standard limits $$\lim_{t\to 0}\frac{e^{t}-1}{t}=1,\,\lim_{x\to\infty}\frac{\log x} {x} =0$$
