Interval of monotonicity of the function $f(x)=\frac{\ln (\pi+x)}{\ln (e+x)}$
Find the exact interval in which the function $f(x)=\frac{\ln (\pi+x)}{\ln (e+x)}$ is increasing and decreasing.
My try: The domain of the function is $(-e, \infty)$
The derivative is: $$f'(x)=\frac{(e+x) \ln (e+x)-(\pi+x) \ln (\pi+x)}{(\pi+x)(e+x)\ln^2(e+x)}$$
Since due to the domain we have $e+x>0, \pi+x >0$ and trivially $\ln^2(e+x)>0$
Now it is sufficient to check the nature of numerator above.
Let $p=e+x,q=\pi+x$
The numerator is in the form $p\ln(p)-q\ln(q)$ where $p<q, \forall x$
Now we know that the function $h(x)=x\ln x$ is increasing in $\left[\frac{1}{e}, \infty\right)$
Case $1.$ If $\frac{1}{e}\leq p<q$ we have:
$h(p)<h(q) \implies p\ln p-q\ln q<0$
Thus $f'(x)<0, \forall x \in \left[\frac{1}{e}-e, \infty\right)=[-2.35, \infty)$
So $f(x)$ must be decreasing in the above interval. But i compared $f(-2)$ and $f(-1)$ It is the other way round, that is $f(-2)<f(-1)$.
Now what i did is i used graphing calculator to check the graph. Yes it is decreasing, but there is a vertical asymptote. How to identify the equation of vertical asymptote?
Also the graph is decreasing in $[-2.541, \infty)$ which is not matching with my answer above.
The domain consists of those $x$ for which $\pi+x>0,e+x>0$ and $\ln(e+x)\ne 0$. That gives the set $(-e,1-e)\cup(1-e,\infty)$. Furthermore, $\lim_{x\to(1-e)^-}f(x)=-\infty$ and $\lim_{x\to(1-e)^+}f(x)=\infty$ so there's a vertical asymptote $x=1-e$. Next, the problem involves determining the sign of $$g(x)=(e+x)\ln(e+x)-(\pi+x)\ln(\pi+x)\ $$ I don't think the answer here can be given in closed form. What you can do is show that $g$ is strictly decreasing (by checking the derivative) and since $\lim_{x\to (-e)^+}g(x)=-(\pi-e)\ln(\pi-e)>0$ and $g(-2)=(e-2)\ln(e-2)-(\pi-2)\ln(\pi-2)<0$, $g$ has a unique zero $\alpha\in(-e,-2)$. Thus, $g(x)>0$ for $x\in(-e,\alpha)$ and $g(x)<0$ for $(\alpha,\infty)$. This implies that $f$ is increasing in $(-e,\alpha]$ and decreasing in $[\alpha,1-e)$ and $(1-e,\infty)$.
Note, however, that $f$ is not decreasing in $[\alpha,1-e)\cup(1-e,\infty)$. This is due to the vertical asymptote $x=1-e$. So finding that asymptote was important.