Problems approaching the Brachistochrone problem

I am having trouble understanding some of what the author mentions in this question regarding the Brachistochrone problem:

Brachistochrone

If a point-like mass is rolling down a hill from a point $A$ to a point $B$, the time it takes the mass to get from $A$ to $B$ depends on the profile of the hill. The Brachistochrone Curve is the profile that minimizes the time and we can find this profile using a Lagrangian extremization procedure. You can easily convince yourself that one can always find profiles which would make the time taken arbitrarily long, so if one finds a finite curve that extremizes the time taken, that curve should necessarily be a minimum.

Before jumping to the core of this problem, let us first look at the ‘cycloid’ curve, which can be thought of as the curve a fixed point on a circle of radius $R$ draws as the circle ‘rolls’ along a straight line (see left of Fig. 4). With $\theta$ as the angle parameterizing the circle’s rotation, the coordinates on the curve are $$x=R(\theta-\sin\theta)\quad\text{and}\quad y=R(1-\cos\theta)$$ The derivatives along that curve are $x'(\theta) = R(1-\cos\theta)$ and $y'(\theta)=R \sin\theta$ and bearing in mind that $\cos\theta=1-y/R$, ie $x'(\theta)=y$, we have $$\left(x'(y)\right)^{-1}=y'(x)=\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{y'(\theta)}{x'(\theta)}=\sqrt\frac{2R-y}{y}\tag{1}$$

Firstly, I don't understand how the leftmost side of $(1)$ is true, is this a typo, or is $x'\equiv\frac{\mathrm{d}x}{\mathrm{d}\theta}$ really a function of $y$, ($x'=x'(y)$)? Now looking at the central equality in $(1)$, then, by the chain rule $$\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\mathrm{d}y}{\mathrm{d}\theta}\frac{\mathrm{d}\theta}{\mathrm{d}x}=\frac{R\sin\theta}{y}\ne \sqrt\frac{2R-y}{y}$$

But even taking the given equality in $(1)$, $$\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{y'(\theta)}{x'(\theta)}=\frac{R\sin\theta}{y}\ne \sqrt\frac{2R-y}{y}$$ This was done by simple insertion of the equations given in the question, but either way, I still cannot seem to arrive at the correct answer of $\sqrt\frac{2R-y}{y}$.

I am almost certain that the chain-rule must be being used somewhere, and at a wild guess perhaps there is some trick to it whereby in $(1)$ $$\frac{y'(\theta)}{x'(\theta)}{\stackrel{?}{=}}\frac{\frac{\mathrm{d}y}{\mathrm{d}\theta}}{\frac{\mathrm{d}x}{\mathrm{d}\theta}}$$

I don't doubt that I am missing something very simple, so any hints or tips that lead me to the answer would be greatly appreciated.


$\require{begingroup}\begingroup\renewcommand{\dd}[1]{\,\mathrm{d}#1}$Regarding the leftmost side of $(1)$, it's just the notation and there's no typo.

Here the author is not adopting the conventions that $x'\equiv\dd{x}/\dd{\theta}$ (implicitly to distinguish from, for example, $\dot{x} = \dd{x}/\dd{t}$) but the other convention. The derivative is denoted with a prime for anything, and it is written explicitly as a function with an argument, as in $x'(u)\equiv\dd{x}/\dd{u}$.

Namely, merely by definition of notation, $$x'(y)\equiv \frac{\dd{x}}{\dd{y}}~,\quad x'(\theta)\equiv \frac{\dd{x}}{\dd{\theta}}~,\quad y'(x)\equiv \frac{\dd{y}}{\dd{x}}~,\quad x'(\theta)\equiv \frac{\dd{x}}{\dd{\theta}}$$ The fact that $\bigl(x'(y)\bigr)^{-1}=y'(x)$ is the basic formula for the derivative of the inverse function.


As for the rightmost of $(1)$, note that

$$y=R(1-\cos\theta) \implies \cos\theta=1-\frac{y}R \implies \sin\theta=\sqrt{\frac{2y}R-\frac{y^2}{R^2}}$$ Plug it back in we get $$\frac{\dd{y}}{\dd{x}}=\frac{R\sin\theta}{y}= \frac{\sqrt{2yR-y^2} }y = \sqrt{\frac{2Ry-y^2}{y^2}}= \sqrt{\frac{2R-y}y}$$ as desired.$\endgroup$