Considering the normal distribution with standard deviation equals to 0.9 and mean 2.1:
$$ P(X\leq a) = \frac{1}{0.9\sqrt{2\pi}}\int_{-\infty}^{a} e^{-\frac12\frac{(x-2.1)^2}{0.9^2}}\,dx $$
I must find the value for 'a' that satisfy $P(X\leq a) = 0.1$ using the numeric method Simpson 1/3 without repetition.
To simplify I named $c = \frac{1}{0.9\sqrt{2\pi}}$ and $f(x) = e^{-\frac12\frac{(x-2.1)^2}{0.9^2}}$
So $P(X\leq a) = c \int_{-\infty}^{a} f(x)\,dx$
Therefore $c\int_{-\infty}^{a} f(x)\,dx = 0.1$ and $c\int_{-\infty}^{2.1} f(x)\,dx = 0.5$.
To be able to use Simpson 1/3 I must have a integral with finite limits, so I write:
$$ c\int_{-\infty}^{2.1} f(x)\,dx = c\int_{-\infty}^{a} f(x)\,dx + c\int_{a}^{2.1} f(x)\,dx $$
$$ 0.5 = 0.1 + c\int_{a}^{2.1} f(x)\,dx $$
$$ \int_{a}^{2.1} f(x)\,dx = \frac{0.4}{c} $$
Using Simpson 1/3:
$$ \int_{a}^{2.1} f(x)\,dx \approx \frac{h}{3} (f(a) + 4f(a+h) + f(2.1))$$ with $h = \frac{2.1 - a}{2}$.
Solving for $a$:
$$ \frac{h}{3} (f(a) + 4f(a+h) + f(2.1)) = \frac{0.4}{c} $$
I get $a = -2.881562$.
Using math software, I know that $a$ value is wrong. But I don't know where I made a mistake.
So, how can I calculate the right approximation for $a$?
[SOLVED]
Let $$ F(x) = \frac{1}{0.9\sqrt{2\pi}} e^{-\frac12 \frac{(x-2.1)^2}{0.9^2}} $$
And
$$ f(a) = \int_{-\infty}^{a} F(x)\,dx - 0.1 $$
We must solve $$f(a) = 0$$
$$ f(a) = \int_{-\infty}^{2.1} F(x)\,dx - \int_{a}^{2.1} F(x)\,dx - 0.1$$
$$ f(a) = -\int_{a}^{2.1} F(x)\,dx + 0.4$$
For that, a method like Newton's Method could be used:
$$ x_{k+1} = x_k - \frac{f(x_k)}{F(x_k)} $$
Since $ f'(x) = F(x) $.
Using Simpson 1/3 the integral in $f(a)$ can be numerically approximated.
In this conditions, using $x_0 = 1$ the fourth iteration of Newton's Method gives:
$$ x_4 = 0.948042356255413 $$
This result, clearly carries the error of approximating the value of $f(a)$, as Simpson 1/3 method has an error of about $|0.0012|$ for this function, using two intervals.