Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

interpolation, finite differences etc.

Status
Not open for further replies.

PG1995

Active Member
Hi

Could you please help me with these queries? Thanks a lot.

Regards
PG
 

Attachments

  • inter_4.jpg
    inter_4.jpg
    313.5 KB · Views: 267
Hi

Could you please help me with these queries? Thanks a lot.

Regards
PG

One must be careful to understand the exact question being asked, which is not made easy by the book, which is not very clear, despite the author's claim that it is easy.

The key question is "polynomial in what variable?". I have to assume that the intention is to write it as a polynomial in terms of [latex]x_r [/latex]. If that is the case, we can take your example and make it clear.

[latex] \Delta y_3=x_4^3-x_3^3=(x_3+\Delta x)^3-x_3^3 [/latex]

Hopefully, now it is clear because if one expands the [latex](x_3+\Delta x)^3 [/latex] using the Binomial theorem, it's obvious that the highest order term will subtract out and only powers of n-1 are left.
 
Last edited:
Hi

Could you please help me with this query? Thank you.

Regards
PG
 

Attachments

  • forward_difference.jpg
    forward_difference.jpg
    422 KB · Views: 256
Last edited:
The value "r" is used as an integer index, hence the adjacent value is always a difference of 1 unit. The variable x, or t might be used for the actual distance or time values, and then you can talk about x+h or t+h, and x-h and t-h. Basically, it is customary to discretize continuous time variables and convert them into an integer domain, as typical in discrete-domain mathematics.

Think back to the discrete time notation x[n]=x(nT), where T is the sample time. This is sometimes notated at [latex] x_n[/latex]
 
Last edited:
Hi

I'm sorry for asking this now. I remember when I first read your reply a couple of days ago it made sense to me but now when I was going through the stuff again I'm stuck and confused. I'm sorry.

You could have a look on the first post again and I have quoted your reply below.

One must be careful to understand the exact question being asked, which is not made easy by the book, which is not very clear, despite the author's claim that it is easy.

The key question is "polynomial in what variable?". I have to assume that the intention is to write it as a polynomial in terms of [latex]x_r [/latex]. If that is the case, we can take your example and make it clear.

[latex] \Delta y_3=x_4^3-x_3^3=(x_3+\Delta x)^3-x_3^3 [/latex]

Hopefully, now it is clear because if one expands the [latex](x_3+\Delta x)^3 [/latex] using the Binomial theorem, it's obvious that the highest order term will subtract out and only powers of n-1 are left.

Now here is my confusion. Kindly help me.

Regards
PG
 

Attachments

  • forward_delta.jpg
    forward_delta.jpg
    84.7 KB · Views: 266
First, you asked how I knew x4=x3+Δx. That is simply a result of the fact that we define the grid spacing as Δx, so all adjacent points on the grid differ by Δx. If you are asking, how I know to use this known fact, remember I said before that it is just my guess that the problem is asking for a polynomial in xr, which is x3 in this case. Hence, it makes sense to express x4 as a function of x3.

Your main question is if you are doing the math correctly. I think that you are, but there seems to be a couple of typos there. I've attached a picture of the result using the symbolic tool "mupad" in Matlab. If you aren't familiar with mupad yet, then try this example to get a start on learning this useful tool.
 

Attachments

  • mupad expand.png
    mupad expand.png
    10.8 KB · Views: 271
Last edited:
Hi,


In short, delta x is a constant so this:
3*dx*x^2+3*dx^2*x+dx^3

turns into this for example:
3*x^2+3*x+1

which is clearly second degree.

It works like derivatives. When you take the derivative of a third degree poly you get a second degree poly, take the derivative of a second degree you get a first degree, and finally taking the derivative of a first degree you get a constant. In fact, you'll note that the differences are what you would start with if you were going to take simple numerical derivatives with step size delta x:
(f(x+deltaX)-f(x))/deltaX which is the same as (y2-y1)/deltaX, the differences being y2-y1.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top