Lab 9 (04/10/2017)
Problems and More Problems!
First, implement Richardson's Extrapolation
formula for numerical differentiation. The formula is
$$\begin{multline}
f^\prime(x_0) = \frac{1}{12h}[f(x_0-2h) -
8f(x_0-h) + 8f(x_0+h) -
f(x_0+2h)]
\end{multline}$$
Use Richardson's formula to find the derivatives of
the following at $x = 0$.
- $y = 5.83x^3 - 2.23x^2 + 11.5x - 9$
- $y = e^{-x^2/4}\sin(3x)$
Find the error between your calculated values and the
true values obtained using calculus.
Problems
- Solve $e^{-2x^2/5} = 0.5$
- For what value of $x$ is $e^x = \pi$?
- Where do the following curves intersect?
$$\begin{eqnarray*}
y_1 & = & 7x^3 - 5x^2 + 2x - 3 \\
y_2 & = & 2x^2 - 8x + 6
\end{eqnarray*}$$
Plot the curves and verify if your answer appears
correct.
- The results of a simple pendulum experiment for
finding acceleration due to gravity $g$ are given
below. $L$ is the length and $T$ is the
time-period. Find $g$ if it is given that
$$g = 4\pi^2\frac{L}{T^2}$$
L |
10 | 15 | 20 | 25 |
30 | 35 | 40 |
T |
6.1 | 7.6 | 8.9 | 10.2 |
10.9 | 11.9 | 12.6 |
- The running times of an algorithm for several
inputs are given below. Find the relationship between
the running time ($T$) and the input size($n$). The
input is given in 1000's and the time is in ms.
n (in 1000's) |
1 | 2 | 4 | 5 | 10 |
15 | 20 | 50 | 75 | 100 |
T (in ms) |
83.35 | 122.59 | 197.42 |
339.84 | 1550.27 | 4343.2 |
9439.29 | 132831.67 |
439375.78 | 1030676.44 |
- The rainfall amounts (in mm) over a 20-day period are given
below with some values missing. Find the missing
values and plot them to see how they fit in with the
rest of the data.
19.4, 20.3, 22.9, 26.9, 31.9, --, 41.11,
--,
44.2, 42.6, 39.1, 34.8, 30.4, --, --,
26.4, 29.3, 33.5, --, 42.3