Main Content

taylortool

Taylor series calculator

Description

taylortool initiates a GUI that computes the Taylor series expansion. The GUI that graphs a function against the Nth partial sum of its Taylor series about a base point x = a. The default function, value of N, base point, and interval of computation for taylortool are f = x*cos(x), N = 7, a = 0, and [-2*pi,2*pi], respectively.

example

taylortool(f) initiates the GUI that computes the Taylor series expansion of the given expression f.

t = taylortool(___) returns the Figure object. Use t to query or modify properties of the figure after it is created.

example

Examples

collapse all

Open a GUI that computes the Taylor series expansion. By default, the GUI shows the Taylor series expansion of the function f(x)=xcos(x). The blue solid line shows the function f(x) and the red dashed line shows its Taylor approximation.

taylortool

Figure Taylor Tool contains an axes object and other objects of type uipanel. The axes object with title Taylor Series Approximation contains 2 objects of type line.

Next, find the Taylor series expansion of the function cos(x). Assign an output variable to taylortool to return the Figure object.

syms x
t = taylortool(cos(x))

Figure Taylor Tool contains an axes object and other objects of type uipanel. The axes object with title Taylor Series Approximation contains 2 objects of type line.

t = 
  Figure (Taylor Tool) with properties:

      Number: []
        Name: 'Taylor Tool'
       Color: [0.9400 0.9400 0.9400]
    Position: [108 72 374.4000 302.4000]
       Units: 'points'

  Use GET to show all properties

Close the figure.

close(t)

Input Arguments

collapse all

Input to approximate, specified as a symbolic expression or function.

Version History

Introduced before R2006a