tanx+secx=2cosx

(sinx/cosx)+ (1/cosx)=2cosx
(sinx+1)/cosx =2cosx
multiplying both sides by cosx
sinx + 1 =2cos^2x
sinx+1 = 2(1-sin^2x)
2sin^2x + sinx-1=0
(2sinx+1)(sinx-1)=0
x=30 x=270
but if i plug 270 back into the original equation i get undefined because tan 270 is undefined where did i go wrong?

The mistake occurred when you simplified the equation (sinx+1)/cosx = 2cosx to sinx + 1 = 2cos^2x.

In the step where you multiplied both sides of the equation by cosx, you forgot to distribute the cosx to the terms on the left side of the equation.

The correct step would be:
(sin x + 1) = 2cos^2 x * cos x

Now, let's go through the correct steps to find the solution:

1. Start with the equation: (sinx + 1)/cosx = 2cosx

2. Multiply both sides of the equation by cosx:
cosx * (sinx + 1)/cosx = 2cosx * cosx

This simplifies to:
sinx + 1 = 2cos^2x

3. Use the identity cos^2x + sin^2x = 1 to rewrite 2cos^2x:
sinx + 1 = 2(1 - sin^2x)

4. Distribute the 2:
sinx + 1 = 2 - 2sin^2x

5. Rearrange the terms to form a quadratic equation:
2sin^2x + sinx - 1 = 0

6. Factor the quadratic equation:
(2sinx + 1)(sinx - 1) = 0

Now, we have two possible solutions:
2sinx + 1 = 0 --> sinx = -1/2 --> x = 210 degrees or 330 degrees
sinx - 1 = 0 --> sinx = 1 --> x = 90 degrees

Upon closer inspection, we can see that x = 330 degrees is not a valid solution because tan(330 degrees) = tan(30 degrees), which is defined.

Therefore, the correct solution is x = 210 degrees or x = 90 degrees.