I have the following equation:
$$2\int_{0}^{1/n}(1-nx)^{2}dx=\frac{2}{n}\int_{0}^{1}(1-x)^{2}dx.$$
My question is: Is this a rule and where does it come from and if so when are you allowed to use it?
What I have done so far:
I calculated both the integrals by hand and from that I did see they are indeed equal but I am interested in the rule that is being used to see this immediately. I found:
$$2\int_{0}^{1/n}(1-nx)^{2}dx=2\int_{0}^{1/n}(1-2nx+n^{2}x^{2})dx=2\left[ x-nx^{2}+\frac{1}{3}n^{2}x^{3} \right]_{0}^{1/n}= \\ 2\left[\left( \frac{1}{n}-n\frac{1}{n^{2}}+\frac{1}{3}n^{2}\frac{1}{n^{3}}\right)-0\right]=\frac{2}{3n},$$
and
$$\frac{2}{n}\int_{0}^{1}(1-x)^{2}dx=\frac{2}{n}\int_{0}^{1}(1-2x+x^{2})dx=\frac{2}{n}\left[ x-x^{2}+\frac{1}{3}x^{3} \right]_{0}^{1}= \\ \frac{2}{n}\left[\left( 1-1+\frac{1}{3}\right)-0\right]=\frac{2}{3n}.$$
Maybe another example would also be nice to see how this rule works.