# How, in general, do you expand an expression in powers of some variable?

#### AxiomOfChoice

How, in general, do you "expand" an expression in powers of some variable?

I'm studying mechanics right now out of the Landau-Lifschitz book, and he often talks about expanding expressions. But I honestly don't know how to do this, in general. I know about forming Taylor expansions of functions of one variable, but when things get to more than one variable, I start to get confused. Let me give you an example: Apparently, if we expand a function

$$L(\vec{v}^2 + 2\vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2)$$

"in powers of $$\vec{\epsilon}$$," to first order, where $$\vec{\epsilon}$$ is some infinitesimal vector, we get

$$L(\vec{v}^2) + \frac{\partial L}{\partial \vec{v}^2} 2 \vec{v} \cdot \vec{\epsilon}.$$

Could someone please explain why that is? You know, how to get that? And what's so special about expanding "in powers of $$\vec{\epsilon}$$?" As best I can tell, we are letting $$\vec{\epsilon} = 0$$ when we do the expansion. So are we expanding $$L$$ about $$\vec{\epsilon} = 0$$? If so, why are we taking a partial of $$L$$ with respect to $$\vec{v}^2$$?

I have tried to use the information provided at http://en.wikipedia.org/wiki/Taylor_Series to figure this out - particularly what's at the bottom of the page - but without much success.

#### lurflurf

Homework Helper
Re: How, in general, do you "expand" an expression in powers of some variable?

a simple generalization easily seen by expanding by each variable in turn
let x,h be vectors
D the vector derivative so h.D is the directional derivative times h's magnitude
f(x+h)=exp(h.D)f(x)=f(x)+[h.D]f(x)+[(h.D)^2]f(x)/2!+[(h.D)^3]f+...+[(h.D)^k]f(x)/k!+...

#### HallsofIvy

Homework Helper
Re: How, in general, do you "expand" an expression in powers of some variable?

If you are asking about how to get that and why it involves a derivative, "expanding in powers" is just the Taylor's series: The Taylor's series for function f(x), about x= a is
$$f(a)+ \frac{df}{dx}(x-a)+ \frac{1}{2}\frac{d^2f}{dx^2}(x- a)^2+ \cdot\cdot\cdot$$
$$= \sum_{n=0}^\infty \frac{1}{n!}\frac{d^n f}{dx^n} (x- a)^n$$
Of course, if f is a function of several variables, that derivative just becomes the partial derivative with respect to the relevant variable.

#### Marius

Re: How, in general, do you "expand" an expression in powers of some variable?

