So I'm working with functions with compact support, like:
k(r)=s-r, for 0<= r<= s, 0 elsewhere.
Note that $k$ has a point of non-differentiability.
I'm trying to make a function k_\epsilon that's as close to $k$ as possible, is smooth, has the same or just a tiny bit of more support (i.e. closure of the set where k_\epsilon doesn't vanish) so one can use convolution with a mollifier to smoothen it without changing it much; see e.g. Theorem 9 and 11 here.
But I was planning to code this and convolution may not be the best when it comes to coding, so I was looking for a shortcut to find another but similar such smooth function, let's call it k_\epsilon again, so that support(k_\epsilon)=support(k) + epsilon = [0, s+epsilon] and that |k_\epsilon-k|\to 0, \text{as} \epsilon\to 0. Is there an algorithm for the same? A code in either Python on R would be great too. Thank you!