Skip to content

Instantly share code, notes, and snippets.

@olekravchenko
Created September 17, 2016 11:49
Show Gist options
  • Save olekravchenko/c6af9508e69c2a8d92b7d5b246c6b064 to your computer and use it in GitHub Desktop.
Save olekravchenko/c6af9508e69c2a8d92b7d5b246c6b064 to your computer and use it in GitHub Desktop.
QPochhammer vs up
f[x_] := 1/2 - (4/\[Pi]) Arg[QPochhammer[I (2 x - 1)]]
upFT[t_] := Product[Sinc[t 2^-k], {k, 1, 5}]
up[x_] := 1/2 + Sum[Cos[\[Pi] k x] upFT[\[Pi] k], {k, 1, 25}]
Column@{
Plot[{up[x - 1], f[x]}, {x, 0, 1}, PlotStyle -> Thick,
ImageSize -> 450],
Plot[Abs@{up[x - 1] - f[x]}, {x, 0, 1}, PlotStyle -> Thick,
ImageSize -> 450]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment