fricas
a!
Type: Variable(a!)
fricas
!:=operator '!
fricas
a(i,j)==(1+(j-1)*i)/!(2*i+4*j)
Type: Void
fricas
a0:=matrix [[a(i,j)*k^i*l^j for i in 0..5] for j in 1..4]
fricas
Compiling function a with type (NonNegativeInteger,PositiveInteger)
-> Expression(Integer)
Type: Matrix(Expression(Integer))
fricas
a(i:INT,j:INT):FRAC INT == (1+(j-1)*i)/Gamma(1+2*i+4*j)
Function declaration a : (Integer,Integer) -> Fraction(Integer) has
been added to workspace.
Compiled code for a has been cleared.
1 old definition(s) deleted for function or rule a
Type: Void
fricas
aa:DMP([k,l], FRAC INT) := 1+reduce(+,concat [[a(i,j)*k^i*l^j for i in 0..3] for j in 1..3])
fricas
Compiling function a with type (Integer,Integer) -> Fraction(Integer
)
Type: DistributedMultivariatePolynomial
?([k,
l],
Fraction(Integer))
fricas
eval(aa,[k=0,l=l])
Type: DistributedMultivariatePolynomial
?([k,
l],
Polynomial(Fraction(Integer)))
fricas
eval(aa,[k=k,l=0])
Type: DistributedMultivariatePolynomial
?([k,
l],
Polynomial(Fraction(Integer)))
fricas
eval(aa,[k=1.0,l=1.0])
Type: Polynomial(Float)
fricas
eval(aa,[k=0,l=0])
Type: DistributedMultivariatePolynomial
?([k,
l],
Polynomial(Fraction(Integer)))
fricas
eval(aa,[k=-1,l=-1])::Float
Type: Float
Q: Why doesn't this work?
fricas
x:TaylorSeries FRAC INT
Type: Void
fricas
y:TaylorSeries FRAC INT
Type: Void
fricas
cosh(sqrt x)
>> Error detected within library code:
^: rational power does not exist
Because sqrt(x)
does not have a Taylor series. Even though cosh(sqrt(x))
does have a Taylor series, it can not be constructed this way.
Ans: Use GSERIES
fricas
x:GeneralUnivariatePowerSeries(FRAC INT,'x,0)
Type: Void
fricas
cosh(sqrt x)
Type: GeneralUnivariatePowerSeries
?(Fraction(Integer),
x,
0)
fricas
poly(s,n)==reduce(+,[ [(i.c)*variable(s)^(i.k) for i in terms s].j for j in 1..n])
Type: Void
fricas
poly(sinh(sqrt x),5)
fricas
Compiling function poly with type (GeneralUnivariatePowerSeries(
Fraction(Integer),x,0),PositiveInteger) -> Expression(Integer)
Type: Expression(Integer)
fricas
y:GeneralUnivariatePowerSeries(GeneralUnivariatePowerSeries(FRAC INT,'x,0),'y,0)
Type: Void
fricas
poly2(ss,n,m)==reduce(+,[ [poly(i.c,n)*variable(ss)^(i.k) for i in terms ss].j for j in 1..m])
Type: Void
fricas
poly2(cosh(sqrt x)*sinh(sqrt y)/sqrt(y),3,3)::DMP(['x,'y],FRAC INT)
fricas
Compiling function poly2 with type (GeneralUnivariatePowerSeries(
GeneralUnivariatePowerSeries(Fraction(Integer),x,0),y,0),
PositiveInteger,PositiveInteger) -> Expression(Integer)
Type: DistributedMultivariatePolynomial
?([x,
y],
Fraction(Integer))
fricas
aa
Type: DistributedMultivariatePolynomial
?([k,
l],
Fraction(Integer))
fricas
)lib GDRAW
GnuDraw is now explicitly exposed in frame initial
GnuDraw will be automatically loaded when needed from
/var/aw/var/LatexWiki/GDRAW.NRLIB/GDRAW
gnuDraw(aa,k=-30..60,l=-30..30,"SandBoxDoublePowerSeries1.dat",title=="Generating Function")
fricas
Compiling function %B with type (DoubleFloat,DoubleFloat) ->
DoubleFloat
Transmitting data...
Type: Void