Deduction and analysis of numerical integration method

35 Views Asked by At

a) Find the cubic polynomial $p_3(x)$ that interpolates a function $f(x)$ in the nodes $x = -1, 0, 1$ and satisfy $p_3'(0)=f'(0)$.

b) Evaluate $S=\int_{-1}^1 p_3(x)dx$ as an approximation to $\int_{-1}^1 f(x)dx$. What method is obtained?

c) Apply identity \begin{equation*} \int uv'''dx = uv'' - u'v' + u''v - \int u'''vdx \end{equation*} for the case \begin{equation*} u(x)= \frac{1}{6}x(1-x)^2, \quad v(x) = f(x)+f(-x) \end{equation*} to get the result \begin{equation*} \int_{-1}^1 f(x)dx = S - \int_0^1 u(x)v'''(x)dx. \end{equation*}

d) Show that if $f \in C^4[-1,1]$, then \begin{equation*} \left|\int_{-1}^1 f(x)dx - S\right| \leq \frac{||f^{(4)}||_\infty}{90} \end{equation*}

Solution a):

Let $p_3 = ax^3 + bx^2 + cx + d$. We know that $p_3(-1)=f(-1), p_3(0)=f(0), p_3(1)=f(1)$ \begin{align*} p_3(-1) &= -a+b-c+d = f(-1), \quad p_3(0) = d = f(0), \quad p_3(1) = a+b+c+d = f(1) \end{align*} Also, $p_3'(0) = f'(0)$ \begin{equation*} p_3'(x) = 3ax^2 + 2bx + c p_3'(0) = c = f'(0) \end{equation*}

\begin{align*} \therefore -a+b &= f(-1) + f'(0) - f(0), \quad a+b = f(1)-f'(0)-f(0) \end{align*}

\begin{align*} (+) 2b &= f(-1) - 2 f(0) + f(1), \quad \therefore b = \frac{f(-1)}{2} - f(0) + \frac{f(1)}{2}, \quad \therefore a = \frac{f(1)}{2} - f'(0) - \frac{f(-1)}{2} \end{align*} Therefore, the polynomial is \begin{equation*} p_3(x) = \left(\frac{f(1)}{2} - f'(0) - \frac{f(-1)}{2}\right)x^3 + \left(\frac{f(-1)}{2} - f(0) + \frac{f(1)}{2} \right) x^2 + f'(0)x + f(0) \end{equation*}

Solution b):

Let $A = \left(\frac{f(1)}{2} - f'(0) - \frac{f(-1)}{2}\right)$ y $B = \left(\frac{f(-1)}{2} - f(0) + \frac{f(1)}{2} \right)$ \begin{align*} \int_{-1}^1 f(x)dx &= \int_{-1}^1 p_3(x)dx = \int_{-1}^1 Ax^3 + B x^2 + f'(0)x + f(0)dx = \left( \frac{ax^4}{4} + \frac{bx^3}{3} + \frac{f'(0)x^2}{2} + f(0)x \right|_{-1}^1 = \frac{a}{4} + \frac{b}{3} + \frac{f'(0)}{2} + f(0) - \frac{a}{4} + \frac{b}{3} - \frac{f'(0)}{2} + f(0) = \frac{2b}{3} + 2f(0) = \frac{2}{3} \left(\frac{f(-1)}{2} - f(0) + \frac{f(1)}{2} \right) + 2f(0) = \frac{f(-1)}{3} - \frac{2f(0)}{3} + \frac{f(1)}{3} + 2f(0) = \frac{f(1)}{3} + \frac{4f(0)}{3} + \frac{f(1)}{3} = \frac{1}{3} (f(1) + 4f(0) + f(1) \end{align*} As we see, the Simpson 1/3 method is obtained with $a = -1, b=1$

Solution c):

\begin{align*} \int_0^1 u v''' dx &= \frac{1}{6}x(1-x)^2(f(x)+f(-x))'' - \frac{3x^2-4x+1}{6}(f'(x)-f(-x))' + \frac{3x-2}{3}(f(x)-f(-x)) - \int_0^1 \frac{3x-2}{3} (f(x)+f(-x)) dx = \frac{1}{6}x(1-x)^2(f''(x)+f''(-x))- \frac{3x^2-4x+2}{6}(f'(x)-f'(-x)) + \frac{3x-2}{3}(f(x)-f(-x)) - \int_0^1 \frac{3x-2}{4}(f(x)+f(-x))dx \end{align*}

Then I am stuck in here. Any hints/solutions for $c)$ or $d)$ are appreciated.