I am trying to find the (numerical) subset of $(k,l,m)\in[-\pi,\pi)\times[-\pi,\pi)\times[-\pi,\pi)$
where the next expression is valid
$$
\tan \Bigl(
\frac{k+l+m}{2}
\Bigr)
=
\frac{ \sin k+ \sin l+\sin m }{ \cos k+ \cos l+\cos m }.
$$
When I fix $k$ I am able, using ContourPlot
, to
obtain a set of curves revealing where the previous
expression is satisfied. However, I'd like to get not a
curve but the values of $l$ and $m$.
Note that using NSolve
returns "This system cannot be solved
with the methods available to Solve.". NMinimize
only gives
a point on the curve.
findM[k_,l_] := FindRoot[Tan[(k + l + m)/2] - (Sin[k] + Sin[l] + Sin[m])/( Cos[k] + Cos[l] + Cos[m]) == 0, {m, 0, -π, π}][[1, 2]]
? $\endgroup$ContourPlot3D[Tan[(k+l+m)/2]-(Sin[k]+Sin[l]+Sin[m])/(Cos[k]+Cos[l]+Cos[m])==0, {k,-π,π}, {l,-π,π}, {m,-π,π}]
gives a good overview of the solution branches. $\endgroup$tan
function. It is better to useContourPlot3D[Tan[(k + l + m)/2] (Cos[k] + Cos[l] + Cos[m]) - (Sin[k] + Sin[l] + Sin[m]) == 0, {k, -π, π]}, {l, -π],π}, {m, -π, π]}, RegionFunction -> Function[{k, l, m}, Cos[k + l + m] > -0.98]]
$\endgroup$Solve
for that. In contrastContourPlot3D
nicely reveals this surface. A more meaningful and challenging question would be to find a 2d parametrization of this surface. $\endgroup$