# taylor expansion of function with a vector as variable

I know how to do a taylor expansion of a function from R to R. I dont know how to do taylor expansion of functions which have 3D vectors as variable. How can I do this? I would appreciate it if someone also worked out an example. Thank you!

-

The title says "vector valued" and your question mentions "vectors as variable", which is it ? – Joel Cohen Nov 28 '12 at 19:06
@JoelCohen sorry for the confusion, I am not good at the terminology. I meant a function which has a vector as a variable – Badshah Nov 28 '12 at 19:07
Do you have an example in mind? – Muphrid Nov 28 '12 at 19:14
@Muphrid f(x)=|a-x|^3 for example with x and a 3D vector and the vertical lines mean the length (here a is constant). – Badshah Nov 28 '12 at 19:18
So $x$ and $a$ are both vectors, just $a$ is a constant vector? – Muphrid Nov 28 '12 at 19:19
show 2 more comments

## 1 Answer

Then what you're looking for is the Taylor expansion of a scalar field--a function $f$ that maps $\mathbb R^n$ to $\mathbb R$.

An easy way to build up intuition about this is to do the expansion only in one direction. Let $\hat n$ be a unit vector and $t$ a scalar parameter. Let $x_0$, the point you want to expand around, be given by $x_0 = x - t \hat n$ or $x = x_0 + t \hat n$. There is only one direction connecting $x$ and $x_0$, and the magnitude can always be calculated (which fixes $t$). Then you can say

$$f(x) = f(x_0 + t \hat n) = f(x_0) + \left. \frac{\partial f}{\partial t} \right|_{x_0} t + \frac{1}{2} \left. \frac{\partial^2 f}{\partial t^2} \right|_{x_0} t^2 + \ldots$$

Now, identify $\partial f/\partial t$ as $\hat n \cdot \nabla f$. In addition, see that $t\hat n = x - x_0$. Some clever recombining of terms gives

$$f(x) = f(x_0) + (x-x_0) \cdot \nabla f|_{x_0} + \frac{1}{2} ([x - x_0] \cdot \nabla)^2 f|_{x_0} + \ldots$$

This is suitably general to cover any point $x$.

-

I dont understand why f(x)=f(x_0 +tn). could you explain? and what does de upside down delta f mean? – Badshah Nov 28 '12 at 20:28
I've added some additional language to clarify why $x = x_0 + t \hat n$.  The symbol $\nabla$ (pronounced del) represents the vector derivative operator.  Acting on a scalar field, it produces the gradient. – Muphrid Nov 28 '12 at 21:52
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 20, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9250791668891907, "perplexity_flag": "middle"}