Professional Documents
Culture Documents
In this method, the sum of the squares of the errors calculated at each xi are minimized. The error
is:
e = yj – a0 – a1xj
for each point: (xi,yi)
where:
[2].
Results
When using the least squares method, it produced the equation of the stress-strain line that best
fits the data as:
y= 3.96587e-05x + 1.08184
The value of the coefficient of determination r2 = 0.429173.
This trendline does not pass through the origin. In Figure 2, the line that best fits the data is
shown.
Figure 3 Data and best fit line passing through the origin
Both lines are poor fits to the given data.
Conclusion
This paper analyzed data from a tensile test that showcases a material’s mechanical response. By
creating a best fit straight line, the least squares method in C++ was extremely helpful to produce
a trendline equation. Additionally, we found out that forcing the trendline to include the origin
point of 0 strain and 0 fails to represent the trend of the data.
References
[1] Dr. Corina S. Drapaca, ESC 261M: Computational Methods for Engineers,
esc261m_lecture13_13.pdf and ESC261_PROJECT3_2018.docx. Canvas, web. March, 2018.
[2] ESC 261-Lecture Notes-Least Squares Method, 2018.
Appendix