Disagreement over the arc length of an ellipse I'm reading Elliptic Functions and Elliptic Integrals by Prasolov and Solovyev. On page $53$, it reads:

The ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ can be given parametrically by the formulas $x=a\cos \varphi$, $y=b\sin\varphi$. The differential $dl$ of the length of an arc on the ellipse is equal to $\sqrt{dx^2+dy^2}=d\varphi\sqrt{a^2\cos ^2\varphi +b^2\sin ^2\varphi}$. If $a=1$ and $b=\sqrt{1-k^2}$, then $dl=d\varphi \sqrt{1-k^2\sin ^2\varphi}$. In this case the length of the arc on the ellipse between the end point of the small half axis, $B$, and the point $M=(\cos\varphi ,b\sin\varphi )$ is equal to $E (\varphi )=\int_0^{\varphi}\sqrt{1-k^2\sin ^2\psi}\, d\psi .$

I think there is an error. My approach is the following:
The upper half of the ellipse (there are the points $B$ and $M$) can be represented by $y=b\sqrt{1-x^2}$. The arc length, measured from the point $B=(0,b)$ to an arbitrary point in the first quadrant $M$ in terms of the horizontal component of $M$ is
$$s=\int_0^x \sqrt{\frac{1-k^2t^2}{1-t^2}}\, dt$$
where $b=\sqrt{1-k^2}$. The substitution $u=\arcsin t$ gives
$$s=\int_0^{\arcsin x}\sqrt{1-k^2\sin ^2 u}\, du.$$
The ellipse is parametrized by $x=\cos\varphi$, $y=b\sin\varphi$, therefore if $M=(\cos\varphi ,b\sin\varphi )$, then
$$\begin{align}s&=\int_0^{\arcsin \cos\varphi}\sqrt{1-k^2\sin ^2 u}\, du\\&=\int_0^{\frac{\pi}{2}-\varphi}\sqrt{1-k^2 \sin ^2 u}\, du.\end{align}$$
So the required arc length should be $E\left(\frac{\pi}{2}-\varphi\right)$, not $E(\varphi )$. A considerable amount of the following theorems in the book is "proved" assuming $E (\varphi )$ for the arc length, which seems a bit worrying. Maybe I'm missing something.
 A: If $x=a\cos \varphi$ and $y=b\sin\varphi$ then
$$
(dx)^2+(dy)^2 = a^2\sin^2\varphi\, d\varphi +b^2\cos^2\varphi\, d\varphi,
$$
contrary to the book's claim that it would be
$a^2\cos^2\varphi\, d\varphi +b^2\sin^2\varphi\, d\varphi.$
Yet $x=a\cos \varphi$ and $y=b\sin\varphi$ also implies that
$(x,y) = (a,0)$ when $\varphi = 0$ and $(x,y) = (0,b)$ when $\varphi = \frac\pi2,$  which implies that to integrate the curve from $(0,b)$ to an arbitrary point on the ellipse you should choose $\frac\pi2$ and not $0$ as the fixed end of your integral.
So altogether the book is not making sense.
But if we make just one change -- instead of $x=a\cos\varphi$ and $y=b\sin\varphi$,
let $x=a\sin\varphi$ and $y=b\cos\varphi$ --
then $(x,y) = (0,b)$ when $\varphi=0,$ it therefore makes sense to use $0$ as the fixed end of the integral when integrating the curve length from $(0,b)$ to an arbitrary point on the ellipse, and
$$
(dx)^2+(dy)^2 = a^2\cos^2\varphi\, d\varphi +b^2\sin^2\varphi\, d\varphi
$$
as claimed in the book.
So I will guess that the original intention was to set
$x=a\sin\varphi$ and $y=b\cos\varphi,$ but sometime between the original conception
of the integration and the time when the book was typeset, someone mistakenly wrote
the more usual formulas $x=a\cos\varphi$ and $y=b\sin\varphi$ instead of the particular formulas that are correct for this particular problem.
