y =π²/3 + 4·(-1)1/12·cos(1·x) + 4·(-1)2/22·cos(2·x) + ... + 4·(-1)n/n2·cos(n·x)   per n = 1, 2, 3, ..., 80

Puoi aprire il codice e modificarlo
HELP

...
aX = -5; bX = 10; aY = -2; bY = 10
Dx = 5; Dy = 1

titolo = ""PI^2/3 + 4*(-1)^1/(1^2)*cos(1*x) +  4*(-1)^2/(2^2)*cos(2*x) +  4*(-1)^3/(3^2)*cos(3*x)  +  ..."
...
// modifica la definizione della funzione di cui volessi tracciare il grafico (f blu, g verde, h rosso, k arancione)
// Esempi: y=2*x+5   y=x*x/3  y= Math.sqrt(x-5)*10+3  y= Math.pow(x,3) (=x^3)  y= Math.sin(x/360*Math.PI)

function f(x) { y = Math.PI*Math.PI/3+4*Math.pow(-1,1)/Math.pow(1,2)*Math.cos(1*x); return y }  
function g(x) { y = Math.PI*Math.PI/3+4*Math.pow(-1,1)/Math.pow(1,2)*Math.cos(1*x)+4*Math.pow(-1,2)/Math.pow(2,2)*Math.cos(2*x) ; return y }
function h(x) { y = Math.PI*Math.PI/3; for(ii=1; ii<=3; ii=ii+1) {y = y+4*Math.pow(-1,ii)/Math.pow(ii,2)*Math.cos(ii*x)}; return y }
function k(x) { y = Math.PI*Math.PI/3; for(ii=1; ii<=80; ii=ii+1) {y = y+4*Math.pow(-1,ii)/Math.pow(ii,2)*Math.cos(ii*x)}; return y }
...
n=8*9*5*7*11*13  (abbiamo aumentato la tabulazione passando da n=8*9*5*7*11 a n=8*9*5*7*11*13)
...