MATH 156 LAB 3Topic 1: Comparing sums with increasing number of subintervals.We come back to the example of velocity-distance travelled from Laboratory 2. The velocity function wasf := t->-22108.111351860603123*t^12+267716.97873114933992*t^7-28550.588718383953421*t^4-.69089471139707261503e-1*t^18-593.25933891402415755*t^2+88214.018798090967877*t^5-182944.24328666353298*t^6+5693.6391073166057753*t^3-285572.24388626189800*t^8+227046.45357947547549*t^9-136597.49693854806554*t^10+62764.645490312705181*t^11+1.5172197744989322043*t^17+5957.3207937003999701*t^13-1217.1081971634308471*t^14+185.14666942246783552*t^15-20.307901075143421783*t^16+.14466922546287623311e-2*t^19+33.706872407075593812*t+20;Digits:=20;We are working on the interval [0, 5].Write commands that show the left-hands sums with 5 and 10 subintervals simultaneously. Explain why LHS(5) is less than LHS(10). Graph and explain why LHS(10) is less than LHS(20). Graph and explain why RHS(5)>RHS(10)>RHS(20). Do not forget the plots and student packages.Topic 2: Evaluate the sums numerically.We would like now to calculate the sums numerically. Maple has the commands: leftsum(function, variable= lower limit .. upperlimit, number of subintervals) for the left-hand sum and rightsum(function, variable=lower limit ..upper limit, number of subintervals). We will use first 5 subintervals.leftsum(f(t), t=0..5, 5); rightsum(f(t), t=0..5, 5);As you see Maple does not give us the numerical value, so we use evalf:evalf(leftsum(f(t), t=0..5, 5)); evalf(rightsum(f(t), t=0..5, 5));Write commands to compute the left-hand sums and the right-hand sums with 10, 20, 40, 80, 160 subintervals.We see that indeed the left-hand sums are increasing and the right-hand sums are decreasing. At the same time the right-hand sums are always larger than all the left-hand sums.As you see we have not gotten great accuracy. We do not even have accuracy to the nearest integer. To compute more accurately it will be nice to increase the number of subintervals. As it is tiring to write the same commands over and over, it is important to introduce loops in Maple.Topic 3: Loops and convergence of Riemann sums.The following commands produce a table of the left-hand sums with 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120 subintervals. Notice that every time we multiply the number of subintervals by 2, so at the first step (j=1) we have 5*2^0 subintervals, at the second step (j=2) we have 5*2^1=10 subintervals, at the third step (j=3) we have 5*2^2=20 subintervals etc. This gives the formula 5*2^{j-1} in the commands. for j from 1 to 11 do n:= 5*2^(j-1): evalf(leftsum(f(t), t=0..5, n)):od;We see that the first decimal digit is stabilized. Morever, as you have noticed before, the left-hand sums are increasing. To be certain that the first decimal digit is indeed 6 we need to give overestimates, which are the right-hand sums. Write commands that produce the right-hand sums with the same number of subintervals, using a loop. All you have to do is copy the command for the left-hand sums and change leftsum into rightsum.Now let us introduce the command that evaluates the integral exactly. To introduce NiMtJSRpbnRHNiQtJSJmRzYjJSJ0Ry9GKTslImFHJSJiRw== we use the command Int( f(t), t=a..b)Topic 4: The Int command.integraloff:=Int(f(t), t=0..5);To compute the numerical value we use the value command.value(integraloff);Now we will work with the function g(x)=1/x and the integral NiMtJSRpbnRHNiQqJiIiIkYnJSJ4RyEiIi9GKDtGJyIiIw== .Compute the left-hand sums and right-hand sums with 2, 4, 8, 16, 32, 64, 128, 256, 516, 1024 subintervals. Use a loop. How many decimal digits are you certain of?Which are overestimates and which are underestimates and why? Do the left-hand sums form an increasing or decreasing sequence of numbers, as the number of subintervals increase? Show this in appropriate graphs.