Skip to main content
added 197 characters in body
Source Link

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

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

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
added 519 characters in body
Source Link

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,

g[s1]==f[s1]
g'[s1]==f'[s1]
g[s2]==0Derivative[n][g][s1]==Derivative[n][f][s1]
g'[s2]==0Derivative[n][g][s2]==0

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

g[s1]==f[s1]
g'[s1]==f'[s1]
g[s2]==0
g'[s2]==0

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
added 100 characters in body
Source Link

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

g[s1]==f[s1]
g'[s1]==f'[s1]
g[s2]==0
g'[s2]==0

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.

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

g[s1]==f[s1]
g'[s1]==f'[s1]
g[s2]==0
g'[s2]==0
Source Link
Loading