- #1
KOBES
- 2
- 0
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:
[itex]\int\limits_{x1}^{x2} x^2\left(x-a\right)^2\,dx[/itex]
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:
[itex]\int\limits_{x1}^{x2} Bx_{k1}^{n1}(tx1(x))Bx_{k2}^{n2}(tx2(x))\,dx[/itex]
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.
[itex]tx1=\frac{250x}{21}-\frac{5}{7}[/itex] and [itex]tx2=\frac{250x}{21}[/itex] while [itex]x_1=0.06[/itex] and [itex]x_2=0.084[/itex]
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.
I am wondering if there is a way to integrate the following function without first expanding the brackets:
[itex]\int\limits_{x1}^{x2} x^2\left(x-a\right)^2\,dx[/itex]
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:
[itex]\int\limits_{x1}^{x2} Bx_{k1}^{n1}(tx1(x))Bx_{k2}^{n2}(tx2(x))\,dx[/itex]
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.
[itex]tx1=\frac{250x}{21}-\frac{5}{7}[/itex] and [itex]tx2=\frac{250x}{21}[/itex] while [itex]x_1=0.06[/itex] and [itex]x_2=0.084[/itex]
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.