Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 7 years ago

B r u n o gravatar image

You can proceed as follows, where N is given to serve as an approximation of .

sage: g(x) = abs(x - floor(x) - 1/2)
sage: def f(x, N): return sum(g(2^j*x)/2^j for j in range(N+1))
sage: N = 100 # for instance...
sage: plot(f(x, N), x, -1, 1)

Resulting plot

Note. For this approach to make sense, you need to show that that the partial sums converge fast, which is the case since g(x)1/2 for all x.