# Finding a solution to an equation and plotting it

I have this equation that I want solve explicitly so that $$\omega$$ is dependent of $$k$$ like this $$\omega (k)$$ and then plot it on a plane for k, but I have no idea which function to use. This is the equation.

$$4\omega^4+2\omega^2-2e^{-ik}+2e^{ik}+7$$ = 0

w[k] /. Solve[
4 w[k]^4 + 2 w[k]^2 - 2 Exp[-I k] + 2 Exp[I k] + 7 == 0, w[k]]

Plot[ReIm[%], {k, 0, 20}]


• I was working on this as you solved it. Better than I would have done. You missed a 4 of the first term. Also looks pretty if you plot k between 0 and 20. – Hugh Jan 10 at 20:29

sol = w[k] /.
Solve[4 w[k]^4 + 2 w[k]^2 - 2 Exp[-I k] + 2 Exp[I k] + 7 == 0, w[k]] //
FullSimplify

(* {-(1/2) Sqrt[-1 - Sqrt[-27 - 16 I Sin[k]]],
1/2 Sqrt[-1 - Sqrt[-27 - 16 I Sin[k]]], -(1/2) Sqrt[-1 +
Sqrt[-27 - 16 I Sin[k]]], 1/2 Sqrt[-1 + Sqrt[-27 - 16 I Sin[k]]]} *)

Plot[Evaluate@ReIm[sol], {k, 0, 20},
PlotLegends -> (Outer[StringForm["1 2", #2, #1] &, Range[4], {Re, Im}] //
Flatten)]


Even with the colors it is difficult to see the separate solutions. Separating them out,

Grid[
Partition[
Plot[Evaluate@ReIm[sol[[#]]], {k, 0, 20},
PlotLegends -> {Re, Im}] & /@ Range[4], 2],
Frame -> All]