# Integral containing 1/(a+b*x+c*sqrt(d-x^2))^2

1. Jan 11, 2013

### Wu Xiaobin

Thank you so much if anyone can solve this integral to obtain its individual marginal PDF.

The joint probability density function shows as follows:
$f(\xi_1,\xi_2)=\frac{1-\eta_1^2-\eta_2^2-\eta_3^2}{4\pi}[\frac{1}{(1-\eta_1\xi_1-\eta_2\xi_2-\eta_3\sqrt{1-\xi_1^2-\xi_2^2})^2}+\frac{1}{(1-\eta_1\xi_1-\eta_2\xi_2+\eta_3\sqrt{1-\xi_1^2-\xi_2^2})^2}]$
with the domain of integration $0\leq(\xi_1^2+\xi_2^2\leq1)$

And I want to integrate the above joint probability density function to obtain $f(\xi_1)$

2. Jan 11, 2013

### haruspex

Writing the denominators as (A-Bx±C√(D2-x2))2, I believe the integrand reduces to $\frac{f+g}{\left(f-g\right)^2}$ where f = (A-Bx)2 and g = C2(D2-x2). Maybe you can usefully expand that with partial fractions.

3. Jan 11, 2013

### Wu Xiaobin

4. Jan 11, 2013

### Wu Xiaobin

Could you please give some more hint. I am confused about using partial fractions.

5. Jan 11, 2013

### haruspex

In what I posted before, f and g are quadratics in x. So f-g is a quadratic; suppose it has roots α, β. Then we have $\frac{f+g}{(x-\alpha)^2(x-\beta)^2}$. It should be possible to write this as a sum of fractions in which the numerators are all constants and the denominators are (x-α), (x-α)2, (x-β), (x-β)2. To find the numerators, just fill them in as four unknowns, equate the sum to the original integrand, multiply out, then collect up terms according to the powers of x. That should produce four equations, one for each power of x.

6. Jan 12, 2013

### Ray Vickson

You have
$$f = c\left[ \frac{1}{A - \sqrt{B}}+ \frac{1}{A + \sqrt{B}} \right],$$
where A = linear and B = quadratic in $(\xi_1,\xi_2)$ . Adding the fractions gives
$$f = c \frac{2A}{A^2 - B} = \frac{\text{linear}}{\text{quadratic}},$$
whose indefinite $\xi_2$ integration is do-able in terms of log and arctan functions.

7. Jan 12, 2013

### Wu Xiaobin

However when I work it out in Mathematica, the root appears rather complicated. Two of the roots are
$\alpha,\beta=\frac{\eta_2-\xi_1\eta_1\eta_2\pm\sqrt{-\eta_3^2(1-2\xi_1\eta_1-\eta_2^2-\eta_3^2+\xi_1^2(\eta_1^2+\eta_2^2+\eta_3^2))}}{\eta_{2}^{2}+\eta_3^2}$

It appears to be it would be rather complex to derive the four fractions.

8. Jan 12, 2013

### Wu Xiaobin

Excuse me. I wonder you may neglect the square in the integral?

9. Jan 12, 2013

### Wu Xiaobin

I got the result as follows, but I still can't work it out.
I hope if anyone could help.
$f(\xi_1)=\frac{(1-\eta_1\xi_1)(1-\eta_1^2-\eta_2^2-\eta_3^2)}{2[(1-\eta_1\xi_1)^2-(\eta_2^2+\eta_3^2)(1-\xi_1^2)]^{3/2}}$
where the domain of integration is $-1\leq \xi_1\leq 1$

10. Jan 12, 2013

### haruspex

By suitable change of variable, you should be able to get that into the form $\frac{\left(x+A\right)dx}{\left(x^2+B^2\right)^{3/2}}$. The x term in the numerator is easy: 2x.dx =d(x2), allowing direct integration. That leaves $\frac{dx}{\left(x^2+B^2\right)^{3/2}}$. Put x = Btan(θ).

11. Jan 12, 2013

### Wu Xiaobin

I put the result $f(\xi_1)$ here but I am not able to obtain $f(\xi_1)$.
The question is I can't obtain $f(\xi_1)$ from integrating $f(\xi_1,\xi_2)$ with respect to $\xi_2$

I found it too difficult to obtain the partial fractions and it's hard to integrate to obtain $f(\xi)$ in the form I put.

12. Jan 12, 2013

### haruspex

Oh, ok, I misunderstood your previous post.
Can you just keep the roots as α, β and finish the integration, then substitute in at the end? You might find there's a lot of cancellation, e.g. you can easily substitute for α+β.

13. Jan 12, 2013

### Wu Xiaobin

But how can I use $\alpha,\beta$ without taking its real form into consideration. Just as I put in the previous message, it has quite complicate form.

I am not very good at it, could you show me just how to use $\alpha,\beta$ to obtain the partial fraction. Of course I will solve the integration my self. Please tell me how to carry on.

14. Jan 12, 2013

### Ray Vickson

Sorry: I did not see the "square".

15. Jan 12, 2013

### Ray Vickson

You can write
$$\frac{1}{(x - \alpha)(x-\beta)} = \frac{c_1}{x-\alpha} + \frac{c_2}{x-\beta},$$ where $c_1, \, c_2$ are easily expressible in terms of $\alpha, \, \beta$. Thus,
$$\left[ \frac{1}{(x - \alpha)(x-\beta)} \right]^2 = \left[ \frac{c_1}{x-\alpha} + \frac{c_2}{x-\beta} \right]^2,$$
which involves $1/(x - \alpha)^2, \; 1/(x - \beta)^2$ and $1/[(x-\alpha)(x-\beta)]$. Re-write the latter again in terms of just $1/(x-\alpha)$ and $1/(x-\beta)$. In the end you will have a function of the form
$$f = \frac{a_1}{x-\alpha} + \frac{b_1}{(x - \alpha)^2} + \frac{a_2}{x - \beta} + \frac{b_2}{(x - \beta)^2} + c + px + qx^2,$$
where $x = \xi_2$ and the coefficients $a_i, b_i , c, p, q$ and $\alpha, \, \beta$ are all functions of $\xi_1$. You can then do the integral.

Using this method to compute
$$f(\xi_1) = \int_{-\sqrt{1-\xi_1^2}}^{\sqrt{1-\xi_1^2}} f(\xi_1,\xi_2) \, d \xi_2,$$
Maple gives an answer that takes between 25 and 26 pages to display when everything is written out in terms of the $\eta_i.$ So, the final result is long and messy.

Last edited: Jan 12, 2013
16. Jan 12, 2013

### haruspex

Yet, if I understand Wu Xiaobin's post, the answer is supposed to be as in post #9.

17. Jan 12, 2013

### Ray Vickson

I do not believe the answer in post #9. I input input some numerical values of the eta_i and tackled the integration for f(xi_1) directly, numerically; that is, for each numerical value of xi_1, I can do the xi_2 integral numerically. I plotted f(xi_1) and compared it with the formula in #9. The shapes are different. (All computations done in Maple.)

18. Jan 12, 2013

### Wu Xiaobin

That is fine.

19. Jan 12, 2013

### Wu Xiaobin

Yeah, I see. If I strive to work it out in partial fraction, I believe the result would be messy.
However I have tried another method and it works out.

I would post here later.

20. Jan 12, 2013

### Wu Xiaobin

You are right. The result is displayed in post #9.

Last night I worked it out with your kind help. I would posted here later.

It would take me a little time to check.