I'm trying to find the arc length using Simpsons formula for this function:
$\int_{0}^{\pi}\sqrt{1+cos^2(x)}$ where $h=\frac{\pi}{6}$
I've seen online that people solve this type of examples so that they find the values of $f(x_0),f(x_1),...,f(x_n)$ and they just apply the Simpsons formula. But what about the remainder of the formula ($R$)?
In all examples I needed to find the Simpsons error which is $R_m=\frac{b-a}{180}h^4M_4$, where $M_4=max_{x=[a,b]}|f^{iv}(x)|$ ( 4th derivative of $f(x)$)
To clarify, it sounds like you're trying to find the arc length of $f(x) = \sin x$ on the interval $[0,\pi]$. This will result in needing to evaluate the integral $\displaystyle \int_0^\pi \sqrt{1 + \cos^2 x} \, dx$.
So you'll want to use Simpson's rule with $a = 0, b = \pi, h = \dfrac\pi6$, and $g(x) = \sqrt{1 + \cos^2 x}$. (I'm using $g(x)$ since the name "$f$" is already taken in my own explanation here: $f(x) = \sin x$ above.)
Before you can use Simpson's rule, you'll need to see how many subintervals of $[0,\pi]$ you have. In other words, you need to find $n$. Normally we use $n$ to find $h$, but this time we're given $h$. It's just as easy to get $n$ from $h$. We can use the same equation: $$h = \frac{b-a}n$$ We already know $h$, $b$, and $a$. So we have: $$\frac\pi6 = \frac{\pi - 0}n$$ From this it's clear that $n = 6$. Simpson's rule with $n=6$, applied here, says this: (Recall that $g(x) = \sqrt{1+\cos^2x}$.)
$$\int_0^\pi g(x) \, dx \approx \frac h3\left[g(x_0) + 4g(x_1) + 2g(x_2) + 4g(x_3) + 2g(x_4) + 4g(x_5) + g(x_6)\right] \tag{*}$$
In the above, $x_0 = 0$, $x_1 = x_0 + h = \dfrac\pi6$, $x_2 = x_1 + h = \dfrac\pi3$, and so on. I'll leave it to you to find $x_3, x_4, x_5, x_6$ and to evaluate the RHS of equation (*) above.
Regarding the remainder, typically you don't need to find it unless explicitly asked for it. The way you phrased your question it sounds like you aren't required to find it. But perhaps there is an understanding in your class that all numerical method answers must include remainder/error terms; I don't know. The error is, as you said, equal to $\displaystyle \frac {h^4}{180}(b-a) \max_{a \le x \le b} \left|g^{(4)}(x)\right|$. To find this you'll need to maximize the fourth derivative of $g(x) = \sqrt{1 + \cos^2x}$ on $[0,\pi]$. To me that sounds nontrivial (or at least extremely tedious) so I'm wondering if you really do have to do that here.