Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Identify the linear regression and nonlinear regression to fit the given data fo

ID: 2088822 • Letter: I

Question

Identify the linear regression and nonlinear regression to fit the given data for the following problem. Hooke's law, which holds when a spring is not stretched too far, signifies that the extension of the spring and the applied force are linearly related. The proportionality is parameterized by the spring constant k. A value for this parameter can be established experimentally by placing known weights onto the spring and measuring the resulting compression. Such data were plotted in the given figure. Notice that above a weight of 40 x 104 N, the linear relationship between the force and displacement breaks down. Use a linear regression to match the linear part and use a nonlinear regression to match the nonlinear portion. Then, use a piecewise function to represent both portions. Verify by plotting the function together witlh the data points and discussing results. placement, m 0.10 17 0.27 035 039 0.42 043 0.44 orce, 104 N |10 |20 ?? 140 150 160 170 180 Hooke's law Nonideal behavior: spring is hardening 40 0.2 Displacement, m 0.4

Explanation / Answer

For the given data, in the linear region, a curve can be fit. This is done by using Matlab. Input the linear data in Matlab and the curve fitting tool.

The linear data is
force = 10. 20, 30, 40.
displacement = 0.1, 0.17, 0.27, 0.35.

then the linear fit is given by a polynomial
     f(x) = p1*x + p2 (where p1 = 117.2; p2 = -1.068)

Now, for non-linear region, in a similar fashion:
The non-linear data is
force = 50, 60, 70, 80.
displacement = 0.39, 0.42, 0.43, 0.44.

A non-linear model is given by
   f(x) = p1*x^2 + p2*x + p3    (where p1 = 1.271e+04; p2 = -9939; p3 = 1993)

A function representing both regions is given as

f(x) = p1*x^5 + p2*x^4 + p3*x^3 + p4*x^2 + p5*x + p6
      (where p1 =   2.967e+05; p2 = -3.842e+05; p3 = 1.916e+05; p4 = -4.554e+04; p5 =    5203; p6 = -211)