How to transform the result of this integral into powers of $\sin\,x$?

If you expand your expression in terms of elementary trig functions

Integrate[Cos[x]^5, x] // TrigExpand

(5 Sin[x])/8 + 5/16 Cos[x]^2 Sin[x] + 1/16 Cos[x]^4 Sin[x] - (
 5 Sin[x]^3)/48 - 1/8 Cos[x]^2 Sin[x]^3 + Sin[x]^5/80

you will see only even powers of Cos - so it's straightforward to replace it like this:

(Integrate[Cos[x]^5, x] // TrigExpand) /. 
   Cos[x] -> Sqrt[1 - Sin[x]^2] // Simplify // TraditionalForm

enter image description here


I'll answer with a more general module I've done for converting trig expressions. An overkill here, but anyway:

trigSet[exp_, inTerm_] := 
 Module[{trigSyms, rels, set, setRep, setRep1, toLow, oneInTermsOf, allInTermsOf, fq, 
          ruleAll, convert},

  trigSyms = {Sin, Cos, Tan, Cot, Sec, Csc};
  rels     = {csc sin == 1, cos^2 + sin^2 == 1, 1 == cos sec, tan == sin/cos, cot tan == 1};
  set      = ToExpression /@ ToLowerCase /@ SymbolName /@ trigSyms;
  setRep   = Thread[set -> (ToExpression /@ (StringJoin[#, "[x_]"] & /@ ToString /@ set))];
  setRep1  = Thread[set -> (ToExpression /@ (StringJoin[#, "[x]"] & /@ ToString /@ set))];
  toLow    = Thread[trigSyms -> set];

  oneInTermsOf[one_, of_] :=  Solve[rels, {one}, Complement[set, {one, of}]];
  allInTermsOf[of_] :=  Flatten[oneInTermsOf[#, of] & /@ Complement[set, {of}]];
  fq[x_, y_] := FreeQ[x, Alternatives @@ Complement[set, {y}]];
  ruleAll[of_] := Rule @@@ Transpose[{#[[1]] /. setRep, #[[2]] /. setRep1} &@
                                                     Transpose@(List @@@ allInTermsOf[of])];
  convert[expr_, inTerms_] := FullSimplify@ Union@Select[
      Flatten@NestWhile[# /. (List /@ ruleAll[inTerms]) &, {TrigExpand[expr] /. 
           toLow }, ! Or @@ (fq[#, inTerms] & /@ Flatten@#) &], fq[#, inTerms] &];
  HoldForm[ Evaluate@convert[exp, inTerm]] /. (Reverse /@ toLow)
  ]

  trigSet[(5 Sin[x])/8 + 5/48 Sin[3 x] + 1/80 Sin[5 x], sin]
  (*
  -> {Sin[x]-(2 Sin[x]^3)/3+Sin[x]^5/5}
  *)

Test it with more difficult expressions:

trigSet[Cos[3 x] - Tan[2 x] + Cot[3 x]^2, sin]

Edit

Depending on your expression, because of the signs in the radicals, you could need more than one "converted" one to cover the whole domain. For example:

s = Cos[x] Sin[x];
s0 = trigSet[s, sin]
s1 = FullSimplify[Reduce[# == s, x, Reals] & /@ ReleaseHold[s0] /. _Equal -> False]
(*
{-Sin[x] Sqrt[1-Sin[x]^2],Sin[x] Sqrt[1-Sin[x]^2]}

{C[1] \[Element] Integers && 
      ((Pi + x > 2 Pi  C[1] && Pi + 2 x <= 4 Pi C[1]) || Pi/2 <= x - 2 Pi C[1] < Pi),
 C[1] \[Element] Integers &&
       -(Pi/2) <= x - 2 \[Pi] C[1] <= Pi/2}

*)

Still working in automating this last process, but you can plot it like:

f[x_] := Piecewise[{{-Sin[x] Sqrt[1 - Sin[x]^2], 
                      Resolve[Exists[C[1], Element[C[1], Integers], 
                              ((Pi + x > 2 Pi  C[1] && Pi + 2 x <= 4 Pi C[1]) || 
                                Pi/2 <= x - 2 Pi C[1] < Pi)]]}, 
                    {Sin[x] Sqrt[1 - Sin[x]^2], 
                       Resolve[Exists[C[1], Element[C[1], Integers],
                             -(Pi/2) <= x - 2 \[Pi] C[1] <= Pi/2]]}}];
Plot[{f[x], Sin[x] Cos[x]}, {x, 0, 2 Pi}, PlotStyle -> {{Thick, Dashed, Red}, Blue, Green}]

Mathematica graphics


It's somewhat convenient to use Chebyshev polynomials for such purposes. Here, I use the Chebyshev polynomial of the second kind, due to the convenient identity

$$U_n(\cos\,x)=\frac{\sin((n+1)x)}{\sin\,x}$$

Here goes:

Integrate[Cos[x]^5, x] /.
       Sin[n_Integer x] :> Sin[x] ChebyshevU[n - 1, Sqrt[1 - Sin[x]^2]] // Expand
   Sin[x] - (2 Sin[x]^3)/3 + Sin[x]^5/5

For completeness, the relation $T_n(\cos\,x)=\cos\,nx$ can be similarly exploited. I use that in this answer.