Question

In: Advanced Math

[Note that, in this example, the mesh sizes in x and y are identical (h); strictly...

[Note that, in this example, the mesh sizes in x and y are identical (h); strictly speaking, this need not be true. In some applications, we may need more resolution along the x- or y-axis; we could then use separate mesh sizes hx and hy.]

By definition, the partial derivative of a function f ( x , y ) with respect to x is

∂ f ∂ x = L i m h ⟶ 0 f ( x i + h , y j ) − f ( x i , y j ) h

and the partial derivative with respect to y is

∂ f /∂ y = L i m h ⟶ 0 f ( x i , y j + h ) − f ( x i , y j )/ h

If we applied these formulas to our grid values, we would get the finite difference expressions

∂ f /d x ( x i , y j ) ≅ f ( x i + 1 , y j ) − f ( x i , y j )/ h

Note: To avoid round-off error, retain at least six decimal places in all of your calculations.

  • Assume the function f is defined as f(x, y) = 3 tan x cos y
  • Use differentiation rules to find the exact partial derivatives ∂ f /∂ x and ∂ f /∂ y , and evaluate those exact partial derivatives at (1.56, -2.1).  
  • Use the finite difference formulas to estimate ∂ f /∂ x and ∂ f/ ∂ y at (1.56, -2.1) for three different values of the mesh size
    • h = 0.01
    • h = 0.001
    • h = 0.0001
  • Use your calculated values to fill in this table:

Estimated partial derivatives using finite difference formulas:

h

finite difference approx. to ∂ f/ ∂ x

exact ∂ f/ ∂ x

finite difference approx. to ∂ f/ ∂ y

exact ∂ f/ ∂ y

0.01

0.001

0.0001

Answer the following questions:

  • For which partial derivative is the finite difference approximation more accurate?
  • Why is the finite difference approximation for the other partial derivative less accurate?  Under what real-world conditions might we see such poor approximations?

Solutions

Expert Solution


Related Solutions

PART A: Suppose X and Y are independent. Show that H(X|Y) = H(X) . (H represents...
PART A: Suppose X and Y are independent. Show that H(X|Y) = H(X) . (H represents entropy i think) PART B: Suppose X and Y are independent. Show that H(X,Y) = H(X) + H(Y) PART C: Prove that the mutual information is symmetric, i.e., I(X,Y) = I(Y,X) and xi∈X, yi∈Y
Consider two firms, X and Y, that have identical assets and generate identical cash flows. X...
Consider two firms, X and Y, that have identical assets and generate identical cash flows. X is an all-equity firm, with 1 million shares outstanding that trade for a price of $24 per share. Y has 2 million shares outstanding and $12 million dollars in debt at an interest rate of 5%. According to MM proposition 1, share price of y is $6. a) If the annual earnings before interest and taxes for each firm are $5 million, what would...
Firm X and Firm Y have identical assets that generate identical cash flows. Firm X is...
Firm X and Firm Y have identical assets that generate identical cash flows. Firm X is an unlevered firm, with 2.5 million outstanding shares and the market price of $20 per share. Firm Y is a levered firm, with 2 million outstanding shares and $15 million debt. The interest rate on the debt is 7%. According to MM Proposition 1 without tax and bankruptcy costs, the stock price for Firm Y is closest to: $15.00 $16.25 $17.50 $19.75
Solve the initial value problem dy/dx + H(x)y = e5x ; y(0) = 2 where H(x)...
Solve the initial value problem dy/dx + H(x)y = e5x ; y(0) = 2 where H(x) = −1 0 ≤ x ≤ 3 1 3 < x
Let G and H be groups. Define the direct product G X H = {(x,y) |...
Let G and H be groups. Define the direct product G X H = {(x,y) | x ∈ G and y ∈H } Prove that G X H itself is a group.
Formulate Newton’s method for the system x^3 = y y^3 = x Note that this system...
Formulate Newton’s method for the system x^3 = y y^3 = x Note that this system has three real roots (−1, −1), (0, 0) and (1, 1). By taking various initial points in the square −2 < x, y < 2, try to obtain the attraction regions of these three roots. P.S. An attraction region of a root is defined as the set of all initial points which will eventually converge to the root.
Consider the following five utility functions. G(x,y) = (x)1/2 + y H(x,y) = (x+1)1/2 + y...
Consider the following five utility functions. G(x,y) = (x)1/2 + y H(x,y) = (x+1)1/2 + y + 1 L(x,y) = ln(x) + y U(x,y) = x ey W(x,y) = 100 x - 4x2 + 3 y Z(x,y) = -(100 - x)2 -3 (y-200)2 Which function or functions represent the same preferences as U?   a.G b.U c.None. d.W e.Z f.L g.H
Let X and Y be independent and identical uniform distribution on [0, 1]. Let Z=min(X, Y)....
Let X and Y be independent and identical uniform distribution on [0, 1]. Let Z=min(X, Y). Find E[Y-Z]. Hint: condition on whether Y=Z or not. What is the probability Y=Z?
X Co is identical in all operating and risk characteristics to Y Co, except that X...
X Co is identical in all operating and risk characteristics to Y Co, except that X Co is financed only by equity valued at RM3m whereas Y Co has debt valued at RM0.9m (based on market value as part of its capital structure. X Co ad Y Co operate in a country where tax is payable at 33%. The interest paid on Y Co’s debt is RM72,000 per annum, and it pays a dividend to shareholders of RM378,000 per annum....
X Co is identical in all operating and risk characteristics to Y Co, except that X...
X Co is identical in all operating and risk characteristics to Y Co, except that X Co is all equity financed and Y Co is financed by equity valued at RM2.1m and debt valued at RM0.9m based on market values. X Co and Y Co operate in a country where no tax is payable. The interest paid on Y Co’s debt is RM72,000 per annum, and it pays a dividend to shareholders of RM378,000 per annum. X Co pays an...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT