# Thread: I'm completely lost with matrix differentiation.

1. ## I'm completely lost with matrix differentiation.

So I'm really kinda bummed out because I just don't get how to solve numerical differentiation problems with linear algebra. As an example :

Estimate f ' (-1) if f (1) = 3, f (0) = -2, f (-2) = -18.

I'd like to say I have an idea on how to at least set up the problem, but to be honest I have no idea. I would think we to use the transpose of the vandermond matrix like we would in numerical integration. But I'm not positive.

Sorry, I know I'm essentially asking you to guide me through step by step from the beginning, but I don't know what else to do as I've read the section in my textbook multiple times and I'm still lost.

So I'm really kinda bummed out because I just don't get how to solve numerical differentiation problems with linear algebra. As an example :

Estimate f ' (-1) if f (1) = 3, f (0) = -2, f (-2) = -18.

I'd like to say I have an idea on how to at least set up the problem, but to be honest I have no idea. I would think we to use the transpose of the vandermond matrix like we would in numerical integration. But I'm not positive.

Sorry, I know I'm essentially asking you to guide me through step by step from the beginning, but I don't know what else to do as I've read the section in my textbook multiple times and I'm still lost.

The title says about "matrix" differentiation, then you have f(1) = -2 and etc...I don't understand: what's f here??

Tonio

3. in our book it's called numerical differentiation. Here I'll write down what my book says.

"suppose that f is a differentiable function and we wish to estimate the value f ' (a), where f is differentiable at t = a.
Let p be the polynomial of degree n that interpolates f at t0, t1, ... , tn, where the interpolation nodes t1 are clustered near t = a. Then p provides us with an approximation for f, and we can estimate the value f ' (a) by evaluating the derivative of p at t = a.
f ' (a) = p ' (a)

As with a numerical integration formula, it can be shown that the value p ' (a) can be expressed as p ' (a) = A0 p(t0) + A1 p(t1) + ... + An p(tn)

the weights Ai are determined by the system of equations:

q0 ' (a) = A0 q0 (t0) + A1 q0 (t1) + ... + An q0 (tn)
.
.
.
qn ' (a) = A0 qn (t0) + A1 qn (t1) + ... +An qn (tn)

where q0(t) = 1, q1(t) = t,...., qn(t) = t^n

"

Does that tell you anything? If not I could possibly type out one of the examples they give.

4. There are many different ways, and different answers, to "estimate" anything. I would suggest fitting a quadratic equation to the curve, then differentiating that at x= -1. If $\displaystyle f(x)= ax^2+ bx+ c$ then $\displaystyle f(1)= a+ b+ c= 3$, $\displaystyle f(0)= c= -2$, and $\displaystyle f(-2)= 4a- 2b+ c= -18$. Of course, $\displaystyle f'(1)= -2a+ b$. If this is a problem specifically asking you to do the numerical differentiation with "linear algebra" then I would suspect there is a formula in the text book close to this problem! Of course, you can use linear algebra to solve for a, b, and c.

5. Thank you very much HallsofIvy. I don't know if I even had to use that section of the book at all. I just simply formed the exact equations that you gave and then put them in a matrix and solved for a, b, c. I appreciate the help