InputMode:=Word PrecisionDigits:=16 NotationDigits:=16 "Calculate the perimeter of this ellipse." x^2/a^2+y^2/b^2=1 [a>0,b>0,a>b] "Calculate one fourth the perimeter and multiply it by four." [x>=0,y>=0] ;Simp(User) y=b*SQRT(a^2-x^2)/a ds^2=dy^2+dx^2 ds=SQRT(dx^2+dy^2) ds=SQRT(dx^2+dy^2) ;Simp(User) dy=-b*dx*x/(a*SQRT(a^2-x^2)) ;Simp(User) dy^2=b^2*dx^2*x^2/(a^2*(a^2-x^2)) ;Simp(User) dx^2+dy^2=-b^2*dx^2/(x^2-a^2)-b^2*dx^2/a^2+dx^2 ds=SQRT(-b^2*dx^2/(x^2-a^2)-b^2*dx^2/a^2+dx^2) ;Simp(User) ds=dx*SQRT((x^2*(a^2-b^2)-a^4)/(x^2-a^2))/a perimeter=4*INT(SQRT((x^2*(a^2-b^2)-a^4)/(x^2-a^2)),x,0,a)/a "The perimeter of an ellipse is an elliptic integral." "Change variables so it will be a elliptic integral in the table." t=x^2 x=SQRT(t) dx=dt/(2*SQRT(t)) ;Simp(Sub(#21)) t=a^2 perimeter=4*INT(SQRT((t*(a^2-b^2)-a^4)/(t-a^2))/(2*SQRT(t)),t,0,a^2)/a [a>0,b>0,a>b] perimeter=2*INT(SQRT(a^4-t*(a^2-b^2))/(SQRT(t)*SQRT(a^2-t)),t,0,a^2)/a "Before finding the integral in the table, do a numerical approximation." [a=7.5,b=5] ;Sub(#27) perimeter=2*INT(SQRT((7.5)^4-t*((7.5)^2-5^2))/(SQRT(t)*SQRT((7.5)^2-t)),t,0,(~ 7.5)^2)/(7.5) ;Approx(#30) perimeter=39.66344269140738 "First set i=1, n=3, and h=3." IHAT(x):= AHAT(e):= "The zeros of this rational expression are:" [0,a^2,a^4/(a^2-b^2)] [a>0,b>0,a>b] ei:= "The integral is of the type IHAT(e3)." perimeter=2*(b^2-a^2)*IHAT(e3)/a "Check this equation." [a=[0,a^2,a^4],b=[1,-1,-(a^2-b^2)],m=[0,0,1]] II_AUXH(h,a,b,t):=PRODUCT((a SUB j_+b SUB j_*t)^(-1/2),j_,1,h) II_AUXN(m,n,a,b,t):=PRODUCT((a SUB j_+b SUB j_*t)^m SUB j_,j_,1,n) II_AUX(m,h,n,a,b,t):=II_AUXH(h,a,b,t)*II_AUXN(m,n,a,b,t) AF(m,h,n,a,b,x,y):=II_AUX(m,h,n,a,b,x)-II_AUX(m,h,n,a,b,y) II(m,h,n,a,b,x,y):=INT(II_AUX(m,h,n,a,b,t_),t_,y,x) IHAT(e3)=II([0,0,1],3,3,[0,a^2,a^4],[1,-1,-(a^2-b^2)],a^2,0)/(-(a^2-b^2)) ;Simp(#48) IHAT(e3)=INT(SQRT(t_*(b^2-a^2)+a^4)/(SQRT(t_)*SQRT(a^2-t_)),t_,0,a^2)/(b^2-a^~ 2) perimeter=2*(b^2-a^2)*IHAT(e3)/a ;Simp(User) perimeter=2*INT(SQRT(t_*(b^2-a^2)+a^4)/(SQRT(t_)*SQRT(a^2-t_)),t_,0,a^2)/a "The equation matches." [a=7.5,b=5] ;Simp(Sub(#51)) perimeter=2*SQRT(5)*INT(SQRT(405-4*t_)/(SQRT(t_)*SQRT(225-4*t_)),t_,0,225/4)/~ 3 ;Approx(#54) perimeter=39.66344269140632 "Look up this integral in the table." IHAT(ei)=2*AHAT(ej+ek)+rij*rik*IHAT(-ei) IHAT(e3)=2*AHAT(e1+e2)+r31*r32*IHAT(-e3) "Calculate AHAT(e1 + e2)." AHAT(e1+e2)=AF([1,1,0],3,3,[0,a^2,a^4],[1,-1,-(a^2-b^2)],x,y)/(b^2-a^2) ;Simp(#60) AHAT(e1+e2)=(SQRT(y)*SQRT(a^2-y)*SQRT(x*(b^2-a^2)+a^4)-SQRT(x)*SQRT(a^2-x)*SQ~ RT(y*(b^2-a^2)+a^4))/((a^2-b^2)*SQRT(x*(b^2-a^2)+a^4)*SQRT(y*(b^2-a^2)+a^4)) ;Sub(#61) AHAT(e1+e2)=(SQRT(y)*SQRT(a^2-y)*SQRT(a^2*(b^2-a^2)+a^4)-SQRT(a^2)*SQRT(a^2-a~ ^2)*SQRT(y*(b^2-a^2)+a^4))/((a^2-b^2)*SQRT(a^2*(b^2-a^2)+a^4)*SQRT(y*(b^2-a^2~ )+a^4)) ;Simp(#62) AHAT(e1+e2)=SQRT(y)*SQRT(a^2-y)/((a^2-b^2)*SQRT(y*(b^2-a^2)+a^4)) ;Sub(User') AHAT(e1+e2)=LIM(SQRT(y)*SQRT(a^2-y)/((a^2-b^2)*SQRT(y*(b^2-a^2)+a^4)),y,0,0) ;Simp(#64) AHAT(e1+e2)=0 "Substitute AHAT(e1 + e2)." IHAT(e3)=2*AHAT(e1+e2)+r31*r32*IHAT(-e3) ;Simp(User) IHAT(e3)=r31*r32*IHAT(-e3) RA(i,j,a,b):=a SUB i/b SUB i-a SUB j/b SUB j ;Sub(#68) IHAT(e3)=RA(3,1,a,b)*RA(3,2,a,b)*IHAT(-e3) ;Sub(#70) IHAT(e3)=RA(3,1,[0,a^2,a^4],[1,-1,-(a^2-b^2)])*RA(3,2,[0,a^2,a^4],[1,-1,-(a^2~ -b^2)])*IHAT(-e3) ;Simp(#71) IHAT(e3)=a^6*b^2*IHAT(-e3)/(a^2-b^2)^2 "Substitute IHAT(e3)." perimeter=2*(b^2-a^2)*IHAT(e3)/a ;Simp(User) perimeter=2*a^5*b^2*IHAT(-e3)/(b^2-a^2) "Find the function to evaluate IHAT(-e3)." LOAD("c2002.mth") IHAT(-e3)=ISHAT(IHAT(-e3),[0,a^2,a^4,1],[1,-1,-(a^2-b^2),0],a^2,0) IHAT(-e3)=(b^2-a^2)*I428([[0,a^2,a^4,1] SUB 3,[0,a^2,a^4,1] SUB 2,[0,a^2,a^4,~ 1] SUB 1,[0,a^2,a^4,1] SUB 4],[[1,-1,b^2-a^2,0] SUB 3,[1,-1,b^2-a^2,0] SUB 2,~ [1,-1,b^2-a^2,0] SUB 1,[1,-1,b^2-a^2,0] SUB 4],a^2,0) ;Simp(User') IHAT(-e3)=(b^2-a^2)*I428([a^4,a^2,0,1],[b^2-a^2,-1,1,0],a^2,0) "I428(a, b, x, y) is the integral with n=4 and h=4. I428A(a, b, x, y) is the ~ same integral with n=3 and h=3." "Load the program to evaluate I428A(a, b, x, y)." LOAD("c1998.mth") "Substitute for IHAT(-e3)." perimeter=2*a^5*b^2*I428A([a^4,a^2,0],[b^2-a^2,-1,1],a^2,0) "Calculate the perimeter of the ellipse." [a=7.5,b=5] ;Sub(#85) perimeter=2*(7.5)^5*5^2*I428A([(7.5)^4,(7.5)^2,0],[5^2-(7.5)^2,-1,1],(7.5)^2,~ 0) ;Approx(#88) perimeter=39.66359897322647 PrecisionDigits:=64 NotationDigits:=64 ;Approx(#88) perimeter=39.66359897322647447832915756945768124182520712081625172416815779 "I428(a, b, x, y) could have been used also by adding a factor that is always~ 1." "Substitute for IHAT(-e3)." ;Sub(#85') perimeter=2*a^5*b^2*I428([a^4,a^2,0,1],[b^2-a^2,-1,1,0],a^2,0) [a=7.5,b=5] ;Sub(#95) perimeter=2*(7.5)^5*5^2*I428([(7.5)^4,(7.5)^2,0,1],[5^2-(7.5)^2,-1,1,0],(7.5)~ ^2,0) ;Approx(#97) perimeter=39.66359897322647447832915756945768124182520712081625172416815779