Find, programmatically, equation of quartic curve with three points, two of which are turning.

143 Views Asked by At

I have a curve which passes through the origin with gradient zero, and also through the point (d,1) with gradient zero. It also passes through the point (m,n) between the two. I believe this is a quartic with an equation of the form y = ax^4 + bx^3 + cx^2. I need to be able to programmatically find the equation for different m, n, and d. So I need expressions for a, b, and c in terms of m, n, and d.

I have found these three equations:

(1) ad^4 + bd^3 + cd^2 = 1 (from point (d,1))

(2) 4ad^2 + 3bd + 2c = 0 (from gradient at (d,1), divided by d as I know d to be non-zero)

(3) am^4 + bm^3 + cm^2 = n

Can a, b, and c be found programmatically? If not is there another curve which fits my purposes (flat at origin and (d,1), passes through (m,n) somewhere between the two, I must be able to change d, m, and n)?

Many thanks in advance for the help.

1

There are 1 best solutions below

6
On BEST ANSWER

You have three linear equations with three unknowns so it will solve in a few steps. While doing the calculations remember that $d$, $m$ and $n$ represent values while $a$, $b$ and $c$ are variables you want to find.

The working out will depend upon what techniques you know to solve systems of linear equations. I'll add something if you want but without knowing if you know matrices it's pretty ugly looking.

The final answer is:

$$a= \frac{d^3n-3 d m^2+2 m^3}{d^3 m^2 (d-m)^2}$$

$$b= \frac{2\left(-d^4 n+2 d^2 m^2-m^4\right)}{d^3 m^2 (d-m)^2}$$

$$c= \frac{d^4n-4 dm^3+3 m^4}{d^2 m^2 (d-m)^2}$$