| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| R2010b Documentation → Symbolic Math Toolbox |
| Contents | Index |
| Learn more about Symbolic Math Toolbox |
taylor(f)
taylor(f, n)
taylor(f, a)
taylor(f, n, v)
taylor(f, n, v, a)
taylor(f) returns the fifth order Maclaurin polynomial approximation to f.
taylor(f, n) returns the (n-1)-order Maclaurin polynomial approximation to f. Here n is a positive integer.
taylor(f, a) returns the fifth order Taylor series approximation to f about point a. Here a is a real number. If a is a positive integer or if you want to change the expansion order, use taylor(f,n,a) to specify the base point and the expansion order.
taylor(f, n, v) returns the (n-1)-order Maclaurin polynomial approximation to f, where f is a symbolic expression representing a function and v specifies the independent variable in the expression. v can be a string or symbolic variable.
taylor(f, n, v, a) returns the Taylor series approximation to f about a. The argument a can be a numeric value, a symbol, or a string representing a numeric value or an unknown. If a is a symbol or a string, do not omit v.
If a is neither an integer nor a symbol or a string, you can supply the arguments n, v, and a in any order. taylor determines the purpose of the arguments from their position and type.
You also can omit any of the arguments n, v, and a. If you do not specify v, taylor usessymvar to determine the function's independent variable. n defaults to 6, and a defaults to 0.
The following expression present the Taylor series for an analytic function f(x) about the base point x=a:
![]()
The following table describes the various uses of the taylor command and its relation to Taylor and Maclaurin series. Before using the taylor command, define the function you want to expand. For example:
syms x f = exp(x^2);
Mathematical Operation | MATLAB Operation |
|---|---|
| |
n is a positive integer | n is a positive integer. |
a is a real number | a is a real number. |
n is a positive integer and a is real. Also, a can be a positive integer. |
In the case where f is a function of two or more variables (f=f(x,y,...)), there is an additional parameter that allows you to select the variable for the Taylor expansion. Look at this table for illustrations of this feature.
Mathematical Operation | MATLAB Operation |
|---|---|
| |
n is a positive integer | taylor(f,y,n) or taylor(f,n,y) n is a positive integer. |
a is real | taylor(f,y,a) a is real. |
a is real and n is a positive integer | taylor(f,n,y,a) a is real and n is a positive integer. |

See how symbolic computations can help you find analytical solutions to math and engineering problems.
Get free kit| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |