Difference between revisions of "User:5849206328x"

m
m
Line 2: Line 2:
 
Label f;
 
Label f;
 
f.p=fontsize(6);
 
f.p=fontsize(6);
xaxis(-5,5);
+
xaxis(0,5);
yaxis(-3,3);
 
  
real f(real x) { return sin(x); }
+
real f(real x)
real g(real x) { return x - x^3/6; }
+
{
real h(real x) {return x - x^3/6 + x^5/120; }
+
return 0.01 * (3x^4 - 20x^3 + 36x^2 + 10x + 200 + 50 * sin(x));
real i(real x) {return x - x^3/6 + x^5/120 - x^7/5040; }
+
}
  
draw(graph(f,-5,5));
+
for (int i = 1; i < 7; ++i) {
draw(graph(g,-3.3,3.3),dotted);
+
fill((0.5 + 0.5 * i,0)--(0.5 + 0.5 * i, f(0.5 + 0.5 * i))--(1 + 0.5 * i, f(0.5 + 0.5 * i))--(1 + 0.5 * i,0)--cycle,lightblue);
draw(graph(h,-4.2,4.2),dotted);
+
}
draw(graph(i,-4.5,4.5),dotted);
 
  
label("$\sin(x)$",(5,sin(5)),E);
+
draw(graph(f,0,5));
label("$T_3$",(3.3,-3),S);
+
draw((1,0)--(1,4),dashed);
label("$T_5$",(4.2,3),N);
+
for (int i = 1; i < 6; ++i) {
label("$T_7$",(4.5,-3),S);
+
draw((1 + 0.5 * i,0)--(1 + 0.5 * i, 4),dotted);
 +
draw((0.5 + 0.5 * i, f(0.5 + 0.5 * i))--(1 + 0.5 * i, f(0.5 + 0.5 * i)),dotted);
 +
}
 +
draw((3.5,f(3.5))--(4,f(3.5)),dotted);
 +
draw((4,0)--(4,4),dashed);
 
</asy>
 
</asy>

Revision as of 15:53, 24 April 2015

[asy] Label f; f.p=fontsize(6); xaxis(0,5);  real f(real x) { return 0.01 * (3x^4 - 20x^3 + 36x^2 + 10x + 200 + 50 * sin(x)); }  for (int i = 1; i < 7; ++i) { fill((0.5 + 0.5 * i,0)--(0.5 + 0.5 * i, f(0.5 + 0.5 * i))--(1 + 0.5 * i, f(0.5 + 0.5 * i))--(1 + 0.5 * i,0)--cycle,lightblue); }  draw(graph(f,0,5)); draw((1,0)--(1,4),dashed); for (int i = 1; i < 6; ++i) { draw((1 + 0.5 * i,0)--(1 + 0.5 * i, 4),dotted); draw((0.5 + 0.5 * i, f(0.5 + 0.5 * i))--(1 + 0.5 * i, f(0.5 + 0.5 * i)),dotted); } draw((3.5,f(3.5))--(4,f(3.5)),dotted); draw((4,0)--(4,4),dashed); [/asy]