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

Edit detail for SandBoxDoublePowerSeries revision 14 of 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Editor: Bill Page
Time: 2014/08/29 23:02:27 GMT+0
Note: GSERIES

changed:
-sqrt(x) does not have a Taylor series even though cosh(sqrt(x)) does,
-it can not be constructed this way.
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.

changed:
-sinh(sqrt x)
-truncate(%,4)
poly(s,n)==reduce(+,[ [(i.c)*variable(s)^(i.k) for i in terms s].j for j in 1..n])
poly(sinh(sqrt x),5)
\end{axiom}

\begin{axiom}

changed:
-cosh(sqrt x)*sinh(y)
poly2(ss,n,m)==reduce(+,[ [poly(i.c,n)*variable(ss)^(i.k) for i in terms ss].j for j in 1..m])
poly2(cosh(sqrt x)*sinh(y),5,5)::DMP(['x,'y],FRAC INT)

fricas
a!

\label{eq1}a !(1)
Type: Variable(a!)
fricas
!:=operator '!

\label{eq2}!(2)
Type: BasicOperator?
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)

\label{eq3}\left[ 
\begin{array}{cccccc}
{l \over{! \left({4}\right)}}&{{k \  l}\over{! \left({6}\right)}}&{{{{k}^{2}}\  l}\over{! \left({8}\right)}}&{{{{k}^{3}}\  l}\over{! \left({1
0}\right)}}&{{{{k}^{4}}\  l}\over{! \left({12}\right)}}&{{{{k}^{5}}\  l}\over{! \left({14}\right)}}
\
{{{l}^{2}}\over{! \left({8}\right)}}&{{2 \  k \ {{l}^{2}}}\over{! \left({10}\right)}}&{{3 \ {{k}^{2}}\ {{l}^{2}}}\over{! \left({1
2}\right)}}&{{4 \ {{k}^{3}}\ {{l}^{2}}}\over{! \left({14}\right)}}&{{5 \ {{k}^{4}}\ {{l}^{2}}}\over{! \left({16}\right)}}&{{6 \ {{k}^{5}}\ {{l}^{2}}}\over{! \left({18}\right)}}
\
{{{l}^{3}}\over{! \left({12}\right)}}&{{3 \  k \ {{l}^{3}}}\over{! \left({14}\right)}}&{{5 \ {{k}^{2}}\ {{l}^{3}}}\over{! \left({1
6}\right)}}&{{7 \ {{k}^{3}}\ {{l}^{3}}}\over{! \left({18}\right)}}&{{9 \ {{k}^{4}}\ {{l}^{3}}}\over{! \left({20}\right)}}&{{{11}\ {{k}^{5}}\ {{l}^{3}}}\over{! \left({22}\right)}}
\
{{{l}^{4}}\over{! \left({16}\right)}}&{{4 \  k \ {{l}^{4}}}\over{! \left({18}\right)}}&{{7 \ {{k}^{2}}\ {{l}^{4}}}\over{! \left({2
0}\right)}}&{{{10}\ {{k}^{3}}\ {{l}^{4}}}\over{! \left({22}\right)}}&{{{1
3}\ {{k}^{4}}\ {{l}^{4}}}\over{! \left({24}\right)}}&{{{16}\ {{k}^{5}}\ {{l}^{4}}}\over{! \left({26}\right)}}
(3)
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..2] for j in 1..2])
fricas
Compiling function a with type (Integer,Integer) -> Fraction(Integer
      )

\label{eq4}\begin{array}{@{}l}
\displaystyle
{{1 \over{159667200}}\ {{k}^{2}}\ {{l}^{2}}}+{{1 \over{40320}}\ {{k}^{2}}\  l}+{{1 \over{1814400}}\  k \ {{l}^{2}}}+{{1 \over{720}}\  k \  l}+ 
\
\
\displaystyle
{{1 \over{40320}}\ {{l}^{2}}}+{{1 \over{24}}\  l}+ 1 
(4)
Type: DistributedMultivariatePolynomial?([k,l],Fraction(Integer))
fricas
eval(aa,[k=0,l=l])

