9x+3x+1-40=0=32x+3x-39=0.
Let y=3x, then y2+y-39=0. Using the quadratic formula:
y=(-1±√(1+156))/2=(-1±√157)/2=5.764982 approx. The other root is negative and can be ignored because 3x>0.
3x=5.764982, xlog(3)=log(5.764982), x=log(5.764982)/log(3)=1.594559 approx.
The exact answer would be x=log(½(√157-1))/log(3).