help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding Taylor Coefficients Using Octave


From: Carlo de Falco
Subject: Re: Finding Taylor Coefficients Using Octave
Date: Tue, 25 Mar 2008 10:26:16 +0000


On 24/mar/08, at 03:33, Gregg Anderson wrote:
Sirs,
In MATLAB one can find the 15th-order Taylor polynomial of f(x) = x^3*tan(x^2) (assuming you have the symbolic module installed) by typing at the command line the following:

       >> taylor(x^3*tan(x^2),16)       ->ans = x^5+1/3*x^9+2/15*x^13

MATLAB is using n! = gamma(n+1).

How can I do this using Octave?

Octave is intended to perform numerical computions,
things like the one you want to do are done better with a symbolic manipulation tool
like for example Maxima.
Nevertheless I suspect that something similar can be done within Octave using the "symbolic"
package which links to GiNaC.
I am not familiar with that package but at least it does contain a function called "differentiate" which looks promising.

<snip>
Also, any documentation on how to actually use these packages?

pkg describe -verbose symbolic

will give you a list of functions in the package
then, for example,

help differentiate

tells you how to use the function, for more help on managing packages try

doc pkg

Thanks.
Gregg  Anderson

c.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]