Calculate curvature necessary for line segment to cover given X-axis distance (This is very similar to my previous question. In fact, I feel I probably have all the answers there, but I don't quite know how to apply them in this new problem. I'm essentially trying to solve the same problem as in the linked question, but on the X axis, rather than the Y axis.)
Consider a line segment of known, fixed length, being curved into an arc:

Imagine these lines are exactly the same length. The rate of curvature for each is constant (they are circular arcs). Observe that as the degree of arc increases, the horizontal distance covered by the arc increases.
My question is twofold:

*

*Given a fixed arc length, how can I calculate the amount of curvature needed to reach a given width?


*How can I determine the maximum width a line of a given length could arc in this manor? (This would be the upper limit of the function requested above. By my testing, it seems that after ~110°, the arc begins to grow narrower and continues shrinking as the angle increases. I would need to know the maximum width of a of my arc length to determine if a given horizontal distance was within reach in the first place.)
Let me know if anymore information is needed or if you need anything clarified. I'm not the best at reading mathematical formulas, so I can only hope you'll be patient with me if I have questions. Thank you for your time.
 A: Assuming the line segment is originally along the $y$-axis, extending between $(0,0)$ and $(0, L)$.
Next the linear segment is bent to form an arc, whose subtended angle at the center of the arc is $\theta$, and the radius of the arc is $r$
Then the equation of points on the arc is
$ p(\alpha) = (r, 0) + r (-\cos(\alpha), \sin(\alpha) ) $
where $0 \le \alpha \le \theta $.
From the length, we know that
$ r \theta = L $
Therefore,
$ p(\alpha) = \dfrac{L}{\theta} ( 1 - \cos(\alpha), \sin(\alpha) ) $
Scanning the values of $\alpha \in [0, \theta]$, we find the range of values of the $x$ coordinate of $p(\alpha)$.
Now $(1 - \cos(\alpha))$ is increasing over $[0, \pi]$ and decreasing over $[\pi, 2 \pi]$.  Therefore, for $0 \le \theta \le \pi $, the horizontal distance covered is
$ X_{Max} = \dfrac{L}{\theta} (1 - \cos(\theta) )  $
And for $ \pi \le \theta \le 2 \pi $
$ X_{Max} = \dfrac{2 L}{\theta} $
This piecewise-defined function is plotted using Desmos and shown below

So, given a certain $ \dfrac{X_{Max}}{L} $, one should be able to find the corresponding value of $\theta$.  In many cases there will be two possible value for $\theta$, in which case, one can choose the minimum of the two.
To automate this, you have to find the peak point of the function $\dfrac{(1 - \cos(\theta)) }{\theta} $, and this can be done numerically using Newton's method, applied to the derivative.  Once the peak is found, lets say it is $(\theta_1, Y_1)$, then given any $ 0 \le y \le Y_1$ one would be able to find the values of $\theta$ that result in $f(\theta) = y $, using simple numerical techniques, such as bracketing, combined with Newton's method, which is very robust.
The details are as follows.
Let $f(\theta) = \dfrac{ 1 - \cos(\theta) }{\theta} $, then the derivative is
$ f'(\theta) = \dfrac{ sin(\theta)\theta + \cos(\theta) - 1}{\theta^2} $
Setting $f'(\theta) = 0 $ we want to find the solution of
$ \sin(\theta) \theta + \cos(\theta) - 1 = 0 $
And this can found using Newton's method applied to
$g(\theta) = \sin(\theta) \theta + \cos(\theta) - 1 $
whose derivative is
$ g'(\theta) = \cos(\theta) \theta $
Here's the code I used to find $\theta_{peak}$
Public Function theta_peak() As Double
Dim g, gp As Double

' Find t such that g(t) = 0

' g(t) = t sin(t) + cos(t) - 1 

' derivative gp(t) = t cos(t)

p = WorksheetFunction.Pi()

lconverged = 0

t =  1.2 * p / 2

For i = 1 To 100

g = t*sin(t) + cos(t) - 1

gp = t*cos(t)

If Abs(g) < 0.00000001 Then
   lconverged = 1
   Exit For 
End If

dt = -g / gp

If Abs(dt) < 0.00000001 Then
   lconverged = 1
   Exit For
End If

t = t +  dt

Next i

If Not (lconverged = 1) Then
   MsgBox ("did not converge")
   Exit Function
End If

theta_peak = t

End Function

The angle returned by this function is approximately $2.3311 \text{  radians} $ (equivalent to $133.56^\circ$)
Now you should calculate the maximum value of $\dfrac{W}{L}$ as
$\bigg(\dfrac{W}{L}\bigg)_{Max} = Y = f(\theta_{peak}) $
where $f(\theta) = \dfrac{1 - \cos(\theta)}{\theta} $
Looking at the graph given above, we know that for $ 0 \le y \le Y $ there will always be at least one solution for $f(\theta) = y $.  Moreover, one can say that for $ 0 \le y \le \dfrac{1}{\pi} $ there will be only one solution $\theta$ and that solution satisfies $0 \lt \theta \lt \theta_{peak}$.  While if $ \dfrac{1}{\pi} \lt y \lt Y $ , then we will have two solutions, one being less than $\theta_{peak}$ and one greater than $\theta_{peak} $.
The following subroutine and the function that follows find the values of the solutions (whether it is one or two solutions).
Public Sub Find_Thetas(W2L, t1, t2, n )

t0 = theta_peak()

Ypeak = (1 - cos(t0))/t0

If W2L > Ypeak Then

n = 0
Exit Sub

Elseif Abs(W2L - Ypeak) < 1E-5 Then

n = 1
t1 = t0

Exit Sub

Endif

' now there will one solution t1 < t0 and another solution
' t2 > t0

t1 = t0 - 0.2
t1 = Find_Single_Solution( W2L , Ypeak , t1 ) 

t2 = t0 + 0.2
t2 = Find_Single_Solution( W2L , Ypeak, t2)

n = 2

End Sub

Public Function Find_Single_Solution( W2L, Ypeak, t ) As Double

'   we want to solve  (1 - cos(t)) / t = W2L  or  2 / t = W2L
'   The function f(t) = W2L t + cos(t) - 1  for 0 < t < pi
'   and f(t) = t W2L - 2 

p = WorksheetFunction.Pi()

For i = 1 To 100

If t < p then
f = W2L*t + cos(t) - 1

fp = W2L - sin(t)

Else

f = W2L*t - 2
fp = W2L

Endif

If Abs(f) < 0.00000001 Then
   lconverged = 1
   Exit For 
End If

dt = -f / fp

If Abs(dt) < 0.00000001 Then
   lconverged = 1
   Exit For
End If

t = t +  dt

Next i

If Not (lconverged = 1) Then
   MsgBox ("did not converge")
   Exit Function
End If

Find_Single_Solution = t

End Function

