Suppose that a random vector $X=(X_1,X_2,X_3)$ follows a Dirichlet distribution with a shape parameter $(a_1,a_2,a_3).$
What I want to calculate is the probability of $X_1>X_2$ and I want to check whether I'm on the right track.
What I have done so far is:
Step 1) Find out the joint distribution of $(X_1,X_2)$. Because $x_i$'s should sum up to 1, This is simply given by $$(X_1,X_2)\sim Dir(a_1,a_2,a_3).$$ Say that the distribution is $$Kx_1^{a_1-1}x_2^{a_2-1}(1-x_1-x_2)^{a_3-1},$$ where $K$ is the constant part.
Step 2) Find the probability: $$P[X_1>X_2]=\int^\frac{1}{2}_0\int^{x_1}_0f_{X_1X_2}(x_1,x_2)dx_2dx_1+\int^1_\frac{1}{2}\int^{1-x_1}_0f_{X_1X_2}(x_1,x_2)dx_2dx_1$$ Here, using the integration by parts, the first term of the LHS is $$Kx_1\int^{x_1}_0x_1^{a_1-1}x_2^{a_2-1}(1-x_1-x_2)^{a_3-1}dx_2\bigg|^{x_1=\frac{1}{2}}_0-K\int^\frac{1}{2}_0x_1x_1^{a_1+a_2-2}(1-2x_1)^{a_3-1}dx_1\\=K\bigg(\frac{1}{2}\bigg)^{a_1}\int^\frac{1}{2}_0x_2^{a_2-1}(\frac{1}{2}-x_2)^{a_3-1}dx_2-K2^{a_3-1}\int^\frac{1}{2}_0x_1^{a_1+a_2-1}(\frac{1}{2}-x_1)^{a_3-1}dx_1.$$ Letting $\frac{1}{2}y=x_2$ and $\frac{1}{2}z=x_1$, the above expression is the same as $$K\bigg(\frac{1}{2}\bigg)^{a_1+a_2+a_3-1}\int^1_0y^{a_2-1}(1-y)^{a_3-1}dy-K\bigg(\frac{1}{2}\bigg)^{a_1+a_2}\int^1_0z^{a_1+a_2-1}(1-z)^{a_3-1}dz.$$ So, the value is $$K\bigg(\frac{1}{2}\bigg)^{a_1+a_2+a_3-1}B(a_2,a_3)-K\bigg(\frac{1}{2}\bigg)^{a_1+a_2}B(a_1+a_2,a_3).$$ Similarly, using the integration by parts, the second term of the LHS is $$Kx_1\int^{1-x_1}_0x_1^{a_1-1}x_2^{a_2-1}(1-x_1-x_2)^{a_3-1}dx_2\bigg|^{x_1=1}_\frac{1}{2}-0\\=K\bigg(\frac{1}{2}\bigg)^{a_1+a_2+a_3-1}B(a_2,a_3).$$ so that we can conclude $$P[X_1>X_2]=K\bigg(\frac{1}{2}\bigg)^{a_1+a_2+a_3}B(a_2,a_3)-K\bigg(\frac{1}{2}\bigg)^{a_1+a_2}B(a_1+a_2,a_3).$$ I'm not really good at finding probability. Is this approach correct? or is there any other approach which is correct and easier than this to find out $P[X_1>X_2]?$