# Solve equation using Mathematica

I want to solve this equation using Mathematica:

$$4^x -18^x-8=0$$

I tried this code and it didn't work:

Solve[4^x-18^x-8==0,x]


• Have you read the error message? "This system cannot be solved with the methods available to Solve." – Roman Jul 31 '19 at 8:21
• There are no real solutions as 4^x - 18^x < 1 for real x. Do you want a complex answer? – lirtosiast Jul 31 '19 at 8:32
• Yes this was the error message – Sadisha randinu Jul 31 '19 at 8:32
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Jul 31 '19 at 15:14
• @Sadisharandinu, Try to see and find the roots (whether Real or Complex) using Contour plot: mathematica.stackexchange.com/a/194654/44142 – 2.1 Aug 1 '19 at 5:06

You just need to add a domain restriction. For example:

Solve[4^x - 18^x - 8 == 0 && Abs[x] < 10, x] //N


{{x -> 0.655338 - 9.68327 I}, {x -> 0.655338 + 9.68327 I}, {x -> 0.682744 - 5.32247 I}, {x -> 0.682744 + 5.32247 I}, {x -> 0.712648 - 0.969253 I}, {x -> 0.712648 + 0.969253 I}, {x -> 0.742883 - 3.37599 I}, {x -> 0.742883 + 3.37599 I}, {x -> 0.771278 + 7.71356 I}, {x -> 0.771278 - 7.71356 I}}

(I used N to convert the exact values (which are Root objects) into complex number). You can also use Re and Im:

Solve[4^x - 18^x - 8 == 0 && 0<Re[x]<10 && 10<Im[x]<20, x] //N


{{x -> 0.615189 + 18.4231 I}, {x -> 0.632332 + 14.0506 I}, {x -> 0.795925 + 12.0444 I}, {x -> 0.815342 + 16.3697 I}}

If you can live with numerical complex-valued solutions,

FindRoot[4^x - 18^x - 8 == 0, {x, I}]
(*    {x -> 0.712648 + 0.969253 I}    *)

FindRoot[4^x - 18^x - 8 == 0, {x, -I}]
(*    {x -> 0.712648 - 0.969253 I}    *)


There are infinitely many more solutions. To look for them, you could use starting points gathered from a DensityPlot or similar.