Secant is reciprocal cosine.

Let's start with the equation #cos 3 a=cos 4 a#.

#3 a = pm 4 a + 2pi k quad # integer #k#

Minus sign subsumes plus:

#7 a = 2 pi k#

#a = {2 pi k}/7 #

So this equation has solutions #0, {2pi}/7, {4pi}/7, ...# There are four unique cosines in the bunch: #cos 0, cos({2pi}/7), cos ({4pi}/7), cos({6pi}/7).# That's pretty close to what we want to add up.

What we're aiming for is a polynomial whose roots are the secants we seek; then the sum of the roots is given by Viete.

Let's expand #cos 3a=cos 4a # using the triple and quadruple angle formulas. We let #x=cos a #.

#cos 3a = 4cos^3 a - 3 cos a = 4 x^3 - 3x#

#cos2a = 2 cos ^2 x -1 = 2x^2-1#

#cos 4a = 2 cos^2 (2a) - 1 = 2(2x^2-1)^2-1 = 8x^4-8x^2+1#

So our equation with those cosines as roots is

#4x^3 - 3x = 8x^4 - 8x^2 + 1 #

#0 = 8x^4 - 4x^3 - 8x^2 + 3x + 1 #

The fourth degree equation verifies that there are (at most) four unique cosines here.

We actually want the equation with the secants as roots.

Let #y=1/x=1/cos a = sec a#

#0 = 8/y^4 - 4/y^3 - 8/y^2 + 3/y + 1 #

Multiply both sides by #y^4,#

#0 = y^4 + 3y^3 - 8y^2 - 4y + 8#

If we imagine this factored #0=(y-r_1)(y-r_2)(y-r_3)(y-r_4)# we see the #y^3# coefficient is # (-r_1-r_2-r_3-r_4)=-(r_1+r_2+r_3+r_4)#. That's of course one of Viete's formulas.

Since the sum of the roots are the sum of the four secants mentioned, we have

#sec0 + sec({2pi}/7) + sec({4pi}/7) + sec ({6pi}/7) = -(3) #

# sec({2pi}/7) + sec({4pi}/7) + sec ({6pi}/7) = -3 - 1/cos 0 = -4 quad sqrt #