Approximating the length of an ellipse given equation Can anyone help me with this problem in numerical analysis?

Determine to within $10^{−6}$ the length of the graph of the ellipse with equation
  $$4x^2+9y^2=36$$

Thanks a lot.
 A: You can use a parametric equation of the ellipse:
$$x=3\cos t, \; y=2\sin t$$
Then the length in the first quadrant can be computed as
$$\frac{L}{4}=\int_0^{\pi/2} \sqrt{x'^2(t)+y'^2(t)} \;\mathrm{d}t$$
So the length of the full ellipse is
$$L=4\int_0^{\pi/2} \sqrt{9\sin^2 t+4 \cos^2 t} \;\mathrm{d}t$$
Using $\cos^2t+\sin^2t=1$, this reduces to an elliptic integral
$$L=4\int_0^{\pi/2} 3\sqrt{1- \frac{5}{9}\cos^2 t} \;\mathrm{d}t=4\int_0^{\pi/2} 3\sqrt{1- \frac{5}{9}\sin^2 t} \;\mathrm{d}t=12\mathrm{E}\left(\frac{\sqrt{5}}3\right)$$
Where $\mathrm{E}$ is the complete elliptic integral of the second kind. You can then use a series expansion of this function to compute this to desired accuracy.
If you use a software package to compute $\mathrm{E}(k)$, notice that sometimes the argument is $k^2$, not $k$. For example, in Maxima you would do
(%i1) 12*elliptic_ec(5/9),bfloat,fpprec=20;
(%o1) 1.5865439589290589791b1

A: Taking into account the fact that Jean-Claude Arbaut gave you the answer, let me just precise that the general formula for the circumference of an ellipse is given by $$C=4 a E\left(e\right) $$ where $a$ is the length of the semi-major axis, $e$ the eccentricity and $E$ is the complete elliptic integral of the second kind. The eccentricity itself is defined
according to $$e=\sqrt{1-\frac {b^2}{a^2}}$$
A very good approximation is Ramanujan's: it write $$C \simeq \pi[3(a+b)-\sqrt{(3a+b)+(a+3b)}]$$ Applied to your case $a=3,b=2$, this leads to $C=\pi[15-\sqrt {99}]=15.8654375$ for an exact value equal to $15.8654396$
[Correction]
Ramanujan's formula is 
$$C \simeq \pi[3(a+b)-\sqrt{(3a+b)*(a+3b)}]$$
A: You may use Pythagoras theorem on each triangle defined by the discretization of your ellipse, say $(x_i, y_i)$, so the total arc length would be given by:
$$L = \sum^N_{i=0}(\Delta x_i^2 + \Delta y_i^2 )^{1/2} $$
Where $ \Delta x_i = x_{i+1} - x_{i} $ and $ \Delta y_i = y_{i+1} - y_{i} $. The truncation error, understood as the absolute value of the difference between the numerical and analytical computation will depend on the choice of the spatial steps.
Of course, another way to go is applying a given numerical rule for integrating:
$$   L = 4 \int_A \sqrt{1+(y'(x))^2} \, dx   $$ where A is the $x$ region where the 1st quarter of the ellipse is defined and $y(x)$ is the explicit function which defines the upper part of the ellipse. For example, a Simpson's rule could be applied, where its error is well known.
I hope this helps.
Cheers.
