(10 pts)
In this problem, you’re going to work out an integral numerically from start to finish. To get your specific problem, choose your name from the following menu:
(10 pts)
In this problem, you’re going to work out an integral numerically from start to finish. To get your specific problem, choose your name from the following menu:
My integral is
Here’s a graph of the integrand f, together with f''(x):
Over the interval [1,3], it sure looks like
So I can take M_2 = 2. Now, our error bound says
Solving that equation for n, we find that we need
Thus, we’ll take n = 26 and break the interval from 1 to 3 up into 26 parts to get
This yields the approximation
Note that the final approximation was computed with this code.
My integral: \int_0^2 \sqrt{1+x^4}\ dx
Here is the graph of f and f^"(x):
Over the interval [0, 2]:
|f^"(x)| < 3
,so M_2=3.f
n\geq \sqrt{27000/24} \approx33.54
I’ll take n=34, so \Delta x= \frac{2}{34}= \frac{1}{17}, \text{and } x_i= \frac{i}{17}
The result is:
\int_0^2 \sqrt{1+x^4} \approx \sum_{i=1}^{34} \sqrt{1+(\frac{\frac{i}{17} + \frac{i-1}{17}}{2})^4} \approx \sum_{i=1}^{34} \sqrt{1+ (\frac{2i-1}{34})^4} \approx 3.6529
This is the code.
My integral is
Here is the graph of f and f"(x)
Over the interval [0,2], it appears to be |f''(x)| < 1 So M1 = 1. The error bound says error < or = M1 (b-a)^2/n = 4/n < or = 1/1000 Solving for n, we need n > or = 4000. We'll take n=4000 and break the interval from 0 to 2 up into 4000 parts to get delta(x) = 2/4000=1/2000 and xi= 0 + i/2000 This yields the approximation ~~ 7.6527. This was computed using this code: f(x) = (16-x^2)^(1/2) a = 0; b = 2; n = 4000;xi = a;
dx = (b-a)/n;
sum = 0;
for i in range(n):
xi = xi+dx;
sum = sum + f(xi)
N(sum*dx)
Apologies this is not formatted at the moment, I will improve on it. I struggled with getting any formatting to work successfully.
My integral is
The graph of this (red) and f''(x) (blue) is shown below:
From this it seems that over the interval [-1,1],
So we can take M_2 = 3. The error bound for a midpoint sum states
When solving the equation for n we find that
well round up and make n = 32. We’ll then break up the interval from -1 to 1 into 32 parts to get
This yields the approximation
This code I used to calculate this was here: Sage Cell Server.
My integral is
My graph of f and f''(x):
I can set my M_{2}=10
Using n=21 to find \Delta x and x_i, yields:
Midpoint approximation:
An image of the function (in red) and it’s first and second derivative
|f"(x)|<3...f"(x)=\dfrac{6x^2}{\sqrt{x^4+1}}-\dfrac{4x^6}{\left(x^4+1\right)^\frac{3}{2}}
Error Calculation: M2 =3, n=>\sqrt(\frac{27000}{34})=33.5
This gives us the equation \int_0^2 \sqrt{1+x^4} \, dx \approx \sum_{i=1}^{34} \sqrt{1+(i/17+(\frac{2i-1}{34})^4}=3.6848
Code: Sage Cell Server
f(x) = sqrt(1+x^4)
a = 0; b = 2;
n = 34;
xi = a;
dx = (b-a)/n;
sum = 0;
for i in range(n):
xi = xi+dx;
sum = sum + f(xi)
N(sum*dx)
I have confused myself.
My integral is
Here’s a graph of f, together with f'(x)
Over the interval [-1,1], it looks like
So I can take M_1=1.5. Now my error bound says
solving for n, I find that I need
Thus, I’ll take n=6000 and break the interval from -1 to 1 up into 6000 parts to get
This yields the approximation
The final approximation was computed with this code: Sage Cell Server
My integral is:
Here’s a graph of the integrated f, together with f''(x):
Over the interval [0,2], it looks like:
So, we can take M_2=3. Now, our error bound says:
Solving that equation for n, we will find that we need:
Thus, we’ll take n=32 and break the interval from 0 to 2 up into 32 parts to get:
This yields the approximation:
Note that the final approximation was computed with this code.
my integral is
Here’s a graph of the integrand f , together with f"(x)
So I can take M_2 = 3 . Now, our error bounds says
Solving that equation for n , we find that we need
Thus, we’ll take n=32 and break the interval from -1 to 1 up into 32 parts to get
this yields the approximation
my integral is
Here is the graph of f(x) and f’(x):
Over the interval [1,2] it looks like
So, M1 = 4. Now, our error bound says
Solving that equation for n, we find that
Thus, we’ll take n=4000 and break the interval from 1 to 2 up into 4000 parts to get
This yields the approximation
Note that the final approximation was computed with Sage Cell Server
My integral is
Here is a graph of the integrand f, together with f''(x):
Over the interval [-1,1], it looks like
So I can take M_2 = 20. Now, our error bounds says
Solving for n, we find that we need
Now we will take n=82 and break the interval from -1 to 1 up into 82 parts to get
This yields the approximation
The final approximation was computed using this code.
My integral is:
Here’s a graph of the integrand f, together with f, together with f''(x).
Over the interval [0,2], it sure looks like |f''(x)|<1
So I can take M_2 =1. Now, our error bound says,
Solving that equation for n, we find that we need,
Thus we’ll take n =18 and break the interval from 0 to 2 up into 18 parts to get,
This yields the approximation,
Note that the final approximation was computed with this code.
My integral is
Here is a graph of the f(x) and f''(x):
Over the interval [2,4] it looks like
So, M1=1. Now, our error bound says
Solving that equation form, we find that
Thus, we’ll take n=4000 and break the interval from 2 to 4 into
This yields the approximation
The final approximation was computed with this code
My intergral is
Here’s a graph of the integrand f, together with f''(x)
Over the interal [0,2], it looks like
So I can take M_2 = 1. Now, our error bound says
Solving that equation for n, we find that we need
We take n=19 and break the interval from 0 to 2 up into 19 parts to get
This yields the approximation
The final approximation was computed with this code.
My Integral is:
The graph is f(Orange) and f′′(x)(Green) is shown below:
The interval is over [0,1] it looks like
|f''(x)|<10
So I set M_2=10
error \leq M_2 \frac{(b-a)^3}{24n^2}=\frac{10}{24n^2} \stackrel{\color{red}\text{want}}{\leq} \frac{1}{1000}
n \geq \sqrt{\frac{1250}{3}}\approx20.412
Using n= 20 and break the interval from 0 to 1 up into 20 parts to get
\Delta x = \frac{1}{20}\text{ and } x_i = 1 + \frac{i}{20}.
This yields the approximation
\int_{0}^{1}sin({\pi}x)dx\approx\displaystyle\sum_{i=1} ^{20} sin(\pi\frac{(1+\frac{i}{20})+(1+\frac{i+1}{20})}{2})\frac{1}{20}\approx0.6372
Note that the final approximation was computed with Sage Cell Server
My integral is
Over the interval [0,2] it looks like
So I will set
The error bound for a left sum states
So,
So I’ll take n = 16000 and break the interval 0 to 2 into 16000 parts
This yields the approximation
Sage code: Sage Cell Server