# Marginal PDF from a joint PDF with an integral that does not converge

I have a joint PDF that has gone through some transformations of

$f(x,y) = 12x\displaystyle\frac{1-y}{y^3}$,$0<x<y^2$, $0<y<1$

It definitely is a valid PDF as it has a double integration along its support that equals 1

I am trying to find the marginal PDF of $X$.

However integrating along y gives a definite integral that does not converge:

$\displaystyle\int_{0}^1 12x\displaystyle\frac{1-y}{x^3}dy$

Any ideas how else I can find that marginal PDF of $X$?

-
What are the limits on $x$ and $y$? Or in other words, what is the support? –  Henry May 24 '12 at 17:53
Sorry I somehow cut that bit out. 0<x<y^2 and 0<y<1 –  Seraphya May 24 '12 at 19:02
Then, contrarily to what you declare in the post, if f is the density of a joint PDF, the integral over y should converge. Or rather, it should for almost every x. (Please check your post, at the moment the two formulas for f are not compatible.) –  Did May 24 '12 at 19:17
@Seraphya: In the second calculation, you gave the program the wrong integral, and it calculated correctly. I would rather you found the answer partly by yourself, so will wait a while before answering, in the hope you can push things through. The region in which the joint density lives is the first quadrant region that is below the line $y=1$ and above the curve $x=y^2$. So when we "integrate $y$ out" the variable $y$ runs from $y=\sqrt{x}$ to $y=1$, not from $y=0$ to $y=1$. Remember the $0\lt x\lt y^2$, which in particular says that $y \gt\sqrt{x}$. –  André Nicolas May 24 '12 at 20:16
@Seraphya: Yes, I also had $6+6x-12x^{1/2}$ over the same interval. If you like, you can write up the answer reasonably carefully, and post it as the solution, and, after waiting a little while, accept it. –  André Nicolas May 25 '12 at 2:40

The form of the probability density was clarified in the comments: $$f(x,y) = 12x(1-y)y^{-3}\, [0<x<y^2 \text{ and }0<y<1]$$ (using the Iverson bracket). To prepare integration along $y$, note that $$[0<x<y^2 \text{ and }0<y<1] = [\sqrt{x}<y<1 \text{ and }0<x<1]$$ Therefore, $$\int f(x,y)\,dy = [0<x<1] \int_{\sqrt{x}}^1 12x(1-y)y^{-3} \,dy$$ which evaluates to $[0<x<1] \, (6+6x−12\sqrt{x})$. This is the required marginal.
(Sanity check: the marginal integrates to $6+6/2-12/(3/2)=1$.)