Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Integral of dot product

  1. Apr 26, 2013 #1
    Hi all,

    I'm working on a math problem with a known answer - though I can't reproduce the maths.

    The problem is this: there is a random 3d vector of unit length with a uniform probability, [itex]\vec{v}[/itex], and a secondary unit vector [itex]\vec{u}[/itex]. It is stated that:
    [tex]f = \int_{S^2}{| \vec{v} \cdot \vec{u} | d\vec{v}} = 2\pi[/tex]

    Now, I've never worked with integrals of this kind, and I'm not even exactly sure what [itex]S^2[/itex] means in the integral subscript, but given the problem I attempted to take a vector for [itex]\vec{u} = [0, 0, 1][/itex] (which shouldn't matter, as the distribution is uniform), and I set
    [tex]\vec{v} = [cos(\alpha)sin(\sigma), sin(\alpha)sin(\sigma), cos(\sigma)][/tex]
    for [itex]0 \leq \alpha \leq 2\pi[/itex] and [itex]0 \leq \sigma \leq \pi[/itex].

    Now I expected that:
    [tex]f = \int_{S^2}{| \vec{v} \cdot \vec{u} |d\vec{v}} = \int_{\alpha = 0}^{2\pi}\int_{\sigma = 0}^{\pi} | \vec{v} \cdot \vec{u} |d{\sigma}d\alpha[/tex]
    [tex]f = \int_{\alpha = 0}^{2\pi}\int_{\sigma = 0}^{\pi} | cos(\sigma) |d{\sigma}d\alpha = \int_{\alpha = 0}^{2\pi}\int_{\sigma = 0}^{{1 \over 2} \pi} 2cos(\sigma)d{\sigma}d\alpha[/tex]
    [tex]f = \int_{\alpha = 0}^{2\pi} 2[sin({1 \over 2}\pi) - sin(0)]d\alpha = 4\pi[/tex]

    Which is not what the apparent solution should be. What is the error in my logic? And how can it be proven that [itex]f = 2\pi[/itex]?

    Thanks in advance
  2. jcsd
  3. Apr 26, 2013 #2


    User Avatar
    2017 Award

    Staff: Mentor

    S_2 is the unit sphere - the set of all points with distance 1 to the origin.

    Your parametrization of the sphere is not uniform, you favor points close to u (and on the opposite side) in the integral.
    This is easier to solve in spherical coordinates.
  4. Apr 26, 2013 #3
    Thanks for your answer.

    I did manage to reproduce the answer now. Though I didn't know integration in spherical coordinates. I actually did convert it to spherical coordinates (right?), with p = 1 (the distance from the origin), except I didn't take into account the "Jacobian determinant". I really only had to multiply it with [itex]p^2 sin(\sigma)[/itex], is that correct?
  5. Apr 26, 2013 #4


    User Avatar
    2017 Award

    Staff: Mentor

    I think so, yes.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook