# Median of a continuous random variable

Consider the cdf $$F(x)=1-e^{-x}-xe^{-x}, 0\leq x <\infty$$, zero elsewhere. Find the median of this distribution,

The given CDF is a complicated and I am finding it difficult to find x for which P(X<x)=0.5. Is there any other approach I can try?

As commented, this is a CDF of a $$Gamma(2;1)$$
$$f_X(x)=xe^{-x}$$
that is $$f_X(x)=\frac{\theta^n}{\Gamma(n)}x^{n-1}e^{-\theta x}$$
with $$\theta=1$$ and $$n=2$$
As you can see in the link already posted, the median has not a closed form, so an alternative method with respect to the one described in the link to calculate the median, is a numerical one...it is not difficult, you can use, for example, the bisection method finding immediately $$Me\approx 1.678$$