# Why does having a function within a function change the integral value?

Why does this integral equal this? It doesn't make sense to me why there is a one-half in this integral. It was on a test today and I got it wrong, my answer was $F(6) - F(2)$ Could someone explain why when I declare a function that is not directly $f(x)$, but $f(g(x))$ or some other function something weird like this occurs?

$$\int_{1}^3 \mathrm{f(2x)= \frac{1}2(F(6) - F(2))}$$ Where: $$F'(x) = f(x)$$

I'm more interested in this as a special case as I thought that having a function within a function only changes the values that are plugged into that function and I find this to be a little bit weird, and I want to know why this has to happen.

• For some basic information about writing math at this site see e.g. here, here, here and here. – RE60K Apr 7 '15 at 20:07
• Please, try to make the title of your question more informative. E.g., Why does $a<b$ imply $a+c<b+c$? is much more useful for other users than A question about inequality. From How can I ask a good question?: Make your title as descriptive as possible. In many cases one can actually phrase the title as the question, at least in such a way so as to be comprehensible to an expert reader. You can find more tips for choosing a good title here. – RE60K Apr 7 '15 at 20:08
• $\frac{\mathrm{d}}{\mathrm{dx}} F(2x) = 2f(2x)$, but you want $\frac{\mathrm{d}}{\mathrm{dx}} \frac{1}{2} F(2x) = f(2x)$ – Jerry Apr 8 '15 at 3:47

The answer is the chain rule. You want an antiderivative for $f(2x)$, but when you take $\frac{d}{dx}(F(2x))$ you get $2f(2x)$, so a factor of $1/2$ must be introduced so that the derivative will be $f(2x)$, as desired.

• An intuitive/informal explanation is that the "vertical" part of the area is the same, but the "horizontal" part has been compressed by a factor of $2$, since the domain of integration is only half as long. – Ian Apr 7 '15 at 20:42

$\int_1^3 f(2x) dx \\ \text{ Let } u=2x \\ du=2 dx \\ \frac{1}{2} du=dx \\ \int_1^3 f(2x) dx=\int_{2(1)}^{2(3)} f(u) \frac{1}{2} du=F(u) \cdot \frac{1}{2} |_2^6 \\ \text{ Example: Choose } f(x)=\sin(x) \text{ so then } f(2x)=\sin(2x) \\ \int_0^\frac{\pi}{2} \sin(x) dx=- \cos(x)|_0^\frac{\pi}{2}=-(\cos(\frac{\pi}{2})-\cos(0))=-(0-1)=1 \\ \text{ and } \\ \int_0^\frac{\pi}{2} \sin(2x) dx= \int_0^\pi \frac{1}{2} \sin(u) du=-\frac{1}{2} \cos(u)|_0^\pi=-\frac{1}{2}(\cos(\pi)-\cos(0))=-\frac{1}{2}(-1-1)=1$

• I don't know if the example makes things a little clearer or not but I put it in there just in case. – randomgirl Apr 7 '15 at 20:24
• $\frac{d}{dx} \frac{-1}{2} \cos(2x)=-\frac{1}{2}(2x)'(-\sin(2x))=\frac{1}{2}(2) \sin(2x)=\sin(2x)$ So that is why we need the 1/2 in our result so we cancel the derivative of the inside as that one guy stated chain rule is definitely involved here – randomgirl Apr 7 '15 at 20:28

To see why the chain rule is necessary, consider the simplest possible case: $f(x) = 1$, $F(x) = x$.

$$\int_1^3 f(2x) = \int_1^3 1 = 2$$

but

$$\int_2^6 f(x) = F(6) - F(2) = 6 - 2 = 4$$

(You have to compensate for $\int_2^6$ being 4 units long rather than just 2. This may become clearer if you draw yourself a picture.)