hey guys i just need someone to help me out in parts (c) and (d) of the following question:
a- Implement the function f(a,x)=sin(ax)/x. (the prototype is double f1(double a, double x). Note that this function is equal to a for x=0. (6 points)
b- Write a code that asks the user to enter a, and calculates the sum: sum= f(a,0)+f(a,0.01)+f(a,0.02)+…+f(a,1) , i.e. in the interval 0<=x<=1. Test your code for a=12, and include the result as a comment in your program.
c- Write a code which counts, calculates, and displays the roots of f(a,x) in the interval 0<=x<=1, with an error less than 0.01. Note that a root exists between r and r+0.01 if f(a,r)*f(a,r+0.01) is negative. Test your code for a=12, and include the result as a comment in your program.
d- Write a code which counts, calculates, and displays the number of minima of f(a,x) in the interval 0<=x<=1, with an error less than 0.01. Test your code for a=12, and include the result as a comment in your program.