Please help me with this basic problem that I cannot solve;

Consider the following equation

U=(H-h) * (I^(1-e))/1-e

and the following identity

I=h*W

and the following condition

H>h

I want to solve for e when U is at its maximum. By guess is to transform to

U=(H-h) * ((hw)^(1-e))/1-e

and differentiate wrt to h , then set dU/dh to zero and solve. This method should work as it is an inverted U shaped function.

or alternatively express as I

U=(H-I/w) * (I^(1-e))/1-e

and differentiate wrt to I.

The expected result is e=H/(H-h), but I cannot do the proof !

Thanks in advance, my maths is very rusty, and i cannot get any further, unfortunately.