|
|
last edited 10 years ago by test1 |
1 2 3 4 5 6 7 | ||
Editor: kratt6
Time: 2007/12/23 10:51:33 GMT-8 |
||
Note: |
changed: -patch attached. Observation by Bill Page transferred to new report patch attached. Observation by Bill Page transferred to new report #408
integrate((x^2)*(%e^(-x^2)),x=0..%plusInfinity) does not give sqrt(%pi)/4.
integrate((x^2)*(%e^(-x^2)),x=0..%plusInfinity) does not give sqrt(%pi)/4.
The answer it gives is correct (unless there is a new bug introduced that is not on my axiom 0.20040831-1). The gamma function has sqrt(pi) for half-integer values.
axiomintegrate(x^2*(exp(-x^2)), x=0..%plusInfinity)
(1) |
axiomGamma(3/2)/2::Float
(2) |
axiomsqrt(%pi)/4::Float
(3) |
What I don't understand is why the integration result is so hard to
convert to a Float. Appending ::Float
to the integrate()
command
fails. Why? If I type Gamma(3/2)/2
by hand it has no problem.
_ 3 | (-) 2 (28) ----- 2 Type: Union(f1: OrderedCompletion Expression Integer,...)
which I assume is the Gamma function, but the tex is converted improperly:
{{|{\overline {\ }}} \left( {{3 \over 2}} \right)} \over 2 \leqno(29)
i.e. clearly does not contain \Gamma
.
...
?
I think therein lies the problem. Note that
axiomintegrate(x^2*(exp(-x^2)), x=0..%plusInfinity)::InputForm
(4) |
seems correct.
P.S. IssueTracker? + axiom rules. Having axiom right here is so powerful... I will have to pay more attention to IssueTracker?. I was half thinking to strip it when (if) I fork zwiki. Right now IssueTracker? is a big hack that can't be uninstalled...
axiomintegrate(x^2*(exp(-x^2)), x=0..%plusInfinity)
(5) |
Not only prints oddly without conversion to proper LaTeX? but also it is not actually recognized "mathematically" as Gamma().
Further, there is something wrong with the implementation of Gamma() itself because it only works numerically and is of no use symbolically. It seems like there are two separate Gamma functions. The one produced by the integration is "symbolic" but does not seem to be connected to any appropriate logic.
Category: Axiom Mathematics => Axiom User Interface Severity: normal => minor
:)
This shows where your priorities are Martin! But, thanks.
Some User Interface issue is involved here, but I don't think that it is quite correct to classify it this way. The issue is really what symbollic computations are possible in Axiom involving Gamma? I would say that this is more of a deficiency in the mathmatics.
Name:#6 wrong integration result
=> #6 integration result Gamma not TeXed correctly
Here is a simple patch:
diff -c /home/martin/fricas/src/algebra/op.spad.pamphlet\~ /home/martin/fricas/src/algebra/op.spad.pamphlet *** /home/martin/fricas/src/algebra/op.spad.pamphlet~ 2007-12-23 18:14:48.000000000 +0100 --- /home/martin/fricas/src/algebra/op.spad.pamphlet 2007-12-23 19:14:41.000000000 +0100 *************** *** 443,449 **** dpi l == "%pi"::Symbol::O dfact x == postfix("!"::Symbol::O, (ATOM(x)$Lisp => x; paren x)) dquote l == prefix(quote(first(l)::O), rest l) ! dgamma l == prefix(hconcat(super("|"::Symbol::O, "-"::Symbol::O)), l) setDummyVar(op, n) == setProperty(op, DUMMYVAR, n pretend None) dexp x == --- 443,468 ---- dpi l == "%pi"::Symbol::O dfact x == postfix("!"::Symbol::O, (ATOM(x)$Lisp => x; paren x)) dquote l == prefix(quote(first(l)::O), rest l) ! dgamma l == prefix(super("|"::Symbol::O, "-"::Symbol::O), l) ! @ ! ! It is certainly an abuse of [[OutputForm]] to produce a Gamma as done above. ! Originally, it was even worse: ! <img alt="LatexWiki Image" class="equation" src="images/6088886649565853660-18.0px.png" width="703" height="33"/> ! which was TeXed to ! <a name="unnumbered"><table width="95%"><tr><td align="center" width="95%"><img alt="LatexWiki Image" class="equation" src="images/8760961923361831896-18.0px.png" width="67" height="18"/></td><td width="5%" align="right"> </td></tr></table></a> ! ! The right thing would be to introduce Greek letters in [[OutputForm]], but that ! should be coordinated with the new mathml package. ! ! <<package COMMONOP CommonOperators>>= setDummyVar(op, n) == setProperty(op, DUMMYVAR, n pretend None) dexp x ==
Warning: Gamma looks slightly different in ASCII then. A better patch is discussed on the FriCAS? list, 23.12.2007
Martin
Status: open => fix proposedpatch attached. Observation by Bill Page transferred to new report #408