\label{eq5}{{1 \over{40320}}\ {{l}^{2}}}+{{1 \over{24}}\  l}+ 1(5)
Type: DistributedMultivariatePolynomial?([k,l],Polynomial(Fraction(Integer)))
fricas
eval(aa,[k=k,l=0])

\label{eq6}1(6)
Type: DistributedMultivariatePolynomial?([k,l],Polynomial(Fraction(Integer)))
fricas
eval(aa,[k=1.0,l=1.0])

\label{eq7}1.0431057161_395703062(7)
Type: Polynomial(Float)
fricas
eval(aa,[k=0,l=0])

\label{eq8}1(8)
Type: DistributedMultivariatePolynomial?([k,l],Polynomial(Fraction(Integer)))
fricas
eval(aa,[k=-1,l=-1])::Float

\label{eq9}0.9597216773_3886483886(9)
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)

\label{eq10}1 +{{1 \over 2}\  x}+{{1 \over{24}}\ {{x}^{2}}}+{{1 \over{720}}\ {{x}^{3}}}+{{1 \over{40320}}\ {{x}^{4}}}+{{1 \over{3628800}}\ {{x}^{5}}}+{O \left({{x}^{{11}\over 2}}\right)}(10)
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)

\label{eq11}{{\left({{x}^{4}}+{{72}\ {{x}^{3}}}+{{3024}\ {{x}^{2}}}+{{604
80}\  x}+{362880}\right)}\ {\sqrt{x}}}\over{362880}(11)
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(y),5,5)::DMP(['x,'y],FRAC INT)
fricas
Compiling function poly2 with type (GeneralUnivariatePowerSeries(
      GeneralUnivariatePowerSeries(Fraction(Integer),x,0),y,0),
      PositiveInteger,PositiveInteger) -> Expression(Integer)

\label{eq12}\begin{array}{@{}l}
\displaystyle
{{1 \over{14631321600}}\ {{x}^{4}}\ {{y}^{9}}}+{{1 \over{2032
12800}}\ {{x}^{4}}\ {{y}^{7}}}+{{1 \over{4838400}}\ {{x}^{4}}\ {{y}^{5}}}+ 
\
\
\displaystyle
{{1 \over{241920}}\ {{x}^{4}}\ {{y}^{3}}}+{{1 \over{40320}}\ {{x}^{4}}\  y}+{{1 \over{261273600}}\ {{x}^{3}}\ {{y}^{9}}}+ 
\
\
\displaystyle
{{1 \over{3628800}}\ {{x}^{3}}\ {{y}^{7}}}+{{1 \over{86400}}\ {{x}^{3}}\ {{y}^{5}}}+{{1 \over{4320}}\ {{x}^{3}}\ {{y}^{3}}}+{{1 \over{720}}\ {{x}^{3}}\  y}+ 
\
\
\displaystyle
{{1 \over{8709120}}\ {{x}^{2}}\ {{y}^{9}}}+{{1 \over{120960}}\ {{x}^{2}}\ {{y}^{7}}}+{{1 \over{2880}}\ {{x}^{2}}\ {{y}^{5}}}+{{1 \over{144}}\ {{x}^{2}}\ {{y}^{3}}}+ 
\
\
\displaystyle
{{1 \over{24}}\ {{x}^{2}}\  y}+{{1 \over{725760}}\  x \ {{y}^{9}}}+{{1 \over{10080}}\  x \ {{y}^{7}}}+{{1 \over{240}}\  x \ {{y}^{5}}}+{{1 \over{12}}\  x \ {{y}^{3}}}+ 
\
\
\displaystyle
{{1 \over 2}\  x \  y}+{{1 \over{362880}}\ {{y}^{9}}}+{{1 \over{5
040}}\ {{y}^{7}}}+{{1 \over{120}}\ {{y}^{5}}}+{{1 \over 6}\ {{y}^{3}}}+ y 
(12)
Type: DistributedMultivariatePolynomial?([x,y],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

[terminal=pslatex,terminaloptions=color,scale=1.3]
set view 60, 30, 0.85, 1.1
set samples 20, 20
set isosamples 21, 21
set contour base
set cntrparam levels auto 20
set xlabel "k axis" 
set ylabel "l axis" 
load "SandBoxDoublePowerSeries1.dat"