i'll solve the first one only and i'll leave the second integral to you or whoever likes trouble! first we need the following magical identity:

now finding is straightforward. to find substitute: then and thus

finally let and to get: note that now everything is nice and easy and you're good to go!

Remark: i think this is true that for any we have where is some rational function of .

actually i think where both and are monic polynomials with integer coefficients! for example, in your problem: i also think that we

always have these claims are either wrong or easy to prove! ... let's just leave it as a challenge for whoever has time and patience to try it.

by the way, the identity shows that my claims are not based on nothing!