function [value] = hermite(m,x,y,yprime)
for i = 1:m
z(2*i-1) = x(i);
z(2*i) = x(i);
D(2*i-1,1) = y(i);
D(2*i,1) = y(i);
end
for i = 1:m
D(2*i-1,2) = yprime(i);
end
for i = 1:m-1
D(2*i,2) = (D(2*i+1,1)-D(2*i,1)/(z(2*i+1)-z(2*i);
end
for j = 3:2*m
for i =
Homework #1 Sketch
1. For each part, check whether the hypotheses of the intermediate value theorem are
satisfied for the starting interval [a, b]: f continuous and f has different signs at a and
b.
2. Perform bisection method until only one root, among 0
Homework #2 Sketch
1. (a) Square the formula for the distance between the two points (x, x3 ) and (3, 1).
(b) d0 (x) = 0 is the root-finding problem so use Newtons method on f (x) = d0 (x) to
generate the approximations.
2. Set x = 1 and manipulate to get
Homework #3
1. Compute using Newtons method on 2 equations, 2 unknowns.
2. (a) Put all terms in both expressions under the same denominator and simplify the
numerator to show they are equal.
(b) No.
3. Compute using secant method.
4. (a) Write |en+2 | in
Homework #4 Sketch
1. Suppose there is a polynomial of smaller degree that interpolates the data. Then its
degree is still n. Then use uniqueness of interpolation polynomial to arrive at a
contradiction.
2. Fix xn+1 to be a node that is distinct from x0 ,
Homework #5
1. Consider the data points (2, 1), (0, 1), (1, 3).
(a) Should be of the form
a0 + a1 (x + 2) + a2 (x + 2)x,
where you can solve for a0 , a1 , a2 in order.
(b) Should be of the form
a0 + a1 (x + 2) + a2 (x + 2)x + a3 (x + 2)x(x + 1),
where you
Homework #6 Sketch
1. Form the divided difference table with the given values and fill in the rest of it for the
unknown values using the recursive formula for calculating divided differences.
2. (a) Form the divided difference table.
(b) Add the data poi
Homework #7
1. 4 values of f , 3 values of f 0 , 2 values of f 00 and 1 value of f 000 add up to be 10. 10
conditions are matched by 10 degrees of freedom, which a degree 9 polynomial has.
2. Using divided difference table, we double the node x0 and the n
Homework #8
1. Enforce interpolation, continuity, first derivative continuity, second derivative continuity, and endpoint conditions for eight equations, eight unknowns in a linear system.
2. Enforce first derivative continuity, second derivative continui
QUESTION
(a) Consider the linear programming problem
maximize
n
P
j=1
c j xj
subject to xj 0
n
P
j=1
j = 1, . . . , n
aij xj = bi
i = 1, . . . , m,
where the constraint matrix A = (aij ) has rank m, and m < n. Explain
briefly what is meant by a basic feas
QUESTION
(a) Use a branch and bound algorithm to solve the following (zero-one)
knapsack problem. In your algorithm, always choose a node of the
search tree with the largest upper bound to be explored next.
Maximize z = 18x1 + 17x2 + 11x3 + 14x4 + 6x5 + 4
QUESTION
(a) Explain two approaches by which linear programming is used to tackle
multi-objective linear programming problems.
(b) Describe three alternative pivoting rules in linear programming, and
state the situations for which they are most appropriat
QUESTION
(a) Describe how artificial arcs are used in the network simplex method.
Suppose that artificial arcs remain in the tree solution at the end of
phase 1 of the two-phase network simplex method. State the conditions
under which phase 2 should be pe
QUESTION
(a) State the Duality Theorem of linear programming and use it to prove
the Theorem of Complementary Slackness.
(b) Use duality theory to determine whether x1 = 0, x2 = 1, x3 = 0, x4 = 4,
is an optimal solution of the linear programming problem
m
QUESTION
Solve the following linear programming problem using the bounded variable
simplex method.
Maximize z = 7x1 + 2x2 + 7x3 x4
subject to 4x1 x2 + x3 + 2x4 8
6x1 + 3x2 + 2x3 5x4 25
0 x1 1
0 x2 11
0 x3 9
0 x4 5.
(i) For the first constraint, give the r
QUESTION
(a) Consider the linear programming problem
maximize
n
P
j=1
c j xj
subject to xj 0
n
P
j=1
j = 1, . . . , n
aij xj = bi
i = 1, . . . , m,
where the constraint matrix A = (aij ) has rank m, and m < n. Prove
that a basic feasible solution is an ex
QUESTION
Solve the following linear programming problem.
Maximize z = 18x1 + 3x2 + x3 + 16x4 + 3x5
subject to 4x1 + 2x2 x3 + 3x4 + x5 24
8x1 + x2 + x3 + 4x4 + 4x5 30
0 x1 3
0 x2 9
0 x3 10
0 x4 6
0 x5 15.
(i) For the first constraint, give the range of val
QUESTION
(a) Describe briefly the advantages of the revised simplex method over the
original simplex method in which the full tableau is computed at each
iteration.
(b) Solve the following linear programming problem using the revised simplex method.
maxim
QUESTION
(a) State the Duality Theorem of linear programming and use it to prove
the Theorem of Complementary Slackness.
(b) Use duality theory to determine whether x1 = 3, x2 = 0, x3 = 0, x4 = 2,
is an optimal solution of the linear programming problem
m
QUESTION
(a) By means of a diagram, write down the facet defining constraints for the
integer programming problem with the following constraints:
x1 , x2 integer
6x1 4x2
2x1 + 4x2
6x1 + 2x2
2x1 6x2
6x1 + 8x2
15
5
5
15
33
State the advantage of such a refo
QUESTION
An engineering company manufactures industrial machines for overseas export. Demand for the next three months, which must be satisfied, is shown
in the following table.
Month
Aug
Demand 130
Sept Oct
210 220
Capacity restrictions limit the product
QUESTION
(a) State the Duality Theorem of linear programming, and use it to prove
the Theorem of Complementary Slackness.
(b) Use duality theory to determine whether x1 = 3, x2 = 0, x3 = 2,
x4 = 0, is an optimal solution of the linear programming problem
QUESTION
(a) Consider the linear programming problem
maximize
zP =
n
P
j=1
c j xj
subject to xj 0
n
P
j=1
aij xj bi
j = 1, . . . , n
i = 1, . . . , m.
Write down the dual problem. If the original problem has an optimal solution, what can you say about the