Solve for $x$ if $4^x + x^x = 20$ where $x \in \mathbb{Z}$
My Attempt:
By inspection,
$x=2$
Now, $4^2 + 2^2 = 20$
$16+4=20$
$20=20$
Which is True.
But, I Could not do it by any process. Can anyone help me?
Thanks in Advance.
Solve for $x$ if $4^x + x^x = 20$ where $x \in \mathbb{Z}$
My Attempt:
By inspection,
$x=2$
Now, $4^2 + 2^2 = 20$
$16+4=20$
$20=20$
Which is True.
But, I Could not do it by any process. Can anyone help me?
Thanks in Advance.
If the solution is an integer,
$$4^1+1^1<20,\\4^0+0^0<20^*,\\\frac1{4^n}+\frac{(-1)^n}{n^n}\le1+1<20$$ and for all $n>2$, $$4^n+n^n\ge16+4=20.$$
$^*$Whatever the meaning of $0^0$.
There does not exist an explicit solution for $x$ which can be expressed in a finite number of elementary functions.
However, you can solve this using an iterative method. In order to apply it, we will generalise our possible solutions to $x \in \mathbb{R}$.
We will use the Newton-Raphson method. The methodology is as follows:
$$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)} \tag{1}$$
We can set a suitable 'guess' in order to obtain a solution to $x$.
For your function, $f(x)=4^x+x^x-20$, we evaluate the derivative to be: $f'(x)=x^x(\ln{x}+1)+\ln{(4)} \cdot 4^x$
We can substitute our functions into equation $(1)$.
$$x_{n+1}=x_n-\frac{4^{x_n}+{x_n}^{x_n}-20}{{x_n}^{x_n}(\ln{x_n}+1)+\ln{(4)} \cdot 4^{x_n}}$$
Let's use an initial value of $x_0=11$. On $x_{29}$, the iteration is accurate to over 10 decimal places (extremely close to $2$). As $n \to \infty$, $x_n \to 2$.
You can apply this iteration into a spreadsheet, or you can use more sophisticated software such as MATLAB.
As others have noted, there exists only one solution to your equation. If there were more solutions, you can set different values for $x_0$ and see if they converge to different solutions.