Ref.
Derivative of abs
fricas
s1:=D(abs(x),x)
Type: Expression(Integer)
fricas
D(s1,x)
Type: Expression(Integer)
fricas
limit(abs(x)/x,x=0,"right")
Type: Union(OrderedCompletion
?(Expression(Integer)),
...)
fricas
limit(abs(x)/x,x=0,"left")
Type: Union(OrderedCompletion
?(Expression(Integer)),
...)
An approximation to signum
fricas
D(tanh(a*x),x)
Type: Expression(Integer)
fricas
limit(%,a=%plusInfinity)
Type: Union("failed",...)
Patterns for derivatives
fricas
Abs:=operator('Abs)
fricas
D(abs(x),x)
Type: Expression(Integer)
fricas
signum:=operator('signum)
fricas
diracDelta:=operator('diracDelta)
fricas
signum(x)
Type: Expression(Integer)
fricas
D(signum(x),[x,x])
Type: Expression(Integer)
fricas
diff1:=rule
signum(x) == Abs(x)/x
D(Abs(x),x) == signum(x) + 2*x*diracDelta(x)
D(signum(x),x) == 2*diracDelta(x)
Type: Ruleset(Integer,Integer,Expression(Integer))
fricas
diff(x,y)==diff1 D(x,y)
Type: Void
fricas
diff(Abs(x),x)
fricas
Compiling function diff with type (Expression(Integer),Variable(x))
-> Expression(Integer)
Type: Expression(Integer)
fricas
diff(Abs(x)/x,x)
Type: Expression(Integer)
Adding the singular part of the derivative
fricas
diff(f,x) == D(f,x)+(limit(f,x=0,"right")-limit(f,x=0,"left"))::EXPR(INT)*diracDelta(x)
Compiled code for diff has been cleared.
1 old definition(s) deleted for function or rule diff
Type: Void
fricas
diff(abs(x),x)
fricas
Compiling function diff with type (Expression(Integer),Variable(x))
-> Expression(Integer)
Type: Expression(Integer)
fricas
diff(%,x)
Type: Expression(Integer)
fricas
signum(x)==abs(x)/x
Type: Void
fricas
diff(signum(x),x)
fricas
Compiling function signum with type Variable(x) -> Expression(
Integer)
Type: Expression(Integer)
fricas
integrate(signum(x),x)
Type: Union(Expression(Integer),...)
Heaviside
fricas
H(x)==(abs(x)+x)/2/x
Type: Void
fricas
H(-0.3),H(0.3)
fricas
Compiling function H with type Float -> Float
Type: Tuple(Float)
fricas
diff(H(x),x)
fricas
Compiling function H with type Variable(x) -> Expression(Integer)
Type: Expression(Integer)
Solving sifferential equations, e.g.
fricas
-- differential Operator
L(f)==D(f,[x,x])
Type: Void
fricas
-- Green function
g(x)==abs(x)/2
Type: Void
fricas
-- pulse
c(x)==H(x+1/2)-H(x-1/2)
Type: Void
fricas
c(x)
fricas
Compiling function H with type Polynomial(Fraction(Integer)) ->
Expression(Integer)
fricas
Compiling function c with type Variable(x) -> Expression(Integer)
Type: Expression(Integer)
fricas
-- convolution
integrand:=c(x-y)*g(y)
fricas
Compiling function c with type Polynomial(Integer) -> Expression(
Integer)
fricas
Compiling function g with type Variable(y) -> Expression(Integer)
Type: Expression(Integer)
fricas
conv:=integrate(integrand,y=%minusInfinity..%plusInfinity)
Type: Union(pole: potentialPole,...)
fricas
conv:=integrate(integrand,y=%minusInfinity..%plusInfinity,"noPole")
Type: Union(fail: failed,...)
fricas
conv:=integrate(integrand,y)
Type: Union(Expression(Integer),...)
fricas
-- expected result
conv:=1/2*x^2*H(x+1/2)-1/2*x+1/2*x*H(x+1/2)+1/8*H(x+1/2)-1/2*x^2*H(x-1/2)+1/2*x*H(x-1/2)-1/8*H(x-1/2)
Type: Expression(Integer)
fricas
-- ramp
diff(conv,x)
Type: Expression(Integer)
fricas
test(L conv = c(x))
fricas
Compiling function L with type Expression(Integer) -> Expression(
Integer)
Type: Boolean