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

Edit detail for SandBoxDiracDelta revision 14 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/11 22:01:08 GMT+0
Note:

changed:
-Load new definition of derivative of abs(x)
New definition of derivative of abs(x)

added:
abs2sqrt := rule abs(a+%i*b)==sqrt(a^2+b^2)

added:
Derivatives

changed:
-%signum:=differentiate(abs(%x),%x)
-signum(z)==eval(%signum,%x=z)
%signum:=differentiate(abs(%z),%z)
%diracDelta:=differentiate(%signum,%z)/2
\end{axiom}

Distributions
\begin{axiom}
realSignum:=abs2sqrt(eval(%signum,%z=a+%i*b)+eval(%signum,%z=a-%i*b))/2
signum(x)==eval(realSignum,a=x)

changed:
-%diracDelta:=differentiate(signum(%x),%x)
-diracDelta(z)==eval(%diracDelta/2,%x=z)
--
realDirac:=abs2sqrt(eval(%diracDelta,%z=a+%i*b)+eval(%diracDelta, %z=a-%i*b))/4
diracDelta(x)==eval(realDirac,a=x)

added:
Properties

changed:
-dirac2:=(diracDelta(x+%i*yy)+diracDelta(x-%i*yy))/2
-abs2sqrt:RewriteRule(Integer,Complex Integer,Expression(Complex Integer)):= rule abs(a+%i*b)==sqrt(a^2+b^2)
-realDirac:=abs2sqrt(dirac2)/2
-integrate(eval(realDirac,yy=1),x=%minusInfinity..%plusInfinity,"noPole")
-integrate(eval(realDirac,yy=1/1000),x=%minusInfinity..%plusInfinity,"noPole")
-limit(realDirac,yy=0)
-diracDelta(z)==eval(realDirac,x=z)
signum(x)^2
limit(%,b=0)
diracDelta(x)^2
limit(%,b=0)
-- b disappears?
integrate(diracDelta(x),x=%minusInfinity..%plusInfinity,"noPole")
limit(%,b=0)
-- generally

removed:
--- yy disappears?
--- limit(%,yy=0)

added:
signum(x)*diracDelta(x)
limit(%,b=0)
diracDelta(x^2)
limit(%,b=0)

changed:
-Properties
-\begin{axiom}
-signum(x^2)
-diracDelta(x)^2
-diracDelta(x^2)
-signum(x)*diracDelta(x)
-\end{axiom}
-
Problems?

added:
eval(abs2sqrt(abs(a+%i*b)/2+abs(a-%i*b)/2),a=x)
integrate(%,x)
limit(%,b=0)
integrate(%signum,%z)
-- expected abs(x)

changed:
--- expected abs(x)
limit(%,b=0)
integrate(%diracDelta,%z)
-- expected
signum(x)/2

changed:
--- expected signum(x)/2
---
-integrate(diracDelta(x),x=%minusInfinity..%plusInfinity,"noPole")
-integrate(x*diracDelta(x),x=%minusInfinity..%plusInfinity,"noPole")
limit(%,b=0)

changed:
-Y:=[eval(realDirac,[x=x1,y=1.0])::DFLOAT for x1 in X];
Y:=[eval(diracDelta(x),b=1.0)::DFLOAT for x in X];

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 abs2sqrt := rule abs(a+%i*b)==sqrt(a^2+b^2)

\label{eq1}{abs \left({{i \  b}+ a}\right)}\mbox{\rm = =}{\sqrt{{{b}^{2}}+{{a}^{2}}}}(1)
Type: RewriteRule?(Integer,Complex(Integer),Expression(Complex(Integer)))

Derivatives

fricas
%signum:=differentiate(abs(%z),%z)

\label{eq2}\%z \over{abs \left({\%z}\right)}(2)
Type: Expression(Integer)
fricas
%diracDelta:=differentiate(%signum,%z)/2

\label{eq3}{{{abs \left({\%z}\right)}^{2}}-{{\%z}^{2}}}\over{2 \ {{abs \left({\%z}\right)}^{3}}}(3)
Type: Expression(Integer)

Distributions

fricas
realSignum:=abs2sqrt(eval(%signum,%z=a+%i*b)+eval(%signum,%z=a-%i*b))/2

