$\displaystyle \int\frac{tan\frac{x}{2}}{1+tan^{2}\frac{x}{2}}$
$\displaystyle =2\int\frac{tan\frac{x}{2}}{1+tan^{2}\frac{x}{2}}$
what should I do next?
Ah, well if you're using u-substitution it's especially important to specify the unit of integration at the end of your expression. The above confusion is evidence of what can go wrong when this isn't specified.
And off the top of my head, I think changing it to sec^2 would be a good idea, it might allow you to express the whole fraction as some form of sin^2 on cos^2 or vice versa.
Yes. From there you can simplify your integral:
$\displaystyle \int\frac{tan(\frac{x}{2})}{sec^2(\frac{x}{2})}dx\ Rightarrow$
$\displaystyle \int\frac{sin(\frac{x}{2})cos^{2}(\frac{x}{2})}{co s(\frac{x}{2})}dx\Rightarrow$
$\displaystyle \int\sin(\frac{x}{2})cos(\frac{x}{2})dx$
From here, you can use u-du substitution. Do you see which one you should take?
From your earlier work I'm assuming you did:
$\displaystyle u=tan(\frac{x}{2})$
$\displaystyle du=\frac{1}{2}sec^{2}(\frac{x}{2})dx$
$\displaystyle 2du=sec^{2}(\frac{x}{2})dx$
Which is cool, except you don't have a $\displaystyle sec^{2}(\frac{x}{2})$ in your integral, you have a $\displaystyle \frac{1}{sec^{2}(\frac{x}{2})}$