Integrate the following:

sin^3 x/cosx

Have attempted numerous ways but can't get anything sensible to come out of it.

2 answers

sin^3 x/cosx dx
| = integral sign

|sin^2 x tan x dx
|(1 - cos^2 x)tan x dx
|tan x - cos^2 x tan x dx
|tan x - cos^2 x (sin x/cos x) dx
|tan x - sin x cos x dx
|tan x dx - |sin x cos x dx
ln (sec x) - |sin x cos x dx

u = cos x
du = sin x dx
ln (sec x) - |u du
ln |sec x| - 1/2 u^2

substitute back in u = cos x
ln |sec x| - 1/2 cos^2 x + C

what do you think?

An online integration calculator has the answer as,
1/2 cos^2 x - log (cos x ) + C

I can see why/how they have
1/2 cos^2 x as positive, but don't understand why they have -log (cos x)
when |tan x dx = log |sec x|

I think their answer is just another form of the answer I have.

Do you have an answer from your book?
I forgot the very first line, where I rewrote the integral

sin^3 x/cosx dx=|(sin^2 x sin x)/cos x dx
sin^3 x/cos x dx = |sin^2 x tan x dx

see above