How can I reconstruct a correct joint PDF The question: Let C be the circle $\left\{(x, y) |   x^2 +y^2 ≤ 1 \right\}. $. A point a is chosen randomly on the boundary of C and another point b is chosen randomly from the interior of C (these points are chosen independently and uniformly over their domains). Let R be the rectangle with sides parallel to the x-and y-axes with diagonal ab. What is the probability that no point of R lies outside of C?
My solution: 
I think there is something wrong with my joint PDF. Can you tell me where is the mistake?
 A: I seem to have the impression that this is an old Putnam problem but I can't remember off the top of my head which one it is.  I think it's an A1 or B1 problem.
Your distribution for $b$ is not correct.
It is easier and more instructive to directly consider the conditional probability that $R$ is contained in $C$ given the point $a$, then integrate over the distribution of $a$.
Given a point $a(\theta) = (\cos \theta, \sin \theta)$ on the boundary of the circle $C$, we can immediately see that the rectangle $R$ will be contained entirely in $C$ if and only if $b$ is contained within the rectangle with vertices $$\{(\pm \cos \theta, \pm \sin \theta)\}.$$  That is to say, if we look at the unique inscribed rectangle with sides parallel to the coordinate axes that has $a(\theta)$ as a vertex, only points within this rectangle will be suitable choices for $b$.
Consequently, the conditional probability $\Pr[R \subseteq C \mid \theta]$ that $R \subseteq C$ given $a(\theta)$ is simply the ratio of the area of the aforementioned inscribed rectangle to the total area of the circle.  Assuming without loss of generality that the circle has unit radius, we obtain $$\Pr[R \subseteq C \mid \theta] = \frac{4 |\cos \theta \sin \theta|}{\pi} = \frac{2|\sin 2\theta|}{\pi}.$$  Therefore, the unconditional probability is simply $$\Pr[R \subseteq C] = 4 \int_{\theta=0}^{\pi/2} \frac{2 |\sin 2\theta|}{\pi} \cdot \frac{1}{2\pi} \, d\theta.$$

In the above image, you can see that the locus of points $b$ in the disk for which the rectangle $R$ with $a$ and $b$ as opposite vertices will lie entirely within the circle, is shaded in red.  If $b$ is chosen in the light blue region, then the rectangle $R$ will not be enclosed by the circle.
A: One approach is to say that the angle of $a$ is uniformly distributed with density $\frac{1}{2\pi}$
and that for $b$ to meet the condition given $a$ it must lie in a rectangle with sides $2|\cos(a)|$ and $2|\sin(a)|$, i.e. with area $4 |\cos(a) \sin(a)|$ compared with the circle's area of $\pi$
That makes the probability of meeting the condition $$\int_0^{2\pi} \frac{4\left|\cos(a) \sin(a)\right|}{\pi} \frac{1}{2\pi}\, da = \int_0^{\pi/2} \frac{8}{\pi^2} \cos(a) \sin(a) \, da = \frac{4}{\pi^2} $$ 
