Write three functions, AppEval, AppDeriv and AppInt that approximate the value, the derivative and the integral of an unknown function f for which you are given only some unevenly spaced values. More specifically, the function AppEval has to be written

in the file AppEval.m, and its first line looks like this:

function y=AppEval(x,xvals,yvals)

For any x from the interval [0, 1] it should return (an approximation of) the function value y = f (x). You do not know the formula for f , but xvals and yvals are sample vectors of length approximately 120 (you cannot rely on the exact length but it will be
larger than 100). For each element of xvals, the function value is in yvals: yvals(i) is f(xvals(i)). Note that the values in xvals cover the entire range from -0.1 to 1.1but they are slightly unevenly spaced in a random manner.

To approximate the value, derivative, and integral of an unknown function f using unevenly spaced values, you can implement three separate functions: AppEval, AppDeriv, and AppInt.

Here's an explanation of each function and how to implement them:

1. AppEval:
The AppEval function takes an x value, xvals vector, and yvals vector as inputs, and returns an approximation of the function value y = f(x).

To implement AppEval in the file "AppEval.m", follow these steps:
- Create a new file named "AppEval.m" in your preferred programming environment.
- Add the following line at the beginning of the file:
function y = AppEval(x, xvals, yvals)
- Inside the function, use interpolation techniques, such as polynomial interpolation or spline interpolation, to approximate the function value at x based on the provided xvals and yvals.
- Return the approximate function value y.

2. AppDeriv:
The AppDeriv function calculates the derivative of the unknown function f at a given x value using the provided xvals and yvals vectors.

To implement AppDeriv, you can modify the AppEval function as follows:
- Inside the AppEval function, use interpolation techniques to approximate the function value at x and store it in a variable, let's say y.
- Calculate the derivative of the interpolated function at x using numerical differentiation methods, such as finite differences or central differences.
- Return the derivative value.

3. AppInt:
The AppInt function calculates the integral of the unknown function f over the interval [0, 1] using the given xvals and yvals vectors.

To implement AppInt, you can modify the AppEval function as follows:
- Inside the AppEval function, use interpolation techniques to approximate the function values at various points within the interval [0, 1] using the provided xvals and yvals.
- Apply numerical integration methods, such as the trapezoidal rule or Simpson's rule, to compute the integral of the interpolated function over the interval [0, 1].
- Return the integral value.

Note: Implementing the interpolation, numerical differentiation, and numerical integration methods is beyond the scope of this explanation. You will need to study and implement these techniques according to your programming language and the mathematical libraries available to you.

Remember to adjust the code and algorithm according to your specific programming language and environment.