Distributions
We represent distributions as the real part of a complex function
in the limit where the imaginary part goes to 0.
Ref.
Use new definition of derivative of abs(x) from SandBoxFunctionalSpecialFunction?
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
abs(x)==sqrt(x*conjugate(x))
Type: Void
fricas
diff(ex,z) == eval(D(eval(ex,z=%conjugate),%conjugate),%conjugate=z)
Type: Void
Derivatives
fricas
%signum:=diff(abs(%z),%z)+diff(abs(%z),conjugate %z)
fricas
Compiling function abs with type Variable(%z) -> Expression(Integer)
fricas
Compiling function diff with type (Expression(Integer),Variable(%z))
-> Expression(Integer)
fricas
Compiling function diff with type (Expression(Integer),Expression(
Integer)) -> Expression(Integer)
Type: Expression(Integer)
fricas
%diracDelta:=diff(%signum,%z)+diff(%signum,conjugate %z)
Type: Expression(Integer)
Consider the real part of a complex function of
for real
and with
.
fricas
realSignum:=eval((eval(%signum,%z=a+%i*b)+eval(%signum,%z=a-%i*b))/2,[conjugate(a)=a,conjugate(b)=b])
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))
Type: Expression(Complex(Integer))
fricas
--
realDirac:=eval((eval(%diracDelta,%z=a+%i*b) + eval(%diracDelta, %z=a-%i*b))/2,[conjugate(a)=a,conjugate(b)=b])/2
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))
Type: Expression(Complex(Integer))
Properties
fricas
limit( signum(1) ,b=0)
fricas
Compiling function signum with type PositiveInteger -> Expression(
Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( signum(-1) ,b=0)
fricas
Compiling function signum with type Integer -> Expression(Complex(
Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( signum(0) ,b=0)
fricas
Compiling function signum with type NonNegativeInteger -> Expression
(Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( signum(x)^2 ,b=0)
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( diracDelta(1) ,b=0)
fricas
Compiling function diracDelta with type PositiveInteger ->
Expression(Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( diracDelta(-1) ,b=0)
fricas
Compiling function diracDelta with type Integer -> Expression(
Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( diracDelta(0) ,b=0)
fricas
Compiling function diracDelta with type NonNegativeInteger ->
Expression(Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
test( diracDelta(x)=diracDelta(-x) )
fricas
Compiling function diracDelta with type Polynomial(Integer) ->
Expression(Complex(Integer))
Type: Boolean
fricas
limit( diracDelta(x)^2 ,b=0)
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
integrate(diracDelta(x),x=%minusInfinity..%plusInfinity,"noPole")
Type: Union(f1: OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
f(x)==x+c
Type: Void
fricas
integrate(f(x)*diracDelta(x),x=%minusInfinity..%plusInfinity,"noPole")
fricas
Compiling function f with type Variable(x) -> Polynomial(Integer)
Type: Union(f1: OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
integrate(f(x)*diracDelta(x-t),x=%minusInfinity..%plusInfinity,"noPole")
Type: Union(f1: OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
integrate(diracDelta(2*x),x=%minusInfinity..%plusInfinity,"noPole")
Type: Union(f1: OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
--
limit( signum(x)*diracDelta(x) ,b=0)
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
diracDelta(x^2)
Type: Expression(Complex(Integer))
fricas
limit(%,b=0)
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
Heaviside
fricas
realHeaviside:=integrate(diracDelta(a),a)::Expression Complex Integer
fricas
Compiling function diracDelta with type Variable(a) -> Expression(
Complex(Integer))
Type: Expression(Complex(Integer))
fricas
heavisideStep(x)==eval(realHeaviside,a=x)
Type: Void
fricas
limit( heavisideStep(1), b=0)
fricas
Compiling function heavisideStep with type PositiveInteger ->
Expression(Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( heavisideStep(-1) ,b=0)
fricas
Compiling function heavisideStep with type Integer -> Expression(
Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( heavisideStep(0) ,b=0)
fricas
Compiling function heavisideStep with type NonNegativeInteger ->
Expression(Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( heavisideStep(x), x=0)
fricas
Compiling function heavisideStep with type Variable(x) -> Expression
(Complex(Integer))
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( heavisideStep(x) ,x=%plusInfinity)
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
limit( heavisideStep(x) ,x=%minusInfinity)
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
test(simplify( (1+signum(x))/2 - heavisideStep(x) ) = 0)
Type: Boolean
fricas
test(limit( integrate(heavisideStep(t),t=%minusInfinity..x, "noPole") - x*heavisideStep(x), b=0) =0)
fricas
Compiling function heavisideStep with type Variable(t) -> Expression
(Complex(Integer))
Type: Boolean
Problems?
fricas
-- expected 1/abs(alpha)
integrate(diracDelta(alpha*x),x=%minusInfinity..%plusInfinity,"noPole")
Type: Union(f1: OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
-- expected x*abs(x)/2
integrate(abs(x),x)
fricas
Compiling function abs with type Variable(x) -> Expression(Integer)
Type: Union(Expression(Integer),...)
fricas
eval(abs2sqrt(abs(a+%i*b)/2+abs(a-%i*b)/2),a=x)
fricas
Compiling function abs with type Polynomial(Complex(Integer)) ->
Expression(Complex(Integer))
There are no library operations named abs2sqrt
Use HyperDoc Browse or issue
)what op abs2sqrt
to learn if there is any operation containing " abs2sqrt " in its
name.
Cannot find a definition or applicable library operation named
abs2sqrt with argument type(s)
Expression(Complex(Integer))
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
integrate(%,x)
Type: Union(Expression(Integer),...)
fricas
limit(%,b=0)
Type: Union(OrderedCompletion
?(Expression(Integer)),
...)
fricas
-- expected abs(x)
integrate(%signum,%z)
Type: Union(Expression(Integer),...)
fricas
integrate(signum(x),x)
Type: Union(Expression(Complex(Integer)),...)
fricas
limit(%,b=0)
Type: Union(OrderedCompletion
?(Expression(Complex(Integer))),
...)
fricas
-- expected signum(x)/2
integrate(%diracDelta,%z)
Type: Union(Expression(Integer),...)
fricas
integrate(diracDelta(x^2+y^2), x=%minusInfinity..%plusInfinity, "noPole")
Type: Union(fail: failed,...)
Convolution
fricas
g(x)==eval((abs(a+%i*b)/2+abs(a-%i*b)/2),a=x)/2
Type: Void
fricas
g(y)
fricas
Compiling function g with type Variable(y) -> Expression(Complex(
Integer))
Type: Expression(Complex(Integer))
fricas
h(x)==heavisideStep(x+1/2)-heavisideStep(x-1/2)
Type: Void
fricas
h(x)
fricas
Compiling function heavisideStep with type Polynomial(Fraction(
Integer)) -> Expression(Complex(Integer))
fricas
Compiling function h with type Variable(x) -> Expression(Complex(
Integer))
Type: Expression(Complex(Integer))
fricas
conv:=integrate(h(x-y)*g(y),y=%minusInfinity..%plusInfinity,"noPole")
fricas
Compiling function h with type Polynomial(Integer) -> Expression(
Complex(Integer))
Type: Union(fail: failed,...)
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 1];
fricas
Y:=[eval(diracDelta(x),b=1.0)::DFLOAT for x in X];
fricas
Compiling function diracDelta with type DoubleFloat -> Expression(
Complex(DoubleFloat))
fricas
gnuDraw(X,Y,"SandBoxDiracDelta.dat")
Graph data being transmitted to the viewport manager...
FriCAS2D data being transmitted to the viewport manager...
Type: Void