$$L(\vec{v'}^2) = L(\vec{v}^2 + 2\vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2)$$

At point $$a = \vec{v}'^2 = \vec{v}^2 + 2\vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2$$ this expands to

\begin{align*} L(\vec{v'}^2) &= L(\vec{v}^2) + \frac{\partial L}{\partial \vec{v'}^2} ( \vec{v}^2 + 2 \vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2 - \vec{v}^2) + \cdots \\ &= L(\vec{v}^2) + \frac{\partial L}{\partial \vec{v'}^2} ( 2 \vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2) + \cdots\\ &= L(\vec{v}^2) + \frac{\partial L}{\partial \vec{v'}^2} 2 \vec{v} \cdot \vec{\epsilon} + \frac{\partial L}{\partial \vec{v'}^2} \vec{\epsilon}^2 + \cdots \end{align*}
We leave just two terms and drop everything else, because then $$\vec{\epsilon}$$ approaches $$0$$ everything else is alot smaller.

So we get
$$L(\vec{v}^2) + \frac{\partial L}{\partial \vec{v'}^2} 2 \vec{v} \cdot \vec{\epsilon}$$
The remaining question is how to get?
$$\partial \vec{v'}^2 = \partial \vec{v}^2$$

#### Landau

Re: How, in general, do you "expand" an expression in powers of some variable?

In principle this is just Taylor's theorem in several variables. In physics this is used extensively, but I also don't always directly see how it is done. So I decided to write it out in a more formal way.

We have a function of one variable $$L:\mathbb{R}\to\mathbb{R}: x\mapsto L(x)$$, and the inner product, a function of n variables, $$g:\mathbb{R}^n\to\mathbb{R}:\vec{x}\mapsto \vec{x}\cdot\vec{x}=\vec{x}^2.$$

We are interested in the composition $$L\circ g:\mathbb{R}^n\to\mathbb{R}$$, evaluated at $$\vec{v}+\vec{\epsilon}$$, since this is indeed $$(L\circ g)(\vec{v}+\vec{\epsilon})=L((\vec{v}+\vec{\epsilon})^2)=L(\vec{v}^2+2\vec{v}\cdot\vec{\epsilon}+\vec{\epsilon}^2)$$. We're going to appoximate this assuming epsilon is small.

Taylor's theorem from Wikipedia says $$T(\vec{x}) = f(\vec{a}) + (\vec{x} - \vec{a})^T\mathrm{D} f(\vec{a}) + \frac{1}{2!} (\vec{x} - \vec{a})^T \,\{\mathrm{D}^2 f(\vec{a})\}\,(\vec{x} - \vec{a}) + \cdots$$, for the Taylor expansion of f around the point a.

Substituting $$a=v, h=\epsilon, x=a+h=v+\epsilon$$, we get $$T(\vec{v}+\vec{\epsilon}) = f(\vec{v}) + (\vec{\epsilon})^T\mathrm{D} f(\vec{v}) + \frac{1}{2!} (\vec{\epsilon})^T \,\{\mathrm{D}^2 f(\vec{v})\}\vec{\epsilon} + \cdots$$.

Now, the assumption that epsilon is small leads to the ignoring of powers of epsilon greater than one, i.e. all terms from $$\frac{1}{2!} (\vec{\epsilon})^T \,\{\mathrm{D}^2 f(\vec{v})\}\vec{\epsilon} + \cdots$$ on are ignored because of the occurence of at least two epsilon factors (here under the disguise of $$(\vec{\epsilon})^T$$ and $$\vec{\epsilon}$$).

Now we compute this for $$f=L\circ g$$:
$$T(\vec{v}+\vec{\epsilon}) = (L\circ g)(\vec{v}) + (\vec{\epsilon})^T\mathrm{D} (L\circ g)(\vec{v})$$, using the chain rule in several dimensions: $$D(L\circ g)(x)=DL(g(x))\circ Dg(x)$$. Since $$L$$ is just a function of one variable, this is equal to the product of the number $$L'(g(x))$$, i.e. the derivative of L evaluated at the point g(x), with the vector $$Dg(x)$$.

Now, since $$g(\vec{x})=x_1^2+x_2^2+...+x_n^2$$, we have

$$Dg(\vec{x})=\left(\frac{\partial g}{\partial x_1},\frac{\partial g}{\partial x_2},...,\frac{\partial g}{\partial x_n}\right)=(2x_1,2x_1,...,2x_n)$$.

So
$$T(\vec{v}+\vec{\epsilon}) = (L\circ g)(\vec{v}) + (\vec{\epsilon})^T\mathrm{D} (L\circ g)(\vec{v})$$

$$=L(\vec{v}^2)+(\vec{\epsilon})^TL'(\vec{v}^2)Dg(\vec{v})$$
$$=L(\vec{v}^2)+L'(\vec{v}^2)(\epsilon_1,\epsilon_2,...,\epsilon_n)\cdot (2v_1,2v_1,...,2v_n)$$
$$={L(\vec{v}^2)+L'(\vec{v}^2)2\vec{\epsilon}\cdot\vec{v}$$.

The only question is, what do L&L mean by $$\frac{\partial L}{\partial \vec{v}^2}$$? $$L$$ is just a function of one variable, so it doesn't really make sense to talk about partial derivatives. My notation $$L'(\vec{v}^2)$$ is unambiguous: THE derivative of L, evualated at $$\vec{v}^2$$.

#### Marius

Re: How, in general, do you "expand" an expression in powers of some variable?

In principle this is just Taylor's theorem in several variables. In physics this is used extensively, but I also don't always directly see how it is done. So I decided to write it out in a more formal way.
I think your way is too difficult in this case. Why do you expand in several variables?

I found the answer and will correct my previous post soon.

#### Marius

Re: How, in general, do you "expand" an expression in powers of some variable?

$$L(x) = L(\vec{v'}^2) = L(\vec{v}^2 + 2\vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2)$$

At point $$a = \vec{v}^2$$ this expands to

\begin{align*} L(x) &= L(a) + \frac{d L(a)}{d x} ( x - a) + \cdots \\ &= L(\vec{v}^2) + \frac{d L(\vec{v}^2)}{d x} ( \vec{v}^2 + 2 \vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2 - \vec{v}^2) + \cdots \\ &= L(\vec{v}^2) + \frac{d L(\vec{v}^2)}{d x} ( 2 \vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2) + \cdots\\ &= L(\vec{v}^2) + \frac{d L(\vec{v}^2)}{d x} 2 \vec{v} \cdot \vec{\epsilon} + \frac{d L(\vec{v}^2)}{d x} \vec{\epsilon}^2 + \cdots \end{align*}
We leave just two terms and drop everything else, because then $$\vec{\epsilon}$$ approaches $$0$$ everything else is alot smaller.

$$d x = d(\vec{v}^2 + 2\vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2) = 2 d(\vec{v}) + 2 \vec{\epsilon} d(\vec{v}) = (1+\vec{\epsilon}) 2 d(\vec{v}) = (1+\vec{\epsilon}) d(\vec{v}^2)$$

Because $$\vec{\epsilon}$$ approaches $$0$$ and is alot smaller then $$1$$ we drop it. So

$$d x = d(\vec{v}^2)$$

And finally
$$L(\vec{v}^2) + \frac{d L(\vec{v}^2)}{d \vec{v}^2} 2 \vec{v} \cdot \vec{\epsilon}$$

#### Landau

Re: How, in general, do you "expand" an expression in powers of some variable?

I think your way is too difficult in this case.
I don't think it is difficult, I just thoroughly explained what I was doing and using.
Why do you expand in several variables?
How can you not expand in several variables, given that we are considering n-dimensional vectors $$\vec{v}$$ (of course, in classical mechanics, n=3)?
$$L(x) = L(\vec{v'}^2) =...$$
$$= L(\vec{v}^2) + \frac{d L(\vec{v}^2)}{d x} ( \vec{v}^2 + 2 \vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2 - \vec{v}^2) + \cdots$$
I'm a bit confused about your notation. What does the expression $$\frac{d L(\vec{v}^2)}{d x}$$ mean? Just $$L'(\vec{v}^2)$$, the derivative of L evaluated at the point $$\vec{v}^2$$? My problem with this notation is the use of d/dx; it suggests you are differentiating 'with respect to x' (whatever that means for a function of one variable), but you earlier defined x as v'^2.
Same here:
$$d x = d(\vec{v}^2 + 2\vec{v} \cdot \vec{\epsilon} + \vec{\epsilon}^2) = 2 d(\vec{v}) + 2 \vec{\epsilon} d(\vec{v}) = (1+\vec{\epsilon}) 2 d(\vec{v}) = (1+\vec{\epsilon}) d(\vec{v}^2)$$

Because $$\vec{\epsilon}$$ approaches $$0$$ and is alot smaller then $$1$$ we drop it. So

$$d x = d(\vec{v}^2)$$

And finally
$$L(\vec{v}^2) + \frac{d L(\vec{v}^2)}{d \vec{v}^2} 2 \vec{v} \cdot \vec{\epsilon}$$
what does the expression $$\frac{d L(\vec{v}^2)}{d \vec{v}^2}$$ mean?

Maybe my problem is that following mathematics courses has made me unconfortable with this kind of 'physics approach', of just calculating things like $$d(\vec{v}^2)$$, and substituting the result in the 'denominator of the derivative'.

#### Marius

Re: How, in general, do you "expand" an expression in powers of some variable?

How can you not expand in several variables, given that we are considering n-dimensional vectors $$\vec{v}$$ (of course, in classical mechanics, n=3)?
But $$\vec{v'}^2$$ is scalar.

Oh, of course, you are right, this notation is strange. Now I'm confused too :)

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving