Real roots
This is a quadratic in #e^x#. It will be easier to see what we're doing if we introduce a substitution. I will let #t=e^x#:
#(e^x)^2-6e^x-16=0#
#t^2-6t-16=0#
We solve the quadratic by grouping:
#t^2-8t+2t-16=0#
#t(t-8)+2(t-8)=0#
#(t+2)(t-8)=0#
By the zero factor principle, this has solutions #t=-2# and #t=8#. We can undo the substitution to get these in terms of #x#:
#e^x=8#
#ln(e^x)=ln(8)#
#x=ln(8)#
Complex roots
For the other root, #t=-2#, we can try doing the same procedure:
#e^x=-2#
#ln(e^x)=ln(-2)#
#x=ln(-2)#
But we run into a problem. The natural log of negative numbers is not defined with real numbers, which means that this root is complex.
We can find this root by using Euler's identity, #e^(ipi)=-1#. This lets us rewrite the logarithm as such:
#ln(-2)=ln(2*-1)=ln(2e^(ipi))=ln(2)+ln(e^(ipi))=ln(2)+ipi#
Note that #ipi# is not the only imaginary exponent that gives #-1#. Euler's formula actually gives an infinite number of ways to express #-1# in this way due to the periodicity of the sine and cosine functions. We can capture this by adding #2pik# (remember, the periodicity of sine and cosine is #2pi#) in the exponent, which after the same calculations as before gives the solutions:
#x=ln(2)+(2k+1)ipi#
Using complex numbers, we can also find even more solutions!
Because Euler's identity gives that #e^(i2pik)=1#, we can do the same thing we did with #ln(-2)# with #ln(8)#:
#ln(8)=ln(8e^(i2pik))=ln(8)+ln(e^(i2pik))=ln(8)+i2pik#