Question: For the function 2 1 ) ( x xf = , find the US and LS in the interval [ 1 , 2 ] for
For the function
x
xf find the US and LS in the interval for
n
Lets first get the function defined, since it is not a function in the Matlab library.
finlinex
The dot before the operation symbols tells Matlab to generate a function that can be
evaluated on arrays, in particular vectors.
Next, use the graphing capabilities of Matlab to graph this function on this interval
As you can see when you do so because our function is decreasing in any
subinterval the maximum is always on the left end and the minimum in the right end.
Lets first define the Delta x
deltaX ;
Now generate the vector with the left ends of the intervals. This will be used to give us
the US
xu linspace deltaX ;
Now the vector with the right ends of the intervals fro the LS
xl linspace deltaX ;
Finally a simple command gives us the Riemann sums.
deltaXUS xufsum
MATH Lab Matlab Version Page of
deltaXLS xlfsum
Remember that we know now that
USALS
If we define our approximation as the middle point
LSUS Aest
then the largest error
we could possibly be making is given by
LSUS
error what means that
est errorAA
Now we can compute the estimation of the area and the error
Estimate LSUS
LSUSerror
Now find an n that is a power of such that the error in the estimation of the area is
less than or equal to
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
