# Derive Taylor Series for $f(x)$

I am learning to derive the Taylor Series for $f(x)$, and I cannot remember how to do the following integral.

$\int_{x_0}^x \left(x-x_0\right) \, dx$ to get the following solution $=\frac{\left(x-x_0\right){}^2}{2!}\$

I have been out of university for many years. I believe I would use substitution, but I thought I would get some expert help since I need to work on other projects and multi-task.

I saw the above solution at Wolfram Alpha's description of Taylor series expansion[1].

Please be generous with steps and lead me to the appropriate integral method!

References:

[1] Wolfram Mathworld. Taylor Series. Retrieved (2015, Dec. 17). Mathworld.wolfram[online]. Available from: http://mathworld.wolfram.com/TaylorSeries.html

• Typically you don't want to use the same letter for the limits of the integral or the variable that's being integrated.
– user223391
Dec 18 '15 at 2:19
• Hello, Wolfram uses the variable Xo throughout the above reference, so I used it here. Look near (13). Thanks! Dec 18 '15 at 3:08

I took a brief look at the reference and couldn't find the exact line you are referencing. However, it is in general bad notation to use the same variable letter in both the integrand and the limits of integration. It would probably be better to write it as:

$$\int_{x_0}^x t - x_0 dt = \frac{(x-x_0)^2}{2!}$$ Now the integral is linear so we can separate it along the minus sign and pull out an $x_0$, which is a constant and then apply the integration rules:

$$\int_{x_0}^x t - x_0 dt = \int_{x_0}^x t dt - x_0 \int_{x_0}^x dt = \frac{x^2}{2} - \frac{x_0^2}{2} - x_0 (x-x_0) = \frac{(x-x_0)^2}{2!}$$.

• From where is your constant? It seems to be an integration constant, which would not apply here since there are limits of integration. Dec 18 '15 at 2:32
• Yeah, I made a pretty basic error. I got the same thing. It has been a long time since I have done or used math, so I made a basic error in my head on several occasions. I should have just carefully wrote it down on paper and I would have seen it. As for the same variable being used, it is due to the way that the derivation begins, and it threw me for a bit of a loop. Thanks! Dec 18 '15 at 3:37

To me, this has nothing to do with Taylor series. This is just an exercise in integration.

Also, as T.S.L stated, it is misleading to have the same variable inside the integral and as one of the limits of integration. So I will write your integral as $\int_{x_0}^x \left(t-x_0\right) \, dt$.

I see two ways to do this.

For the first, in $\int_{x_0}^x \left(t-x_0\right) \, dt$, let $u = t-x_0$. Then $du = dt$. When $t=x_0$, $u = 0$, so the lower limit of integration becomes $0$. Similarly, when $t=x$, $u = x-x_0$, so the upper limit of integration becomes $x-x_0$.

The integral then becomes $\int_{0}^{x-x_0} u\, du =\frac{u^2}{2}\big|_0^{x-x_0} =\frac{(x-x_0)^2}{2}$.

The second way is to split the integral into its separate terms as T.S.L did.

Either method can be used.

My preference is for the first, since it can be used for any function inside the integral. In this case, we get $\int_{x_0}^x f(t-x_0) dt =\int_{0}^{x-x_0} f(u) du$.