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

# Fit curve y = a x^b (A)

Numerical Method · Chapter 4: Interpolation

- Asked in: 2075 Baisakh, 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-ax-b
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-4

## Question

Fit the curve y = ax^b to the following data:
| x | 4 | 5 | 7 | 10 | 11 | 13 |
|---|---|---|---|---|---|---|
| y | 48 | 100 | 294 | 900 | 1210 | 2028 |

## Short answer

Take log10: log y = log a + b log x. Linear least squares gives log a ≈ -0.2216, b≈3.1734. Thus a=10^{-0.2216}≈0.6003, so the fitted curve is y=0.6003 x^3.1734.

## Answer

Take logarithms (base 10): y = a·xᵇ → log y = log a + b·log x. Put Y = log y, X = log x, A = log a, so Y = A + bX, a straight line fitted by least squares.

| x | y | X = log x | Y = log y | X² | XY |
|---|---|---|---|---|---|
| 4 | 48 | 0.6021 | 1.6812 | 0.3625 | 1.0122 |
| 5 | 100 | 0.6990 | 2.0000 | 0.4886 | 1.3979 |
| 7 | 294 | 0.8451 | 2.4683 | 0.7142 | 2.0860 |
| 10 | 900 | 1.0000 | 2.9542 | 1.0000 | 2.9542 |
| 11 | 1210 | 1.0414 | 3.0828 | 1.0845 | 3.2104 |
| 13 | 2028 | 1.1139 | 3.3071 | 1.2409 | 3.6839 |
| Σ |  | 5.3015 | 15.4937 | 4.8906 | 14.3447 |

#### Normal equations (b = B)

```text
ΣY = n·A + B·ΣX      →  15.4937 = 6A + 5.3015B
ΣXY = A·ΣX + B·ΣX²   →  14.3447 = 5.3015A + 4.8906B
```

Solving: B = (nΣXY − ΣXΣY)/(nΣX² − (ΣX)²) = 3.1734,  A = (ΣY − BΣX)/n = -0.2216.

Then a = 10ᴬ = 10^(-0.2216) = 0.6003, b = 3.1734.

**Answer: y = 0.6003 x^3.1734**  (check: at x = 10, y ≈ 894.8 against 900).

## Check yourself

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

1. How is y = a·x^b converted into a straight line?
   A. Take logs: log y = log a + b log x
   B. Take the exponential of both sides
   C. Divide by x
   D. Square both sides
   Answer: A. Putting Y = log y, X = log x, A = log a gives Y = A + bX. (Key point: Linearisation)

2. After finding A = -0.2216, how is a obtained?
   A. a = A = -0.2216
   B. a = 10^A = 0.6003
   C. a = log A
   D. a = A/b
   Answer: B. A is log a (base 10), so a = 10^A. (Key point: Recovering a)

3. Which sums are needed for the least-squares fit of Y = A + bX?
   A. Σx, Σy, Σx² only
   B. Σlog a and Σb
   C. ΣX, ΣY, ΣX² and ΣXY
   D. ΣXY only
   Answer: C. The normal equations ΣY = nA + bΣX and ΣXY = AΣX + bΣX² use these four sums. (Key point: Normal equations)

## Close variants set in other exams

- [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×

## Related in Numerical Method

- [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×
- [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×
- [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 = a b^x (growth data)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afit-y-abx-d2) — 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
- [Quadratic least squares fit](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aquadratic-fit-least-squares) — Numerical Method, chapter 4

## Related in other subjects

- [K-map Σ(1,2,3,8,9,10,11,13,14)+d, POS](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-pos-form-12389) — Digital Logic, chapter 3
- [Design: 100 kVA 11/132 kV transformer with winding data](https://www.bctengineer.com/question.md?key=semester_5%2Felectric_machine_design%3Adesign-100kva-11-132kv) — Electric Machine Design, chapter 3, asked 3×
- [Composite curve with 48 degree deflection](https://www.bctengineer.com/question.md?key=semester_6%2Ftransportation_engineering_i%3An-72m-composite-60) — Transportation Engineering I, chapter 3
- [Annual firm and secondary energy (900 m³/s, Nov 100)](https://www.bctengineer.com/question.md?key=semester_6%2Fhydro_power%3Afirm-secondary-energy-2078) — Hydro Power, chapter 3, asked 2×
