1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Jan 11, 2013 #1
    Thank you so much if anyone can solve this integral to obtain its individual marginal PDF.

    The joint probability density function shows as follows:
    [itex]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}][/itex]
    with the domain of integration [itex]0\leq(\xi_1^2+\xi_2^2\leq1)[/itex]

    And I want to integrate the above joint probability density function to obtain [itex]f(\xi_1)[/itex]
     
  2. jcsd
  3. Jan 11, 2013 #2

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  4. Jan 11, 2013 #3
    Thanks for your reply, I will have a try.
     
  5. Jan 11, 2013 #4
    Could you please give some more hint. I am confused about using partial fractions.
     
  6. Jan 11, 2013 #5

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  7. Jan 12, 2013 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You have
    [tex]f = c\left[ \frac{1}{A - \sqrt{B}}+ \frac{1}{A + \sqrt{B}} \right], [/tex]
    where A = linear and B = quadratic in ##(\xi_1,\xi_2)## . Adding the fractions gives
    [tex] f = c \frac{2A}{A^2 - B} = \frac{\text{linear}}{\text{quadratic}},[/tex]
    whose indefinite ##\xi_2## integration is do-able in terms of log and arctan functions.
     
  8. Jan 12, 2013 #7
    Thank you so much for your further reply.
    However when I work it out in Mathematica, the root appears rather complicated. Two of the roots are
    [itex]
    \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}
    [/itex]

    It appears to be it would be rather complex to derive the four fractions.
     
  9. Jan 12, 2013 #8
    Excuse me. I wonder you may neglect the square in the integral?
     
  10. Jan 12, 2013 #9
    I got the result as follows, but I still can't work it out.
    I hope if anyone could help.
    [itex]
    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}}
    [/itex]
    where the domain of integration is [itex]-1\leq \xi_1\leq 1[/itex]
     
  11. Jan 12, 2013 #10

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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(θ).
     
  12. Jan 12, 2013 #11
    I put the result [itex]f(\xi_1)[/itex] here but I am not able to obtain [itex]f(\xi_1)[/itex].
    The question is I can't obtain [itex]f(\xi_1)[/itex] from integrating [itex]f(\xi_1,\xi_2)[/itex] with respect to [itex]\xi_2[/itex]

    I found it too difficult to obtain the partial fractions and it's hard to integrate to obtain [itex]f(\xi)[/itex] in the form I put.
     
  13. Jan 12, 2013 #12

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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 α+β.
     
  14. Jan 12, 2013 #13
    But how can I use [itex]\alpha,\beta[/itex] 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 [itex]\alpha,\beta[/itex] to obtain the partial fraction. Of course I will solve the integration my self. Please tell me how to carry on.
     
  15. Jan 12, 2013 #14

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Sorry: I did not see the "square".
     
  16. Jan 12, 2013 #15

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You can write
    [tex] \frac{1}{(x - \alpha)(x-\beta)} = \frac{c_1}{x-\alpha} + \frac{c_2}{x-\beta},[/tex] where ##c_1, \, c_2## are easily expressible in terms of ##\alpha, \, \beta##. Thus,
    [tex]\left[ \frac{1}{(x - \alpha)(x-\beta)} \right]^2 =
    \left[ \frac{c_1}{x-\alpha} + \frac{c_2}{x-\beta} \right]^2, [/tex]
    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
    [tex] 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,[/tex]
    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
    [tex] f(\xi_1) = \int_{-\sqrt{1-\xi_1^2}}^{\sqrt{1-\xi_1^2}} f(\xi_1,\xi_2) \, d \xi_2, [/tex]
    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
  17. Jan 12, 2013 #16

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

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

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.)
     
  19. Jan 12, 2013 #18
    That is fine.
     
  20. Jan 12, 2013 #19
    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.
     
  21. Jan 12, 2013 #20
    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.
     
  22. Jan 13, 2013 #21

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    No, the correct result is NOT displayed in post #9. Just look at the formula. The actual f(xi_1) is given by
    [tex] f(\xi_1) = \int_{-\sqrt{1-\xi_1^2}}^{\sqrt{1-\xi_1^2}} f(\xi_1, \xi_2)\, d\xi_2, \; -1 \leq \xi_1 \leq 1.[/tex]
    As ##\xi_1 \to \pm 1## this → 0 because we have an integral from 0 to 0. However, the formula in post #9 gives nonzero results at ##\xi_1 = \pm 1##.
     
    Last edited: Jan 13, 2013
  23. Jan 13, 2013 #22
    Thank you so much for all friends who replied.

    I think I have worked it out, but maybe using another way to solve it.
    However partial fractions really help when I solve this problem.

    I needs great effort to type the integration process here, so I decide to attach the pdf
    document here.

    The attachment shows the whole process of solving the integral.

    In the end, I want to give me special gratitude to haruspex and Ray Vickson.

    --
    Best regards
    Jacky Wu
     

    Attached Files:

  24. Jan 13, 2013 #23

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Your final answer is incorrect, as I have already indicated; you made some errors in your computation.

    However, it is possible to give a corrected answer, and it is not very difficult to get. Below, I use ##x_1, x_2, x_3## instead of ##\xi_1, \xi_2, \xi_3## and I use ##c_1, c_2, c_3## instead of ##\eta_1, \eta_2, \eta_3##. I will get the marginal density of ##x_3## instead of ##x_1##, but by a simple re-labelling you can get the other two marginals as well. The density function is
    [tex] P(x_1,x_2,x_3) = k \frac{\delta(1 - \sqrt{x_1^2 + x_2^2 + x_3^2})}{( 1 - c_1 x_1
    - c_2 x_2 - c_3 x_3)^2},[/tex]
    where k is a constant which you give in the pdf file. Let's change to polar coordinates:
    [tex] x_1 = r \sin(\theta) \cos(\phi)\\
    x_2 = r \sin(\theta) \sin(\phi)\\
    x_3 = r \cos(\theta).[/tex]
    When we fix x_3 the area element is ##dA = dx_1 dx_2 = R\, dR\, d\phi##, where ##R = r \sin(\theta)##, so ##dR = dr \sin(\theta)## (since, ultimately, we are fixing θ). Thus, ##dA = r \sin^2(\theta) dr \, d\phi##, so the marginal density ##f(x_3)## is given as
    [tex] f = k \sin^2(\theta) \int_0^{2 \pi}
    \frac{1}{(1 - c_1 \sin(\theta) \cos(\phi) - c_2 \sin(\theta) \sin(\phi) - c_3 \cos(\theta))^2} \, d \phi, [/tex]
    because the r-integration is simply ##\int \delta(r-1) q(r,\phi)\, dr##. Note that since r = 1 we have ##\cos(\theta) = x_3## and ##\sin(\theta) = \sqrt{1-x_3^2}.## We may write
    [tex] c_1 \sin(\theta) \cos(\phi) + c_2 \sin(\theta) \sin(\phi) = C \cos(\omega - \phi),[/tex] where ##C = \sin(\theta) \sqrt{c_1^2 + c_2^2}## and ##\cos(\omega) = c_1 \sin(\theta)/C, \: \sin(\omega) = \sin(\theta) c_2/C.## Since we are integrating ##\phi## over an entire cycle, we can omit ##\omega## and write
    [tex] f = k (1-x_3^2) \int_0^{2 \pi} \frac{1}{(1 - C \cos(\phi) -c_3 x_3)^2}\, d\phi
    = k (1-x_3^2) \text{sign}(x_3 - 1 -C)\frac{2(c_3 x_3 - 1)}{( 1 - 2 c_3 x_3 + c_3^2 x_3^2 - c_1^2 - c_2^2 - C^2)^{3/2}}.[/tex]
    Since ##x_3 \in (-1,1)## we have sign = -1, so finally we have
    [tex] f(x_3) = \text{const.} \frac{(1 - c_3 x_3)(1 - x_3^2)}{( (1 - c_3 x_3)^2 - (c_1^2 + c_2^2)(1 - x_3^2))^{3/2}}, \: -1 \leq x_3 \leq 1.[/tex]
    Here, we assume that ##c_1^2 + c_2^2 + c_3^2 < 1## and also that the denominator function ## (1 - c_3 x_3)^2 - (c_1^2 + c_2^2)(1 - x_3^2)## does not vanish for ##x_3 \in [-1,1].## A sufficient condition for this is that
    [tex] 1 - c_1^2 - c_2^2 - c_3^2 > 2 c_3.[/tex] When the denominator function vanishes at some point in (-1,1) the integral is singular at some values of ##x_3##, and the computation breaks down.

    Note that this formula gives ##f(x_3) \to 0## as ## x_3 \to \pm 1##, as it must be (since having x_3 = ± 1 gives an integration over a region of area = 0). The formula you gave in post #9 does not have this necessary property.
     
    Last edited: Jan 13, 2013
  25. Jan 13, 2013 #24
    Thanks for your reply.

    Actually I don't know where the problem is?

    But the result of [itex]f(\xi)[/itex] appears in several academic papers.

    I will check it later to find out which one suits better and try to find out the exact problem.
     
  26. Jan 13, 2013 #25

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    No fair! You posted incorrect, misleading information. You say you wanted to find the marginal density of ##x_1## from the bivariate density
    [tex] f(x_1,x_2) = c \left[ \frac{1}{(1-c_1 x_1 - c_2 x_2 - c_3 \sqrt{1-x_1^2 - x_2^2})^2} +
    \frac{1}{(1-c_1 x_1 - c_2 x_2 + c_3 \sqrt{1-x_1^2 - x_2^2})^2} \right], \; x_1^2 + x_2^2 \leq 1,[/tex]
    but in fact, your bivariate density should be
    [tex] f(x_1,x_2) = \frac{c}{\sqrt{1-x_1^2-x_2^2}} \left[ \frac{1}{(1-c_1 x_1 - c_2 x_2 - c_3 \sqrt{1-x_1^2 - x_2^2})^2} +
    \frac{1}{(1-c_1 x_1 - c_2 x_2 + c_3 \sqrt{1-x_1^2 - x_2^2})^2} \right], \; x_1^2 + x_2^2 \leq 1[/tex] (from your pdf file). This makes all the difference in the world! The first form leads to ##f(x_1) \to 0## as ##x_1 \to \pm 1##, while this does not happen for the second form!
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook