gespex
- 56
- 0
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, \vec{v}, and a secondary unit vector \vec{u}. It is stated that:
f = \int_{S^2}{| \vec{v} \cdot \vec{u} | d\vec{v}} = 2\pi
Now, I've never worked with integrals of this kind, and I'm not even exactly sure what S^2 means in the integral subscript, but given the problem I attempted to take a vector for \vec{u} = [0, 0, 1] (which shouldn't matter, as the distribution is uniform), and I set
\vec{v} = [cos(\alpha)sin(\sigma), sin(\alpha)sin(\sigma), cos(\sigma)]
for 0 \leq \alpha \leq 2\pi and 0 \leq \sigma \leq \pi.
Now I expected that:
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
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
f = \int_{\alpha = 0}^{2\pi} 2[sin({1 \over 2}\pi) - sin(0)]d\alpha = 4\pi
Which is not what the apparent solution should be. What is the error in my logic? And how can it be proven that f = 2\pi?
Thanks in advance
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, \vec{v}, and a secondary unit vector \vec{u}. It is stated that:
f = \int_{S^2}{| \vec{v} \cdot \vec{u} | d\vec{v}} = 2\pi
Now, I've never worked with integrals of this kind, and I'm not even exactly sure what S^2 means in the integral subscript, but given the problem I attempted to take a vector for \vec{u} = [0, 0, 1] (which shouldn't matter, as the distribution is uniform), and I set
\vec{v} = [cos(\alpha)sin(\sigma), sin(\alpha)sin(\sigma), cos(\sigma)]
for 0 \leq \alpha \leq 2\pi and 0 \leq \sigma \leq \pi.
Now I expected that:
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
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
f = \int_{\alpha = 0}^{2\pi} 2[sin({1 \over 2}\pi) - sin(0)]d\alpha = 4\pi
Which is not what the apparent solution should be. What is the error in my logic? And how can it be proven that f = 2\pi?
Thanks in advance