Integration by parts tanx help

1. The problem statement, all variables and given/known data
[tex]\int\frac{x}{x^{2}+4x+4}dx[/tex]

2. Relevant equations
None

3. The attempt at a solution
I tried this one twice. I honestly have no idea how to do it, and I used integration by parts. The first time, I reduced it down to:
[tex]\int\frac{1}{x} + \frac{1}{4} + \frac{x}{4}dx[/tex]
But, this is wrong.

I tried it a second time by using integration by parts to obtain:
[tex]\int\frac{x}{(x+2)(x+2)}dx[/tex], then I reduced that down, since integration by parts does not work. So, I was hoping to know what I am susposed to do.

The second one is a bit different:1. The problem statement, all variables and given/known data
[tex]/int[/tex] [tex](tan^{2}(x))dx[/tex]

2. Relevant equations
[tex]tan^{2}(x) + 1 = sec^{2}[/tex]

3. The attempt at a solution
I used the regular formula that I listed to get:
[tex]\int(sec^{2}(x) - 1)dx[/tex].
I just integrated to: [tex] tan^{2} - x + c [/tex]
I wanted to see if this one is correct.

You've not solved it yet. You'll still need to do a substitution to integrate the partial fractions. Now you must do it twice. Also since its a linear substitution you can do it in your head once you're practiced.

You've not solved it yet. You'll still need to do a substitution to integrate the partial fractions. Now you must do it twice. Also since its a linear substitution you can do it in your head once you're practiced.

OK I take back the "twice", as it is the same substitution and you can write the two summed integrals as a single one.

In effect it is the same two steps in different orders as when I say "you can then separate into powers of u and integrate" this is a trivial case of expansion into partial fractions. Ultimately the preference is one of which you can do more easily the first substitution or the first expansion by partial fractions.