Integrate the following:

sin^3 x/cosx

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

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

To integrate the function sin^3(x)/cos(x), you can use a trigonometric substitution. Let's go through the steps:

Step 1: Rewrite the function using trigonometric identities.
sin^3(x)/cos(x) can be written as sin^2(x) * sin(x)/cos(x). Now, using the identity sin^2(x) = 1 - cos^2(x), we have:
(1 - cos^2(x)) * sin(x)/cos(x).

Step 2: Simplify the expression.
Distribute the sin(x) and divide through by cos(x):
sin(x) - cos^2(x) * sin(x)/cos(x).

Step 3: Apply the trigonometric substitution.
Let's substitute u = cos(x). Then, du = -sin(x) dx.
We can rewrite the expression as:
(-1/2) * u^2 du.

Step 4: Integrate the new expression.
Now, we have a simpler integral to solve: (-1/2) * ∫u^2 du.
Integrating u^2, we get u^3/3:
(-1/2) * (u^3/3) + C, where C is the constant of integration.

Step 5: Substitute back u = cos(x).
Substituting back cos(x) for u, we have:
(-1/2) * (cos^3(x)/3) + C.

Therefore, the integral of sin^3(x)/cos(x) is (-1/2) * (cos^3(x)/3) + C.