Let's consider a function
I want that if I input only one argument I get
but if I input 2 arguments I get
How can I implement that?
I thought I could use
but reading this previous post Are UnsamQ and Not[SameQ] the same function? I think it's not the correct way.
I could use 2 different definition for
f[a_,b_] but I'd like to have only one definition. In fact, my problem arises because if
f has only one argument,
f performs analytic calculation, but with two argument (where the second argument is a "correction" of the first one)
f needs, in only one part, a numerical calculations; anyway the computation that
f performs is the same in both cases.