We need two numerical approaches here. One to find the zeros of the function $f(x)$, Newton's Method, and one to estimate the integral, Composite Simpson and Composite Trapezoidal, above where:
Repeat this exact same procedure using the Composite Trapezoidal Rule for calculating the values of $s$.
Curious question, is it possible to calculate the value of $n$ for the desired accuracy apriori to doing the iterative steps when using these two numerical approaches? Probably, but I will leave that for you to ponder.
We are asked to find the value of $x$ where:
$$\int_0^x \dfrac{1}{\sqrt{2 \pi}} e^{-t^2/2}~dt = 0.45$$
We need two numerical approaches here. One to find the zeros of the function $f(x)$, Newton's Method, and one to estimate the integral, Composite Simpson and Composite Trapezoidal, above where:
$$f(x) = \int_0^x \dfrac{1}{\sqrt{2 \pi}} e^{-t^2/2}~dt - 0.45 = 0$$
The derivative wrt $x$ of this function is (there is a slight typo in problem specification):
$$f'(x) = \dfrac{1}{\sqrt{2 \pi}} e^{-x^2/2}$$
The Newton-Raphson method is given by:
$$\displaystyle x_{n+1} = x_n - \dfrac{f(x_n)}{f'(x_n)} = x_n - \dfrac{\displaystyle \int_0^{x_n} \dfrac{1}{\sqrt{2 \pi}} e^{-t^2/2}~dt - 0.45}{\dfrac{1}{\sqrt{2 \pi}} e^{-x_n^2/2}}$$
At each iteration, we have to use the Composite Simpson's Rule to find the value of that integral for the next $x_n$.
$$s = \int_a^b f(x) \approx \dfrac{h}{3} \left( f(a) + f(b) + 4 \sum_{i=1}^{n/2}~f(a + (2i - 1)h)+2 \sum_{i=1}^{(n-2)/2} f(a+2 ih) \right)$$
The initial starting point is $x_0 = 0.5$ with a desired accuracy of $10^{-5}$.
The iterations are:
Lets compare this to the exact result and validate we found the correct value of $x$. We have:
$$\int \dfrac{1}{\sqrt{2 \pi}} e^{-x^2/2}~dx = \frac{1}{2} \text{erf}\left(\frac{x}{\sqrt{2}}\right)$$
Evaluating this at $x = 1.64485$ yields:
$$\frac{1}{2} \text{erf}\left(\frac{1.64485}{\sqrt{2}}\right) = 0.45$$
Repeat this exact same procedure using the Composite Trapezoidal Rule for calculating the values of $s$.
Curious question, is it possible to calculate the value of $n$ for the desired accuracy apriori to doing the iterative steps when using these two numerical approaches? Probably, but I will leave that for you to ponder.