I see that I can declare a function with (say)
public double Function(double parameter)
but what if I do want to take the derivative of tha
If you have written the function, it's already been derived.
And given that it's an int function, I'll assume you don't mean the calculus definition of "derive".