This question is closely related to this post
Suppose I have a random variable $X \sim \text{Gamma}(k, \theta)$, and I define $Y = \log(X)$. I would like to find the probability density function of $Y$.
I had originally thought I would just define cumulative distribution function X, do a change of variable, and take the "inside" of the integral as my density, like so,
\begin{align} P(X \le c) & = \int_{0}^{c} \frac{1}{\theta^k} \frac{1}{\Gamma(k)} x^{k- 1} e^{-\frac{x}{\theta}} dx \\ P(Y \le \log c) & = \int_{\log(0)}^{\log(c)} \frac{1}{\theta^k} \frac{1}{\Gamma(k)} \exp(y)^{k- 1} e^{-\frac{\exp(y)}{\theta}} \exp(y) dy \\ \end{align}
Here I use $y = \log x$ and $dy = \frac{1}{x} dx$, then sub in definitions for $x$ and $dx$ in terms of $y$.
The output, unfortunately, does not integrate to 1. I'm not sure where my mistake is. Could some tell me where my error is?