I have a question which I thought was simple enough, but have somehow got lost for quite a while on it. I need to maximise the following equation with respect to the variable x. a and b are constants.

$\displaystyle max \ f(x) = \frac{a}{x}\left[e^{-b}\left(1+\frac{1}{b}\right)-e^{-b x}\left(x+\frac{1}{b}\right)\right] $

Making use of the quotient rule, I got the partial derivative with respect to x to be:

$\displaystyle

\frac{\delta f(x)}{\delta x}

= -\frac{a e^{-b}}{x^2}\left(1+\frac{1}{b}\right)+\left(\frac{x b^2(a e^{-b x})+ba e^{-bx}}{{x^2 b^2}}\right)+b e^{-b x} =0

$

Now solving for x, I thought, would be the easy part. But I've spent quite a while now just lost in the algebra. Is there any tips or hints with regards to getting the answer out?