Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

tracking precision through ndsolve, findfit, regress, etc

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61535] tracking precision through ndsolve, findfit, regress, etc
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Sat, 22 Oct 2005 00:35:19 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

For anyone who may have noticed me asking a bunch of arbitrary
precision related questions recently, yes - I did just finally figure
out how to use precision to track "significant digits" through
calculations. Sorry I'm slow...

Anyway, I have a few questions:

If a distance is measured with a ruler to be 7 and 3/16" inches + or -
0.5/16" inches, how should the precision of the distance number be
set?

FindRoot and Regress (by default if the inputs don't require high
precision) both seem to return numbers that are "machine precision
floats". This means they do not carry through the (possibly low)
precision (or significance arithmetic or whatever... too many names)
of their inputs to their outputs.

For example:
xample=0.025`1
FindRoot[x==xample,{x,.4}]

The following is also encouraging:
Interpolation does know how to create InterpolatingFunctions that will
track significance *if* the interpolated data as well as the argument
to the InterpolatingFunction both have significance numbers to track:
data[1]=Sort@Map[Random[Real,#]&,{{1,2},{3,4},{5,6},{7,8}},{2}]
data[2]=SetPrecision[data[1],5]
Interpolation[data[1]][Max[data[2][[All,1]]]/2]
Interpolation[data[2]][Max[data[2][[All,1]]]/2]

Unfortunately, NDSolve doesn't seem to be able to create significance
tracking InterpolatingFunctions:
eqns[2]=x'[t]==2`20 x[t]+4`6&&x[1]==1`15
x[2]/.DSolve[eqns[2],x,t][[1]]
x[2]/.NDSolve[eqns[2],x,{t,0,6}][[1]]

Anyway, all of this has me thinking. If Mathematica doesn't have an
automated solution to the Regress, FindRoot, and NDSolve significance
tracking problems - is it possible to track significance at all
through "routines" like these?

Is there a way to know what precision (number of significant digits)
of answer satisfies the original equations which I am trying to solve?

BTW, if someone is wondering, my full "equations" through which I am
trying to carry significance are as follows in the two commands below:

myeqns[1][cNapRatio_,acCap_]=
    Equal[Times[Power[Log[10],-1],Log[acCap[cNapRatio]]],
      Plus[Times[0.6107999999999999999`0.9956786262173576,cNapRatio],
        Times[-2.0360000000000000001`2.9999999999999996,
          Plus[Times[-0.0061540230743798795`0.9978339382434933,
              Power[acCap[cNapRatio],-2],
              Power[Power[acCap[cNapRatio],2],Rational[1,2]]],
            Times[Power[2,Rational[-1,2]],
              Power[Plus[Times[2,cNapRatio],
                  Times[0.0410268204958658633`3.3010299956639817,
                    Power[acCap[cNapRatio],-2],
                    Power[Power[acCap[cNapRatio],2],Rational[1,2]]]],
                Rational[1,2]],
              Power[Plus[1,
                  Times[Power[2,Rational[-1,2]],
                    Power[Plus[Times[2,cNapRatio],
                        Times[0.0410268204958658633`3.3010299956639817,
                          Power[acCap[cNapRatio],-2],
                          Power[Power[acCap[cNapRatio],2],Rational[1,2]]]],
                      Rational[1,2]]]],-1]]]]]]
mysolns[3]=
  NDSolve[Evaluate[
      And[D[myeqns[1][cNapRatio,acCap],cNapRatio],
        acCap[0]\[Equal](acCap[0]/.FindRoot[
                Evaluate[myeqns[1][0,acCap]],{acCap[0],0.6}])]],
    acCap,{cNapRatio,0,0.5}] (*homotopic continuation - thanks Carl
Woll! - (yes I did figure out what that means)*)

Thank you for your time,
--
Chris Chiasson
http://chrischiasson.com/contact/chris_chiasson


  • Prev by Date: Re: Re: (a/b)^2 when a/b is replaced by e won't yield e^2
  • Next by Date: Re: Warning from Piecewise
  • Previous by thread: Re: Save everything
  • Next by thread: aggregation of related elements in a list