# What’s the median of $f(x) = 4xe^{-2x}$

medianprobabilityprobability distributionsstatistics

I'm trying to find the median of $$f(x) = 4xe^{-2x}$$.

So far, I've tried solving for $$q_{50}$$ by plugging it into an integral and setting it equal to 0.5 like so: $$\int_{0}^{q_{50}} 4xe^{-2x} dx = 0.5$$. I eventually get to $$-2q_{50}e^{-2q_{50}} – e^{-2q_{50}} + 1 = 0.5$$. Unfortunately, at this point, I have been unable to solve for $$q_{50}$$.

Is there something I've done wrong up to this point or another method that I could be using instead to find the median? Thanks for the help!

#### Best Answer

Letting $$x=q_{50}$$, as @Vítězslav Štembera answered, you want to solve for $$x$$ the equation $$(2 x+1)\,e^{-2 x}=k \quad\implies\quad(2x+1)\,e^{-(2 x+1)}=\frac k e$$ The only explicit solution of it is given by $$x=-\frac{1}{2} \left(1+W_{-1}\left(-\frac{k}{e}\right)\right)$$ where $$W_{-1}(.)$$ is the second branch of Lambert function.

If you cannot use Lambert function, only numerical methods would give the solution.