Hello, do you mind helping me with this please?

let for some a>0

f(x,y) = a^{2}(cos (x - y) + sin ( x + y)) 0 ≤ x ≤ π/2 and 0 ≤ y ≤ π/2

Assume without computing a that f(x,y) is the p.d.f of a bivariate random variable ( X,Y) and compute the marginal p.d.f f_{1}(x) and f_{2}(y). Either from f_{1}(x) or f,(y) find the value a > 0 such that f(x,y) is a proper p.d.f

So i need to find a such as the function equals to 1.

i should find 1/2 but i must have forgotten something..