1. Mar 19, 2005

### Bob Smith

I'll be honest, I don't understand most of what's going on in this forum, so forgive me if this isn't the right place.

I'm trying to extrapolate a quadratic curve between two points (my x values). These are known, as are the corresponding y values and the y' (or dy/dx if you prefer) values.

Much as I like working things out on my own, I'm not sure where to start on this. Other than trial and error, what methods are there for working this out?

It's been a couple of years since I studied maths properly so I'm kinda rusty to say the least.

Cheers

Bob

2. Mar 19, 2005

### Data

Set up a system of linear equations. In general a quadratic relation has the form

y = Ax^2 + Bx + C

Let's say I want the quadratic to go through three points, (2, 1), (3,1), and (0, 2). Just plug the three points into the equation:

1 = 4A + 2B + C
1 = 9A + 3B + C
2 = C

and solve. In your case it will be a little different because you will be using the derivative as well, but the principle is precisely the same.

Last edited: Mar 19, 2005
3. Mar 19, 2005

### Bob Smith

Ahh excellent thanks, got it working now.

4. Mar 19, 2005

### cronxeh

"Curve fitting". You can also try many other functions like:

y = A*x (Proportional)
y = m*x + b (Linear)
y = a*x^2 + b*x + c (Quadratic)
y = A + B*x + C*x^2 + D*x^3 + .. (Polynomial)
y = A*x^B (Power)
y = A/x (Inverse)
y = A*exp(-C*x) + B (Natural Exponent)
y = A*ln(B*x) (Natural Logarithm)
y = A*10^(B*x) (Base-10 Exponent)
y = A*sin(B*x+C)+D (Sine)
y = 1/(sqrt(2*3.14159)*S)*exp(-(x-M)^2/(2*S^2)) (Normalized Gaussian)
y = A*exp(-(x-B)^2/(C^2))+D (Gaussian)