Reputation
790
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 17
Impact
~10k people reached

May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Michael E2 - Sorry, now it was my reading too fast; I never really noted the meaning of DiscontinuityProcessing in your solution. Nevertheless, this whole post -- including the ?NumericQ reminder -- has been very helpful to me. Thanks.
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Miachael E2 - Hmm, you never did mention _?NumericQ and your answer did not solve my problem whose premise was to use ExplicitEuler with a fixed solution step size. Your solutions proposed a different method or choosing a smaller time step or employing the DiracDelta-function all of which vialote my premises. On this forum we might be that precise and if we are it is not about liking but about arguments and reason(ing). ;-)
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@chuy Thanks a lot - that indeed solves the issue and I really have to think hard about why it does.
May
19
revised Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Clarified the question; used more specific vocabulary.
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
I now also checked with different StepSizes ( 1/16, 1/8, 1/4 ) where of course the pulse width and the multiplier for g(t) are modified accordingly. The problem does persist without exception and the whole thing in my opinion smells like a bug in the implementation of Euler-Integration in Mathematica.
May
19
revised Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Spelling corrected
May
19
revised Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Changed numerical values to integer values so infinite precision inputs are used.
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
One needs to increase PlotPoints; I used Plot[{g[t], b[t]}, {t, 0, 10}, PlotRange -> All, PlotPoints -> 1000, PlotTheme -> "Detailed", ImageSize -> Large].
May
19
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Phab that is exactly the plan. Each pulse should integrate to one. For simple Euler integration there should also not be any discontinuities.
May
18
revised Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Clarified the question
May
18
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Thanks for showing the DiracDelta- function but I had mentioned and excluded that possibility in my post: Naturally in continuous time a sequence of DiracDelta-Functions would be the way to go but I have found them to be incompatible with EulerIntegration method so far.
May
18
revised Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Spelling corrected
May
18
revised Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Linked the Pulse Train documentation of Vensim, an SD-software package.
May
18
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Thank you for pointing that out; unfortunately that is only a 'copy error' -- in my notebook I had the correct definition and all results given are correct. I have updated the definition of b(t) now.
May
18
revised Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
Updated the definition of b(t) due to a copy error.
May
18
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Michael E2: I am sticking to EulerIntegration with fixed step sizes because I am employing the Bayesian Particle Filter to identify parameters in my models and -- so far ;-) -- the resampling method build upon a fixed step markov chain (no continuous particle filter yet). I would really "love" to forget all about StepSize and simply "build in continous time" like a "purist"...
May
18
comment Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
@Michael E2: So I had thought also but if you let NDSolve choose its own method (eg. comment out StartingStepSize and Method options) it will not give the correct result which I do find disappointing somehow.
May
18
asked Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method
May
18
awarded  Notable Question
Apr
8
comment String-manipulation bugs in v10.1
Works fine on my machine (Windows 7 - 64Bit).