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

Edit detail for SandBoxDiracDelta revision 3 of 40

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Editor: Bill page
Time: 2014/08/10 03:48:59 GMT+0
Note:

added:
abs2sqrt:RewriteRule(Integer,Complex Integer,Expression(Complex Integer)):= rule abs(x)==sqrt(x^2)
conj:RewriteRule(Integer,Complex Integer,Expression(Complex Integer)):= rule %i==-%i
abs2sqrt(abs(a+%i*b))
abs2sqrt realDirac

changed:
-t1(x:Float):Float == real eval(realDirac,y=1.0)
-t1(10.0)
-gnuDraw(t1, -10..10,"SandBoxDiracDelta1.dat")
X:=[(x/100)::DFLOAT for x in 1..50 by 5]
Y:=[eval(realDirac,[x=x1,y=1.0])::DFLOAT for x1 in X]
gnuDraw(X,Y,"SandBoxDiracDelta1.dat")

Load new definition of derivative of abs(x)

fricas
)lib FSPECX
FunctionalSpecialFunction is now explicitly exposed in frame initial
FunctionalSpecialFunction will be automatically loaded when needed from /var/aw/var/LatexWiki/FSPECX.NRLIB/FSPECX

fricas
signum(x)==eval(differentiate(abs(%x),%x),%x=x)
Type: Void
fricas
signum(x)
fricas
Compiling function signum with type Variable(x) -> Expression(
      Integer)

\label{eq1}x \over{abs \left({x}\right)}(1)
Type: Expression(Integer)
fricas
diracDelta(x)==eval(differentiate(signum(%x),%x)/2,%x=x)
Type: Void
fricas
diracDelta(x)
fricas
Compiling function signum with type Variable( ) -> Expression(
      Integer)
fricas
Compiling function diracDelta with type Variable(x) -> Expression(
      Integer)

\label{eq2}{{{abs \left({x}\right)}^{2}}-{{x}^{2}}}\over{2 \ {{abs \left({x}\right)}^{3}}}(2)
Type: Expression(Integer)
fricas
realDirac:=(eval(diracDelta(z),z=x+%i*y)+eval(diracDelta(z),z=x-%i*y))/2
fricas
Compiling function diracDelta with type Variable(z) -> Expression(
      Integer)

\label{eq3}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({{abs \left({{i \  y}- x}\right)}^{2}}+{{y}^{2}}+{2 \  i \  x \  y}-{{x}^{2}}\right)}\ {{abs \left({{i \  y}+ x}\right)}^{3}}}+ 
\
\
\displaystyle
{{{abs \left({{i \  y}- x}\right)}^{3}}\ {{abs \left({{i \  y}+ x}\right)}^{2}}}+ 
\
\
\displaystyle
{{\left({{y}^{2}}-{2 \  i \  x \  y}-{{x}^{2}}\right)}\ {{abs \left({{i \  y}- x}\right)}^{3}}}
(3)
Type: Expression(Complex(Integer))
fricas
abs2sqrt:RewriteRule(Integer,Complex Integer,Expression(Complex Integer)):= rule abs(x)==sqrt(x^2)

\label{eq4}{abs \left({x}\right)}\mbox{\rm = =}{\sqrt{{x}^{2}}}(4)
Type: RewriteRule?(Integer,Complex(Integer),Expression(Complex(Integer)))
fricas
conj:RewriteRule(Integer,Complex Integer,Expression(Complex Integer)):= rule %i==-%i

\label{eq5}i \mbox{\rm = =}- i(5)
Type: RewriteRule?(Integer,Complex(Integer),Expression(Complex(Integer)))
fricas
abs2sqrt(abs(a+%i*b))

\label{eq6}\sqrt{-{{b}^{2}}+{2 \  i \  a \  b}+{{a}^{2}}}(6)
Type: Expression(Complex(Integer))
fricas
abs2sqrt realDirac

\label{eq7}0(7)
Type: Expression(Complex(Integer))
fricas
eval(realDirac,[x=0.1,y=1.0])::Float

