Question about Lagrange Error Bounds Derivation My calculus class recently went over Lagrange error bounds, but I have a couple questions about the derivation of the equation. Here's the derivation I've found online (I know it's not too rigorous) alongside with any questions I have about any of the steps.
Let $E(x)=f(x)-P_{n,a}(x)$ for all $x\in[a,b]$ where $P_{n,a}(x)$ denotes the nth degree polynomial approximation centered at a and b is the value of x we're approximating $f(x)$ at.
By the properties of the taylor expaonsion, $E^{(k)}(a)=f^{(k)}(a)-P^{(k)}_{n,a}(a)=0$ for all $k \in \mathbb{Z}, k \leq n$.
Does this relationship come from differentiating the definition of the error bound k times and then using  x=a since the derivatives at the point must be equal? I think that's where it comes from, but I'm not entirely sure.
Since the $(n+1)$th derivative of a polynomial of degree n is $0$,
$E^{(n+1)}(x)=f^{(n+1)}(x)-P^{(n+1)}_{n,a}=f^{(n+1)}(x)$. From this it follows that $|E^{(n+1)}(x)|=|f^{(n+1)}(x)|$. Assuming that $f^{(n+1)}(x)$ is continuous on $[a,b]$, there must exist some M such that $|E^{(n+1)}(x)|=|f^{(n+1)}(x)|\leq M$.
I know the fact that M has to exist comes from the Boundedness theorem, and intutively $f$ can't "go off to infinity" if it's continuous, but is there a more rigorous way to state this? Should I wait until I learn some analysis before trying to prove it? Most of the proofs I've seen use theorems from real analysis which I haven't learned yet.
The next step is to antidifferentiate both sides of the inequality to get
$\int_{ }^{ }\left|E^{\left(n+1\right)}\left(x\right)\right|dx\le\int_{ }^{ }Mdx$ and because $\int_{ }^{ }\left|f\left(x\right)\right|dx\ge\left|\int_{ }^{ }f\left(x\right)dx\right|$, this means $\left|\int_{ }^{ }E^{\left(n\right)}\left(x\right)dx\right|\le Mx+C$ for some constant C.
I have 2 questions about this step. The first is, how do we know that antidifferentiating on both sides of the inequality preserve the inequality? My first thought was that if $f(x)\leq g(x)$ then $g(x)-f(x)$ is strictly positive, but I don't think that this means the antiderivative of $g(x)-f(x)$ is strictly positive (the example I thought about was $x^2$ and $\frac{1}{3}x^3+C$). So how would we show that antidifferentiating preserves the inequality?
The second question I had on this step was about the absolute value inequality. Intuitively $\left|\int_{ }^{ }f\left(x\right)dx\right|\le\int_{ }^{ }\left|f\left(x\right)dx\right|$ makes sense if thinking about the "area under the curve" idea, but is there a more formal way to say this? Is extending the area under the curve idea from definite integrals to indefinite ones even valid?
Finally, the last step in most of the derivations is using $|E^{n}(a)|\leq0$ and then saying $0=Mx+C \Rightarrow c=-Ma$. The rest of the steps are just repeating this process until you get to $|E(x)|\leq \frac{(M)(x-a)^{n+1}}{(n+1)!}$.
I have one question about this, any value of C greater than $-Ma$ would make the inequality $|E^{n}(x)|\leq Mx+c$, so how do we choose C to be equal to $-Ma$ specifically? Some sites say that we need to find the minimal value of C, which is -Ma, but how can we be sure that this minimal value will satisfy the inequality for other values of x besides a?
Those are all the questions I had about Lagrange Error Bounds. I hope the answers to these questions aren't too obvious/trivial (I'm not the greatest at mathematics, so they might be dumb questions I'm not sure).
Any clarification would really help.
Thanks for reading
 A: *

*You are just differentiating the definition of $E$ $k$ times. The important thing is that $P_{n,a}(a),P_{n,a}'(a),\dots,P_{n,a}^{(n)}(a)$ are the same as $f(a),f'(a),\dots,f^{(n)}(a)$. Achieving this property was why we constructed $P_{n,a}$ the way we did in the first place.

*The fact that a continuous function on a closed interval is bounded is a relatively basic theorem in real analysis, called the extreme value theorem in most books I have seen. If you don't know it then you can just take it for granted.

*This step of doing an indefinite integral is, in my opinion, very bad style. It should really be done with definite integrals all the way through. The point is that you know $E(a)=0,E'(a)=0,\dots,E^{(n)}(a)=0$, so you can repeatedly apply the fundamental theorem of calculus to get $E(x)=\int_a^x E'(y_1) dy_1 = \int_a^x \int_a^{y_1} E''(y_2) dy_2 dy_1 = \dots$, continuing the pattern until you've gotten down to $E^{(n+1)}(y_{n+1})$ as the integrand. Then you take absolute values on the outside, bring absolute values inside (as you mentioned), apply $|E^{(n+1)}| \leq M$, and then you can just perform all $n+1$ integrals explicitly. (Using integrals is not the only way to do it, by the way; you can find this derivation written up using the mean value theorem, for instance.) Just as a small example to show the pattern, say $n=2$, then

$$E(x)=\int_a^x E'(y_1) dy = \int_a^x \int_a^{y_1} E''(y_2) dy_2 dy_1. \\
|E(x)| \leq \int_a^x \int_a^{y_1} |E''(y_2)| dy_2 dy_1 \leq \int_a^x \int_a^{y_1} M dy_2 dy_1 \\
= \int_a^x M(y_1-a) dy_1 = \frac{1}{2} M (x-a)^2.$$
I think your other questions are all technicalities that arise from trying to force indefinite integrals where they do not belong. Using definite integrals, you don't have to think about these things.
