How to plot a Weierstrass function in Maple?

270 Views Asked by At

I'm attempting to get a good approximation of a Weierstrass function using Maple, but I have very little background in the matter. So far, I can get an approximation of $\sum_{n=0}^{643}\frac{1}{2^n}cos(3^nx)$, but I was wondering if I could make it more precise?

1

There are 1 best solutions below

0
On BEST ANSWER

If your goal is to plot it, there's no need to be so precise. A difference of one part in 10000 wouldn't make any perceptible difference on a plot. It follows that the largest necessary value of $n$ on a full-scale plot is 13.

W:= x-> add(cos(3^n*x)/2^n, n= 0..13):
plot(W, -Pi..Pi, numpoints= 1000);