I have the function
f[x_,y_]:=1/(Sin[x]+Sin[y])
which obviously becomes infinite for $x=\pi n, \;y=\pi n$ where $n\,\epsilon \, \mathbf{N}$.
I want to give f
the value 0
for this case, i.e f[x,y]=0
I am trying
While[Mod[x, π] == 0 && Mod[y, π] == 0, f[x, y] == 0]
but it doesn't work.
I also tried
f[x_ /; Mod[x, π] == 0, y_ /; Mod[y, π]] := 0
didn't work either
How can I do it?
ComplexInfinity
. Do you want to similarly treat this case? $\endgroup$f[x_, y_] := If[Sin[x] + Sin[y] == 0, 0, 1/(Sin[x] + Sin[y])]
$\endgroup$