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

  1. Solve $e^{-2x^2/5} = 0.5$
  2. For what value of $x$ is $e^x = \pi$?
  3. 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.
  4. 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 10152025 303540
    T 6.17.68.910.2 10.911.912.6
  5. 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) 124510 15205075100
    T (in ms) 83.35122.59197.42 339.841550.274343.2 9439.29132831.67 439375.781030676.44
  6. 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