|
|
last edited 2 years ago by TheDoctor |
1 2 3 4 5 6 7 8 | ||
Editor: test1
Time: 2013/05/23 17:59:49 GMT+0 |
||
Note: |
changed: -integrate(x/sqrt(2*%pi)*exp(-1/2*log(x)**2),x=0..%plusInfinity) integrate(x/sqrt(2*%pi)*exp(-1/2*log(x)^2),x=0..%plusInfinity) changed: -integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)**2),x=0..%plusInfinity, noPole) integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)^2),x=0..%plusInfinity, "noPole") changed: -integrate(1/sqrt(2*%pi)*exp(-1/2*x**2),x=%minusInfinity..%plusInfinity) integrate(1/sqrt(2*%pi)*exp(-1/2*x^2),x=%minusInfinity..%plusInfinity) changed: -We are using the following version of Axiom: We are using the following version of FriCAS: changed: -It is obvious that $\int_{-1}^2 f(t) dt= 1$, while Axiom claims otherwise: It is obvious that $\int_{-1}^2 f(t) dt= 1$, while FriCAS signals error. changed: -What's worse, it doesn't say that it cannot calsulate it, but it simply gives an incorrect result! Haven't I first tested it with such a simple example I wouldn't even know, the results are wrong. Any clue how to serve Axiom such function, so that it integrates them correctly? Is this a bug in Axiom or I'm doing something wrong? TIA Currently conditional expressions are not supported. Axiom used to evaluate such examples using its internal order on expressions, which gave unexpected results. From users point of view the results were wrong.
Here are some integration problems submitted by "Anonymous". In
at least one example, Axiom generated a segmentation fault
. We
will see if we can reproduce the problem here in a more controlled
environment.
Test1
Start here:
integrate(x/sqrt(2*%pi)*exp(-1/2*log(x)^2),x=0..%plusInfinity)
(1) |
Test2
Might not work:
integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)^2),x=0..%plusInfinity, "noPole")
(2) |
Test3
A simpler integration:
integrate(1/sqrt(2*%pi)*exp(-1/2*x^2),x=%minusInfinity..%plusInfinity)
(3) |
We are using the following version of FriCAS?:
)version
Value = "FriCAS 1.2.6 compiled at Tue Jun 30 17:27:35 UTC 2015"
integrate(x^n*exp(-x^2/2),x=0..%plusInfinity, "noPole")
(4) |
What if the positive Integer is declare as a positiveInteger or even chosen, say, as 2:
n:PositiveInteger
integrate(x^n*exp(-x^2/2),I think the idea that one should be able to "declare the type" of a variable in Axiom by the commandx=0..%plusInfinity)
n is declared as being in PositiveInteger but has not been given a value.
n:PositiveInteger
is a frequent expectation of new users of Axiom - especially if one have used other computer algebra systems, after all Axiom is supposed to be a "strongly typed" system, right? Certainly I was surprized (and disappointed) by Axiom's limitations in this reguard.
Unfortunately Axiom does not attempt to use this type information when forming expressions - but worse - declaring the type actually interferes with the use of the variable to form expressions!
When you write
n:PositiveInteger
what this tells Axiom is that n
will be assigned an integer
value greater than 0 - only that. After it is actually assigned
some value, then it can be used exactly like that value, but
not before.
To me, this is a tremedous waste of an opportunity in Axiom to to deal with "domain of computation" issues such as are addressed in other untyped computer algebra systems by the use of "assumptions" such as:
assume(x,PositiveInteger);
Such knowledge can be used to considerably improve the quality and generality of the computations.
f(x | (x >=0) and (x <=1) ) == 1
f(x | (x<0) or (x > 1)) == 0
It is obvious that , while FriCAS? signals error.
integrate(f(t),t=-1..2)
There are 1 exposed and 1 unexposed library operations named >= having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse,or issue )display op >= 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 >= with argument type(s) Variable(t) NonNegativeInteger
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need. FriCAS will attempt to step through and interpret the code. There are 1 exposed and 1 unexposed library operations named >= having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op >= 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 >= with argument type(s) Variable(t) NonNegativeInteger
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
Currently conditional expressions are not supported. Axiom used to evaluate such examples using its internal order on expressions, which gave unexpected results. From users point of view the results were wrong.