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

Edit detail for SandBoxDoublePowerSeries revision 13 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 21:22:24 GMT+0
Note: GSERIES

added:
Q: Why doesn't this work?
\begin{axiom}
x:TaylorSeries FRAC INT
y:TaylorSeries FRAC INT
cosh(sqrt x)
\end{axiom}
sqrt(x) does not have a Taylor series even though cosh(sqrt(x)) does,
it can not be constructed this way.

Ans: Use GSERIES
\begin{axiom}
x:GeneralUnivariatePowerSeries(FRAC INT,'x,0)
cosh(sqrt x)
sinh(sqrt x)
truncate(%,4)
y:GeneralUnivariatePowerSeries(GeneralUnivariatePowerSeries(FRAC INT,'x,0),'y,0)
cosh(sqrt x)*sinh(y)
\end{axiom}


removed:
-
-From BillPage Mon Aug 25 01:03:16 +0000 2014
-From: Bill Page
-Date: Mon, 25 Aug 2014 01:03:16 +0000
-Subject: Why?
-Message-ID: <20140825010316+0000@axiom-wiki.newsynthesis.org>
-
-\begin{axiom}
-x:TaylorSeries FRAC INT
-y:TaylorSeries FRAC INT
-cosh(sqrt x)
-\end{axiom}
-
-From BillPage Fri Aug 29 21:06:52 +0000 2014
-From: Bill Page
-Date: Fri, 29 Aug 2014 21:06:52 +0000
-Subject: GSERIES
-Message-ID: <20140829210652+0000@axiom-wiki.newsynthesis.org>
-
-\begin{axiom}
-x:GeneralUnivariatePowerSeries(FRAC INT,'x,0)
-cosh(sqrt x)
-y:GeneralUnivariatePowerSeries(GeneralUnivariatePowerSeries(FRAC INT,'x,0),'y,0)
-cosh(sqrt x)*sinh(y)
-\end{axiom}

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

sqrt(x) does not have a Taylor series even though cosh(sqrt(x)) does, 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
sinh(sqrt x)

\label{eq11}\begin{array}{@{}l}
\displaystyle
{{x}^{1 \over 2}}+{{1 \over 6}\ {{x}^{3 \over 2}}}+{{1 \over{1
20}}\ {{x}^{5 \over 2}}}+{{1 \over{5040}}\ {{x}^{7 \over 2}}}+{{1 \over{362880}}\ {{x}^{9 \over 2}}}+ 
\
\
\displaystyle
{{1 \over{39916800}}\ {{x}^{{11}\over 2}}}+{O \left({{x}^{6}}\right)}
(11)
Type: GeneralUnivariatePowerSeries?(Fraction(Integer),x,0)
fricas
truncate(%,4)

\label{eq12}{{x}^{1 \over 2}}+{{1 \over 6}\ {{x}^{3 \over 2}}}+{{1 \over{1
20}}\ {{x}^{5 \over 2}}}+{{1 \over{5040}}\ {{x}^{7 \over 2}}}(12)
Type: GeneralUnivariatePowerSeries?(Fraction(Integer),x,0)
fricas
y:GeneralUnivariatePowerSeries(GeneralUnivariatePowerSeries(FRAC INT,'x,0),'y,0)
Type: Void
fricas
cosh(sqrt x)*sinh(y)

\label{eq13}\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
1 +{{1 \over 2}\  x}+{{1 \over{24}}\ {{x}^{2}}}+{{1 \over{720}}\ {{x}^{3}}}+{{1 \over{40320}}\ {{x}^{4}}}+ 
\
\
\displaystyle
{{1 \over{3628800}}\ {{x}^{5}}}+{O \left({{x}^{{11}\over 2}}\right)}
(13)
Type: GeneralUnivariatePowerSeries?(GeneralUnivariatePowerSeries?(Fraction(Integer),x,0),y,0)

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"