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.
If you are not interested in a specific domain of multivariate
power series you can find a simpler solution below using a domain of
power series in infinitely many variables.
fricas
Z==>Integer
Type: Void
fricas
Q==>Fraction Z
Type: Void
fricas
vl: List Symbol := [x,y]
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
.
Y:=monomial(1$M,y,1)
The constructor TaylorSeries takes 1 argument and you have given 3
.
sinh(X)*cosh(Y)
Type: Expression(Integer)
This is not what I expected:
fricas
x:=taylor 'x
Type: UnivariateTaylorSeries
?(Expression(Integer),
x,
0)
fricas
y:=taylor 'y
Type: UnivariateTaylorSeries
?(Expression(Integer),
y,
0)
fricas
sinh(x)*cosh(y)
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,
i.e. TaylorSeries(Q)
is the domain of power series over Q
in infinitely many variables.
With that domain the input is as simple as above.
fricas
T==>TaylorSeries Fraction Integer
Type: Void
fricas
xx:T := 'x
Type: TaylorSeries
?(Fraction(Integer))
fricas
yy:T := 'y
Type: TaylorSeries
?(Fraction(Integer))
fricas
sinh(xx)*cosh(yy)
Type: TaylorSeries
?(Fraction(Integer))