If I understand your question correctly, then yes there are 100's of packages out there that can do that as that is really just the crust of scientific computing.

Personally I like to use Matlab, but Octave is free alternative. Here is an example of using matlab or octave for what you want.

Code:>> f = @(x) x^2 + 1 >> f(1) >> ans = 2