Choosing a proposal density g(x) for $ f(x)= {\Large \frac{e^{x}}{(e-1)} }$ In finding an proposal distribution function $g(x)$ for the following function:
$ f(x)= {\Large \frac{e^{x}}{(e-1)} }$  where $0 \leq x \leq 1$
Tested with  $$x^2+1,  1/x+1$$ and other variations, but the simulation did not quite fit well.
How to find $g(x)$?

Since
$$\max_{x\in(0,1)} \dfrac{e^x}{x^2+1}=\frac{e}{2}$$
simulating from the distribution with density
$$g(x)=\frac{x^2+1}{4/3}$$
(which happens to be a $(3/4,1/4)$ mixture of a uniform and a distribution with density $x^2/3$) and accepting with probability
$$p(x)=\dfrac{2e^x}{e(x^2+1)}$$
is correct.

To wit,
N=1e6
x=c(runif(N/4)^{1/3},runif(3*N/4))
hist(x[runif(N)<2*exp(x-1)/(x^2+1)],pr=TRUE)
curve(exp(x)/(exp(1)-1),ad=TRUE)

shows a perfect fit.