\label{eq4}{a \ {\sqrt{{{b}^{2}}+{{a}^{2}}}}}\over{{{b}^{2}}+{{a}^{2}}}(4)
Type: Expression(Complex(Integer))
fricas
signum(x)==eval(realSignum,a=x)
Type: Void
fricas
signum(x)
fricas
Compiling function signum with type Variable(x) -> Expression(
      Complex(Integer))

\label{eq5}{x \ {\sqrt{{{x}^{2}}+{{b}^{2}}}}}\over{{{x}^{2}}+{{b}^{2}}}(5)
Type: Expression(Complex(Integer))
fricas
--
realDirac:=abs2sqrt(eval(%diracDelta,%z=a+%i*b)+eval(%diracDelta, %z=a-%i*b))/4

\label{eq6}{{{b}^{2}}\ {\sqrt{{{b}^{2}}+{{a}^{2}}}}}\over{{2 \ {{b}^{4}}}+{4 \ {{a}^{2}}\ {{b}^{2}}}+{2 \ {{a}^{4}}}}(6)
Type: Expression(Complex(Integer))
fricas
diracDelta(x)==eval(realDirac,a=x)
Type: Void
fricas
diracDelta(x)
fricas
Compiling function diracDelta with type Variable(x) -> Expression(
      Complex(Integer))

\label{eq7}{{{b}^{2}}\ {\sqrt{{{x}^{2}}+{{b}^{2}}}}}\over{{2 \ {{x}^{4}}}+{4 \ {{b}^{2}}\ {{x}^{2}}}+{2 \ {{b}^{4}}}}(7)
Type: Expression(Complex(Integer))

Properties

fricas
signum(x)^2

\label{eq8}{{x}^{2}}\over{{{x}^{2}}+{{b}^{2}}}(8)
Type: Expression(Complex(Integer))
fricas
limit(%,b=0)

\label{eq9}1(9)
Type: Union(OrderedCompletion?(Expression(Complex(Integer))),...)
fricas
diracDelta(x)^2

\label{eq10}{{b}^{4}}\over{{4 \ {{x}^{6}}}+{{12}\ {{b}^{2}}\ {{x}^{4}}}+{{1
2}\ {{b}^{4}}\ {{x}^{2}}}+{4 \ {{b}^{6}}}}(10)
Type: Expression(Complex(Integer))
fricas
limit(%,b=0)

\label{eq11}0(11)
Type: Union(OrderedCompletion?(Expression(Complex(Integer))),...)
fricas
-- b disappears?
integrate(diracDelta(x),x=%minusInfinity..%plusInfinity,"noPole")

\label{eq12}1(12)
Type: Union(f1: OrderedCompletion?(Expression(Complex(Integer))),...)
fricas
limit(%,b=0)

\label{eq13}1(13)
Type: Union(OrderedCompletion?(Expression(Integer)),...)
fricas
-- generally
f(x)==x+c
Type: Void
fricas
f(x)*diracDelta(x)
fricas
Compiling function f with type Variable(x) -> Polynomial(Integer)

\label{eq14}{{\left({{{b}^{2}}\  x}+{{{b}^{2}}\  c}\right)}\ {\sqrt{{{x}^{2}}+{{b}^{2}}}}}\over{{2 \ {{x}^{4}}}+{4 \ {{b}^{2}}\ {{x}^{2}}}+{2 \ {{b}^{4}}}}(14)
Type: Expression(Complex(Integer))
fricas
integrate(%,x=%minusInfinity..%plusInfinity,"noPole")

\label{eq15}c(15)
Type: Union(f1: OrderedCompletion?(Expression(Complex(Integer))),...)
fricas
signum(x)*diracDelta(x)

\label{eq16}{{{b}^{2}}\  x}\over{{2 \ {{x}^{4}}}+{4 \ {{b}^{2}}\ {{x}^{2}}}+{2 \ {{b}^{4}}}}(16)
Type: Expression(Complex(Integer))
fricas
limit(%,b=0)

