I want to define a function g[s]
such that g[s_]:=f[s]
in a (arbitrarily small open) neighborhood around s1
and g[s_]:=0
in a (arbitrarily small open) neighborhood around s2
.
How do I do that? It looks like Piecewise requires actual numbers to be inputted, but I don't have numerical values of s1
and s2
, so I don't think I can use that.
The goal would be to get it so that, for example,
Derivative[n][g][s1]==Derivative[n][f][s1]
Derivative[n][g][s2]==0
Edit: In the meantime I've been able to mimic a solution with
g0[s_] := f[s];
g[s1] = g0[s1];
g[s2] = 0;
Derivative[n_][g][s1] := Derivative[n][g0][s1]
Derivative[n_][g][s2] := 0