Compute marginal probabilities for a given substitution I am trying to compute the marginal probability for this:

$$f_{XY}(x,y) =  \begin{cases}
      2e^{-y} &amp; \text{if  } -y&lt; x &lt; y \ \text{ and }\ 0 &lt; y &lt; \infty ,\\
      0 &amp; \text{otherwise.}   \end{cases} $$

Is my following solution correct?

$$f_X(x) = \int_{y}^{-y}\,2e^{-y}\,\mathrm{d}y = -2e^{-y} + 2e^y$$

and

$$f_Y(y) = \int_{0}^{\infty}\,2e^{-y}\,\mathrm{d}x = \infty$$
Your joint pdf is not correctly normalized:
$$
\int_0^\infty dy\int_{-y}^y dx\ 2 e^{-y}=4
$$
instead of $1$. So, assuming that your jpdf is instead $(1/2)e^{-y}$ over the same $(x,y)$-domain, the marginal pdf of $X$ is obtained by integrating over $y$ (be careful about the integration range, though!)
$$
f_X(x)=\Theta(-x)\int_{-x}^\infty dy (1/2)e^{-y}+\Theta(x)\int_{x}^\infty dy (1/2)e^{-y}=\Theta(-x) e^{x}/2+\Theta(x)e^{-x}/2\ ,
$$ 
where $\Theta(x)$ is the Heaviside step function. The integration limits are obtained by resolving the constraints $-y&lt;x&lt;y$ together with $y&gt;0$ for $y$. Note that this marginal pdf is correctly normalized over the support $x\in (-\infty,\infty)$.

For the other marginal
$$
f_Y(y)=\Theta(y)\int_{-y}^y dx (1/2)e^{-y}=y e^{-y}\Theta(y)\ ,
$$
correctly normalized over $y\in (0,\infty)$.
Nope your answer is not correct.
The fact you need the pdf of X shoul prompt you to integrate y.which you have done but the limits of integration are incorrect..limits should be from $ 0 to  \infty $

For your second part the limit should be

$ -y to y $.