1
$\begingroup$

I have numerical analysis final coming up in a few weeks and I'm trying to tackle a practice exam.

Assuming $p(x)$ interpolates the function $f(x)$, find the polynomial $p(x)$ that satisfies the following conditions: $$p(0) = 20, p(1) = 26, p'(1)=9, p(2) = 36, p'(2)=16$$.

I also have to provide an expression for the interpolation error.

I've been going through my book and notes all afternoon, but I'm afraid I just don't understand.

$\endgroup$
1
  • $\begingroup$ I think that this involves Hermite Interpolation, so I'm reading up on that now. $\endgroup$
    – CoopLance
    Commented Dec 12, 2013 at 2:49

2 Answers 2

2
$\begingroup$

Since you are given five conditions, your polynomial must be at least of degree 4. So, write
$$p(x) = a + b x + c x^2 + d x^3 + e x^4 $$ Establish the derivative $p'(x)$. Apply all given conditions. You have now a system of five linear equations for five unknowns $(a,b,c,d,e)$. Just solve it (the solutions are simple). This will give you the solution to the first part of your problem.

$\endgroup$
7
  • $\begingroup$ (Hope the introduction of Latex-format is not unwelcome...) $\endgroup$ Commented Dec 12, 2013 at 5:51
  • 2
    $\begingroup$ @GottfriedHelms. Thanks for editing my answer. My problem is that I am almost blind and I have major trouble as soon as I have to type anything else than pure ASCII. Ages are not making things easier. Cheers. $\endgroup$ Commented Dec 12, 2013 at 6:02
  • $\begingroup$ Suffering from weak health too, I think I'm only a couple of years away from the same. So - ... shake hands for a while to share life ...:) $\endgroup$ Commented Dec 12, 2013 at 6:23
  • $\begingroup$ @GottfriedHelms. Yes, let us shake hands and hope ! Cheers. $\endgroup$ Commented Dec 12, 2013 at 6:45
  • $\begingroup$ @ClaudeLeibovici are you familiar with solving this without the use of a 5 x 5 system? $\endgroup$
    – Neurax
    Commented Dec 16, 2013 at 17:21
1
$\begingroup$

As asked by Neurax, i describe the way of getting the function without using matrix for the 5x5 system.

I keep the notation used on my previous answer and I use the conditions in the order they appear in the initial post.

Equations then write

p(0) = 20 gives a = 20
p(1) = 26 gives a + b + c + d + e = 26
p'(1) = 9 gives b + 2 c + 3 b + 4 e = 9
p(2) = 36 gives a + 2 b + 4 c + 8 d + 16 e = 36
p'(2) = 16 gives b + 4 c + 12 d + 32 e = 16

Then the first equation gives simply a = 20. Replacing this value in the four next equations lead to
b + c + d + e = 6
b + 2 c + 3 d + 4 e = 9
2 b + 4 c + 8 d + 16 e = 16
b + 4 c + 12 d + 32 e = 16
Now, we eliminate b from what became the new first equation. This gives
b = 6 - c - d - e
and we inject this expression in the next three equations. This leads now to
c + 2 d + 3 e = 3
2 c + 6 d + 14 e = 4
3 c + 11 d + 31 e = 10
Now, we eliminate c from what became the new first equation. This gives
c = 3 - 2 d - 3 e
and we inject this expression in the next two equations. This leads now to
2 d + 8 e = -2
5 d + 22 e = 1

Now, we eliminate d from what became the new first equation. This gives
d = -4 e - 1
Injected in the remaining equation, we then have
2 e = 6
Now we are done and we shall back substitute : so e = 3 , d = -13, c = 20 , b = -4 and a = 20.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .