|
|
last edited 10 years ago by test1 |
1 2 3 4 5 6 7 | ||
Editor: kratt6
Time: 2007/12/24 02:42:36 GMT-8 |
||
Note: |
added:
From kratt6 Mon Dec 24 02:42:36 -0800 2007
From: kratt6
Date: Mon, 24 Dec 2007 02:42:36 -0800
Subject:
Message-ID: <20071224024236-0800@axiom-wiki.newsynthesis.org>
fixed in FriCAS
integrate((x^2)*(%e^(-x^2)),x=0..%plusInfinity) does not give sqrt(%pi)/4.(new) --Bob McElrath, Wed, 22 Dec 2004 21:57:46 -0600 replyanonymous [mathaction@axiom-developer.org] wrote: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.
fricasintegrate(x^2*(exp(-x^2)),\begin{equation} \label{eq1}{\sqrt{\pi}}\over 4\end{equation}x=0..%plusInfinity) Type: Union(f1: OrderedCompletion?(Expression(Integer)),...) fricasGamma(3/2)/2::Float\begin{equation} \label{eq2}{0.5}\ {\Gamma \left({1.5}\right)}\end{equation}Type: Expression(Float)fricassqrt(%pi)/4::Float\begin{equation} \label{eq3}0.4431134627_2637900682\end{equation}Type: Expression(Float)What I don't understand is why the integration result is so hard to convert to a Float. Appending
Actually the text output is:::Float
to theintegrate()
command fails. Why? If I typeGamma(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
It is possible to convert this peculiar monogram to \Gamma for display but I think the problem is more fundamental. Clearly AXIOM does not have a consistent and complete representation of the Gamma function. I think integrate should at least return a Gamma that can be converted to Float or something of type Expression Integer like sqrt(%pi)/4. But it seems that the current Gamma function always agressively returns a DoubleFloat? value. This doesn't seem very useful to me for symbolic computations. Bill, What is the type that is returned there? How can I get axiom to print the entire type rather than\Gamma
....
?I think therein lies the problem. Note that
fricasintegrate(x^2*(exp(-x^2)),\begin{equation} \label{eq4}\left(/ \ {\left(^\ {\left(pi \right)}\ {\left(/ \ 1 \ 2 \right)}\right)}\ 4 \right)\end{equation}x=0..%plusInfinity)::InputForm Type: InputForm?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...
this is not a math bug, only the output is not as nice as it could be --kratt6, Wed, 19 Jan 2005 08:34:21 -0600 replyCategory: Axiom Mathematics => Axiom User Interface Severity: normal => minor I disagree. There is something fundamentally wrong here. The result offricasintegrate(x^2*(exp(-x^2)),\begin{equation} \label{eq5}{\sqrt{\pi}}\over 4\end{equation}x=0..%plusInfinity) Type: Union(f1: OrderedCompletion?(Expression(Integer)),...) 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.
this is not a mathbug, only the output is not as nice as it could be --Bill Page, Wed, 19 Jan 2005 09:20:12 -0600 replyCategory: 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: ! \begin{verbatim} ! dgamma l == prefix(hconcat("|"::Symbol::O, overbar(" "::Symbol::O)), l) ! \end{verbatim} ! which was TeXed to ! $$ ! {|{\overline {\ }}} ! \left( ! {x} ! \right). ! $$ ! ! 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
fixed in FriCAS?
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) \write18 enabled. %&-line parsing enabled. entering extended mode (./2223382317764768902-16.0px.tex LaTeX2e <2005/12/01> Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, arabic, farsi, croatian, ukrainian, russian, bulgarian, czech, slov ak, danish, dutch, finnish, basque, french, german, ngerman, ibycus, greek, mon ogreek, ancientgreek, hungarian, italian, latin, mongolian, norsk, icelandic, i nterlingua, turkish, coptic, romanian, welsh, serbian, slovenian, estonian, esp eranto, uppersorbian, indonesian, polish, portuguese, spanish, catalan, galicia n, swedish, ukenglish, pinyin, loaded. (/usr/share/texmf-texlive/tex/latex/base/article.cls Document Class: article 2005/09/16 v1.4f Standard LaTeX document class (/usr/share/texmf-texlive/tex/latex/base/size12.clo)) (/usr/share/texmf-texlive/tex/latex/ucs/ucs.sty (/usr/share/texmf-texlive/tex/latex/ucs/data/uni-global.def)) (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty (/usr/share/texmf-texlive/tex/latex/ucs/utf8x.def)) (/usr/share/texmf-texlive/tex/latex/bbm/bbm.sty) (/usr/share/texmf-texlive/tex/latex/jknapltx/mathrsfs.sty) (/usr/share/texmf-texlive/tex/latex/base/fontenc.sty (/usr/share/texmf-texlive/tex/latex/base/t1enc.def)) (/usr/share/texmf-texlive/tex/latex/pstricks/pstricks.sty (/usr/share/texmf-texlive/tex/generic/pstricks/pstricks.tex `PSTricks' v1.15 <2006/12/22> (tvz) (/usr/share/texmf-texlive/tex/generic/pstricks/pstricks.con)) (/usr/share/texmf/tex/latex/xcolor/xcolor.sty (/etc/texmf/tex/latex/config/color.cfg) (/usr/share/texmf-texlive/tex/latex/graphics/dvips.def) (/usr/share/texmf-texlive/tex/latex/graphics/dvipsnam.def))) (/usr/share/texmf-texlive/tex/latex/graphics/epsfig.sty (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty) (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty) (/etc/texmf/tex/latex/config/graphics.cfg)))) (/usr/share/texmf-texlive/tex/latex/pst-grad/pst-grad.sty (/usr/share/texmf-texlive/tex/generic/pst-grad/pst-grad.tex (/usr/share/texmf-texlive/tex/latex/xkeyval/pst-xkey.tex (/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty (/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.tex))) `pst-plot' v1.05, 2006/11/04 (tvz,dg,hv))) (/usr/share/texmf-texlive/tex/latex/pstricks/pst-plot.sty (/usr/share/texmf-texlive/tex/generic/pstricks/pst-plot.tex v97 patch 2, 1999/12/12 (/usr/share/texmf-texlive/tex/generic/multido/multido.tex v1.41, 2004/05/18 <tvz>))) (/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty (/usr/share/texmf-texlive/tex/xelatex/xetexconfig/geometry.cfg)Package geometry Warning: `lmargin' and `rmargin' result in NEGATIVE (-108.405p t). `width' should be shortened in length.
) (/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?
option. (/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty (/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty)) (/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty) (/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty)) (/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty) (/usr/share/texmf-texlive/tex/latex/amsfonts/amssymb.sty) (/usr/share/texmf-texlive/tex/latex/amscls/amsthm.sty) (/usr/share/texmf-texlive/tex/latex/setspace/setspace.sty Package: `setspace
6.7 <2000/12/01> ) (/usr/share/texmf-texlive/tex/generic/xypic/xy.sty (/usr/share/texmf-texlive/tex/generic/xypic/xy.tex Bootstrap'ing: catcodes, docmode, (/usr/share/texmf-texlive/tex/generic/xypic/xyrecat.tex) (/usr/share/texmf-texlive/tex/generic/xypic/xyidioms.tex)Xy-pic version 3.7 <1999/02/16> Copyright (c) 1991-1998 by Kristoffer H. Rose <krisrose@ens-lyon.fr> Xy-pic is free software: see the User's Guide for details.
Loading kernel: messages; fonts; allocations: state, direction, utility macros; pictures: \xy, positions, objects, decorations; kernel objects: directionals, circles, text; options; algorithms: directions, edges, connections; Xy-pic loaded)) (/usr/share/texmf-texlive/tex/generic/xypic/xyall.tex Xy-pic option: All features v.3.3 (/usr/share/texmf-texlive/tex/generic/xypic/xycurve.tex Xy-pic option: Curve and Spline extension v.3.7 curve, circles, loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xyframe.tex Xy-pic option: Frame and Bracket extension v.3.7 loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xycmtip.tex Xy-pic option: Computer Modern tip extension v.3.3 (/usr/share/texmf-texlive/tex/generic/xypic/xytips.tex Xy-pic option: More Tips extension v.3.3 loaded) loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xyline.tex Xy-pic option: Line styles extension v.3.6 loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xyrotate.tex Xy-pic option: Rotate and Scale extension v.3.3 loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xycolor.tex Xy-pic option: Colour extension v.3.3 loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xymatrix.tex Xy-pic option: Matrix feature v.3.4 loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xyarrow.tex Xy-pic option: Arrow and Path feature v.3.5 path, \ar, loaded) (/usr/share/texmf-texlive/tex/generic/xypic/xygraph.tex Xy-pic option: Graph feature v.3.7 loaded) loaded) (/usr/share/texmf-texlive/tex/latex/tools/verbatim.sty) (/usr/share/texmf/tex/latex/graphviz/graphviz.sty (/usr/share/texmf-texlive/tex/latex/psfrag/psfrag.sty)) (/usr/share/texmf/tex/latex/sagetex.sty Writing sage input file 2223382317764768902-16.0px.sage ) (/usr/share/texmf-texlive/tex/latex/gnuplottex/gnuplottex.sty (/usr/share/texmf-texlive/tex/latex/base/latexsym.sty) (/usr/share/texmf-texlive/tex/latex/moreverb/moreverb.sty) (/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)) (./2223382317764768902-16.0px.aux) (/usr/share/texmf-texlive/tex/latex/ucs/ucsencs.def) (/usr/share/texmf-texlive/tex/latex/jknapltx/ursfs.fd) (/usr/share/texmf-texlive/tex/latex/amsfonts/umsa.fd) (/usr/share/texmf-texlive/tex/latex/amsfonts/umsb.fd) (/usr/share/texmf-texlive/tex/latex/base/ulasy.fd)
Package amsmath Warning: Foreign command \over; (amsmath) \frac or \genfrac should be used instead (amsmath) on input line 122.
[1] [2] [3] Missing { inserted. <to be read again> \ l.128 \label{eq4}\left(/ \ {\left(^\ {\left(pi \right)}\ {\left(/ \ 1 \ 2 ...
Missing } inserted. <inserted text> } l.128 ...ight)}\ {\left(/ \ 1 \ 2 \right)}\right )}\ 4 \right)\end{equatio...
[4] [5] [6] [7] (/usr/share/texmf-texlive/tex/latex/base/t1cmtt.fd)
LaTeX Warning: Characters dropped after `\end{verbatim}' on input line 135.
[8] (./2223382317764768902-16.0px.aux) ) (see the transcript file for additional information) Output written on 2223382317764768902-16.0px.dvi (8 pages, 2432 bytes). Transcript written on 2223382317764768902-16.0px.log.