I have a better solution for the second Question.


tanx dx
take half common and multiply by 2
1/2

2

tanx dx
now write it as
(

tanx +

cotx)dx + (

tanx -

cotx)dx
i1 i2
break tan and cot into sin and cos
i1=

(sinx+cosx)/

sinxcosx
multiply numerator and denominator by 4
then the denominator becomes

2sinxcosx
write it as

(1-(sinx-cosx)
2 tak e sinx-cosx as Z then
i1 will reduce to standard form dZ/

1-Z
2
similarlly for i2 you will first break into sinx and cosx multiply by 4 in numerator and denominator and write the denominator as

(sinx+cosx)
2-1
consider sinx +cosx as V
it will reduce to standard form
dV/

V
2-1
now you can integrate i1 and i2.
in both cases i arrange the numerator as the derivative of the denominator.
Have a good day