There is probably a direct way of doing this, but right now I don't know it.
But here is an indirect way.
The derivation of the integral of sec x can be done in 2 ways to get two different answers which are both correct. The integral of sec x = ln(sec x + tan x) = ln{tan[(x/2)+(π/4)]}, i.e
sec x + tan x = tan[(x/2)+(π/4)]
If you expand the right side using the addition formula for tan, you get
[1+tan(x/2)]/[1-tan(x/2)]
If you now use the half-angle formula for tan, i.e. tan(x/2)=sin x/(1+cos x) you will get to the fraction on the right side of the original problem.
I will work on this some more to see if I can get to a direct method. If I get it, I will come back and edit this answer. In the meantime, this answer is correct.
OK, it is much easier than what I wrote above; but it is difficult to write in this editor. You will have to work though this using your own pencil and paper to follow.
Divide the numerator and denominator on the left side of the identity in the problem by 1+cos x.
For writing purposes call z=sin x/(1+cos x).
Your left hand fraction will now look like (1+z)/(1-z).
But using the half-angle formula for tan you will see that z = tan(x/2)
Now use tan=sin/cos, i.e. substitute sin(x/2)/cos(x/2) for z and clear fractions to get
[cos(x/2)+sin(x/2)]/[cos(x/2)-sin(x/2)]
Then multiply numerator and denominator by cos(x/2)+sin(x/2).
That will square the numerator and give you the difference of 2 squares in the denominator
The numerator becomes cos2(x /2)+ 2sin (x/2) cos (x/2) + sin2(x/2) = 1+sinx.
The denominator becomes cos2(x/2)-sin2(x/2)=cos x
And that fraction become sec x + tan x
Voila!
If you can't follow it, please let me know and I will send it to yo some other way! :
There is an even easier way!
Multiply the fraction on the left by cos x/(1+sin x).
Expand the denominator and show that the multiplied fraction = 1
Then you have that the original left side = (1+sin x)/cos x = sec x + tan x
I'm sorry this took so many iterations.