# Run the following three lines, after:  source("http://macosa.dima.unige.it/r.R") 
 
f = function(x) ifelse(x != 0, cos(1/x)*x, 0)
BF=4; HF=3; a = 4
for(i in 1:8) {a=a/2; graph2F(f,-a,a,"blue"); if(a<2) abovex("I made a zoom"); wait(3)} 
underx("STOP")
#

• A continuous function in  a finite closed interval, [-2,2], such that
  - it has an infinite length graph
  - we don't know in which direction it arrives and starts from (0,0)
 
 
• In the following case the function has derivative in 0 (it is 0) but
  neither right nor left derivative.
 
g <- function(x) ifelse(x != 0, sin(1/x)*x^2, 0)
BF=4; HF=3; a = 4
for(i in 1:8) {a=a/2; graph2F(g,-a,a,"blue"); if(a<2) abovex("I made a zoom"); wait(3)} 
underx("STOP")

• A continuous function in a finite closed interval, [-2,2], such that - it has an infinite length graph - we don't know in which direction it arrives and starts from (0,0) • The graph of a continuous function that is not derivable at any point in the domain: if I zoom in I find ripples everywhere h(x) = Σ 1/10^i*k(10^i*x) for i from 1 to ∞ where k(x) = |x-floor(x+1/2)|
 
 
# The sum is executed only for the first 300 addenda k = function(x) abs(x-floor(x+1/2)) h = function(x) {y = 0; for(i in 1:n) y = y+1/10^i*k(10^i*x); y} BF=5; HF=4 n=300 A=0.2; graph1F( h, 0,A, "brown") A=0.1; graph1F( h, 0,A, "brown") A=0.01; graph1F( h, 0,A, "brown") A=0.001; graph1F( h, 0,A, "brown")