# 4-point Trapezium rule for numerical integration

Background:

This is in reference to Mark Joshi's concepts of mathematical finance ch.7 problem 11.

Question:

We have in the Black-Scholes model: $S_0 = 1, T = 1, \sigma = 0.1, r = 0$. A derivative pays $\cos(S_1)$ at time $1$ if $S_1$ is between $1$ and $2$. Find the price implied by a $4$-point trapezium rule numeric integration.

Now I understand that we need to evaluate

$$\mathbb{E}\left(\cos(S_1)\right) = \int \cos\left(e^{(r - 0.5\sigma^2)T + \sigma\sqrt{T}z})\right)e^{-z^2/2}dz$$

The odd part of his solution is he is evaluating this integral from $z_1$ to $z_2$ and states that this $z_j$ mapping $z$to $j$ and solving for $z_1 = 0.05, z_2 = 6.981$.

The formula in the book states that to solve using the trapezium method. If we wish to integrate a function $g(x)$ over an interval $[a, b]$ then we divide the interval into $N$ pieces of equal length. Thus we set

$$x_j = a + \frac{j}{N}(b-a)$$

for $j = 0,\ldots, N$

I don't see how any reader can take that information and solve for $z_1$ and $z_2$. Any suggestions on this are greatly appreciated.

## 1 Answer

This has nothing to do with the trapezium rule. The derivative pays $cos(S_1)$ if $1<=S_1<=2$. Solve $e^{(r-0.5\sigma^2)T+\sigma\sqrt{T}z)}=1$ and $e^{(r-0.5\sigma^2)T+\sigma\sqrt{T}z)}=2$ to obtain the bounds of the integral.

• Now that I know how to get the bounds do we simply plug in an evaluate the integral? – Wolfy Feb 1 '18 at 19:38
• Yes now you can plug in the bounds and evaluate the integral with the trapezium rule – Andrew Feb 1 '18 at 19:58
• Okay, I just get a different value than the author so not sure what I am doing wrong – Wolfy Feb 1 '18 at 19:58
• What value did you get for the integral and how did you implement the trapezium rule? – Andrew Feb 1 '18 at 20:23
• I got .22 something. I just evaluated the integral using Wolfram alpha – Wolfy Feb 1 '18 at 20:25