---
title: "Fit curve y = a b^x (decay data)"
subject: "Numerical Method"
chapter: 4
key: "semester_4/numerical_method:fit-y-abx-d"
source: https://www.bctengineer.com/q/semester_4/numerical_method/fit-y-abx-d
site: BCT Engineering
---

# Fit curve y = a b^x (decay data)

Numerical Method · Chapter 4: Interpolation

- Asked in: 2073 Magh, 8 marks
- Video: [Curve Fitting Of Exponential Curve By Least Square Method Examples](https://www.youtube.com/watch?v=s94k4H6AE54) — Dr.Gajendra Purohit
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/fit-y-abx-d
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-4

## Question

Fit the following set of data to a curve of the form y = ab^x.
| x | 1.0 | 1.5 | 2.0 | 2.5 | 3.0 | 3.5 | 4.0 |
|---|---|---|---|---|---|---|---|
| y | 8.2 | 5.2 | 3.1 | 2.5 | 1.7 | 1.6 | 1.4 |

## Short answer

Take log10 of y = ab^x to get Y = A + Bx. Least squares gives B = -0.2563 and A = 1.0835, so a = 10^A = 12.1199 and b = 10^B = 0.5543. The fitted curve is y = 12.1199(0.5543)^x.

## Answer

Take logarithms (base 10): y = a·bˣ → log y = log a + x·log b. Put Y = log y, A = log a, B = log b, so Y = A + Bx is a straight line in x.

| x | y | Y = log y | x² | xY |
|---|---|---|---|---|
| 1 | 8.2 | 0.9138 | 1.0000 | 0.9138 |
| 1.5 | 5.2 | 0.7160 | 2.2500 | 1.0740 |
| 2 | 3.1 | 0.4914 | 4.0000 | 0.9827 |
| 2.5 | 2.5 | 0.3979 | 6.2500 | 0.9949 |
| 3 | 1.7 | 0.2304 | 9.0000 | 0.6913 |
| 3.5 | 1.6 | 0.2041 | 12.2500 | 0.7144 |
| 4 | 1.4 | 0.1461 | 16.0000 | 0.5845 |
| Σx = 17.5 |  | 3.0998 | 50.7500 | 5.9557 |

#### Normal equations

```text
ΣY = n·A + B·Σx      →  3.0998 = 7A + 17.5000B
ΣxY = A·Σx + B·Σx²   →  5.9557 = 17.5000A + 50.7500B
```

Solving: B = (nΣxY − ΣxΣY)/(nΣx² − (Σx)²) = -0.2563,  A = (ΣY − BΣx)/n = 1.0835.

a = 10ᴬ = 12.1199, b = 10ᴮ = 0.5543.

**Answer: y = 12.1199 · (0.5543)ˣ**  (decay curve, b < 1; at x = 2 it gives 3.72 against 3.1).

## Check yourself

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

1. How is y = a b^x converted to a straight line?
   A. Take log of x only
   B. Square y
   C. Plot y against 1/x
   D. Take logs: log y = log a + x log b
   Answer: D. Y = log y, A = log a, B = log b gives Y = A + Bx. (Key point: Linearisation)

2. After solving for A and B, how are a and b found?
   A. a = 1/A, b = 1/B
   B. a = log A, b = log B
   C. a = 10^A, b = 10^B
   D. a = A, b = B
   Answer: C. They were logs (base 10), so we take antilogs. (Key point: Recovering constants)

3. b came out as 0.5543. What does this show?
   A. The data grow, since b > 1
   B. The fit failed
   C. The data decay, since b < 1
   D. The line is horizontal
   Answer: C. b < 1 means y decreases as x increases. (Key point: Meaning of b)

## Close variants set in other exams

- [Fit y = a b^x and find y(7)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-abx-y7) — Numerical Method, chapter 4, asked 2×
- [Fit y = ax/(b + x)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-ax-over-b-plus-x) — Numerical Method, chapter 4, asked 2×

## Related in Numerical Method

- [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
- [Fit curve y = a x^b (A)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-ax-b) — Numerical Method, chapter 4, asked 2×
- [Fit y = a e^(bx)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-aebx) — Numerical Method, chapter 4
- [Quadratic least squares fit](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aquadratic-fit-least-squares) — Numerical Method, chapter 4
- [Fit y = ln(ax + b)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-log-ax-b) — Numerical Method, chapter 4, asked 2×
- [Fit y = a + b√x](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-a-b-sqrt-x) — 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
- [Rankine's data, 8° curve, 187.62 m long chord](https://www.bctengineer.com/question.md?key=semester_4%2Fsurveying_ii%3Asimple-curve-8deg-18762-long-chord) — Surveying II, chapter 6
- [Demagnetizing via B-H curve; data storage material](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_engineering_material%3Ademagnetize-bh-curve-storage) — Electrical Engineering Material, chapter 4
- [Presentation of precipitation data, IDF curve](https://www.bctengineer.com/question.md?key=semester_5%2Fengineering_hydrology%3Apresent-precip-data-idf) — Engineering Hydrology, chapter 2
