We differentiate term by term:
fx=ddxex−lnx=ddxex−ddxlnx=ex−x1
NOTE: because ln x is not defined for x0 we assume implicitly that x0.