\label{eq8}0.9851853368_4157340165(8)
Type: Float

Properties

fricas
signum(x^2)
fricas
Compiling function signum with type Polynomial(Integer) -> 
      Expression(Integer)

\label{eq9}{{x}^{2}}\over{abs \left({{x}^{2}}\right)}(9)
Type: Expression(Integer)
fricas
diracDelta(x)^2

\label{eq10}{{{abs \left({x}\right)}^{4}}-{2 \ {{x}^{2}}\ {{abs \left({x}\right)}^{2}}}+{{x}^{4}}}\over{4 \ {{abs \left({x}\right)}^{6}}}(10)
Type: Expression(Integer)
fricas
diracDelta(x^2)
fricas
Compiling function diracDelta with type Polynomial(Integer) -> 
      Expression(Integer)

\label{eq11}{{{abs \left({{x}^{2}}\right)}^{2}}-{{x}^{4}}}\over{2 \ {{abs \left({{x}^{2}}\right)}^{3}}}(11)
Type: Expression(Integer)
fricas
signum(x)*diracDelta(x)

\label{eq12}{{x \ {{abs \left({x}\right)}^{2}}}-{{x}^{3}}}\over{2 \ {{abs \left({x}\right)}^{4}}}(12)
Type: Expression(Integer)

fricas
integrate(abs(x),x)

\label{eq13}\int^{
\displaystyle
x}{{abs \left({\%A}\right)}\ {d \%A}}(13)
Type: Union(Expression(Integer),...)
fricas
-- expected x*abs(x)/2
integrate(signum(x),x)

\label{eq14}\int^{
\displaystyle
x}{{\%A \over{abs \left({\%A}\right)}}\ {d \%A}}(14)
Type: Union(Expression(Integer),...)
fricas
-- expected abs(x)
integrate(diracDelta(x),x)

\label{eq15}\int^{
\displaystyle
x}{{{{{abs \left({\%A}\right)}^{2}}-{{\%A}^{2}}}\over{2 \ {{abs \left({\%A}\right)}^{3}}}}\ {d \%A}}(15)
Type: Union(Expression(Integer),...)
fricas
-- expected signum(x)/2
--
integrate(diracDelta(x),x=minusInfinity..plusInfinity,"noPole")

\label{eq16}\mbox{\tt "failed"}(16)
Type: Union(fail: failed,...)
fricas
integrate(x*diracDelta(x),x=minusInfinity..plusInfinity,"noPole")

\label{eq17}\mbox{\tt "failed"}(17)
Type: Union(fail: failed,...)

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 X:=[(x/100)::DFLOAT for x in 1..50 by 5]

\label{eq18}\left[{0.01}, \:{0.06}, \:{0.11}, \:{0.16}, \:{0.21}, \:{0.26}, \:{0.31}, \:{0.36}, \:{0.41}, \:{0.46}\right](18)
Type: List(DoubleFloat?)
fricas
Y:=[eval(realDirac,[x=x1,y=1.0])::DFLOAT for x1 in X]

\label{eq19}\begin{array}{@{}l}
\displaystyle
\left[{0.999850018747813}, \:{0.9946241983517127}, \: \right.
\
\
\displaystyle
\left.{0.9821206955196448}, \:{0.9627931278439013}, \: \right.
\
\
\displaystyle
\left.{0.9373177823982093}, \:{0.9065403772838817}, \: \right.
\
\
\displaystyle
\left.{0.8714144021297814}, \:{0.8329385728299635}, \: \right.
\
\
\displaystyle
\left.{0.792099910288845}, \:{0.7498270490909332}\right] 
(19)
Type: List(DoubleFloat?)
fricas
gnuDraw(X,Y,"SandBoxDiracDelta1.dat")
There are 1 exposed and 0 unexposed library operations named gnuDraw having 3 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op gnuDraw to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named gnuDraw with argument type(s) List(DoubleFloat) List(DoubleFloat) String
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.


load "SandBoxDiracDelta1.dat"