Error estimate, asymptotic error and the Peano kernel error formula Find the error estimate by approximating $f(x)$ and derive a numerical integration formula for $\int_0^l f(x) \,dx$ based on approximating $f(x)$ by the straight line joining $(x_0, f(x_0))$ and $(x_1, f(x_1))$, where the two points $x_0$ and $x_1 = h - x_0$ are chosen so that $x_0, x_1 \in (0, l)$, $x_0 < x_1$ and $\int_0^l {(x - x_0) (x - x_1)} dx = 0$. 
Derive the error estimate, asymptotic error and the Peano kernel error formula for the composite rule for $\int_a^b f(x) \,dx$. 
Use the asymptotic error estimate to improve the integration formula. Find the values of $x_0$, $x_1$.
I know the Peano Kernel formula will take the form $E_n(f)=1/2($$\int_a^b K(t)\ f''(t) \,dx$$)$ with $K(t)$ being the Peano kernel but am having a tough time getting started on the question. Any help will be greatly appreciated. Thanks a lot!

The question seems a bit garbled; it's not clear to me in what order you should do things. But the first part seems to find the numerical integration formula. For this you need to find the formula for a straight line through $(x_0,f(x_0))$ and $(x_1,f(x_1))$ and integrate over the interval $[0,l]$. If you take $x_0=0$ and $x_1=l$ this yields the trapezoidal rule described by user60514. You can find $x_0$ and $x_1$ from the conditions in the question.
Added later: To find a straight line through two points, say $(x_0,y_0)$ and $(x_1,y_1)$, note that a straight line is given by the formula $ax+b$. We need to find $a$ and $b$. The line has to go through the two points, which means that $a$ and $b$ should satisfy $ax_0+b = y_0$ and $ax_1+b = y_1$. These are two (linear) equations in two unknowns ($a$ and $b$), which you can solve.
To find $x_0$ and $x_1$, note that they have to satisfy $x_1 = h-x_0$ and $\int_0^l (x-x_0) (x-x_1) \, dx = 0$. Evaluate the integral in the latter equation and you again get two equations in two unknowns ($x_0$ and $x_1$). Solve these equations; this will give you two solutions (I think). The inequality $x_0 < x_1$ allows you to pick one of these two solutions.
