# Integrating a product of two functions - one lags the other

1. Aug 15, 2013

### KOBES

Integrating a product of two functions - one "lags" the other

I am wondering if there is a way to integrate the following function without first expanding the brackets:

$\int\limits_{x1}^{x2} x^2\left(x-a\right)^2\,dx$

The idea behind the question is a bit more complex than I am letting on, but this example gets to the heart of the problem.

____________________________________________________________________________

For the interested reader I will give a bit more background; I am really trying to do the following integral:

$\int\limits_{x1}^{x2} Bx_{k1}^{n1}(tx1(x))Bx_{k2}^{n2}(tx2(x))\,dx$

where the functions tx1 and tx2 return values ranging from [0,1] over the domain to be integrated. Actually, I can just tell you what they are.

$tx1=\frac{250x}{21}-\frac{5}{7}$ and $tx2=\frac{250x}{21}$ while $x_1=0.06$ and $x_2=0.084$

The Bx functions are Bernstein basis polynomials. In the above example, I have used the "square" function instead.

Note that I can solve this problem by converting the Bernstein polynomials to the power basis (this is akin to expanding the brackets in the original question). However, I am trying to avoid doing this for reasons of numerical stability and efficiency.

2. Aug 15, 2013

### KOBES

I just had a thought... it seems to me that a nested integration by parts might work. The idea came to me by looking at the "simple" but representative example above. This should also work for Bernstein polynomials, as their derivatives eventually become zero, in a similar fashion to the monomials.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook