# How to integrate a function of a direction, over the hemisphere

The Mathematica documentation Integrate over Regions gives an example of how to simply integrate over a sphere (surface):

Integrate[1, {x, y, z} ∈ Sphere[]]


Although it seems there is an Hemisphere object in Mathematica, it does not seem possible to easily integrate over all the directions that it includes.

Is there an elegant way to similarly compute the integral of a function over all the directions in an hemisphere?

An example of an application of this would be solving rendering equations

• Hemisphere objects in Mathematica are geographical, not geometric region objects. Nonetheless, you can construct more complex regions and use them on Integrate, for instance: Integrate[1, {x, y, z} ∈ RegionIntersection[Sphere[], ImplicitRegion[x > 0, {x, y, z}]]], which takes the parts of the sphere surface where x > 0. – kirma Sep 25 '15 at 4:00
• ... and in v10.2, you can also use HalfSpace. – kirma Sep 25 '15 at 4:12
• You referenced an article about hemispheres in MathWorld. Although MathWorld is a Wolfram site, it discussed mathematics, not Mathematica. In particular, the hemisphere it discusses is not a built-in Mathematica object. – m_goldberg Sep 25 '15 at 4:23
• @m_goldberg Thank you, I updated the question. – wip Sep 25 '15 at 6:27
• @wil My implied intent was that you can use HalfSpace instead of explicitly written ImplicitRegion to specify which hemisphere of Sphere to use. Maybe it even gets treated more efficiently as an abstraction on some future version of Mma! – kirma Sep 25 '15 at 11:13

Integrate[f[φ, θ] Sin[θ], {φ,0,2π}, {θ, 0, π/2}]

Integrate[1 Boole[x > 0], {x, y, z} ∈ Sphere[]]