I am using minbound to find the solution to an equation the involves log (equivalent to solver in Excel). Results are not produced.when a log function is included. There is not any problem with the exp function. I show an example below ( I have a more complicated equation, so it is not possiible to use algebra to eliminate the logs). This should be easy (in Excel this is produced easily, but I need to solve this for thousands of observations). Do you know a solution?

program drop find_x
program find_x, rclass
version 1
args x f
return scalar fx = (-14139276- (`f' - ln(1-`x')) )^2
end
minbound find_x , arg( 0.33407511) range(0,1)
disp r(x)

program drop find_x
program find_x, rclass
version 1
args x f
return scalar fx = (-2- (`f' - exp(1-`x')) )^2
end
minbound find_x , arg( 0.33407511) range(0,1)
disp r(x)