Can somebody provide me the detailed solution for
$$\log_{2021}a=2022-a$$
I know the answer is $2021$ but don't know, the solution.
(got $2021$ by trial and error method)
Can somebody provide me the detailed solution for
$$\log_{2021}a=2022-a$$
I know the answer is $2021$ but don't know, the solution.
(got $2021$ by trial and error method)
On
The left-hand side is (strictly) monotonically increasing in $a$. The right-hand side is (strictly) monotonically decreasing in $a$. So if there is a solution, there is only one.
Basic log property: When $a = 1$, the left-hand side is $0$ and the right-hand side is positive.
$x$-intercept: When $a = 2022$, the right-hand side is $0$ and the left-hand side is positive (very slightly larger than one). Having swapped which side is the larger, the unique solution has $1 < a < 2022$.
On that interval, the left-hand side is never as large as $2$. For the right-hand side to be less than $2$, $a> 2020$, so $2020 < a < 2022$.
Clearly, it's time to bisect. Try $a = 2021$ to determine whether the left-hand side or right-hand side is the larger (to find out which half of the interval to continue searching -- i.e. to find out if the left-hand side is slightly less than $1$ or slightly greater than $1$ at the solution). As a lucky accident, we find that $a = 2021$ is the solution.
$\require{begingroup} \begingroup$ $\def\e{\mathrm{e}}\def\W{\operatorname{W}}\def\Wp{\operatorname{W_0}}\def\Wm{\operatorname{W_{-1}}}$
Consider an equivalent equation
\begin{align} \ln_b(a)= \frac{\ln(a)}{\ln(b)} &= c-a \tag{2}\label{2} , \end{align}
where $b=2021$, $c=2022$.
It is well-known that \eqref{2} is solvable in terms of the Lambert $\W$ function, so, we need to transform \eqref{2} to the form $u(a)\exp(u(a))=v$, where $u(a)$ is some function of the unknown $a$ and $v$ is some constant in terms of $b$ and $c$.
\begin{align} \ln(a) &= c\ln(b)-a\ln(b) \tag{3}\label{3} ,\\ a &= \exp(c\ln(b)-a\ln(b)) \\ &=\exp(c\ln(b))\exp(-a\ln(b)) \\ &=b^c\exp(-a\ln(b)) \tag{4}\label{4} , \end{align}
\begin{align} a\exp(a\ln(b)) &= b^c \tag{5}\label{5} ,\\ \ln(b)a\exp(a\ln(b)) &= \ln(b)b^c \tag{6}\label{6} . \end{align}
Now we have \eqref{6} in the desired form $u(a)\exp(u(a))=v$ where $u(a)=\ln(b)a$, $v=\ln(b)b^c$, so we can apply the Lambert $\W$ function to both sides of \eqref{6} and simplify:
\begin{align} \W\left(\ln(b)a\exp(a\ln(b))\right) &= \W\left(\ln(b)b^c\right) \tag{7}\label{7} , \end{align}
\begin{align} \ln(b)a &= \W\left(\ln(b)b^c\right) \tag{8}\label{8} ,\\ a &= \frac{\W\left(\ln(b)b^c\right)}{\ln(b)} \tag{9}\label{9} . \end{align}
For given values of $b$ and $c$ the argument of $\W$ in \eqref{9} is positive, hence there is only one real solution of \eqref{9} as well as the original \eqref{1}.
Since $c=b+1$ in the original equation, \eqref{9} can be further simplified as follows:
\begin{align} a &= \frac{\W\left(\ln(b)b^{b+1}\right)}{\ln(b)} \tag{10}\label{10} ,\\ a &= \frac{\W\left(b\ln(b)b^b\right)}{\ln(b)} = \frac{\W\left(\ln(b^b)b^b\right)}{\ln(b)} = \frac{\W\left(\ln(b^b)\exp\left(\ln(b^b)\right)\right)}{\ln(b)} \tag{11}\label{11} ,\\ a&= \frac{\ln(b^b)}{\ln(b)} = \frac{b\ln(b)}{\ln(b)} =b=2021 \tag{12}\label{12} . \end{align}
$\endgroup$