matlab代写-MFIN704W21
时间:2021-02-28
MFIN704W21 Midterm Prep M. Milewski
The following are some practice questions to help you prepare for the midterm.
1) Convert 625.875 into binary.
2) Convert -27.5625 into binary. Calculate the machine epsilon assuming 64-bit floating points
numbers.
3) Use the Newton-Raphson Method to find the root of () = − − with an initial guess of x=0
4) Let () = ln⁡(). Approximate using Second-Order Taylor approximation at = 2 with a step
size of ℎ = 0.5
5) Find the first order Taylor Approximation of () = −0.14 − 0.153 − 0.52 − 0.25 + 1.2 at
= 0.5 with a step size of ℎ = {1, 0.5, 0.25}.
6) Consider Function 3 − 2 + 4, at x=0 find the forward, backward, center difference with
h=0.25
7) Perform LU decomposition, and verify LU=A by hand on (normalization/scaling not required)
[
8 2 1
3 7 2
2 3 9
]
8) Using backward difference formula, find the missing values
() ′()
0.5 1.9
0.6 2.2

9) Explicit (by hand)
a. = [0,10], Δ = 2, Δ = 0.1
b. Boundary and Initial conditions
i. All interior points zero ( = 2,4,6,8, = 0) = 0
ii. Edge points ( = 0, ) = 100, ( = 10, ) = 50 ∀
c. Solve for unknowns at t=0.1 and t=0.2
10) Implicit (by hand)
a. Write out a row or two for the matrix that is the system of equations for the Black-
Scholes Model
11) Write-out pseudo code for the bisection method
12) Name and describe three (3) sources of error we covered in class.
13) Represent 25.375 in binary (in form 11111111.1111)
14) Find the internal rate of return (IRR) of the following cash flows using Newton’s Method with an
initial guess of r=0.325. Verify your result, should be within +/- $1 after one iteration, stop if it is.
= −$500 +
$300
1 +
+
$450
(1 + )2

15) Find the center difference approximation of the derivative for () = 2 − 2 + 1 at = 2 for
ℎ = 1
16) Using the result from Question 4 for the first derivative, find the first order Taylor
Approximation at = 2 with ℎ = 2. If (4) = 9, what is the relative error?
17) Find the L and U matrix for the following:
[
2 4
1 8
]


MFIN704W21 Midterm Prep M. Milewski
18) Solve for the unknown using the explicit method for PDE
= 0 = 0.5
+1 = 11 9 10
= 10 5
−1 = 9 4 5

19) Answer the following questions based on this code snippet:
A = [];
n=1000;
for i =1:n
A(i) = 2^i;
end
mean = 0
for j = n:-1:1 % going backwards through the array
mean = mean + A(j);
end
mean = mean/n;
B = [];
for k = 1:n
B(k) = A(i) – mean
end
a. What does the code do?
b. What numerical issues can be encountered? Be specific.
















































































学霸联盟


essay、essay代写