|
|
Line 52: |
Line 52: |
| --> | | --> |
| == Summations == | | == Summations == |
− | <center><asy>unitsize(15); defaultpen(linewidth(0.7));
| + | <center><asy>defaultpen(linewidth(0.7)); unitsize(15); pen heavy = linewidth(2); |
− | int n = 6; pair shiftR = ((n+2),0); real r = 0.3;
| |
− | pen colors(int i){ return rgb(i/n,0.4+i/(2n),1-i/n); } /* shading */
| |
− | void htick(pair A, pair B,pair ticklength = (0.15,0)){ draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength); }
| |
− | | |
− | /* triangle */
| |
− | draw((-r,0)--(-r,-n+1)^^(r,-n+1)--(r,0),linetype("4 4"));
| |
− | for(int i = 0; i < n; ++i)
| |
− | draw((-i,-i)--(i,-i));
| |
− | for(int i = 0; i < n; ++i)
| |
− | for(int j = 0; j < 2*i+1; ++j)
| |
− | filldraw(CR((j-i,-i),r),colors(i));
| |
− | | |
− | /* square */
| |
− | draw(r*expi(pi/4)+shiftR--(n-1,-n+1)+r*expi(pi/4)+shiftR^^r*expi(5*pi/4)+shiftR--r*expi(5*pi/4)+(n-1,-n+1)+shiftR,linetype("4 4"));
| |
− | for(int i = 0; i < n; ++i)
| |
− | draw(shiftR+(0,-i)--shiftR+(i,-i)--shiftR+(i,0));
| |
− | for(int i = 0; i < n; ++i)
| |
− | for(int j = 0; j < n; ++j)
| |
− | filldraw(CR((j,-i)+shiftR,r),colors((i>j)?i:j));
| |
− | | |
− | htick(shiftR+(-1,r),shiftR+(-1,-n+1-r)); label("$n$",shiftR+(-1,(-n+1)/2),W,fontsize(10));
| |
− | </asy><br>
| |
− | | |
− | The sum of the first <math>n</math> odd natural numbers is <math>n^2</math>.<br><br>
| |
− | </center>
| |
− | | |
− | <center><asy> defaultpen(linewidth(0.7)); unitsize(15); | |
− | int n = 6; pair shiftR = ((n+2),0); real r = 0.3;
| |
− | pen colors(int i){ return rgb(0.4+i/(2n),i/n,1-i/n); } /* shading */ | |
− | void htick(pair A, pair B,pair ticklength = (0.15,0)){
| |
− | draw(A--B);
| |
− | draw(A-ticklength--A+ticklength);
| |
− | draw(B-ticklength--B+ticklength);
| |
− | }
| |
− | | |
− | /* triangle */
| |
− | draw((0.5,0)--(n-0.5,-n+1),linetype("4 4"));
| |
− | for(int i = 0; i < n; ++i)
| |
− | draw((0,-i)--(i,-i));
| |
− | for(int i = 0; i < n; ++i)
| |
− | for(int j = 0; j <= i; ++j)
| |
− | filldraw(CR((j,-i),r),colors(i));
| |
− |
| |
− | /* arc arrow */
| |
− | draw( arc((n,-n+1)/2, (1.5,-1.5), (n-1.5,-1.5), CW) );
| |
− | fill((n-1.5,-1.5) -- (n-1.5,-1.5)+r*expi(5.2*pi/6) -- (n-1.5,-1.5)+r*expi(3.3*pi/6) -- cycle); /* manual arrowhead? avoid resizing */
| |
− | | |
− | /* square */
| |
− | draw(shiftR+(0.5,0)--shiftR+(n-0.5,-n+1),linetype("4 4"));
| |
− | for(int i = 0; i < n; ++i)
| |
− | draw(shiftR+(0,-i)--shiftR+(i,-i)^^shiftR+(n,-n+1)-(0,-i)--shiftR+(n,-n+1)-(i,-i));
| |
− | for(int i = 0; i < n; ++i)
| |
− | for(int j = 0; j < n+1; ++j)
| |
− | filldraw(CR((j,-i)+shiftR,r),colors((j <= i) ? i : n-1-i));
| |
− | | |
− | /* labeling and ticks */
| |
− | htick(shiftR+(-1,r),shiftR+(-1,-n+1-r)); label("$n$",shiftR+(-1,(-n+1)/2),W,fontsize(10));
| |
− | htick(shiftR+(-r,-n),shiftR+(n+r-1,-n),(0,0.15)); label("$n$",shiftR+((n-1)/2,-n),S,fontsize(10));
| |
− | htick(shiftR+(n-r,-n),shiftR+(n+r,-n),(0,0.15)); label("$1$",shiftR+(n,-n),S,fontsize(10));
| |
− | </asy><br>
| |
− | | |
− | The sum of the first <math>n</math> positive integers is <math>n(n+1)/2</math>.<br><br>
| |
− | </center>
| |
− | | |
− | <center><asy>unitsize(15); defaultpen(linewidth(0.7));
| |
− | int n = 6; real r = 0.35, h = 3/4; /* radius size and horizontal spacing */
| |
− | pair shiftR = (h*(n+1)+r, 0);
| |
− | | |
− | pen colors(int i){ /* shading */
| |
− | if(i == n) return red;
| |
− | return rgb(5/n,0.4+5/(2n),1-5/n);
| |
− | }
| |
− | void htick(pair A, pair B, pair ticklength = (0.15,0)){
| |
− | draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength);
| |
− | }
| |
− | void makeshiftarrow(pair A, real dir, real arrowlength = r){ /* Arrow option resizes */
| |
− | fill(A--A+arrowlength*expi(dir+pi/8)--A+arrowlength*expi(dir-pi/8)--cycle);
| |
− | }
| |
− | pair getCenter(int i, int j){ return ((2*j-i)*h,-i);}
| |
− | | |
− | /* triangle */
| |
− | for(int i = 0; i < n+1; ++i){
| |
− | draw((-i*h,-i)--(i*h,-i)); /* horizontal lining */
| |
− | for(int j = 0; j <= i; ++j)
| |
− | filldraw(circle(getCenter(i,j),r), colors(i));
| |
− | }
| |
− | | |
− | /* fill in circle in row 4, column 3 */
| |
− | filldraw(circle(getCenter(3,2),r),blue);
| |
− | draw(getCenter(n,2)-- getCenter(3,2)-- getCenter(n,n+2-3));
| |
− | makeshiftarrow(getCenter(n,2),pi/4,0.5); makeshiftarrow(getCenter(n,n+2-3),3*pi/4,0.5);
| |
| | | |
− | htick(shiftR+(-1,r),shiftR+(-1,-n+1-r)); label("$n$",shiftR+(-1,(-n+1)/2),E,fontsize(10));
| + | /* global configurable variables */ |
− | </asy><br>
| + | int n2 = 4, n = floor(n2*(n2+1)/2); // number of colors, number of layers |
| + | real h = 0.6; // scale factor of diagram |
| + | pair shiftR1 = (n*h+1,0), // middle diagram shift offset |
| + | shiftR2 = shiftR1 + (n*h+1,0); // right diagram shift offset |
| | | |
− | The sum of the first <math>n</math> positive integers is <math>{n+1 \choose 2}</math>.{{ref|1}}<br><br>
| + | int lvl(int i) { return ceil(((8*i+9)^.5-1)/2); } /* return level of square i */ |
− | </center>
| |
| | | |
− | <center><asy>defaultpen(linewidth(0.7)); unitsize(15); pen heavy = linewidth(2);
| + | pen colors(int i) { return rgb(0.2+lvl(i)/6,0.3+lvl(i)/7,1-lvl(i)/6); } /* shading */ |
− | int n2 = 4, n = floor(n2*(n2+1)/2); real h = 0.6; pair shiftR1 = (n*h+1,0), shiftR2 = shiftR1 + (n*h+1,0); /* global configurable variables */
| |
| | | |
− | int lvl(int i){ return ceil(((8*i+9)^.5-1)/2); }
| + | /* draw tick line with label, segment between A and B */ |
− | pen colors(int i){ return rgb(0.2+lvl(i)/6,0.3+lvl(i)/7,1-lvl(i)/6); } /* shading */
| + | void htick(pair A, pair B,pair ticklength = (0.15,0)) { draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength); } |
− | void htick(pair A, pair B,pair ticklength = (0.15,0)){ draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength); } | |
| | | |
| /* gradient triangle */ | | /* gradient triangle */ |
| for(int i = 0; i < n; ++i){ | | for(int i = 0; i < n; ++i){ |
| for(int j = 0; j < 2*i+1; ++j){ | | for(int j = 0; j < 2*i+1; ++j){ |
− | filldraw(shift(shiftR1)*xscale(h)*yscale(h)*shift((j-i,-i))*unitsquare,colors(i)); | + | filldraw(shift(shiftR1)*scale(h)*shift((j-i,-i))*unitsquare,colors(i)); |
| + | /* |
| if(j % lvl(i) == 0 && j != lvl(i)^2) | | if(j % lvl(i) == 0 && j != lvl(i)^2) |
− | draw(shift(shiftR1)*xscale(h)*yscale(h)*shift((j-i,-i))*((0,0)--(0,1)--(1,1)), heavy); | + | draw(shift(shiftR1)*scale(h)*shift((j-i,-i))*((0,0)--(0,1)--(1,1)), heavy); |
− | if(j == 2*i) /* right border */ | + | if(j == 2*i) // right border |
− | draw(shift(shiftR1)*xscale(h)*yscale(h)*shift((j-i,-i))*((1,0)--(1,1)--(0,1)), heavy); | + | draw(shift(shiftR1)*scale(h)*shift((j-i,-i))*((1,0)--(1,1)--(0,1)), heavy); |
| + | */ |
| } | | } |
| + | draw(shift(shiftR1)*scale(h)*shift((-i,-i))*((0,0)--(0,1)--(1,1)), heavy); |
| + | draw(shift(shiftR1)*scale(h)*shift(( i,-i))*((1,0)--(1,1)--(0,1)), heavy); |
| } | | } |
| | | |
− | for(int i = 0; i < n2; ++i) | + | // return kth triangular number (actually, 1+2+...+k) |
− | draw(shift(shiftR1)*xscale(h)*yscale(h)*shift((-i*(i+1)/2,-i*(i+1)/2))*((0,1)--(2*i*(i+1)/2+1,1)), heavy); | + | int tri(int k) { return ((int) (k*(k+1)/2)); } |
− | draw(shift(shiftR1)*xscale(h)*yscale(h)*shift((-n2*(n2+1)/2,-n2*(n2+1)/2))*((1,1)--(2*n2*(n2+1)/2,1)), heavy); | + | |
| + | for(int i = 0; i < n2; ++i) { |
| + | draw(shift(shiftR1)*scale(h)*shift((0-tri(i),0-tri(i)))*((0,1)--(2*tri(i)+1,1)), heavy); |
| + | if(i % 2 == 0) { |
| + | // vertical heavy lines for odd layers |
| + | draw(shift(shiftR1)*scale(h)*((-i/2,1-tri(i))--(-i/2,-i-tri(i))), heavy); |
| + | draw(shift(shiftR1)*scale(h)*((1+i/2,1-tri(i))--(1+i/2,-i-tri(i))), heavy); |
| + | } |
| + | else { |
| + | // jagged heavy lines for even layers |
| + | pair jag1 = (-(i+1)/2,-(i-1)/2-tri(i)), jag2 = (1+(i+1)/2,-(i-1)/2-tri(i)); |
| + | draw(shift(shiftR1)*scale(h)*(jag1+(0,1+(i-1)/2) -- jag1 -- jag1+(1,0) -- jag1+( 1,-(i+1)/2)), heavy); |
| + | draw(shift(shiftR1)*scale(h)*(jag2+(0,1+(i-1)/2) -- jag2 -- jag2-(1,0) -- jag2+(-1,-(i+1)/2)), heavy); |
| + | } |
| + | } |
| + | draw(shift(shiftR1)*scale(h)*shift((-n2*(n2+1)/2,-n2*(n2+1)/2))*((1,1)--(2*n2*(n2+1)/2,1)), heavy); |
| | | |
| /* gradient square */ | | /* gradient square */ |
− | for(int i = 0; i < n; ++i) | + | for(int i = 0; i < n; ++i) |
| for(int j = 0; j < n; ++j) | | for(int j = 0; j < n; ++j) |
− | filldraw(shift(shiftR2)*xscale(h)*yscale(h)*shift((j,-i))*unitsquare,colors((i>j)?i:j)); | + | filldraw(shift(shiftR2)*scale(h)*shift((j,-i))*unitsquare, colors((i>j)?i:j)); |
| + | for(int i = 0; i < n2; ++i) { |
| + | draw(shift(shiftR2)*scale(h)*((0,0-tri(i))--(tri(i),0-tri(i))--(tri(i),0)),heavy); |
| + | } |
| + | draw(shift(shiftR2)*scale(h)*shift((0,1-n))*scale(n)*unitsquare, heavy); |
| + | |
| | | |
| /* n nxn squares */ | | /* n nxn squares */ |
| for(int i = 0; i < n2; ++i){ | | for(int i = 0; i < n2; ++i){ |
− | filldraw(xscale(h)*yscale(h)*shift((-i,-(i+1)*(i+2)/2+1))*xscale(i+1)*yscale(i+1)*unitsquare, colors(floor(i*(i+1)/2)), heavy); | + | filldraw(scale(h)*shift((-i,-(i+1)*(i+2)/2+1))*xscale(i+1)*yscale(i+1)*unitsquare, colors(floor(i*(i+1)/2)), heavy); |
| } | | } |
| </asy><br> | | </asy><br> |
Line 190: |
Line 123: |
| | | |
| Another proof of the identity <math>1^3 + 2^3 + \cdots + n^3 = (1+2+\cdots + n)^2</math>.<br><br></center> | | Another proof of the identity <math>1^3 + 2^3 + \cdots + n^3 = (1+2+\cdots + n)^2</math>.<br><br></center> |
− |
| |
− | <center><asy>defaultpen(linewidth(0.7)); unitsize(15); pen sm = fontsize(10);
| |
− | int n = 5, fib = 1, fib2 = 1, xsum = 1, ysum = 0; real h = 0.15;
| |
− | void fillsq(pair A = (0,0), real s, pen p = invisible, pen l = linewidth(1)){ filldraw(shift(A)*xscale(s)*yscale(s)*unitsquare, p, l); }
| |
− | void htick(pair A, pair B, pair ticklength = (0.15,0)){ draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength); }
| |
− |
| |
− | for(int i = 0; i < n; ++i) {
| |
− | fillsq((0,h*ysum),h*fib2,rgb(0.9,1,0.9));
| |
− | fillsq((h*xsum,0),h*fib,rgb(1,0.9,0.9));
| |
− | if(i == n-1){
| |
− | label("$F_{n}^2$",h*(xsum+fib/2,fib/2),sm);
| |
− | label("$F_{n-1}^2$",h*(fib2/2,ysum+fib2/2),sm);
| |
− | }
| |
− | else if(i == n-2){
| |
− | label("$F_{n-2}^2$",h*(xsum+fib/2,fib/2),sm);
| |
− | label("$F_{n-3}^2$",h*(fib2/2,ysum+fib2/2),sm);
| |
− | }
| |
− | fib = fib + fib2; fib2 = fib - fib2;
| |
− | xsum = fib;
| |
− | ysum = fib2;
| |
− | fib = fib + fib2; fib2 = fib - fib2;
| |
− | }
| |
− | htick(h*(xsum,0)+(1,0),h*(xsum,ysum)+(1,0)); label("$F_n$",h*(xsum,ysum/2)+(1,0), E, sm);
| |
− | htick(h*(0,ysum)+(0,1),h*(xsum-fib+fib2,ysum)+(0,1),(0,0.15)); label("$F_{n-1}$",h*((xsum-fib+fib2)/2,ysum)+(0,1), N, sm);
| |
− | htick(h*(xsum,ysum)+(0,1),h*(xsum-fib+fib2,ysum)+(0,1),(0,0.15)); label("$F_{n}$",h*((2*xsum-fib+fib2)/2,ysum)+(0,1), N, sm);
| |
− | </asy><br>
| |
− |
| |
− | The identity <math>F_1^2 + F_2^2 + \cdots + F_n^2 = F_{n} \cdot F_{n+1}</math>, where <math>F_i</math> is the <math>i</math>th [[Fibonacci number]].<br><br></center>
| |
− |
| |
− | <center>[[#toc|Back to Top]]</center>
| |
− |
| |
− | === Geometric series ===
| |
− | <center><asy>defaultpen(linewidth(0.7)); unitsize(15);
| |
− | int n = 10; /* # of iterations */
| |
− | real s = 6; /* square size */
| |
− | pair shiftR = (s+2,0); pen sm = fontsize(10);
| |
− | void fillrect(pair A, pair B = (0,0), pen p = invisible, pen l = linewidth(1)){ filldraw(A--(A.x,B.y)--B--(B.x,A.y)--cycle, p, l); }
| |
− | void htick(pair A, pair B, pair ticklength = (0,0.15)){ draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength); }
| |
− |
| |
− | for(int i = 0; i < 2; ++i) /* left */
| |
− | fillrect((s/2^(ceil(i/2)),s/2^(floor(i/2))));
| |
− | for(int i = 0; i < n; ++i) /* right */
| |
− | fillrect(shiftR,shiftR + (s/2^(ceil(i/2)),s/2^(floor(i/2))));
| |
− | label("$\frac 12$",(s*3/4,s/2),sm); label("$\cdots$",(s*1/4,s/2),sm);
| |
− | label("$\frac 12$",shiftR+(s*3/4,s/2),sm); label("$\cdots$",shiftR+(s*1/4,s/2),sm);
| |
− | label("$\frac 14$",shiftR+(s*1/4,s*3/4),sm); label("$\frac 18$",shiftR+(s*3/8,s/4),sm);
| |
− | htick((0,-1), (s,-1)); htick(shiftR + (0,-1), shiftR + (s,-1));
| |
− | label("$1$",(s/2,-1),S,sm); label("$1$",shiftR+(s/2,-1),S,sm);
| |
− | </asy>
| |
− | The infinite [[geometric series]] <math>\frac 12 + \frac {1}{2^2} + \frac {1}{2^3} + \cdots = 1</math>.<br><br>
| |
− | </center>
| |
− |
| |
− | <center><asy> defaultpen(linewidth(0.7)); unitsize(15);
| |
− | int n = 4; real h = 2; pen colors[] = {rgb(0.8,0,0),rgb(0,0.8,0)};
| |
− | void drawTriGrid(real s){
| |
− | for(int i = 0; i < 4; ++i){
| |
− | draw( (-s*3/2,s*(3/2 - i)) -- (s*3/2,s*(3/2 - i)), linetype("2 2"));
| |
− | draw( (s*(3/2 - i),-s*3/2) -- (s*(3/2 - i),s*3/2), linetype("2 2"));
| |
− | }
| |
− | }
| |
− | void fillrect(pair A, pair B, pen p){ filldraw(A--(A.x,B.y)--B--(B.x,A.y)--cycle, p, linewidth(1)); }
| |
− |
| |
− | for(int i = 0; i < n; ++i) {
| |
− | fillrect( ((-1)^i*-h/3^i*(3/2),-h/3^i*(3/2)) , ((-1)^i*-h/3^i*(1/2),h/3^i*(3/2)) , colors[0]);
| |
− | fillrect(-((-1)^i*-h/3^i*(3/2),-h/3^i*(3/2)) ,-((-1)^i*-h/3^i*(1/2),h/3^i*(3/2)) , colors[1]);
| |
− | fillrect( (-h/3^i*(1/2),(-1)^i*h/3^i*(1/2)) , (h/3^i*(1/2),(-1)^i*h/3^i*(3/2)), colors[0]);
| |
− | fillrect(-(-h/3^i*(1/2),(-1)^i*h/3^i*(1/2)) ,-(h/3^i*(1/2),(-1)^i*h/3^i*(3/2)), colors[1]);
| |
− | drawTriGrid(h/3^i);
| |
− | }
| |
− | </asy><br>
| |
− |
| |
− | The infinite [[geometric series]] <math>\frac 13 + \frac {1}{3^2} + \frac {1}{3^3} + \cdots = \frac 12</math>.<br><br>
| |
− | </center>
| |
− |
| |
− | <center><asy> defaultpen(linewidth(0.7)); unitsize(15);
| |
− | int n = 10; real h = 6; pen colors[] = {rgb(0.9,0,0),rgb(0,0.9,0),rgb(0,0,0.9)};
| |
− | pair shiftR = (h+3,0);
| |
− |
| |
− | void drawEquilaterals(pair A, real s){
| |
− | filldraw(A--A+s*expi(2*pi/3)--A+(-s,0)--cycle,colors[0]);
| |
− | filldraw(A--A+s*expi(2*pi/3)--A+s*expi(1*pi/3)--cycle,colors[1]);
| |
− | filldraw(A--A+s*expi(1*pi/3)--A+(s,0)--cycle,colors[2]);
| |
− | }
| |
− |
| |
− | for(int i = 0; i < n; ++i)
| |
− | drawEquilaterals(shiftR + (0,h-h/(2^i) ), (h/(2^(i+1))) *2/3^.5);
| |
− | drawEquilaterals((0,0), h/3^.5); draw((-h/3^.5,0)--(h/3^.5,0)--(0,h)--cycle); label("$\vdots$",(0,3/4*h));
| |
− | </asy><br>
| |
− |
| |
− | The infinite [[geometric series]] <math>\frac 14 + \frac {1}{4^2} + \frac {1}{4^3} + \cdots = \frac 13</math>.<br><br>
| |
− | </center>
| |
− |
| |
− | <center><asy> defaultpen(linewidth(1)); unitsize(15);
| |
− | int n = 8; /* number of layers */
| |
− | real h = 3; /* square height */
| |
− | pen colors[] = {rgb(0.8,0,0),rgb(0,0.8,0),rgb(0,0,0.8)};
| |
− | pair shiftL = (-3*h,0); /* amount to shift second square left by */
| |
− |
| |
− | void drawSquares(real s, pair A = (0,0)){
| |
− | filldraw(shift(A)*shift(-2*s, -s)*xscale(s)*yscale(s)*unitsquare,colors[0]);
| |
− | filldraw(shift(A)*shift(-2*s,-2*s)*xscale(s)*yscale(s)*unitsquare,colors[1]);
| |
− | filldraw(shift(A)*shift(-s ,-2*s)*xscale(s)*yscale(s)*unitsquare,colors[2]);
| |
− | }
| |
− | for(int i = 0; i < n; ++i)
| |
− | drawSquares(h/2^i);
| |
− | drawSquares(h,shiftL); draw(shift(shiftL+(-2*h,-2*h))*xscale(2*h)*yscale(2*h)*unitsquare);
| |
− | label("$\cdots$",shiftL+(-h/2,-h/2));
| |
− | </asy><br>
| |
− |
| |
− | Another proof of the identity <math>\frac 14 + \frac {1}{4^2} + \frac {1}{4^3} + \cdots = \frac 13</math>. <br><br>
| |
− | </center>
| |
− |
| |
− | <center><asy> unitsize(15); defaultpen(linewidth(1)); pen sm = fontsize(10);
| |
− | real r = 0.7, h = 4.5, n = 10, xsum = 0;
| |
− | void htick(pair A, pair B, pair ticklength = (0,0.15)){ draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength); }
| |
− |
| |
− | filldraw(xscale(h)*yscale(h)*unitsquare,rgb(0.9,1,0.9)); draw((0,0)--(h/(1-r),0)--(0,h));
| |
− | for(int i = 0; i < n; ++i){
| |
− | xsum += r^i;
| |
− | draw((h*xsum,0)--(h*xsum,h*(1-(1-r)*xsum)));
| |
− | htick((h*(xsum-r^i),-1),(h*xsum,-1));
| |
− | if(i < 6)
| |
− | label("$r^"+(string) i+"$",(h*(xsum-r^i/2),-1),S,sm);
| |
− | else if(i == 8)
| |
− | label("$\cdots$",(h*(xsum-r^i/2),-1.2),S,sm);
| |
− | }
| |
− |
| |
− | /* htick((-1,0),(-1,h),(.15,0)); htick((0,h+1),(h,h+1)); */ htick((h+1,h),(h+1,h*r),(.15,0));
| |
− | label("$1$",(0,h/2),W,sm); label("$1$",(h/2,h),N,sm); label("$1-r$",(h+1,h*(1+r)/2),E,sm);
| |
− | </asy><br><br>
| |
− |
| |
− | The infinite [[geometric series]] <math>\sum_{n=0}^{\infty} r^n = \frac{1}{1-r}</math>.<br><br></center>
| |
− |
| |
− | <center><asy> unitsize(15); defaultpen(linewidth(1)); pen sm = fontsize(10);
| |
− | real r = 0.55, h = 2.5, n = 7, xsum = 0; pair shiftD = -(0,h*r/(1-r)+2.5);
| |
− | void htick(pair A, pair B, pair ticklength = (0,0.15)){ draw(A--B ^^ A-ticklength--A+ticklength ^^ B-ticklength--B+ticklength); }
| |
− |
| |
− | draw((0,h*r/(1-r))--(0,0)--(h*n,0));
| |
− | for(int i = 1; i < n+1; ++i){
| |
− | draw((h*i,h*(r/(1-r)-xsum-r^(i)))--(h*i,h*(r/(1-r)-xsum))--(0,h*(r/(1-r)-xsum)));
| |
− | if(i < 4)
| |
− | label("$r^"+(string) i+"$", (0,h*(r/(1-r)-xsum-r^(i)/2)), W, sm);
| |
− | htick((h*i,-1),(h*(i-1),-1));
| |
− | if(i < n)
| |
− | label("$1$",(h*(i-1/2),-1),S,sm);
| |
− | else if(i == n)
| |
− | label("$\cdots$",(h*(i-1/2),-1.2),S,sm);
| |
− | xsum += r^i;
| |
− | }
| |
− | draw((0,h*r/(1-r))+shiftD--shiftD--(h*n,0)+shiftD);
| |
− | xsum = 0;
| |
− | for(int i = 1; i < n+1; ++i){
| |
− | draw(shiftD+(h*i,0)--shiftD+(h*i,h*(r/(1-r)-xsum))--shiftD+(h*(i-1),h*(r/(1-r)-xsum)));
| |
− | draw(shiftD+(h*i,h*(r/(1-r)-xsum))--shiftD+(0,h*(r/(1-r)-xsum)),linetype("4 4")+linewidth(0.5));
| |
− | if(i < 4)
| |
− | label("$r^"+(string) i+"$", shiftD+(h*i,h*(r/(1-r)-xsum-r^(i)/2)), ENE, sm);
| |
− | htick(shiftD+(h*i,-1),shiftD+(h*(i-1),-1));
| |
− | if(i < n)
| |
− | label("$1$",shiftD+(h*(i-1/2),-1),S,sm);
| |
− | else if(i == n)
| |
− | label("$\cdots$",shiftD+(h*(i-1/2),-1.2),S,sm);
| |
− | xsum += r^i;
| |
− | }
| |
− | </asy><br><br>
| |
− | The [[arithmetic-geometric series]] <math>\sum_{n=1}^{\infty} nr^n = \sum_{n=1}^{\infty} \sum_{i=n}^{\infty} r^i = \sum_{n=1}^{\infty} \frac{r^{-n}}{1-r} = \frac{r}{(1-r)^2}</math>, also known as Gabriel's staircase.{{ref|2}}<br><br></center>
| |
− |
| |
− | <center>[[#toc|Back to Top]]</center>
| |
| | | |
| == Geometry == | | == Geometry == |