# Taylor Series

Discussion in 'Programmer's Corner' started by jamil1988, Nov 19, 2015.

1. ### jamil1988 Thread Starter New Member

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

2. ### Papabravo Expert

Feb 24, 2006
10,176
1,799
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?

Nov 19, 2015
11
0

4. ### Papabravo Expert

Feb 24, 2006
10,176
1,799
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: Nov 19, 2015
5. ### jamil1988 Thread Starter New Member

Nov 19, 2015
11
0
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.

6. ### WBahn Moderator

Mar 31, 2012
17,787
4,807
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 likes this.
7. ### Papabravo Expert

Feb 24, 2006
10,176
1,799
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.

8. ### jamil1988 Thread Starter New Member

Nov 19, 2015
11
0
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

File size:
223.3 KB
Views:
8
9. ### Papabravo Expert

Feb 24, 2006
10,176
1,799
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.

10. ### jamil1988 Thread Starter New Member

Nov 19, 2015
11
0
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.

11. ### Papabravo Expert

Feb 24, 2006
10,176
1,799
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?

Jun 29, 2010
2,831
89