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
fricas
x:TaylorSeries FRAC INT
Type: Void
fricas
y:TaylorSeries FRAC INT
Type: Void
fricas
cos(x*y)+sinh(x*y)+cosh(x*y)*sinh(x*y)
Q: Why doesn't this work?
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((2*cosh(sqrt x)-x)*sinh(sqrt y)/sqrt(y),3,4)::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
eq1:=(l=-4*(k[1]*k[2])^2)::EQ EXPR INT
Type: Equation(Expression(Integer))
fricas
eq2:=(k=k[1]^2+k[2]^2)::EQ EXPR INT
Type: Equation(Expression(Integer))
fricas
sol:=solve([eq1,eq2],[k[1],k[2]]); # sol
fricas
sol.1
Type: List(Equation(Expression(Integer)))
fricas
a0:=(-k[2]^2*cosh(k[1])+k[1]^2*cosh(k[2]))/(k[1]^2-k[2]^2)
Type: Expression(Integer)
fricas
ans0:=eval(a0,sol.1)
Type: Expression(Integer)
fricas
a1:=(-k[2]^2*sinh(k[1])/k[1]+k[1]^2*sinh(k[2])/k[2])/(k[1]^2-k[2]^2)
Type: Expression(Integer)
fricas
ans1:=eval(a1,sol.1)
Type: Expression(Integer)
fricas
interpret(eval(ans1,[k='x,l='y])::InputForm)
>> Error detected within library code:
^ rational power of coefficient undefined
fricas
)lib GDRAW
OldGnuDraw is now explicitly exposed in frame initial
OldGnuDraw will be automatically loaded when needed from
/var/aw/var/LatexWiki/GDRAW.NRLIB/GDRAW
gnuDraw(ans1,k=-30..60,l=-30..30,"SandBoxDoublePowerSeries1.dat",title=="Generating Function")
fricas
Compiling function %C with type (DoubleFloat, DoubleFloat) ->
DoubleFloat
Type: Void