Let $a\in \mathbb{R}$. Determine the value of $a$ such that $y=x$ is tangent to the curve $y = a^x$.

The trick that is used here is used in a number of other questions. Nevertheless, the solution is elegant!

If $y=x$ is to be tangent to the curve $y = a^x$, then the following two conditions must simultaneously hold:

$$ \begin{align} x &= a^x \\ 1 &= \frac{d}{dx}\left(a^x\right) = \ln(a)a^x \end{align} $$ Substitution of the first equation into the second, follows that $1 = \ln(a)(x)$ and hence $x =\frac{1}{\ln{ a}}$

Therefore,

$$a^\frac{1}{\ln{a}} = \frac{1}{\ln{a}}$$

This gives the following quirky result: The left hand side, irrespective of $a$ reduces to $e$ since $a = e^{\ln{a}}$ and hence $a^\frac{1}{\ln{a}} = e^1$, so we have

$$\ln{a} = \frac{1}{e} \Rightarrow a = e^{\frac{1}{e}}\approx 1.4446$$

The diagram below shows both the curve and tangent line, with the point of contact being $(e,e)$