半椭圆
y=3√(1-x^2/4)
椭圆周长=2×∫√(1+y′²)dx
matlab
>> syms x
>> y=3*(1-x^2/4)^(1/2);
>> y1=diff(y,x);
>> f=(1+y1^2)^(1/2)
f =
(1 - (9*x^2)/(16*(x^2/4 - 1)))^(1/2)
>> ss=@(x)(1 - (9*x.^2)./(16*(x.^2/4 - 1))).^(1/2)
ss =
@(x)(1-(9*x.^2)./(16*(x.^2/4-1))).^(1/2)
>> S=2*quad(ss,-2,2)
S =
15.8655