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(-1,1);
+
xaxis(-2,2);
yaxis(-0.01,0.01);
+
yaxis(0,2);
  
 
real e  = 2.718281828459045235360287471352662497757247093699959574966967627724076630353;
 
real e  = 2.718281828459045235360287471352662497757247093699959574966967627724076630353;
 
real pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286;
 
real pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286;
real f1(real x) { return 0.5 * e^4 * e^(-0.01/(x + 0.1)^2); }
+
real f(real x, real t) { return 1/(t * sqrt(pi)) * e^(-x^2/t^2); }
real f2(real x) { return 1 - 0.5 * e^4 * e^(-0.01/x^2); }
+
real f1(real x) { return f(x,1); }
real f3(real x) { return 0.5 * e^4 * e^(-0.01/(x - 0.1)^2); }
+
real f2(real x) { return f(x,0.5); }
 +
real f3(real x) { return f(x,0.1); }
  
draw(graph(f1,-0.0999999999,-0.05));
+
draw(graph(f1,-2,2), red + dashed);
draw(graph(f2,-0.05,-0.0000000001)); draw(graph(f2,0.0000000001,0.05));
+
draw(graph(f2,-2,2), blue + dashed);
draw(graph(f3,0.05,0.0999999999));
+
draw(graph(f3,-2,2), darkgreen + dashed);
  
//limits((0,0),(1,2),Crop);
+
limits((-2,0),(2,2),Crop);
 
</asy>
 
</asy>

Revision as of 11:12, 10 June 2015

[asy] import slopefield;  Label f; f.p=fontsize(6); xaxis(-2,2); yaxis(0,2);  real e  = 2.718281828459045235360287471352662497757247093699959574966967627724076630353; real pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286; real f(real x, real t) { return 1/(t * sqrt(pi)) * e^(-x^2/t^2); } real f1(real x) { return f(x,1); } real f2(real x) { return f(x,0.5); } real f3(real x) { return f(x,0.1); }  draw(graph(f1,-2,2), red + dashed); draw(graph(f2,-2,2), blue + dashed); draw(graph(f3,-2,2), darkgreen + dashed);  limits((-2,0),(2,2),Crop); [/asy]