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
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==>SparseMultivariateTaylorSeries(Q,V,P)
Type: Void
fricas
X:=monomial(1$M,x,1)
Type: SparseMultivariateTaylorSeries
?(Fraction(Integer),
OrderedVariableList
?([x,
y]),
SparseMultivariatePolynomial
?(Fraction(Integer),
OrderedVariableList
?([x,
y])))
fricas
Y:=monomial(1$M,y,1)
Type: SparseMultivariateTaylorSeries
?(Fraction(Integer),
OrderedVariableList
?([x,
y]),
SparseMultivariatePolynomial
?(Fraction(Integer),
OrderedVariableList
?([x,
y])))
fricas
sinh(X)*cosh(Y)
Type: SparseMultivariateTaylorSeries
?(Fraction(Integer),
OrderedVariableList
?([x,
y]),
SparseMultivariatePolynomial
?(Fraction(Integer),
OrderedVariableList
?([x,
y])))
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.
Then the input is as simple as above.
fricas
T==>TaylorSeries Fraction Integer
Type: Void
fricas
xt:T := 'x
Type: TaylorSeries
?(Fraction(Integer))
fricas
yt:T := 'y
Type: TaylorSeries
?(Fraction(Integer))
fricas
sinh(xt)*cosh(yt)
Type: TaylorSeries
?(Fraction(Integer))