How do you solve equations where $x$ is in both the base and exponent (eg, $x^x=4x^2$) with an exact solution? The equation in question is $x^x=4x^2$, which can be rearranged to $x^{x-2}=4$.
Using other methods, I know the two real solutions are approximately $3.193826160$ and $0.4166376811$, but I would quite like to know how to calculate the exact forms, since using limits and spamming the $=$ button on a calculator until the number stops changing isn't particularly efficient, and may not even work for other similar equations.
I know that the Lambert $W$ function is likely involved, but I don't know how to rearrange equations into the necessary form to use it and answers to other questions on this site haven't been able to help that lack of understanding, unfortunately.
 A: Many mathematical functions are in fact infinite sums.
So, if you accept the result be given as an infinite sum, there is a solution.
Consider that you look for the first zero of function
$$f(x)=x^x-4x^2$$ Build the infinite series close to the root, say $x=\frac 12$ and perform aSum series expansion writing
$$f(x)=\sum_{n=0}^\infty a_n\,\left(x-\frac{1}{2}\right)^n$$ and use power series reversion to obtain
$$x=\frac 12+\sum_{n=1}^\infty b_n\,\left(f(x)-f\left(\frac{1}{2}\right)\right)^n$$ Knowing the $a_n$, we have all the $b_n$ using Morse and Feshbach method.
Now, remembering that we want $f(x)=0$ this gives
$$x=\frac 12+\sum_{n=1}^\infty (-1)^n b_n\,f\left(\frac{1}{2}\right)^n$$
For example, using only terms in the summation,converted to decimals, the result is
$$x=\color{red}{0.41663768}030$$ while the solution is
$x=0.41663768110$.
This approach is very similar to a Newton-like method of infinite order.
A: For simplicity, I give an answer for solutions in the reals.
$$x^x=4x^2$$
Your equation is an equation of elementary functions. It's an algebraic equation in dependence of $x^x$ and $x$. Because the terms $x^x,x$ are algebraically independent, we don't know how to rearrange the equation for $x$ by only elementary operations (means elementary functions).
I don't know if the equation has solutions in the elementary numbers.
Your equation cannot be solved in terms of Lambert W but in terms of Generalized Lambert W.
$$x^x=4x^2$$
$$e^{x\ln(x)}=4x^2$$
$$x\ln(x)=\ln(4x^2)$$
$$x\ln(x)=2\ln(2)+2\ln(x)$$
$x\to e^t$:
$$te^t=2t+2\ln(2)$$
$$\frac{t}{t+\ln(2)}e^t=2$$
We see, the equation isn't in a form for applying Lambert W.
But we can apply Generalized Lambert W.
$$\frac{t}{t-(-\ln(2))}e^t=2$$
$$t=W\left(^{\ \ \ \ \ \ 0}_{-\ln(2)};2\right)$$
$$x=e^{W\left(^{\ \ \ \ \ \ 0}_{-\ln(2)};2\right)}$$
The inverse relation of your kind of equations is what Mezö et al. call $r$-Lambert function. They write:
"Depending on the parameter $r$, the $r$-Lambert function has one, two or three real branches and so the above equations can have one, two or three solutions"
[Mező 2017] Mező, I.: On the structure of the solution set of a generalized Euler-Lambert equation. J. Math. Anal. Appl. 455 (2017) (1) 538-553
[Mező/Baricz 2017] Mező, I.; Baricz, Á.: On the generalization of the Lambert W function. Transact. Amer. Math. Soc. 369 (2017) (11) 7917–7934 (On the generalization of the Lambert W function with applications in theoretical physics. 2015)
[Castle 2018] Castle, P.: Taylor series for generalized Lambert W functions. 2018
A: $$x^x=4x^2$$
$$\boxed{x^{x-2}=4}$$
Consider the function :
$$f(x)=x^{x-2}$$
Thus the problem is to solve $f(x)=4$ for $x$.
Look at a few other examples :
First example : $f(x)=\sinh(x)\quad$ solve $f(x)=\sinh(x)=4$ for $x$. The result is
$$x=f^{-1}(4)=\sinh^{-1}(4)\simeq 1.32581766...$$
Second example : $f(x)=\csc(x)\quad$ solve $f(x)=\csc(x)=4$ for $x$. The result is
$$x=f^{-1}(4)=\csc^{-1}(x)\simeq 0.252680255 ...$$
Third example : $f(x)=x\:e^x\quad$ solve $f(x)=x\:e^x=4$ for $x$. The result is
$$x=f^{-1}(4)=W(4)\simeq 1.20216787 ...$$
$W$ is the LambertW function.
You are not surprised by the above examples because the inverse functions of $\sinh$ , $\csc$ , $x\,e^x$ are known functions for you.
So you should not surprised by the next example :
$f(x)=x^{x-2}\quad$ solve $f(x)=x^{x-2}=4$ for $x$. The result is
$$x=f^{-1}(4)\simeq 0.41663768 ...$$
Of course if the function $f^{-1}(x)$ is multivalued they are several solutions. This is the case of $\csc^{-1}(x)$ for example. This is also the case of your problem. The multivalued cases are not considered above in order to make more clear the presentation.
In fact the question is if an inverse function of $f(x)$ has been standardized or not.
In cases 1,2,3 an inverse function is standardized is wellknown and can be found in math handbooks and is implemented in the math softwares. In your case the inverse function has no standard name and must be computed thanks to recursive numerical calculus (as well as $\sinh^{-1}$ , $\csc^{-1}$, LambertW are numerically computed).
This is the general case of non-standard functions and special functions : https://fr.scribd.com/doc/14623310/Safari-on-the-country-of-the-Special-Functions-Safari-au-pays-des-fonctions-speciales
A: There's two ways to solve this, either handle it as equalizer $\{ (x)|f(x)=g(x)\}$, or move the right side to other side to get $x^x-4x^2=0$ to get a normal root finding problem $\{(x)|f(x)=0\}$.
To handle symbolically, you should do $x \rightarrow (x,x,x) \rightarrow (a,b,c)$ to arrive at easier to solve problem:
$f(a,b,c)=a^b-4c^2=0$. From that you can find dependencies:
$a = \sqrt[b]{4c^2}$, i.e. you can find a dependency $(b,c)\rightarrow a$. the $b$ and $c$ can be freely chosen $(b,c)\in(R,R)$, and the dependency gives you value for $a$.
After you get infinite matrix of $(b,c)$ values and map them to $a$ values, next step is to find from that matrix M a 3d diagonal $(a,b,c)=(x,x,x)$. Basically you need to filter out values from your matrix where $a$,$b$ and $c$ does not have the same value.
$$ \{ (a,b,c)|a=b=c, (a,b,c)\in M \}$$ This in infinite filtering operation and computers with finite resources have trouble implementing the operation.
A: Using logarithmic substitution technique:
$$x^x = 4x^2$$
$$\ln\left(x^x\right) = \ln\left(4x^2\right)$$
$$x \ln{x} = \ln\left(4x^2\right)$$
$$\ln\left(4x^2\right) = \ln{4} + \ln\left(x^2\right) = \ln{4} + 2 \ln{x}$$
$$x \ln{x} = \ln{4} + 2 \ln{x}$$
$$x \ln{x} - 2 \ln{x} = \ln{4}$$
$$(x - 2)\ln{x} = \ln{4}$$
$$\ln{x} = \dfrac{\ln{4}}{x - 2}$$
$$x = \exp{\left({\cfrac{\ln{4}}{x - 2}}\right)}$$
When it comes to transcendental equation, which means it cannot be solved analytically in terms of elementary functions.
$$x[n+1] = x[n] - \dfrac{f(x[n])}{f'(x[n])}$$
where,
$f'(x)$ is the derivative of $f(x)$. By plotting the graphs, the intersection is the solution.
