Archimedes's quadrature of the parabola 
Andy Long, MAT305, NKU, Fall 2009

Background for Archimedes's quadrature of the parabola:
-- Good description of the problem, and the solution method: 
	http://en.wikipedia.org/wiki/The_Quadrature_of_the_Parabola
-- Source of Archimedes's text: 
	http://www.math.ubc.ca/~cass/archimedes/parabola.html
-- Source of Archimedes's geometric series solution of the area: 
	http://www.math.ubc.ca/~cass/archimedes/parabola/para250.html

f[x_]=1-x^2

Clear[a];
s[x_]=(1-a)*(x+1)

Int=Integrate[f[x]-s[x],{x,-1,a}]

a=.6;
Plot[{f[x],s[x]},{x,-1,1}]
Plot[{f[x]-s[x]},{x,-1,a}];
Clear[a];

m=(a-1)/2; fm=f[m];

s1[x_]=Simplify[fm/(m+1)*(x+1)]

s2[x_]=Simplify[(f[a]-fm)/(a-m)(x-m)+fm]

a=.6;Plot[{f[x],s[x],s1[x],s2[x]},{x,-1,1}]
Plot[{f[x]-s[x],f[x]-s1[x],f[x]-s2[x]},{x,-1,1}];
Clear[a];

T=Simplify[Integrate[s1[x]-s[x],{x,-1,m}]+Integrate[s2[x]-s[x],{x,m,a}]]

aLeft=m;
sLeft[x_]=s1[x]

IntLeft=Integrate[f[x]-sLeft[x],{x,-1,aLeft}]

a=.6;Plot[{f[x],sLeft[x]},{x,-1,1}]
Clear[a];

mLeft=(aLeft-1)/2; fmLeft=f[mLeft];

sLeft1[x_]=fmLeft/(mLeft+1)*(x+1)

sLeft2[x_]=(f[aLeft]-fmLeft)/(aLeft-mLeft)(x-mLeft)+fmLeft

a=.6;Plot[{f[x],s[x],s1[x],s2[x],sLeft1[x],sLeft2[x]},{x,-1,1}]
Clear[a];

TLeft=Simplify[Integrate[sLeft1[x]-sLeft[x],{x,-1,mLeft}]+Integrate[sLeft2[x]-sLeft[x],{x,mLeft,m}]]

Simplify[IntLeft/Int]
Simplify[TLeft/T]

aRight=m;faRight=f[aRight];
sRight[x_]=s2[x]

IntRight=Integrate[f[x]-sRight[x],{x,m,a}]

a=.6;Plot[{f[x],sRight[x]},{x,-1,1}];Clear[a];

mRight=(m+a)/2; fmRight=f[mRight];

sRight1[x_]=Simplify[(fmRight-faRight)/(mRight-faRight)*(x-m)+faRight]

sRight2[x_]=(f[a]-fmRight)/(a-mRight)(x-mRight)+fmRight

a=.6;Plot[{f[x],s[x],sLeft[x],sRight[x],sRight1[x],sRight2[x]},{x,-1,1}]
Clear[a];

TRight=Simplify[Integrate[sRight1[x]-sRight[x],{x,m,mRight}]+Integrate[sRight2[x]-sRight[x],{x,mRight,a}]]

Simplify[IntRight/Int]
Simplify[TRight/T]