Polynomial approximation to find function values

In summary, the conversation discusses how to find the values of the constants a and b from given data and the equation R = a * e^(b/T). The suggested solution involves using the polyfit function in MATLAB to get a polynomial approximation, plotting ln(R) as a function of 1/T, and using the y-intercept and slope to determine the values of a and b.
  • #1
Maxo
160
1

Homework Statement


If we have the following data

Code:
T = [296 301 306 309 320 333 341 349 353];
R = [143.1 116.3 98.5 88.9 62.5 43.7 35.1 29.2 27.2];
(where T = Temperature (K) and R = Reistance (Ω) and each temperature value corresponds to the resistor value at the same position)

Homework Equations


We know that
[tex]R=a \cdot e^{b/T}[/tex]
The question of the problem is the following: How can we, from these data and the given equation, find the values of the constants a and b?

The Attempt at a Solution


In the assignment it is suggested one draws a diagram that shows ln(R/Ω) as a function of 1/T and then use MATLAB "polyfit" function which gives a polynom approximation of this line and then use that polynom to find the values of a and b.

I have used the polyfit function in MATLAB to get a polynom approximation, but how does that polynom give me the constants a and b?
 
Last edited:
Physics news on Phys.org
  • #2
Polyfit outputs polynomial coefficients, so I think what you'd have to do is plot ln(R) = ln(a) + b/T, and look for b = 0. Now you will know what value a is. From there, divide your polyfit matrix by a, and you will have the coefficients to the power series of eb/T. With the power series representation, you may have to do some approximating to find a value for b, but I would imagine the coefficients won't change much after the second order term.
 
  • #3
So MATLAB gives me this polynomial:

Code:
1.0e+03 * 

3.0412   -0.0053
which I assume means the same as a polynomial like
[tex]y=10^{3}\cdot 3.0412x-0.0053 = 3041.2x - 5.3[/tex]
I assume then, that -5.3 is the value of ln(a)?

If I divide then the polynomial with -5.3 I get the following matrix:
Code:
[-0.0018    1.0000]
Correct so far?

If so I wonder what does it means that these are the coefficients for the power series of e^(b/T)? I guess that should be a Maclaurin or Taylor series? How can I determine b from such a series?
 
  • #4
We know that
R=a⋅eb/T

The question of the problem is the following: How can we, from these data and the given equation, find the values of the constants a and b?
If I were in your position, I would take logarithms of both sides of that equation, and plot a graph of your data. The y-intercept and the slope lead you to values for a and b. You will then know the approximate values for those constants, and can recognize when MATLAB is giving you nonsense.
 
  • #5
Maxo said:
I assume then, that -5.3 is the value of ln(a)?
Right (I'd go with at least 3 significant figures).

You'd like to fit your data to:
[tex]
\ln(R) = b \frac{1}{T} + \ln(a)
[/tex]
and MATLAB has provided you with:
[tex]
\ln(R_\mathrm{fit}) = p_1 \frac{1}{T} + p_2
[/tex]
You're basically done at this point. How does ##p_1## and ##p_2## relate to ##b## and ##a##, respectively?
 
  • #6
Thanks, that's how I figured also. Onwards
 

1. What is polynomial approximation and why is it used?

Polynomial approximation is a method used to approximate the values of a function by using a polynomial function. It is used when an exact solution to a function is difficult or impossible to find, or when a function is too complex to work with directly.

2. How does polynomial approximation work?

Polynomial approximation works by fitting a polynomial function to a given set of data points. The degree of the polynomial can be adjusted to provide a better fit, and the coefficients of the polynomial can be calculated using mathematical techniques such as least squares regression.

3. What are the advantages of using polynomial approximation?

Polynomial approximation has several advantages, including its simplicity, flexibility, and ability to provide a good approximation to a wide range of functions. It also allows for easy calculation of derivatives and integrals, and can be used to find solutions to differential equations.

4. What are the limitations of polynomial approximation?

While polynomial approximation can provide a good approximation to many functions, it is not always accurate. The accuracy of the approximation depends on the degree of the polynomial used and the quality of the data points. Also, polynomial approximation may not work well for functions with sharp or discontinuous changes.

5. Can polynomial approximation be used for any type of function?

No, polynomial approximation is best suited for functions that are smooth and continuous. It may not work well for functions with sharp or discontinuous changes, or for functions that have a rapidly changing slope. In these cases, other methods such as piecewise approximation may be more suitable.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
10K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
4K
Replies
3
Views
2K
  • Math Proof Training and Practice
2
Replies
46
Views
4K
Replies
1
Views
1K
  • Atomic and Condensed Matter
Replies
9
Views
2K
  • Precalculus Mathematics Homework Help
2
Replies
37
Views
5K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
Back
Top