1. If xsin(πx)=0x2f(t)dt, where f is a continuous function, find f(4).

  2. Suppose f is continuous, f(0)=0, f(1)=1, f(x)>0, and 01f(x)dx=13. Find the value of the integral 01f1(y)dy.

  3. If 04e(x2)4dx=k, find the value of 04xe(x2)4dx.

  4. Evaluate limn(1nn+1+1nn+2++1nn+n).

Algorithm Homework:

  1. Implement a Python program that calculates the left, right, and midpoint Riemann sums for a given function f(x) over a specified interval [a,b]. Your program should allow the user to input the function, the interval, and the number of subintervals (n) they want to use for the Riemann sum. It should then compute and display the results for each type of Riemann sum (left, right, and midpoint).

  2. Create a Python program that generates a random Riemann sum. This program should do the following:

    1. Generate random partition points x0,x1,x2,,xn that satisfy the condition max(xi+1xi)<δ for a given small positive value δ, which also allows the user to select.
    2. Randomly select sample points xi within each subinterval.
    3. Evaluate the Riemann sum using these randomly generated values and display the result.
You can try your code here!