Find $\sec \theta + \tan \theta$. If $\tan \theta=x-\frac{1}{x}$, find $\sec \theta + \tan \theta$.
This was the question ask in my unit test.
My Efforts:
$\tan^2 \theta=(x-\frac{1}{x})^2$
$\tan^2 \theta= (\frac {x^2-1}{x})^2$
Now we can use identity $\sec^2 \theta= 1 + \tan^2 \theta$.
But i am not able to get the answer using this.
I don't know the correct answer but I had got $2x\ or\ -\frac{2}{x} $, which was given wrong.

Also please tell me if there is better way to do this.

As you have written $\sec^2 \theta = 1 + \tan^2 \theta$. From this you could get
$$ \sec \theta + \tan \theta = \pm \sqrt{1+\tan^2 \theta} + \tan \theta = \pm \sqrt{1 + \left( x - \frac{1}{x} \right)^2} + x - \frac{1}{x}.$$
