I want an equation $y=a\cosh(\frac{x-b}{a})+c$ for a catenary opening upward that passes through $(x_1,y_1)$ and $(x_2,y_2)$. WLOG, assume $x_2>x_1$.
Let $L$ be the length of the catenary between $(x_1,y_1)$ and $(x_2,y_2)$
I want an equation $y=a\cosh(\frac{x-b}{a})+c$ for a catenary opening upward that passes through $(x_1,y_1)$ and $(x_2,y_2)$. WLOG, assume $x_2>x_1$.
Let $L$ be the length of the catenary between $(x_1,y_1)$ and $(x_2,y_2)$
Take the horizontal separation (the span) $S = x_2-x_1$ and the vertical separation $h = y_2-y_1$.
But you also need the catenary constant $a$ which describes the curvature of the curve (in units of length). If total length $L$ is given then one needs to solve for $a$ in
$$ L = a \left( \sinh \left( \frac{ x_2 - x_c}{a} \right) - \sinh \left( \frac{x_1-x_c}{a} \right) \right) \tag{1} $$
Where the lowest point is $(x_c,y_c)$ that is evaluated with the following exact equations.
$$ x_c =x_1 + \frac{S}{2} +a\, \sinh^{-1} \left( \frac{h \hat{e}^{S/(2a)}}{a(1-\hat{e}^{S/a})} \right) \tag{2}$$
and
$$y_c = y_1 -a \left( \cosh \left( \frac{x_c-x_1}{a} \right) -1 \right) \tag{3}$$
So if $L$ is given, one must solve (1) and (2) simultaneously which is not possible to do analytically because (1) is of the form of $y = x \exp(x)$ which is unsolvable for $x$.
The combined (1) and (2) equations are
$$ L = 2 a \sinh \left( \frac{S}{2 a} \right) \sqrt{1 + \left( \frac{h \hat{e}^{S/(2a)}}{a(1-\hat{e}^{S/a})} \right)^2} $$
which must be solved for $a$ when $L$ is given. But in many cases, the horizontal tension $H$ and the unit weight of the cable is given, providing with a direct estimation of $a = \frac{H}{w}$.
The equation for the curve is
$$ \boxed{ y(x) = y_1 + a \left( \cosh \left( \frac{x-x_c}{a} \right)- \cosh \left( \frac{x_1-x_c}{a} \right) \right) } \tag{4}$$
You can try for yourself to see that $y(x_1) = y_1$ and $y(x_2)=y_2$
An example of the equations above is shown below
taken from my answer(s) in SE #1 and SE #2
Example is $(x_1,y_1) = (50,15)$ and $(x_2,y_2) = (450, 45)$ with a catenary constant $a = H/w = 300$
These points result in
$$S=450-50 = 400$$
and
$$h = 45-15 = 30$$
The catenary constant
The lowest point is
$$x_c = 50 + \frac{400}{2} + 300 \sinh^{-1} \left( \frac{30 \exp(400/(2\,300)}{300 (1-\exp(400/300))} \right) = 50 + 200 - 20.89897 = 229.101028 $$
$$y_c = 15 + 300 (1-1.183563) = -40.06883 $$
The shape for this example is
$$ y=15+300 \left( \cosh \left( \frac{x}{300}-0.7636700940207649 \right)-\cosh \left(-0.5970034273540983\right) \right) $$
You can delve into C# code to handle catenaries in my GitHub - CatenaryCalculator.cs
/// <summary>
/// Calculate the lower point on the catenary (center point)
/// </summary>
/// <param name="span">The span</param>
/// <param name="w">The unit weight</param>
/// <param name="H">The horizontal tension</param>
/// <returns>A position vector in (x,y) coordinates</returns>
public static Vector2 CenterPosition(Vector2 span, double w, double H)
{
double a=H/w;
double η=span.X/(2*a);
double xc=span.X/2+a*DoubleEx.Asinh((span.Y*Math.Exp(η))/(a*(1-Math.Exp(2*η))));
double yc=-a*(Math.Cosh(-xc/a)-1);
return new Vector2(xc, yc);
}
A Desmos implementation of the above linked. Change the parameter $t=\frac{S}{2a}$ to get the length required.
WLOG, assume $x_2>x_1$.
Let $L$ be the length of the catenary between $(x_1,y_1)$ and $(x_2,y_2)$
$y_1<y_2$ and $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}<L<k\sinh(\frac{x_2-x_1}{k})$, such that $k$ is the unique solution to $$0=x\cosh(\frac{x_2-x_1}{x})+y_1-x-y_2$$
The length $L$ is not enough so that the low point must occur inside of the interval from $x_1$ to $x_2$, and $y_1<y_2$
These two conditions mean that the low point of the catenary occurs at an $x$ value less than $x_1$
$$g(x)=x_1-x\cosh^{-1}(\frac{y_1-c}{x})$$
$$f(x)=x_1-x_2+x(\cosh^{-1}(\frac{y_2-c}{x})-\cosh^{-1}(\frac{y_1-c}{x}))$$
$$a=f^{-1}(0)$$
$$b=g(a)$$
$$\alpha(c)=f^{-1}(0)$$
$$\beta(c)=g(\alpha(c))$$
Then an upward-opening catenary through the desired points can be generated by choosing a value of c for the function
$$y=\alpha(c)\cosh(\frac{x-\beta(c)}{\alpha(c)})+c$$
$y_1<y_2$ and $L=k\sinh(\frac{x_2-x_1}{k})$, such that $k$ is the unique solution to $$0=x\cosh(\frac{x_2-x_1}{x})+y_1-x-y_2$$
The length L is exactly enough so that the low point of the catenary must occur at either $x_1$ or $x_2$
These two conditions mean that the low point is at $(x_1,y_1)$
The upward-opening catenary through the desired points can be generated by the function
$$y=k\cosh(\frac{x-x_1}{k})+y_1-k$$
where $k$ is the unique solution to
$$0=x\cosh(\frac{x_2-x_1}{x})+y_1-x-y_2$$
$L>k\sinh(\frac{x_2-x_1}{k})$, such that $k$ is the unique solution to $$0=x\cosh(\frac{x_2-x_1}{x})+y_1-x-y_2$$
The length $L$ is enough so that the low point must occur inside the interval from $x_1$ to $x_2$
These two conditions mean that the low point of the catenary occurs at an $x$ value that satisfies $x_1<x<x_2$
$$g(x)=x_1+x\cosh^{-1}(\frac{y_1-c}{x})$$
$$f(x)=x_1-x_2+x(\cosh^{-1}(\frac{y_2-c}{x})+\cosh^{-1}(\frac{y_1-c}{x}))$$
$a$ is either zero of $f$ and
$$b=g(a)$$
$\alpha(c)$ is either zero of $f$ and
$$\beta(c)=g(\alpha(c))$$
Then an upward-opening catenary through the desired points can be generated by choosing a value of c for the function
$$y=\alpha(c)\cosh(\frac{x-\beta(c)}{\alpha(c)})+c$$
$y_1>y_2$ and $L=k\sinh(\frac{x_2-x_1}{k})$, such that $k$ is the unique solution to $$0=x\cosh(\frac{x_2-x_1}{x})+y_2-x-y_1$$
The length L is exactly enough so that the low point of the catenary must occur at either $x_1$ or $x_2$
These two conditions mean that the low point is at $(x_2,y_2)$
The upward-opening catenary through the desired points can be generated by the function
$$y=k\cosh(\frac{x-x_2}{k})+y_2-k$$
where $k$ is the unique solution to
$$0=x\cosh(\frac{x_1-x_2}{x})+y_2-x-y_1$$
$y_1>y_2$ and $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}<L<k\sinh(\frac{x_2-x_1}{k})$, such that $k$ is the unique solution to $$0=x\cosh(\frac{x_2-x_1}{x})+y_1-x-y_2$$
The length $L$ is not enough so that the low point must occur inside of the interval from $x_1$ to $x_2$, and $y_1>y_2$
These two conditions mean that the low point of the catenary occurs at an $x$ value greater than $x_2$
$$g(x)=x_2+x\cosh^{-1}(\frac{y_2-c}{x})$$
$$f(x)=x_1-x_2+x(\cosh^{-1}(\frac{y_1-c}{x})-\cosh^{-1}(\frac{y_2-c}{x}))$$
$$a=f^{-1}(0)$$
$$b=g(a)$$
$$\alpha(c)=f^{-1}(0)$$
$$\beta(c)=g(\alpha(c))$$
Then an upward-opening catenary through the desired points can be generated by choosing a value of c for the function
$$y=\alpha(c)\cosh(\frac{x-\beta(c)}{\alpha(c)})+c$$
WLOG, assume $x_2>x_1$.
Let $L$ be the length of the catenary between $(x_1,y_1)$ and $(x_2,y_2)$
$$S=x_2-x_1$$
$$h=y_2-y_1$$
$$A(t)=\frac{S}{2t}$$
$$B(t)=\frac{S}{2}+A(t)\sinh^{-1}\left(\frac{he^{t}}{A(t)(1-e^{2t})}\right)=\frac{S}{2}+A(t)\sinh^{-1}\left(\frac{-h}{2A(t)\sinh\left(t\right)}\right)$$
Such that $t$ is the solution to $$L=2A(t)\sinh\left(t\right)\sqrt{1+\left(\frac{he^{t}}{A(t)\left(1-e^{2t}\right)}\right)^{2}}=A(t)\sinh\left(\frac{S-B(t)}{A(t)}\right)+A(t)\sinh\left(\frac{B(t)}{A(t)}\right)$$
$$ \boxed{ y=A(t)\left(\cosh\left(\frac{x-B(t)-x_{1}}{A(t)}\right)-\cosh\left(\frac{B(t)}{A(t)}\right)\right)+y_{1} }$$
Let k be the solution to $0=x\cosh\left(\frac{x_{1}-x_{2}}{x}\right)-|y_{2}-y_{1}|-x$
If $L>k\sinh\left(\frac{x_{2}-x_{1}}{k}\right)$ then the lowest point of the catenary will occur between $x_1$ and $x_2$
If $L=k\sinh\left(\frac{x_{2}-x_{1}}{k}\right)$ then the lowest point of the catenary will occur at whichever is lower of the two endpoints
If $L<k\sinh\left(\frac{x_{2}-x_{1}}{k}\right)$ then the lowest point of the catenary will occur outside of the interval from $x_1$ to $x_2$