Suppose you want cos(nx) and sin(nx) in terms of sin(x).  You'll need cos(x) as well which can be found using
$cos\left(x\right)=±\sqrt{1-\left(sin\left(x\right){\right)}^{2}}$

First note that ${e}^{ix}=cos\left(x\right)+i\ast sin\left(x\right)$
Raising both sides to the nth power:
${e}^{n\ast ix}=\left(cos\left(x\right)+i\ast sin\left(x\right){\right)}^{n}$
And note that
${e}^{n\ast ix}=cos\left(nx\right)+i\ast sin\left(nx\right)$
Therefore, by the transitive property
$\left(\mathrm{cos}\left(x\right)+i\ast \mathrm{sin}\left(x\right){\right)}^{n}=\mathrm{cos}\left(nx\right)+i\ast \mathrm{sin}\left(nx\right)$
So
$cos\left(nx\right)=Re\left(cos\left(x\right)+i\ast sin\left(x\right){\right)}^{n}\right)$
and
$sin\left(nx\right)=Im\left(cos\left(x\right)+i\ast sin\left(x\right){\right)}^{n}\right)$
Expanding using the binomial theorem yields:
$\left(cos\left(x\right)+i\ast sin\left(x\right){\right)}^{n}=$$\sum _{k=0}^{n}\left(\genfrac{}{}{0}{}{n}{k}\right)\ast \left(cos\left(x\right){\right)}^{n-k}\ast \left(i\ast sin\left(x\right){\right)}^{k}$

Splitting it into real and imaginary parts:
$cos\left(nx\right)=\sum _{k=0}^{⌊\frac{n}{2}⌋}$$\left(\genfrac{}{}{0}{}{n}{2k}\right)\ast \left(-1{\right)}^{k}\ast \left(sin\left(x\right){\right)}^{2k}\ast \left(cos\left(x\right){\right)}^{n-2k}$
And
$sin\left(nx\right)=\sum _{k=0}^{⌊\frac{n-1}{2}⌋}\left(\genfrac{}{}{0}{}{n}{2k+1}\right)\ast$

### sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone https://git.suckless.org/dwm xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim config.mk # FREETYPEINC = \${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i