Message Boards Message Boards

Cubic polynomial regression coefficients formulas for Y= a+bx+cx^2+dX^3

Posted 2 years ago

Greetings Community:
The function below is cubic polynomial regression:

ResourceFunction[
 "CurveFitReport"][{{1, 1.8}, {3, 6.4}, {5, 8.7}, {7, 11.5},{9,13.9}}, x,  {"Polynomial", 3}]

Which solves for the curve coefficients as:
Cubic Polynomial fit: 0.01979166666666629x^3 - 0.3665178571428521x^2 + 3.3766369047618894x - 1.17705357142857
From the general equation form:
Y= ax^3 + bx^2 + cx +d, given these XY pairs of data.
Where:
d= -1.17705357142857
c= 3.3766369047618894
b= -0.3665178571428521
a= 0.01979166666666629

I am not sufficiently familiar with Mathematica to learn how to obtain the algebraic formula strings given these 5 XY data pairs for solving for the a, b, c, and d curve coefficients. I understand Mathematica can provide these 4 equations, which solve for a, b, c,and d for this particular set of data from within the program, in algebra expressed as X1..Xn, and Y1..Yn factoring to solve so to speak the longhand version of the matrix math process.

What I am seeking are the formulas that provide these curve coefficients :
a=,
b=,
c=,
d=,

And to understand the commands necessary to call out these algebra strings for other polynomial problems of different orders, such as linear, and quadratic and for variable sets of input data containing >,< 5 XY pairs. I am currently on the Mathematica trial version of 15 days, and realize that it may take a full paid subscription to unlock these formula details from within the solution page: I am willing to go to this step if necessary, and provided the solutions I see are accessible. An example of requesting this, from within the program would be extremely helpful.

ResourceFunction[
 "CurveFitReport"][{{1, 1.8}, {3, 6.4}, {5, 8.7}, {7, 11.5},{9,13.9}}, x,  {"Polynomial", 3}]

I have uploaded an image for these 4 cubic polynomial coefficients formulas which I believe were taken from Mathematica on another persons post. This example shows 4 XY data points. This is an example of what I am looking to generate.

I do not locate any drop down options or gray plus + sign that may open these details I seek. I am aware through other external references that the algebra process is available somewhere inside of this program. Please advise.

Much appreciated.

Attachment

Attachments:
POSTED BY: David Wright

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. Posting code Images doesn't help other members to copy your code. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

You can also embed notebook or attach notebook.

enter image description here

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract