I should write a function that calculates the derivative of sin^2(x)/x+3
by using the formula (f(x+h)-f(x))/h
.
I have read many examples in Internet but they were complicated. I don`t know much about coding, I should calculate this derivative only by making a function.
For ex.
float deriv(float x,float h)
How can we write this function?