Solution for the following limit problem I want to solve the following limit problem
$$\lim_{x \rightarrow \infty} \bigg[ (x + a)\log \big( \frac{x+a}{x+b} \big) \bigg] $$
A small simulation with a = 5 and b = 2 leads to a result of 3 which I think is correct and the right answer should be (a - b), somehow I am unable to prove it.
Here is the code to reproduce the result
def f(alpha):
    return (5 + alpha) * np.log((5 + alpha) / (2 + alpha))


alpha_list = np.linspace(10,1000)
plt.plot(alpha,[f(a) for a in alpha_list])

yields the following plot,

Thanks in advance.
 A: Use the limit definition of $e$
$$-(x+a)\log\left(\frac{x+b}{x+a}\right) = -\log\left(1+\frac{b-a}{x+a}\right)^{x+a}$$ $$\longrightarrow -\log e^{b-a} = a-b$$
A: Lets think logically about what is going on here, as $x\to\infty$:
$$\log\left(\frac{x+a}{x+b}\right)\approx\log\left(\frac xx\right)=\log(1)=0$$
as $x$ will be much larger than $a,b$. Now in the second part:
$$x+a\to\infty$$
and this is pretty obvious. So, to put it crudely we have a $0\times\infty$ situation.
If you want to use L'Hopital's rule you can do the following:
$$(x+a)\log\left(\frac{x+a}{x+b}\right)=\frac{\log(x+a)-\log(x+b)}{\frac{1}{x+a}}$$
Now both the top and bottom of this fraction tend to zero, so we can say:
$$\lim_{x\to\infty^+}\frac{\log(x+a)-\log(x+b)}{\frac{1}{x+a}}=\lim_{x\to\infty^+}\frac{\frac{1}{x+a}-\frac{1}{x+b}}{-\frac{1}{(x+a)^2}}$$
$$=\lim_{x\to\infty^+}\frac{(x+a)^2}{(x+b)}-(x+a)$$
which we can rewrite as:
$$\lim_{x\to\infty^+}\frac{(x+a)\left[(x+a)-(x+b)\right]}{(x+b)}=\lim_{x\to\infty^+}\frac{(x+a)(a-b)}{(x+b)}=\lim_{x\to\infty^+}(a-b)=a-b$$
which is probably the easiest way to do it
A: With $ y=\frac 1x $, it becomes
$$\lim_{y\to 0^+}\frac{1+ay}{y}\Bigl(\ln(1+ay)-\ln(1+by)\Bigr)=$$
$$\lim_{y\to 0^+}(1+ay)\Bigl(\frac{\ln(1+ay)}{ay}a-\frac{\ln(1+by)}{by}b\Bigr)=$$
$$1.(1.a-1.b)=a-b$$
A: Note that
$$
\begin{align}
(x+a)\log\left(\frac{x+a}{x+b}\right)
&=(x+a)\int_{x+b}^{x+a}\frac1t\,\mathrm{d}t\tag{1a}\\
&=(x+a)\int_{1+b/x}^{1+a/x}\frac1t\,\mathrm{d}t\tag{1b}
\end{align}
$$
Explanation:
$\text{(1a)}$: $\log(t)$ is the integral of $1/t$
$\text{(1b)}$: substitute $t\mapsto xt$
Next, we have the bounds
$$
\overbrace{\ \ \frac{a-b}x\ \ }^{\substack{\text{width of}\\\text{domain}}}\overbrace{\frac1{1+a/x}}^{\substack{\text{minimum of}\\\text{integrand}}}\le\int_{1+b/x}^{1+a/x}\frac1t\,\mathrm{d}t\le\overbrace{\ \ \frac{a-b}x\ \ }^{\substack{\text{width of}\\\text{domain}}}\overbrace{\frac1{1+b/x}}^{\substack{\text{maximum of}\\\text{integrand}}}\tag2
$$
Multiplying $(2)$ by $x+a$ and then applying $(1)$, we get
$$
a-b\le(x+a)\log\left(\frac{x+a}{x+b}\right)\le(a-b)\frac{x+a}{x+b}\tag3
$$
Graphically, we can see the function squeezed between two functions whose limits are easier to compute:

The Squeeze Theorem then gives
$$
\lim_{x\to\infty}(x+a)\log\left(\frac{x+a}{x+b}\right)=a-b\tag4
$$
A: A straightforward solution uses the Taylor series for $\log(1+x)$.
$$\log\frac{x+a}{x+b}=\log\left(1+\frac{a-b}{x+b}\right)=\frac{a-b}{x+b}+O\left(\frac1{(x+b)^2}\right)$$
$$\lim_{x\to\infty}(x+a)\log\frac{x+a}{x+b}=\lim_{x\to\infty}(a-b)\frac{x+a}{x+b}=a-b$$
