How to write exponential function for curve that pass 4 or more points

3.5k Views Asked by At

Given 3 points, we could write exponential function for a curve that would pass those points in $y = ax^n + b$ form

So I wonder that, could we write a function in exponential form that would pass 4 points, which is not quadratic or cubic bezier

Or are there any formula that could construct a function for curve to pass any given points?

Edit : Sorry I was misunderstand the word exponential function. What I really mean is rational exponent function

I don't know what it called but it not polynomial. Something like $y = ax^{1.5} + b$ but can pass any 4 or more points

3

There are 3 best solutions below

2
On

As the equation $y=ax^n+b$ has three independent parameters, you can constrain it to pass through three given points, but not more.

If you add more terms or terms with more coefficients, you can increase the flexibility. For example, the linear combination of four independent functions.

Possibilities are infinite.

3
On

You can try taking a look at Lagrange polynomials.

In general, if you have $n$ points, there exists a polynomial of degree at most $n$ that goes through those points. In the example linked above, notice that $f(2) = 4$. When we plug in $2$ into the Lagrange polynomial, notice that the first term and the last term equals zero (since $x-2 = 2-2 = 0$ in the numerator) and in the middle term, we get $$4\cdot \frac{x-1}{2-x} \cdot \frac{x-3}{2-3} = 4 \cdot \frac{2-1}{2-1} \cdot \frac{2-3}{2-3} = 4(1)(1) = 4,$$ and so we get $f(2) = 0+4+0 = 4$.

Similarly, if we plug in the $x$ in the first point, you get $1$ in the first term and the other terms end up being zero. The same kind of thing happens with the third point.

So you can do the same kind of thing with 4 points and get up to a 4th degree polynomial which could be written as a Lagrange polynomial with 4 terms.

EDIT:

Suppose that we only want an exponential function. In other words, some sequence of transformations (translations, reflections, stretches/dilations) of the function $e^x$. Then such a function would look like $f(x) = a\cdot e^{b(x-c)}+d$ where $a,b,c,d \in \mathbb{R}$ where $a$ and $b$ are nonzero.

But notice, $$f(x) = a\cdot e^{b(x-c)}+d = (a \cdot e^{-bc})e^{bx}+d = ke^{bx}+d,$$

where $k = a \cdot e^{-bc}$.

This means that every exponential function $f$ can be written as, $$f(x) = ae^{bx}+c,$$ where $a,b,c \in \mathbb{R}$ where $a$ and $b$ are nonzero.

Now suppose that you have four points $(x_1, y_1), (x_2, y_2), (x_3, y_3), (x_4, y_4)$ and you want to find the values of $a,b,c$ you need to fit your four points to an exponential function. Then for each $(x_i, y_i)$ you have the equation,

$$y_i = f(x_i) = ae^{bx_i}+c.$$

Notice you have four equations (one for each point) and three variables you need to solve for ($a, b, c$) so in most cases, this system will have no solutions, hence no exponential function will exist that will fit your four points.

6
On

QUESTION : could we write a function in exponential form that would pass 4 points, which is not quadratic or cubic Bezier ?

ANSWER : Yes, for example $$y=a(x-\mu)^\nu+b$$ Determine the parameters $a\:,\:b\:,\:\nu\:,\:\mu$ according to the coordinates of the four points with numerical calculus.