Looking for a function to define a specific curve, given a single parameter

57 Views Asked by At

The curve

  1. passes through (0,0) and (1,1),
  2. has an area under the curve from x=0 to x=1 that is equal to the parameter (such that a parameter of .5 returns the line y=x),
  3. has a monotonic second derivative evaluated along the curve, and
  4. is axisymmetric around y=1-x.

It would serve the same purpose if I had a function to define a similar curve that passed through (0,1) and (1,0), yielded the line y=1-x with the parameter of .5, and was axisymmetric around y=x.

I can find many (infinite, I suppose) functions that will define curves that meet 1 and 3, of course. I am willing to optimize another parameter or two to approximate 2, as actual equality is nice but not necessary, as is the simplicity of a single function rather than an optimization function and the curve function. 4 has me stumped, though.

2

There are 2 best solutions below

4
On

Here is the way to solve it:

enter image description here

Parameterize your function by an angle $\theta$ centered at $(0,1)$ (blue point), with $\theta = 0$ being downward, and $\theta = \pi/2$ being rightward. Thus we only care about $0 \leq \theta \leq \pi/2$. Moreover, we must have $r(0) = r(\pi/2) = 1$.

To ensure the difficult condition that the function is symmetric with respect to the dashed red line $y = 1-x$, we merely need to ensure that the radius function $r(\theta)$ is symmetric with respect to $\theta = \pi/4$. (Think about it.)

One class of such functions is $r(\theta) = 1 + a \sin (2 \theta)$ for $a$ bounded by some small number. (You can add more harmonic terms, or terms of the form $r(\theta) \propto (\theta - \pi/4)^2$ and such as you like, so long as you ensure the end conditions $r(0) = r(\pi/2) = 1$.)

Now express the $x$ and $y$ coordinates from an analysis of the basic coordinates:

$x(\theta) = r(\theta) \sin \theta$

$y(\theta) = 1 - r(\theta) \cos \theta$.

Now you merely need to use these to express $y(x;a)$ and you're done.

Of course once you have $y(x)$ you can find the stated area,

$$A = \int\limits_{x=0}^1 y(x;a)\ dx$$

and hence you can find $a(A)$.

0
On

All right, so after a bunch of trial and error analysis, I have something that gets most of your requirements, though the scaling on the area under the curve is wrong--I'll let you try to curve fit that if that part is truly necessary.

I figured a hyperbola with the x and y axes as asymptotes might be a good starting place, which led me to this post with some good info. This Desmos sheet shows you some of what I did.

Basically, the top equation using $q$ was a good starting point, but we needed $q = 0$ at $a = 1$, and $q = -1$ at $a = 0$, but also $q = \infty$ at $a = 0.5$ so that we would end up with our line. There's a discontinuity at $a = 0.5, x = 0.5$, but it's not bad.

The rest of the sheet is working out a symmetrical hyperbola for q. Then Wolfram Aplha got me to the final equation:

$$ y\ =\ \frac{\ (2a^{2}-3a)\ x}{\left(2a^{2}-a-1\right)+\left(1-2a\right)x}\ $$

As mentioned, the area under the curve doesn't fit what you want. You could likely map $\alpha$ to a curve-fit function $f(\alpha) = \beta$ to get that.

Hope this helps. Interesting problem.