# Taylor Series

#### jamil1988

Joined Nov 19, 2015
11
Hi ,
I am trying to implement Taylor series in Matlab (only first 2 terms of the series) for a 3D quadratic equations.

#### Papabravo

Joined Feb 24, 2006
20,377
I don't think the knowledge is specific to Matlab. You just need the value of the function and it's first derivative to construct the first two terms. So what's the problem with that?

#### jamil1988

Joined Nov 19, 2015
11
I don't think the knowledge is specific to Matlab. You just need the value of the function and it's first derivative to construct the first two terms. So what's the problem with that?

#### Papabravo

Joined Feb 24, 2006
20,377
I don't know what that means. A Taylor Series expansion can be done for any number of variables. You need the value of the function at a point and you need the first partial derivatives with respect to x, y, and z. What is your problem?

https://en.wikipedia.org/wiki/Taylor_series

The two term expansion of a function f(x) about a point x=a is:

$$f(x)=f(a)+f'(a)(x-a)$$

The equivalent in 3D is completely similar involving f(a,b,c) and the three first partial derivatives of f(x,y,z).

Last edited:

#### jamil1988

Joined Nov 19, 2015
11
I don't know what that means. A Taylor Series expansion can be done for any number of variables. You need the value of the function at a point and you need the first partial derivatives with respect to x, y, and z. What is your problem?

https://en.wikipedia.org/wiki/Taylor_series

The two term expansion of a function f(x) about a point x=a is:

$$f(x)=f(a)+f'(a)(x-a)$$

The equivalent in 3D is completely similar involving f(a,b,c) and the three first partial derivatives of f(x,y,z).
HI thanks for your reply.Actually I want to find coordinates (x,y,z) of an object using Taylor Series method.I need to use an initial guess using this guess I would like to estimate the position (coordinates) of the object.I am looking for some hints in it.I have to implement it in Matlab.Please respond.

#### WBahn

Joined Mar 31, 2012
29,147
An object is presumably at a specific location. For instance, it is at x = 10 cm, y = 20 cm, z = 30 cm. How is taking an initial guess that it is at x = 5 cm, y = 25 cm, z = 15 cm going to help you find the actual coordinates of the object and what function are you taking the Taylor series of?

You need to be much more specific in your description of the problem and what you attempting to do.

• thumb2

#### Papabravo

Joined Feb 24, 2006
20,377
There is no guessing involved in a Taylor Series. You either know the value of a function at a point or you don't. If you don't know the value of a function at a point then you are at sea without a paddle. In addition you need to know the value of the function's three first partial derivatives.

$$\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y},\frac{\partial f}{\partial z}$$

If you don't know the values of these partial derivatives then again you are at sea without a paddle.

#### jamil1988

Joined Nov 19, 2015
11
There is no guessing involved in a Taylor Series. You either know the value of a function at a point or you don't. If you don't know the value of a function at a point then you are at sea without a paddle. In addition you need to know the value of the function's three first partial derivatives.

$$\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y},\frac{\partial f}{\partial z}$$

If you don't know the values of these partial derivatives then again you are at sea without a paddle.
Hi,
Thanks for your reply.I think I am not able to explain or some thing is wrong in my explanation.I have uploaded a paper which gives detail of Taylor Series method to find 3D coordinates.In this paper If you have a look it is clearly mentioned that we need an initial point (x0,y0,zo) to apply Taylor series.Can you have a look in it please.I think then you will get my point.Thanks

#### Attachments

• 223.3 KB Views: 8

#### Papabravo

Joined Feb 24, 2006
20,377
Equation (16) is the expression of the Taylor Series limited to a constant term and terms with only a first derivative. You just need to solve the linear system for the initial point and after that it is plug a chug. You're are right about one thing; I have absolutely no idea what your problem could be.

#### jamil1988

Joined Nov 19, 2015
11
Equation (16) is the expression of the Taylor Series limited to a constant term and terms with only a first derivative. You just need to solve the linear system for the initial point and after that it is plug a chug. You're are right about one thing; I have absolutely no idea what your problem could be.
So,Now You got my point from equation.So how to guess this initial point if we dnt know about it.Because if you see the paper it says we have to guess initial point to solve the linear system.My point is how to guess the initial point.Can you write this function in Matlab please.

#### Papabravo

Joined Feb 24, 2006
20,377
Unless you can solve for the initial point with less than perfect data I guess the technique is of no use. Why don't you ask the authors?