$Version
(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)
Clear["Global`*"]
eqn = 1/4 ==
1/((3 + a) (a + 1)) + a^2/((3 a + 1) (a + 1)) +
1/((3 + a) (a + 1)) 1/4 (-1 + Sqrt[-1 - 2 a (1 + a) g12^2]) +
a^2/((3 a + 1) (a + 1)) 1/4 (-1 + Sqrt[-1 - (2 (a + 1))/a^2 g12^2]);
Using Solve
for the exact solutions
(sol = Solve[eqn, a]) // Short[#, 3] &
For the Root
expressions to return a numeric value, g12
must have a numeric value.
For example, for g12 == 3
eqn /. sol /. g12 -> 3 // RootReduce
(* {False, False, True, True, False, False, False, False, False, False} *)
As indicated in the warning message, not all solutions are valid for all values of the parameter g12
Selecting the two valid solutions for g12 == 3
,
Pick @@ ({sol, eqn /. sol} /. g12 -> 3 // RootReduce) // N
(* {{a -> -0.486416 - 0.873728 I}, {a -> -0.486416 + 0.873728 I}} *)
EDIT: For purely imaginary g12
and real a
eqn2 = eqn /. g12 -> I*g // Simplify
(* ((a^2 (3 + Sqrt[-1 + (2 g^2)/a^2 + (2 g^2)/a]))/(1 + 3 a) + (
3 + Sqrt[-1 + 2 a g^2 + 2 a^2 g^2])/(3 + a))/(4 (1 + a)) == 1/4 *)
(sol2 = Solve[{eqn2, {a, g} ∈ Reals}, a]) // Short
DeleteDuplicates[sol2 /. ConditionalExpression[e_, cond_] :> cond]
Plot[Evaluate[a /. sol2], {g, -1.1, 1.1},
AxesLabel -> (Style[#, 14] & /@ {Im[Subscript[g, 12]], a})]