# Density function of an exponential distribution

Let $$X$$ be a random variable with an exponential distribution with $$\lambda=1$$ and $$Y=2X$$.

What is the density function of $$f_y$$?

I know that $$f_x =\begin{cases} e^{-x} & 0\leq x\leq\infty \\ 0 & \text{else} \end{cases},$$

but I'm not sure where to go from here. Would $$f_y =\begin{cases} 2e^{-x} & 0\leq x\leq\infty \\ 0 & \text{else} \end{cases}.$$

Approach 1: find the CDF of $$Y$$ and differentiate.
The CDF of $$Y$$ is $$F_Y(y) = P(Y \le y) = P(2X \le y) = P(X \le y/2) = \cdots.$$ Taking the derivative with respect to $$y$$ yields the density.
Approach 2: change of variables. The derivative of the transformation $$\phi(x) = 2x$$ is $$2$$, so $$f_Y(y) = f_X(y/2) / 2.$$
Find $$F_Y(x) = \mathbb{P}[Y\leq x]$$ and then differentiate it.