# Thread: integral of f*g product

1. ## integral of f*g product

function f is integrable over [a,b]
function g is integrable over [a,b]

and g =
{ 1 on [a,b],
0 otherwise }

If I have $\int_a^b fg$

Can I treat g as a constant and write:

$\int_a^b fg = \int_a^b f$

2. ## Re: integral of f*g product

Hey director.

The answer is yes: you can do exactly that if g(x) = 1 for x in [a,b].

3. ## Re: integral of f*g product

Since you are integrating only from a to b, what happens outside that interval is irrelevant.

In fact, if f were integrable on [p, q] with p< a< b< q, $\int_p^q fg dx= \int_a^b f(x) dx$.