Solve c value in $c \cdot (x+2y) \cdot e^{x+y} $ Today I started to look at previous exam questions, but I can't figure out the solution of one the questions. I hope someone could help me.
In this question I have to find the c value:
$$   f_{X,Y}(x,y) =
\begin{cases}
c \cdot (x+2y) \cdot e^{-(x+y)},  & \text{if x} \ge \text{0 & y} \ge 0 \\0, & \text{otherwise 0}
\end{cases}
$$
The answer is:
$$ c = \frac{1}{3} $$
I think I have to solve this:
$$ \int_0^{\infty} \int_0^{\infty} f(x,y) dydx $$
But the probem is that I don't know how. 
 A: The key condition for any probability distribution is the following, which proves that the overall probability of anything occurring is $1$.
$$\int_{\mathbb{R^n}} f(x_1,...,x_n)dx_1...dx_n \equiv 1$$
Basically, integrating the probability density function over the entire real space along every variable should encompass the probability of anything that is possible, and should therefore be $1$.
As mentioned in the comments, the integral you had originally written was divergent, thus making the above condition false, and the function therefore not a probability distribution.
In your case, the integral has two variables, so the starting definition looks like this:
$$\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} c\cdot(x+2y)\cdot e^{-(x+y)} dxdy \equiv 1$$
Because of the bounds of the problem ($f(x,y)=0 ~ \forall x,y < 0$), you can simplify the bounds to this:
$$\int_{0}^{\infty} \int_{0}^{\infty} c\cdot(x+2y)\cdot e^{-(x+y)} dxdy \equiv 1$$
Let's factor out the constant factor $c$, which is purely used to scale the solution to the required $1$ from above. Also, let's distribute over the term in parenthesis.
$$c \int_{0}^{\infty} \int_{0}^{\infty} x\cdot e^{-(x+y)}+2y \cdot e^{-(x+y)} dxdy \equiv 1$$
Now, let's evaluate the $x$ integration first, and we will integrate with respect to $y$ in a little bit:
$$\int x\cdot e^{-(x+y)}+2y \cdot e^{-(x+y)} dx$$
Use u-substitution, with $u=-x-y ~ du=-dx ~ x=-u-y ~ dx=-du$:
$$\int (-u-y)\cdot e^{u}-du=\int u\cdot e^{u}+y\cdot e^{u}du=(u-1)\cdot e^u+y\cdot e^{u} ~~~ \int 2y \cdot e^{-(x+y)} dx = 2y(-1)\cdot e^{-(x+y)}$$
Go back to the original variables to put in the bounds:
$$(u-1)\cdot e^u+y\cdot e^u = (-x-y-1+y)\cdot e^{-x-y} = (-x-1)\cdot e^{-(x+y)}$$
$$\left[(-x-1)\cdot e^{-(x+y)} \right]_0^{\infty}=\left[\left(-\infty\cdot e^{-\infty}\right)-\left(-1\cdot e^{-y}\right)\right]=e^{-y}$$
$$\left[-2y\cdot e^{-(x+y)}\right]_0^{\infty}=\left[\left(-2y\cdot e^{-\infty}\right)-\left(-2y\cdot e^{-y}\right)\right]=2y\cdot e^{-y}$$
Now that we have the final integration with respect to $x$, we actually have the marginal distribution of $f$ with respect to $y$. Integrate this to get the bounds on $c$.
Do the integral using u-substitution as before (result evaluated on Wolfram Alpha):
$$\int e^{-y}+2y\cdot e^{-y} dy=-e^{-y}-2(y+1)\cdot e^{-y}$$
Apply the bounds:
$$\left[(-1-2y-2)\cdot e^{-y}\right]_0^{\infty}=\left[\left((-3-2\infty)\cdot e^{-\infty}\right)-\left((-3-2\cdot 0)\cdot e^{-0}\right)\right]=3$$
Since this final value is multiplied by $c$ from the beginning of the problem, put it in:
$$3c\equiv 1 \rightarrow c=\frac{1}{3}$$
Which is exactly what the people in the comments said!
