a) Determine the constants α, in the differentiation formula β, γ
y x( ) x(y )h x(y ) x(y )h ′
0 = α 0 − + β 0 + γ 0 +
so that the method is of the highest possible order. Find the order and the error term
of the method. (4)
b) The function ) f (x) = ln(1+ x is to be tabulated at equispaced points in the interval
,2[ using linear interpolation. Find the largest s ]3 tep size h that can be used so that
the error 4
5 10−
≤ × in magnitude. (3)
c) Using finite differences, show that the data
x − 3 − 2 −1 0 1 2 3
f (x) 13 7 3 1 1 3 7
represents a second degree polynomial. Obtain this polynomial using interpolation
and find )5.2( f . (3)
7. a) Derive a suitable numerical differentiation formula of (0 )
2
h to find )4.2( f ′′ with h=0.1 given below
Answers
Let us consider a function
1) u = f(x, y, z, p, q, ... )
of several variables. Such a function can be studied by holding all variables except one constant and observing its variation with respect to one single selected variable. If we consider all the variables except x to be constant, then
represents the partial derivative of f(x, y, z, p, q, ... ) with respect to x (the over-bars indicating variables held fixed). The variables held fixed are viewed as parameters.
Def. Partial derivative. The partial derivative of a function of two or more variables with respect to one of its variables is the ordinary derivative of the function with respect to that variable, considering the other variables as constants.
Example. The partial derivative of 3x2y + 2y2 with respect to x is 6xy. Its partial derivative with respect to y is 3x2 + 4y.
The partial derivative of a function z = f(x, y, ...) with respect to the variable x is commonly written in any of the following ways:
Its derivative with respect to any other variable is written in a similar fashion.
or
The extension of the idea of continuity to functions of several variables was direct. Extending
the notion of the derivative is not quite as simple — the “slope” of the f(x, y) surface at (x, y)
depends on which direction you move off in. So we have to think about slope in a particular
direction. The obvious directions are those along the x− and y−axes.
Now, if one wants to move off from (x, y) in the x direction one has to keep y fixed.
This is the key to defining the partial derivative of the function with respect to x:
∂f
∂x!
y
= fx = lim
δx→0
"
f(x + δx, y) − f(x, y)
δx #
(1.8)
1.3. THE PARTIAL DERIVATIVE 7
The subscript y indicates that y is being kept constant. If we are dealing with a function of
more variables, we keep all but the one variable constant. Eg for f(x1, x2, x3, ...) we have
fx3 =
∂f
∂x3
!
x1x2x4...
(1.9)
= lim
δx3→0
"
f(x1, x2, x3 + δx3, x4, . . .) − f(x1, x2, x3, x4, . . .
δx3
#
Given a list of the variables and the one being varied, the “held constant” subscripts are
superfluous and are often omitted . Leave them in there until you are au fait with the techniques.