Slawomir Kolodynski
2018-07-22 12:39:49 UTC
I am learning FriCAS so please excuse my basic questions and point me to
better place to ask them is such exists.
FriCAS is able to evaluate some integrals in terms of the Gauss error
function (erf). For example
(1/(sqrt(2*%pi)))*integrate(exp(-t^2/2),t=%minusInfinity..x)
returns an expression involving erf. I would prefer such integrals to be
evaluated in terms of cumulative distribution function of the standard
normal distribution.
To achieve that I tried to define a rewriting rule
phirule: rule erf(%x)==2*N(x*sqrt(2))-1
hoping that applying that on the result of integration will express the
result in terms of N (the CDF of standard normal). However, I get
rule(erf(QUOTE(%x)),2*applyQuote(QUOTE(N),QUOTE(x)*sqrt(2))-1,[
QUOTE(N)]) is not a valid type.
when I try to define the rule.
What I am doing wrong when defining the rule?
Is defining such rule the best way to convert the result of integration so
that it is expressed in terms the CDF of standard normal rather than the
erf function?
Thanks,
Slawomir
better place to ask them is such exists.
FriCAS is able to evaluate some integrals in terms of the Gauss error
function (erf). For example
(1/(sqrt(2*%pi)))*integrate(exp(-t^2/2),t=%minusInfinity..x)
returns an expression involving erf. I would prefer such integrals to be
evaluated in terms of cumulative distribution function of the standard
normal distribution.
To achieve that I tried to define a rewriting rule
phirule: rule erf(%x)==2*N(x*sqrt(2))-1
hoping that applying that on the result of integration will express the
result in terms of N (the CDF of standard normal). However, I get
rule(erf(QUOTE(%x)),2*applyQuote(QUOTE(N),QUOTE(x)*sqrt(2))-1,[
QUOTE(N)]) is not a valid type.
when I try to define the rule.
What I am doing wrong when defining the rule?
Is defining such rule the best way to convert the result of integration so
that it is expressed in terms the CDF of standard normal rather than the
erf function?
Thanks,
Slawomir
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.