Quadrature rules under scaling of x axis

102 Views Asked by At

I have derived a 2-point quadrature rule for the following integral, $$ \int_{-1}^1 x^k f(x) dx = w_1 f(x_1) + w_2 f(x_2) $$ where $k$ is an integer and $f(x)$ is a cubic polynomial. The weights $w_i$ and nodes $x_i$ are known. The integral I really want to compute is $$ \int_a^b t^k f(t) dt $$ with $a < b$. The change of variables transformation, $$ t = \frac{b+a}{2} + \frac{b-a}{2} x $$ will map $[-1,1]$ into $[a,b]$. However, in this case, my integral becomes, $$ \int_a^b t^k f(t) dt = \int_{-1}^1 \left( \frac{b-a}{2} \right) \left( \frac{b+a}{2} + \frac{b-a}{2} x \right)^k f\left( \frac{b+a}{2} + \frac{b-a}{2} x \right) dx $$ It does not seem straightforward to apply the quadrature rule I have to this integral. Does anyone see a way forward?

1

There are 1 best solutions below

0
On

Nothing's stopping you from directly applying your quadrature rule to the final integral, getting

$$\int_a^b t^k f(t) dt = \sum_{j=1}^2 \left( \frac{b-a}{2} \right) \left( \frac{b+a}{2} + \frac{b-a}{2} x_j \right)^k f\left( \frac{b+a}{2} + \frac{b-a}{2} x_j \right) .$$

Are you saying you wish the result would be a nice "simple looking" expression? That may be too much to hope for here. Think about the type of expression you'd get if you just integrated normally (finding+evaluating the antiderivative instead of using the quadrature rule) using $f(x) = \sum_{j=0}^3 c_j x^j$. The result would still have a bunch of terms. You can't really expect the formula you get from quadrature to be massively simpler, since all those same function values and scalars need to be involved somewhere.

If the final expression will be evaluated by a computer then I'd just use the big formula I typed above. If you have some other goal, like "I want to use the formula in this specific other computation I'm doing by hand where a simpler formula will be much easier to use", then you should edit your question to explain that requirement, but also understand that there's a limit to how simple the result can look.