# For which $a$ does the equation $a^x=x+2$ have two solutions?

I need to find values of $$a$$ for the following equation to have two real solutions.

$$a^x=x+2$$

• $$(1,\infty)$$
• $$(0,1)$$
• $$1/e,e$$
• $$(1/(e^e), e^e)$$
• $$(e^{1/e}, \infty)$$

This is how I solved this exercise, but I don't understand some things. I would like to know if there's another way to solve this kind of exercise. I would be happy if I would get some ideas.

Also, from my solution, I don't understand why from that table results just one solution and from the graphic results two solutions. Usually, to see the number of solutions I use this kind of table.

For $$a>1$$, $$f$$ decreases from infinity to -1, then increase from -1 to infinity. I'm really confused. Need some suggestions here.

Thank you!

• I didn't even attempt to solve it but here is what Wolfram Alpha thinks of it. – poetasis Dec 29 '18 at 22:52
• Your attempt is completely wrong, sorry. You can' just consider the particular case of $a=e$; using $a=-e$ is absurd, as $a^x$ is only defined for $a>0$. – egreg Dec 29 '18 at 23:09
• I took these values to see how the function increase/decrease.Can you help me with an idea? – Vali RO Dec 29 '18 at 23:12
• It often provides Readers with insight into how best to help when the body of the Question includes a mention of the course or textbook that a problem comes from. In particular the determination of whether functions are increasing or decreasing can be approached with elementary tools from high school algebra, or with more sophisticated tools from a college calculus class. – hardmath Jan 10 '19 at 15:20

Your attempt is wrong, sorry: you cannot just use particular cases. And the case $$a=-e$$ is impossible, because $$a^x$$ is only defined for $$a>0$$. The answer should be in terms of $$a$$, and using a single value is not enough.

Consider the function $$f(x)=a^x-x-2$$. Then $$f'(x)=a^x\log a-1$$ (with $$\log$$ being the natural logarithm). This doesn't vanish for $$0, so the function can have two zeros only for $$a>1$$.

In this case the point of minimum is at $$x=-\frac{\log\log a}{\log a}$$ Set $$b=\log a$$, for simplicity. Then $$a=e^b$$ and $$a^x=e^{bx}$$; we want to evaluate $$f\left(-\frac{\log b}{b}\right)=e^{-\log b}+\frac{\log b}{b}-2=\frac{-1+\log b-2b}{b}$$ Consider $$g(t)=-1+\log t-2t$$, for $$t>0$$; then $$g'(t)=\frac{1}{t}-2$$, which vanishes for $$t=1/2$$; since $$g(1/2)=-1-\log2-1<0$$ you have the desired answer, because this implies $$g(b)<0$$.

• Thank you very much for your help! – Vali RO Dec 29 '18 at 23:25
• Hmm, what is the point of the part starting with "In this case the point of minimum..."? As far as I can see, the exercise doesn't ask to find the two roots. Isn't it enough to observe that we have $a^x > x+2$ at $x=-2$, then $a^x < x+2$ at $x=0$, and finally $a^x > x+2$ for large enough positive $x$, provided $a>1$? – hmakholm left over Monica Jan 1 '19 at 2:54
• @HenningMakholm I didn't want to give the full solution; the task is to show for what values of $a$ the equation has two solutions; the condition $a>1$ is necessary, but is it also sufficient? – egreg Jan 1 '19 at 9:54
• Not wanting to give the full solution is one thing; writing an answer where the lower two thirds of the text seems to have nothing at all to do with the question is another thing. (I've read those lines several times now, and I still have no idea what it is you're doing or what at all they have to do with the question). – hmakholm left over Monica Jan 1 '19 at 17:20
• @HenningMakholm There are two solutions if and only if the value of $f$ at the point of minimum is $<0$. Since $b>0$, the minimum value of $f$ is negative if and only if $-1+\log b-2b<0$. You're right, I'll change the variable. – egreg Jan 1 '19 at 17:25

try and draw to graphs, the first:$$f(x)=a^x$$ and the second: $$g(x)=x+2$$ I recommend using www.desmos.com

now check where the 2 graphs meet

this is a case of Transcendental equation, I don't think it has an analytic solution, usually you solve them numerically or graphically, or even using taylor series for approximation

• Thank you for your response! – Vali RO Dec 29 '18 at 23:24
• +1. Good answer to compare the graphs on desmos. – farruhota Dec 31 '18 at 10:37