Let I denote the integral $I = \int_0^{\pi/2}\sqrt{\sin x}dx$ and 4 strips.
Give a function for which Simpson’s rule returns an exact value.
I just entered in the exact values (so $\sin(\pi/2)$ for example) into the formula but did not get an exact value I don't understand what this question wants and how to approach it.
Edit : I just noticed that you are dealing with 4 strips, meaning that it is not the "basic" Simpson rule (which has 2 strips) that you apply but the "compound one". Nevertheless, here are examples with 2 strips.
You can take any polynomial up to 3rd degree
$$f(x)=ax^3+bx^2+cx+d$$
(see https://rstudio-pubs-static.s3.amazonaws.com/299948_8b0e04afabbc4b8db8262a04addbcc27.html)
Proof : Let us establish it for second degree polynomials :
$$f(x)=ax^2+bx+c. \tag{1}$$
We want to establish that the approximate (Simpson) identity is in fact an equality :
$$\int^{x_2}_{x_0} f(x) dx \approx \frac{x_2-x_0}{3}[f(x_0) + 4f(x_1) + f(x_2)]\tag{2}$$
when we take expression (1) for $f$.
How can we do that ?
A first method (brute force...): we can compute rather tediously, the LHS which is equal to
$$a\tfrac{1}{3}(x_2^3-x_0^3)+b\tfrac{1}{2}(x_2^2-x_0^2)+c(x_2-x_0)$$
and compare it with the RHS, and show that they are the same.
But there is a second, more elegant, way to establish the equality in Simpson formula, at the price of some abstraction.
Let $E$ denote the (3 dimensional) vector space of polynomial functions with real coefficients and degree $\leq 2$.
Expression (2) can be written, in the case of equality :
$$\text{for all} \ f \ \in E, \ \ I(f)= \frac{x_2-x_0}{3}[ev_{x_0}(f) + 4ev_{x_1}(f) + ev_{x_2}(f)]\tag{3}$$
where $ev_a(f)=f(a)$ (evaluation of $f$ in $a$, which is clearly a linear form). If you happen to know what the dual of a vector space is, (3) means that, in the dual $E^*$ of $E$, one can write :
$$I \ = \ \frac{x_2-x_0}{3}[ev_{x_0} + 4ev_{x_1} + ev_{x_2}]\tag{4}$$
This shouldn't comme as a surprise that such a relationship
$$I=p \ ev_{x_0} + q \ ev_{x_1} + r \ ev_{x_2}\tag{5}$$
exists because the 3 evaluation operators in (4) can be shown to be independent, thus constitute a basis of $E^{\ast}$ (recall : $\dim E = \dim E^{\ast}$ = 3) : it is natural that linear form $I$ can be decomposed onto this basis with fixed coefficients (independent from $f$). The fact that the coefficients are those of formula (3) is easily obtained by applying relationship (5) successively on $f(x)=1$, $f(x)=x$,$f(x)=x^2$, giving a linear system out of which one can extract $p,q,r$.
Remark : I found a reference about the reasoning using the dual space on page 441 of this Google book "Geometric Linear Algebra", Volume 1, by Yixiong Lin, World Scientific, 2005.