Difference between revisions of "User:5849206328x"

m
m
Line 4: Line 4:
 
Label f;
 
Label f;
 
f.p=fontsize(6);
 
f.p=fontsize(6);
xaxis(0,3);
+
xaxis(-1.5,1.5);
yaxis(0,3);
+
yaxis(-1.5,1.5);
  
 
real e  = 2.718281828459045235360287471352662497757247093699959574966967627724076630353;
 
real e  = 2.718281828459045235360287471352662497757247093699959574966967627724076630353;
 
real pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286;
 
real pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286;
real f(real x) { return sin(x) * cos(2x - 1) * sin(3x - 2) + 1.5;}
+
real f(real x) { if (x < 0) return -1; else return 1; }
 +
real h(real x) { if (x != 0) return sin(1/x); else return 0; }
  
draw(graph(f,0,3));
+
draw(graph(f,-1.5,1.5,n=10000), red);
dot((1.3,f(1.3)));
+
draw(graph(h,-1.5,1.5,n=10000), blue);
draw((0,f(1.3)) -- (3,f(1.3)), dotted);
 
draw((0,f(1.3) + 0.2) -- (3,f(1.3) + 0.2), dotted);
 
draw((0,f(1.3) - 0.2) -- (3,f(1.3) - 0.2), dotted);
 
draw((1.3,0) -- (1.3,3), dotted);
 
draw((1.2,0) -- (1.2,3), dotted);
 
draw((1.4,0) -- (1.4,3), dotted);
 
  
label("$f(a) + \epsilon$", (0,f(1.3) + 0.2), W);
+
label("$f$",(-1.5,-1),W); label("$h$",(-1.5,h(-1.5)),W);
label("$f(a) - \epsilon$", (0,f(1.3) - 0.2), W);
 
label("$a - \delta$", (1.2,0), SW);
 
label("$a + \delta$", (1.4,0), SE);
 
 
</asy>
 
</asy>

Revision as of 11:58, 26 May 2015

[asy] import slopefield;  Label f; f.p=fontsize(6); xaxis(-1.5,1.5); yaxis(-1.5,1.5);  real e  = 2.718281828459045235360287471352662497757247093699959574966967627724076630353; real pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286; real f(real x) { if (x < 0) return -1; else return 1; } real h(real x) { if (x != 0) return sin(1/x); else return 0; }  draw(graph(f,-1.5,1.5,n=10000), red); draw(graph(h,-1.5,1.5,n=10000), blue);  label("$f$",(-1.5,-1),W); label("$h$",(-1.5,h(-1.5)),W); [/asy]