---
title: "Quadratic least squares fit"
subject: "Numerical Method"
chapter: 4
key: "semester_4/numerical_method:quadratic-fit-least-squares"
source: https://www.bctengineer.com/q/semester_4/numerical_method/quadratic-fit-least-squares
site: BCT Engineering
---

# Quadratic least squares fit

Numerical Method · Chapter 4: Interpolation

- Asked in: 2071 Bhadra, 8 marks
- Video: [Least squares (quadratic example)](https://www.youtube.com/watch?v=M8eZLfmKgMo) — CBlissMath
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/quadratic-fit-least-squares
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-4

## Question

Find the best fit curve in the form of y = a + bx + cx² using least square approximation from the following discrete data.
| x | 1.0 | 1.5 | 2.0 | 2.5 | 3.0 | 3.5 | 4.0 |
|---|---|---|---|---|---|---|---|
| y | 1.1 | 1.3 | 1.6 | 2.0 | 2.7 | 3.4 | 4.1 |

## Short answer

Normal equations give a=1.0357, b=−0.1929, c=0.2429. Best-fit quadratic: y=1.0357−0.1929x+0.2429x².

## Answer

For y = a + bx + cx² the least-squares normal equations are

```text
Σy    = n·a + bΣx + cΣx²
Σxy   = aΣx + bΣx² + cΣx³
Σx²y  = aΣx² + bΣx³ + cΣx⁴
```

| x | y | x² | x³ | x⁴ | xy | x²y |
|---|---|---|---|---|---|---|
| 1 | 1.1 | 1.0000 | 1.0000 | 1.0000 | 1.1000 | 1.1000 |
| 1.5 | 1.3 | 2.2500 | 3.3750 | 5.0625 | 1.9500 | 2.9250 |
| 2 | 1.6 | 4.0000 | 8.0000 | 16.0000 | 3.2000 | 6.4000 |
| 2.5 | 2 | 6.2500 | 15.6250 | 39.0625 | 5.0000 | 12.5000 |
| 3 | 2.7 | 9.0000 | 27.0000 | 81.0000 | 8.1000 | 24.3000 |
| 3.5 | 3.4 | 12.2500 | 42.8750 | 150.0625 | 11.9000 | 41.6500 |
| 4 | 4.1 | 16.0000 | 64.0000 | 256.0000 | 16.4000 | 65.6000 |
| Σx = 17.5 | 16.2 | 50.75 | 161.875 | 548.1875 | 47.650 | 154.475 |

With n = 7:

```text
7a + 17.50b + 50.75c = 16.20
17.50a + 50.75b + 161.875c = 47.650
50.75a + 161.875b + 548.1875c = 154.475
```

Solving by Gauss elimination:

```text
a = 1.0357,  b = -0.1929,  c = 0.2429
```

**Answer: y = 1.0357 − 0.1929x + 0.2429x²**  (check: x = 4 gives 4.15 against 4.1).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How many normal equations are needed for y = a + bx + cx²?
   A. 4
   B. 2
   C. 1
   D. 3
   Answer: D. One per unknown a, b, c. (Key point: Number of equations)

2. Which is the third normal equation?
   A. Σx²y = aΣx + bΣx² + cΣx³
   B. Σx²y = aΣx² + bΣx³ + cΣx⁴
   C. Σxy = aΣx² + bΣx³ + cΣx⁴
   D. Σy = aΣx³ + bΣx⁴
   Answer: B. Multiply the model by x² and sum. (Key point: Third equation)

3. Which sums are needed?
   A. Σ√x and Σy
   B. Only Σx and Σy
   C. Σx and Σx² only
   D. Σx, Σx², Σx³, Σx⁴, Σy, Σxy, Σx²y
   Answer: D. These fill all three equations. (Key point: Sums needed)

## Related in Numerical Method

- [Fit y = a e^(bx)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-aebx) — Numerical Method, chapter 4
- [Least squares significance, normal equations](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aleast-squares-significance-normal) — Numerical Method, chapter 4
- [Least squares: y = ax + b + c/x](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aleast-squares-ax-b-c-over-x) — Numerical Method, chapter 4
- [Fit curve y = a b^x (decay data)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-abx-d) — Numerical Method, chapter 4, asked 3×
- [Derive linear least squares](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aleast-squares-linear-derive) — Numerical Method, chapter 4
- [Fit y = a b^x (growth data)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-abx-d2) — Numerical Method, chapter 4

## Related in other subjects

- [Least squares fit for calibration data](https://www.bctengineer.com/question.md?key=semester_3%2Fmetrology%3Aleast-squares-calibration-line) — Metrology, chapter 2
- [Square law approximation for DSB-AM](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Asquare-law-approximation-dsbam) — Communication Systems, chapter 2
- [Chi-square goodness of fit: Poisson errors](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Achi-square-goodness-fit-poisson-pages) — Probability and Statistics, chapter 7, asked 2×
- [Short note: Discrete data function](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Ashort-note-discrete-data-function) — Signals and Systems, chapter 1
