Hi there,

How do I implement cubic regression? I.e. given a series of x-y data points, how do I find the coefficients:

y = ax^3 + bx^2 + cx + d

Am aware that if I differentiate twice, I get:

d2y/dsx2 = 6ax + 2b

so if I can numerically differentiate my x-y data twice, I can find constants a & b by linear regression.

How do I go about differentiating the data. And how do I find constants c & d?

Or is there a better approach?