I need to calculate how many longitude degrees a certain distance from a point are, with the latitude held constant. Here's an illustration:
Here x represents the longitude degrees, the new point can be on either side of the starting point. I'm using the haversine formula, which calculates the distance between two points on a sphere given a radius, $r$, and a pair of coordinates expressed in latiude, $\phi$, and longitude, $\lambda$, degrees:
$d=2r\arcsin\left(\sqrt{\sin^2\left(\dfrac{\phi_{2}-\phi_{1}}{2}\right)+\cos(\phi_{1})\cos(\phi_{2})\sin^2\left(\dfrac{\lambda_{2}-\lambda_{1}}{2}\right)}\right)$
Which can be reduced to, because of the latitude held constant:
$d=2r\arcsin\left(\sqrt{\cos^2(\phi_{1})\sin^2\left(\dfrac{\lambda_{2}-\lambda_{1}}{2}\right)}\right)$
I plugged it into WolframAlpha to isolate $\lambda_{2}$, and got these two solutions:
$\lambda_{2}=\lambda_{1}-2\arcsin\left(\sec(\phi_{1})\sqrt{\sin\left(\dfrac{d}{2r}\right)}\right)$
$\lambda_{2}=2\arcsin\left(\sec(\phi_{1})\sqrt{\sin\left(\dfrac{d}{2r}\right)}\right)+\lambda_{1}$
Here's an example of why I'm confused about this. The distance between two points, $40° lat, 10° lng$ and $40° lat, 11° lng$ is (we assume an earth radius of $6371km$):
$d=2*6371km*\arcsin\left(\sqrt{\cos^2(40°)\sin^2\left(\dfrac{11°-10°}{2}\right)}\right)=85.1798km$
Plugging those numbers into the 2nd of the two isolated formulas, we get:
$\lambda_{2}=2\arcsin\left(\sec(40°)\sqrt{\sin\left(\dfrac{85.1798km}{2*6371km}\right)}\right)+10°=10.0282$
Which is obviously quite far from our desired $11°$, what am I doing wrong here?