login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for TaylorSeries revision 2 of 8

1 2 3 4 5 6 7 8
Editor: Ralf Hemmecke
Time: 2014/08/23 23:02:42 GMT+0
Note:

changed:
-M==>SparseMultivariateTaylorSeries(Q,V,P)
M==>TaylorSeries(Q,V,P)

Example for multivariate Taylor series expansion

In order to work with multivariate Taylor series one first has to do a few preparation steps in order to create an appropriate domain.

fricas
(1) -> Z==>Integer
Type: Void
fricas
Q==>Fraction Z
Type: Void
fricas
vl: List Symbol := [x,y]

\label{eq1}\left[ x , \: y \right](1)
Type: List(Symbol)
fricas
V==>OrderedVariableList vl
Type: Void
fricas
E ==> DirectProduct(2, NonNegativeInteger)
Type: Void
fricas
P==>SparseMultivariatePolynomial(Q, V)
Type: Void
fricas
M==>TaylorSeries(Q,V,P)
Type: Void
fricas
X:=monomial(1$M,x,1)
The constructor TaylorSeries takes 1 argument and you have given 3 .

Naive solution --Bill Page, Fri, 22 Aug 2014 21:19:19 +0000 reply
This is not what I expected:
fricas
x:=taylor 'x

\label{eq2}x(2)
Type: UnivariateTaylorSeries?(Expression(Integer),x,0)
fricas
y:=taylor 'y

\label{eq3}y(3)
Type: UnivariateTaylorSeries?(Expression(Integer),y,0)
fricas
sinh(x)*cosh(y)

\label{eq4}\begin{array}{@{}l}
\displaystyle
x +{{\frac{1}{6}}\ {{x}^{3}}}+{{\frac{1}{120}}\ {{x}^{5}}}+{{\frac{1}{5
040}}\ {{x}^{7}}}+ 
\
\
\displaystyle
{{\frac{1}{362880}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)}+ \
\
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\frac{1}{2}}\  x}+{{\frac{1}{12}}\ {{x}^{3}}}+{{\frac{1}{24
0}}\ {{x}^{5}}}+ 
\
\
\displaystyle
{{\frac{1}{10080}}\ {{x}^{7}}}+{{\frac{1}{725760}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)}
(4)
Type: UnivariateTaylorSeries?(UnivariateTaylorSeries?(Expression(Integer),x,0),y,0)

Can it be converted somehow to the solution above?

Most simple solution

There is a domain in FriCAS? that is similar to the Polynomial(Q) domain. Then the input is as simple as above.

fricas
T==>TaylorSeries Fraction Integer
Type: Void
fricas
xt:T := 'x

\label{eq5}x(5)
Type: TaylorSeries?(Fraction(Integer))
fricas
yt:T := 'y

\label{eq6}y(6)
Type: TaylorSeries?(Fraction(Integer))
fricas
sinh(xt)*cosh(yt)

\label{eq7}\begin{array}{@{}l}
\displaystyle
x +{\left({{\frac{1}{2}}\  x \ {{y}^{2}}}+{{\frac{1}{6}}\ {{x}^{3}}}\right)}+ 
\
\
\displaystyle
{\left({{\frac{1}{24}}\  x \ {{y}^{4}}}+{{\frac{1}{12}}\ {{x}^{3}}\ {{y}^{2}}}+{{\frac{1}{120}}\ {{x}^{5}}}\right)}+ 
\
\
\displaystyle
{\left({
\begin{array}{@{}l}
\displaystyle
{{\frac{1}{720}}\  x \ {{y}^{6}}}+{{\frac{1}{144}}\ {{x}^{3}}\ {{y}^{4}}}+{{\frac{1}{240}}\ {{x}^{5}}\ {{y}^{2}}}+ 
\
\
\displaystyle
{{\frac{1}{5040}}\ {{x}^{7}}}
(7)
Type: TaylorSeries?(Fraction(Integer))