jump discontinuities less difficult than nonsmooth points?

51 views
Skip to first unread message

Tim Mitchell

unread,
Aug 27, 2020, 9:52:48 AM8/27/20
to chebfun-users
Hi all,

If I have a continuous function that is nonsmooth at k points and a discontinuous function with k jump discontinuities, all else being equal and using 'splitting','on' for both, I often see that it is noticeably cheaper for Chebfun to approximate the discontinuous function in terms of total number of function evaluations.  I've attached a simple demo based on abs(sin(x)) to demonstrate this; just run nonsmoothVsJumps(k), say, with k=10.  

Is this behavior expected, that handling jumps are somehow easier for Chebfun than nonsmooth points?  If it is indeed true, I imagine the reason might be that detecting jump discontinuities is easier than detecting discontinuities in the first derivative, and so good split points for jumps can be found with less effort, which would lower the overall cost.  Nevertheless, I was initially a bit surprised by this, so I'm curious if anyone can elaborate on what is really going on.

Thanks in advance,
Tim
nonsmoothVsJumps.m

Nick Trefethen

unread,
Aug 28, 2020, 2:53:43 AM8/28/20
to chebfun-users
The algorithm used is described in pp 905-906 of https://people.maths.ox.ac.uk/trefethen/publication/PDF/2010_134.pdf, and it looks for discontinuities first.

Tim Mitchell

unread,
Aug 28, 2020, 6:03:44 AM8/28/20
to chebfun-users
I see and looking for discontinuities first of course makes sense.  And just playing around, I see that a) if I make the discontinuities smaller and smaller, then the costs become similar, which also makes sense, and b) that these cost differences are indeed due to detectEdge.  Thanks!
Reply all
Reply to author
Forward
0 new messages