T.R | Title | User | Personal Name | Date | Lines |
---|
1590.1 | an easy one | GAUSS::ROTH | Geometry is the real life! | Wed Apr 01 1992 21:14 | 33 |
| I don't think it's difficult at all - it's a very well
behaved integrand with no singularities on the interval, so
that even simple-minded Romberg integration (extrapolation to the
limit via the asymptotic error term from trapezoidal integration)
will converge, as shown by the following sequence of approximations
in VAX H precision:
subdiv fncalls approx error estimate
------ ---- ----------------------------------- --------------
2 3 0.626126137655402601064255906824330 0.247226
3 5 0.873352304294445890170144033002492 1.832444E-0003
4 9 0.875184748795601088023570336288850 2.266590E-0004
5 17 0.874958089701637284335865903154165 8.968199E-0007
6 33 0.874957192881641013304750745339498 5.892269E-0009
7 65 0.874957198773910750800636856996653 6.474081E-0012
8 129 0.874957198780384832026717863989211 8.015067E-0016
9 257 0.874957198780384030520000990857232 2.814897E-0019
10 513 0.874957198780384030238511216019147 3.944041E-0024
11 1025 0.874957198780384030238507271977611 4.882136E-0029
12 2049 0.874957198780384030238507272026433 9.629649E-0035
Math'a text: 0.8749571987803839994388329808353131568824
MapleV: 0.8749571987803840302385072720264325057257
Mathematica is not to be trusted for any serious work in my opinion -
I've heard too many stories about bad answers coming out of it.
Which is scary, actually - to hear educators talk, students don't even
know how to do simple arithmetic. How are they going to sanity check
the stuff coming out of some algebra system???
- Jim
|
1590.2 | | GAUSS::ROTH | Geometry is the real life! | Wed Apr 01 1992 23:30 | 3 |
| By the way, is the base note in keeping with the first of April?
(like the posting about the world's smallest prime number recently)
|
1590.3 | tough problem | STAR::ABBASI | i^(-i) = SQRT(exp(PI)) | Wed Apr 01 1992 23:43 | 16 |
| i think that is a good question, but it applies to software in general.
May be we can use similar idea as in hardware fault tolerant architecture,
send the input through 3 modules, compare the output from the 3,
if one is different from the other two output, you know something is most
likely wrong with that one that produced a different output, replace that
module.
this is what Jim did in .1, checked the output from maple and from
a third independent program, found the maple and the VAX output to
be closest to each other, then there is a good chance that mma output is
the wrong one.
/nasser
|
1590.4 | you will always need math to do math | SGOUTL::BELDIN_R | Pull us together, not apart | Thu Apr 02 1992 09:06 | 24 |
| Re: <<< Note 1590.1 by GAUSS::ROTH "Geometry is the real life!" >>>
> Which is scary, actually - to hear educators talk, students don't even
> know how to do simple arithmetic. How are they going to sanity check
> the stuff coming out of some algebra system???
answer:
You must examine your assumption that somehow these things
will be tools to help non-initiates do mathematics. They are
not and will not be magic boxes that eliminate the need for
education. Worse (for the egalitarians), they put more
(intellectual) power in the hands of those who already have
it. The prognosis is for widening the breach between the
have's and have-not's in the intellectual sphere. Basically,
the need for students to know their math is greater, not
less, in the computer age.
Dick
ps.
Note that it is no longer the 1st of April. I'm very serious
about this.
|
1590.5 | simple answer | GAUSS::ROTH | Geometry is the real life! | Fri Apr 03 1992 02:36 | 51 |
| It just occurred to me that it was brain dead to try and numerically
integrate this problem when all you really have to do is freshman
calculus...
Change the variable x in the integrand to u = log(x)
sin(exp(x)) dx = sin(u)/u du
and it's the integral from 1 to e.
Expanding this in a series and integrating term by term we find
f(u) = u - u^3/(3*3!) + u^5/(5*5!) - ...
so the integral is f(e)-f(1) as the following program shows.
- Jim
PROGRAM APRIL_FOOLS
IMPLICIT REAL*16 (A-H,O-Z)
X = 1
CALL MTH$HEXP(E, X)
CALL SINX(X, S1)
CALL SINX(E, SE)
TYPE *, S1, SE, SE-S1
END
SUBROUTINE SINX(X, S)
IMPLICIT REAL*16 (A-H,O-Z)
S = 0
T = 1
X2 = -X*X
DO I = 1,100000,2
STMP = S
S = S+T/I
IF (STMP.EQ.S) GOTO 100
T = T*X2/((I+1)*(I+2))
ENDDO
100 CONTINUE
S = S*X
RETURN
END
|