Formula of an ellipse-like curve with custom skew and min/max points

81 Views Asked by At

I need to figure out the formula for a function of one variable x that looks like an ellipse, but I have control on points:

  • min $x = A$

  • max $x = B$

  • the point $x'$ that curve attains its maximum value (If symmetric, this should be $(B+A)/2$)

  • the max value of $f$ at $x'$

So I found this plot that is close to what I am trying to figure out. I tried to use the entropy function but I don't have control over what I need

EDIT: please ignore my mistake on first plot ( correct is (A+B)/2) thanks Blue

enter image description here

enter image description here

enter image description here

1

There are 1 best solutions below

3
On BEST ANSWER

Let $S=(C,H)$ be the "summit" of your graphical representation.

As suggested by your figures, one can consider two "quarter of ellipses" connected in $S$ using the common equation :

$$\dfrac{(x-C)^2}{L(x)^2}+\dfrac{y^2}{H^2}=1 \ \ \ \Rightarrow \ \ \ \ y=H\sqrt{1-\dfrac{(x-C)^2}{L(x)^2}}$$

with

where semi-axis $L$ is in fact (according to the region)

$$L(x)=\begin{cases}C-A& \ (x<C)\\B-C& \ (x \geq C)\end{cases},$$

a step function that can be written under the following compact expression using the "sign" function :

$$L(x)=\frac12\left[(B-A)+(2C-A-B)\text{sign}(C-x)\right]$$

enter image description here

Fig. 1 : Varying $C$ while maintaining $H$ constant.