`(dy)/(dx) = 1/cos(2x)`
`y = int1/cos(2x)dx`
Using sec(2x);
`y=intsec(2x)dx`
`y = 1/2ln|sec(2x)+tan(2x)|+c`
Now let us see how we can do this without using sec(2x);
`y = int1/cos(2x)dx`
Let's write cos(2x) = cos^2(x)-sin^2(x)
Then,
`y = int1/(cos^2(x)-sin^2(x))dx`
Dividing both numerator and denominator by cos^2(x).
`y = int(1/(cos^2(x))/((cos^2(x)-sin^2(x))/cos^2(x)))dx`
`y = int(sec^2(x))/(1-tan^2(x))dx`
but we know, d(tan^2(x)) = sec^2(x)
Therefore,
`y = int1/(1-tan^2(x))d(tan(x))`
Using partial fractions,
`y =(1/2) int(1/(1-tan(x))+1/(1+tan(x)))d(tan(x))`
Integrating wrt tan(x) would give,
`y = (1/2)(-ln(1-tan(x))+ln(1+tan(x)))+ c`
`y = (1/2)ln((1+tan(x))/(1-tan(x)))+ c`
`y = (1/2)ln((cos(x)+sin(x))/(cos(x)-sin(x)))+ c`
Multiplying numerator and denominator inside ln by (cos(x)+sin(x))
`y = (1/2)ln((cos(x)+sin(x))^2/(cos^2(x)-sin^2(x)))+ c`
`y = (1/2)ln((1+sin(2x))/(cos(2x)))+ c`
`y = (1/2)ln(sec(2x)+tan(2x))+ c`
We get the same answer as above.