Skip to main content
added 335 characters in body
Source Link
george2079
  • 39.1k
  • 1
  • 44
  • 111

I know you said "without plot", but why reinvent the wheel?

  adaptivepoints=Last@Last@adaptivepoints=Sort@Last@Last@
        Reap[Plot[f = Sin[x], {x, 0, 100}, 
             EvaluationMonitor :> Sow[{f, x}]]];

You can similarly use NIntegrate, which might be more robust in terms of warning you if the adaptive scheme is not converging.

   g[x_?NumericQ] := Sin[x];     
   Sort@Last@Last@Reap@
        NIntegrate[f = g[x], {x, 0, 1000}, 
            EvaluationMonitor :> Sow[{x, f}]];

note for NIntegrate you should force numeric evaluation, otherwise it might employ some quadrature scheme that minimizes the number of eval points.

I know you said "without plot", but why reinvent the wheel?

  adaptivepoints=Last@Last@
        Reap[Plot[f = Sin[x], {x, 0, 100}, 
             EvaluationMonitor :> Sow[{f, x}]]];

You can similarly use NIntegrate, which might be more robust in terms of warning you if the adaptive scheme is not converging.

I know you said "without plot", but why reinvent the wheel?

  adaptivepoints=Sort@Last@Last@
        Reap[Plot[f = Sin[x], {x, 0, 100}, 
             EvaluationMonitor :> Sow[{f, x}]]];

You can similarly use NIntegrate, which might be more robust in terms of warning you if the adaptive scheme is not converging.

   g[x_?NumericQ] := Sin[x];     
   Sort@Last@Last@Reap@
        NIntegrate[f = g[x], {x, 0, 1000}, 
            EvaluationMonitor :> Sow[{x, f}]];

note for NIntegrate you should force numeric evaluation, otherwise it might employ some quadrature scheme that minimizes the number of eval points.

added 98 characters in body
Source Link
george2079
  • 39.1k
  • 1
  • 44
  • 111

I know you said "without plot", but why reinvent the wheel?

  adaptivepoints=Last@Last@
        Reap[Plot[f = Sin[x], {x, 0, 100}, 
             EvaluationMonitor :> Sow[{f, x}]]];

You can similarly use NIntegrate, which might be more robust in terms of warning you if the adaptive scheme is not converging.

I know you said "without plot", but why reinvent the wheel?

  adaptivepoints=Last@Last@
        Reap[Plot[f = Sin[x], {x, 0, 100}, 
             EvaluationMonitor :> Sow[{f, x}]]];

You can similarly use NIntegrate

I know you said "without plot", but why reinvent the wheel?

  adaptivepoints=Last@Last@
        Reap[Plot[f = Sin[x], {x, 0, 100}, 
             EvaluationMonitor :> Sow[{f, x}]]];

You can similarly use NIntegrate, which might be more robust in terms of warning you if the adaptive scheme is not converging.

Source Link
george2079
  • 39.1k
  • 1
  • 44
  • 111

I know you said "without plot", but why reinvent the wheel?

  adaptivepoints=Last@Last@
        Reap[Plot[f = Sin[x], {x, 0, 100}, 
             EvaluationMonitor :> Sow[{f, x}]]];

You can similarly use NIntegrate