For Problem 1, Mathematica gives

This doesn't strike me as too far off from what you got. One thing that does give me pause is that the argument for my tanh function and the argument for your tan function are the same. You might double-check your algebra. If you like, I could review it if you posted it. Your transformation to the domain is correct. I would double-check your integral. I'd probably do it with partial fractions.

For Problem 2, again, your substitution is correct. I would assume a partial fraction decomposition of

Because the second denominator does not factor over the reals, you might need both the B and the C. Try it, and see if a solution exists. If it does, then that method of partial fractions works.