∫(1+cos(x))⁶dx which is the same as 64∫cos¹²(x/2)dx, because cos(x)=2cos²(x/2)-1, making (1+cos(x))⁶=(2cos²(x/2))⁶=64cos¹²(x/2). Although this looks a simpler integral, I couldn’t find an easy way to solve it.
(1+cos(x))⁶=1+6cos(x)+15cos²(x)+20cos³(x)+15cos⁴(x)+6cos⁵(x)+cos⁶(x)
Use s=sin(x) and c=cos(x), s²+c²=1, s'=c, c'=-s where ' means d/dx the derivative with respect to x. This is just shorthand to save space.
Also, since cos(2x)=2cos²(x)-1, we can write c²=cos²(x)=½(1+cos(2x)).
Use c₂ to represent cos(2x), then c²=½(1+c₂). Similarly s₂=sin(2x).
So (1+c)⁶=1+6c+15c²+20c³+15c⁴+6c⁵+c⁶
=1+6c(1+c⁴)+15c²(1+c²)+20c(1-s²)+c⁶
=1+6s'(1+(1-s²)²)+15(½(1+c₂))(1+½(1+c₂))+20s'(1-s²)+⅛(1+c₂)³
=1+6s'(1+(1-s²)²)+(15/4)(1+c₂)(3+c₂)+20s'(1-s²)+⅛(1+3c₂+3c₂²+c₂³).
Using c₄ to represent cos(4x)=2cos²(2x)-1, c₂²=½(1+c₄). And s₄ represents sin(4x).
So far we have:
(1+c)⁶=1+6s'(1+(1-s²)²)+(15/4)(3+4c₂+c₂²)+20s'(1-s²)+⅛(1+3c₂+3c₂²+c₂³)
=1+6s'(2-2s²+s⁴)+45/4+15c₂+15c₂²/4+20s'-20s²s'+1/8+3c₂/8+3c₂²/8+c₂³/8
=(1+45/4+1/8)+(12+20)s'-(12+20)s²s'+6s⁴s'+(15+3/8)c₂+(15/4+3/8)c₂²+c₂³/8
=99/8+32s'-32s²s'+6s⁴s'+123c₂/8+33c₂²/8+c₂³/8.
The first 5 terms can be directly integrated:
99x/8+32s-32s³/3+6s⁵/5+123s₂/16, but we need to express the last two terms into integrable form. 33c₂²/8 can be reduced to (33/16)(1+c₄)=33/16+33c₄/16.
This can be integrated: 33x/16+(33/64)s₄.
The final term c₂³/8=(1-s₂²)c₂/8=c₂/8-s₂²c₂/8. d(s₂)/dx=2c₂ so d(s₂³/3)/dx=2s₂²c₂. The integral of s₂²c₂/8 is s₂³/48. 33x/16 can be added to 99x/8=231x/16. The final term integrated is s₂/16-s₂³/48. s₂/16 can be added to 123s₂/16 to make 31s₂/4.
So the final result is:
231x/16+32s-32s³/3+6s⁵/5+31s₂/4-s₂³/48+(33/64)s₄.
We can replace the shorthand:
231x/16+32sin(x)-(32/3)sin³(x)+(6/5)sin⁵(x)+(31/4)sin(2x)-(1/48)sin³(2x)+(33/64)sin(4x)+C where C is the constant of integration.
Replacing the multiple angles with expansions involving sin(x) and cos(x) will just make this more complicated than it already is:
231x/16+32sin(x)-(32/3)sin³(x)+(6/5)sin⁵(x)+(215/16)sin(x)cos(x)-(1/6)sin³(x)cos³(x)+(33/8)sin(x)cos³(x)+C.