Solve for $x$; $\tan x+\sec x=2\cos x;-\infty\lt x\lt\infty$ 
Solve for $x$; $\tan x+\sec x=2\cos x;-\infty\lt x\lt\infty$
  $$\tan x+\sec x=2\cos x$$

$$\left(\dfrac{\sin x}{\cos x}\right)+\left(\dfrac{1}{\cos x}\right)=2\cos x$$
$$\left(\dfrac{\sin x+1}{\cos x}\right)=2\cos x$$
$$\sin x+1=2\cos^2x$$
$$2\cos^2x-\sin x+1=0$$
Edit:
$$2\cos^2x=\sin x+1$$
$$2(1-\sin^2x)=\sin x+1$$
$$2\sin^2x+\sin x-1=0$$
$\sin x=a$
$$2a^2+a-1=0$$
$$(a+1)(2a-1)=0$$
$$a=-1,\dfrac{1}{2}$$
$$\arcsin(-1)=-90^\circ=-\dfrac{\pi}{2}$$
$$\arcsin\left(\dfrac{1}{2}\right)=30^\circ=\dfrac{\pi}{6}$$
$$180^\circ-30^\circ=150^\circ=\dfrac{5 \pi}{6}$$
$$x=\dfrac{\pi}{6},-\dfrac{\pi}{2},\dfrac{5 \pi}{6}$$
I actually do not know if those are the only answers considering my range is infinite:$-\infty\lt x\lt\infty$ 
 A: Hint 1: For all $x$, $\sin^2x+\cos^2x=1$
Hint 2: For $at^2+bt+c=0$ the solutions are $t_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$
A: You correctly applied the definitions of $\tan$ and $\sec$ to go from the equation in the problem statement to
$$\left(\dfrac{\sin x}{\cos x}\right)+\left(\dfrac{1}{\cos x}\right)=2\cos x.$$
However, you combined the two fractions incorrectly; in general
$$\frac{a}{c}+\frac{b}{c}=\frac{a+b}{c}$$
For example, you know that 
$$\frac{1}{4}+\frac{1}{4}=\frac{2}{4}=\frac{1}{2}$$
and that $$\frac{1}{4}+\frac{1}{4}\neq\frac{1}{4}.$$

The correct form of the equation should be
$$2\cos^2x-\sin x-1=0.$$
You will want to use the fact that for any $x$,
$$\sin^2(x)+\cos^2(x)=1.$$

 Thus, any occurrence of $\cos^2(x)$ can be replaced with $(1-\sin^2(x))$. $$2(1-\sin^2(x))-\sin(x)-1=0$$ $$[2\cdot1-2\cdot\sin^2(x)]-\sin(x)-1=0$$ $$-2\cdot\sin^2(x)+(-1)\sin(x)-1+2=0$$ $$(-2)\sin^2(x)+(-1)\sin(x)+(1)=0$$

Then, you will need to use the quadratic formula to solve for $\sin(x)$. It may help to write $y=\sin(x)$ temporarily, to prevent confusion. Keep in mind that there may be two different possible values of $\sin(x)$ that result. 

 $$(-2)\sin^2(x)+(-1)\sin(x)+(1)=0$$ $$(-2)y^2+(-1)y+(1)=0$$ $$y=\frac{-(-1)\pm\sqrt{(-1)^2-4(-2)(1)}}{2(-2)}=\frac{1\pm\sqrt{1+8}}{-4}=\frac{1\pm 3}{-4}=\begin{cases}\frac{1+3}{-4}=\frac{4}{-4}=\fbox{$-1$} &\text{ or }\\\\ & \\ \frac{1-3}{-4}=\frac{-2}{-4}=\fbox{$\frac{1}{2}$}.\end{cases}$$

Lastly, you need to find those values of $x$ that produce that value (or those values) of $\sin(x)$. Keep in mind that the function $\sin(x)$ is periodic; here is part of its graph to illustrate:

(and it continues similarly out to infinity in each direction) so that there are always infinitely many values of $x$ that will produce a given value of $\sin(x)$. 
For any real number $x$, the values of
$$\sin(x+2\pi k)$$
are all identical for any integer $k$,. There are usually even more values you can plug into $\sin$ that will give the same number (look at the graph for an idea).
A: Of course, $x$ cannot be an integer multiple of $\pi$ plus $\frac{\pi}{2}$. We have here a quadratic equation after a little manipulation, which you, yourself, started.
$$\frac{\sin x}{\cos x}+\frac{1}{\cos x}=2\cos x$$
After multiplying by $\cos x$, using the identity $1=\sin^2 x+\cos^2 x$, and bringing everything to the left hand side:
$$2\sin^2 x+\sin x-1=0$$
If we replace $y=\sin x$, then you will be able find a familiar expression for $y$:
$$2y^2+y-1 = 0$$
Which gives, $y = \frac{1}{2}$ or $-1$. So, $\sin x$ is equal to either of those two values, which yields $x= 2n\pi+\frac{\pi}{6}$, $x=2n\pi+\frac{5\pi}{6}$ or $x=2n\pi+\frac{\pi}{2}$. However, we ruled out the latter solution initially.
A: \begin{eqnarray}
  \left(\dfrac{\sin x}{\cos x}\right)+\left(\dfrac{1}{\cos x}\right)&=&2\cos x\\
  \sin x + 1 &=& 2 \cos^2 x \\
  \sin x + 1 &=& 2(1-\sin^2 x)\\
\end{eqnarray}
Then $\sin x = -1$ or $\sin x = 1/2$ and the solutions are $-\pi + 2k \pi, \pi/6 + 2 k\pi$  and $5\pi/6 + 2k \pi$.
A: This is more a comment than an answer, but it is an important comment, since it affects the list of solutions. We seem to have solutions that come from $\sin x=\frac{1}{2}$, and solutions that come from $\sin x=-1$.
No problem with the $\sin x=\frac{1}{2}$ stuff. For the record, this gives the solutions $x=\frac{\pi}{6}+2k\pi$ and $x=\frac{5\pi}{6}+2k\pi$, where $k$ ranges over the integers, positive, negative, and $0$.
However, there is an issue with $\sin x=-1$. For then $\cos x=0$, and neither $\tan x$ nor $\sec x$ is defined. When we multiply through by $\cos x$, we must remember that if $\cos x=0$ we are multiplying both sides by $0$, so we are not getting an equivalent equation. Thus the "solutions" $-\frac{\pi}{2}+2k\pi$ must be discarded.
Remark: If we look at the function $\frac{\sin x+1}{\cos x}$, it turns out that it has a removable singularity at $x=-\frac{\pi}{2}$, and can be made continuous there by defining it to be $0$. In that sense, $x=-\frac{\pi}{2}$ is a solution. However, I doubt it would be accepted as a solution in the context the OP is in.
