You are on page 1of 2

Chapter 16 Mathcad: Curve Fitting

Chapter 16 Exercises

1. The volume (in m3 ) and pressure (in kPa) of a gas at a constant temperature is
recorded in the table as
Volume Pressure
1 2494
2 1247
3 831
4 623
5 499
6 416
a. Find the least squares line using the intercept and slope functions and plot it
along with the data points. Add an appropriate title.
b. Use the linfit command to find the second-order approximating polynomial.
Plot it along with the data points and add an appropriate title.
c. Use the linfit command to find the third-order approximating polynomial. Plot
it along with the data points and add an appropriate title.
2. Resistance (in ohms) and current (in amps) are related through the equation I=V/R.
Data was collected from a circuit with unknown constant voltage and is shown in
the table.
Resistance(R) Current(I)
10 11.11
15 8.04
25 6.03
40 2.77
65 1.97
100 1.51
a. Plot R (x-axis) versus I (y-axis). What kind of relationship do you see?
b. Plot 1/R (x-axis) versus I (y-axis). Now, what kind of relationship do you
see?
c. Use intercept and slope (or use linfit) to calculate the slope and intercept of
the line in part b.
d. Approximate the current when the resistance is 80 ohms. You can use the
trace capability here.
e. Create a new plot with the data points from part b, a line with slope and
intercept from part c and the interpolated point from part d. Label and title
appropriately.

116
16.1 Mathcad: Curve Fitting

3. Suppose that a population, P, grows over time, t, according to exponential growth


with the following data.

Time(years) Population(thousands)
1 1.61
2 2.51
3 2.17
4 6.14
5 6.81
6 17.53
7 16.36
8 25.04
9 39.61
10 55.50

We have that the population is therefore growing according to the equation P =


P0 ekt . Taking a logarithm, we can convert this into ln(P ) = ln(P0 ) + kt (i.e. ln(P )
is linear in t).
a. Plot the data with t on the horizontal axis and ln(P ) on the vertical axis.
b. Find the slope and intercept for the data in part a and then create a new plot
with this regression line and the data in part a.

117

You might also like