\label{eq17}0(17)
Type: Union(OrderedCompletion?(Expression(Complex(Integer))),...)
fricas
diracDelta(x^2)
fricas
Compiling function diracDelta with type Polynomial(Integer) -> 
      Expression(Complex(Integer))

\label{eq18}{{{b}^{2}}\ {\sqrt{{{x}^{4}}+{{b}^{2}}}}}\over{{2 \ {{x}^{8}}}+{4 \ {{b}^{2}}\ {{x}^{4}}}+{2 \ {{b}^{4}}}}(18)
Type: Expression(Complex(Integer))
fricas
limit(%,b=0)

\label{eq19}0(19)
Type: Union(OrderedCompletion?(Expression(Complex(Integer))),...)

Problems?

fricas
integrate(abs(x),x)

\label{eq20}\int^{
\displaystyle
x}{{abs \left({\%C}\right)}\ {d \%C}}(20)
Type: Union(Expression(Integer),...)
fricas
-- expected x*abs(x)/2
eval(abs2sqrt(abs(a+%i*b)/2+abs(a-%i*b)/2),a=x)

\label{eq21}\sqrt{{{x}^{2}}+{{b}^{2}}}(21)
Type: Expression(Complex(Integer))
fricas
integrate(%,x)

\label{eq22}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{2 \ {{b}^{2}}\  x \ {\sqrt{{{x}^{2}}+{{b}^{2}}}}}+ 
\
\
\displaystyle
{2 \ {{b}^{2}}\ {{x}^{2}}}+{{b}^{4}}
(22)
Type: Union(Expression(Complex(Integer)),...)
fricas
limit(%,b=0)

\label{eq23}-{{{x}^{2}}\over 2}(23)
Type: Union(OrderedCompletion?(Expression(Complex(Integer))),...)
fricas
integrate(%signum,%z)

\label{eq24}\int^{
\displaystyle
\%z}{{\%C \over{abs \left({\%C}\right)}}\ {d \%C}}(24)
Type: Union(Expression(Integer),...)
fricas
-- expected abs(x)
integrate(signum(x),x)

\label{eq25}{-{x \ {\sqrt{{{x}^{2}}+{{b}^{2}}}}}+{{x}^{2}}+{{b}^{2}}}\over{{\sqrt{{{x}^{2}}+{{b}^{2}}}}- x}(25)
Type: Union(Expression(Complex(Integer)),...)
fricas
limit(%,b=0)

\label{eq26}- x(26)
Type: Union(OrderedCompletion?(Expression(Complex(Integer))),...)
fricas
integrate(%diracDelta,%z)

\label{eq27}\int^{
\displaystyle
\%z}{{{{{abs \left({\%C}\right)}^{2}}-{{\%C}^{2}}}\over{2 \ {{abs \left({\%C}\right)}^{3}}}}\ {d \%C}}(27)
Type: Union(Expression(Integer),...)
fricas
-- expected
signum(x)/2

\label{eq28}{x \ {\sqrt{{{x}^{2}}+{{b}^{2}}}}}\over{{2 \ {{x}^{2}}}+{2 \ {{b}^{2}}}}(28)
Type: Expression(Complex(Integer))
fricas
integrate(diracDelta(x),x)

\label{eq29}-{{{b}^{2}}\over{{2 \  x \ {\sqrt{{{x}^{2}}+{{b}^{2}}}}}-{2 \ {{x}^{2}}}-{2 \ {{b}^{2}}}}}(29)
Type: Union(Expression(Complex(Integer)),...)
fricas
limit(%,b=0)

\label{eq30}0(30)
Type: Union(OrderedCompletion?(Expression(Complex(Integer))),...)

Representing diracDelta as a series of bump functions

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/10)::DFLOAT for x in -100..100 by 2];
Type: List(DoubleFloat?)
fricas
Y:=[eval(diracDelta(x),b=1.0)::DFLOAT for x in X];
fricas
Compiling function diracDelta with type DoubleFloat -> Expression(
      Complex(DoubleFloat))
Type: List(DoubleFloat?)
fricas
gnuDraw(X,Y,"SandBoxDiracDelta1.dat")
Graph data being transmitted to the viewport manager... FriCAS2D data being transmitted to the viewport manager...
Type: Void


load "SandBoxDiracDelta1.dat"