Hi Keen
I read you question again and I guess I didn't really help.
I assume, the formulae you have does not lend itself to rearanging
to make airfoil Cm the subject.
Can you work back the other way, from an airfoil Cm determine the wing Cm?
If you can do this, the problem can be solved itteratively.
Choose 3 airfoil Cm values and calculate the wing Cm.
Now you can establish a relationship between airfoil Cm and Wing Cm.
You could just graph this but if you are looking for a program solution, you can use:
Y = a * X^2 + b * X + c (for parabolic relationships)
Y = a * X^-2 + b * X^-1 +c (for exponential relationships)
Plug the Cm values into 3 equations for X and Y and solve a, b and c by simultaneous equations or by matrix algebra, there is another method, I can't recall it's name. If you like, I have a basic program I wrote many years ago for any number of points but it's best not to use too many.
Now you have an equation for estimating airfoil Cm from wing Cm.
Use the estimated airfoil cm to calculate wing Cm. If this is not close enough. Pick the 3 airfoil Cms that yield wing Cms closest to what you want and use them for another iteration.
Repeat until your estimate is close enough.
Obviously I don't know the formulae you have and can only guess at it's derivation. As it is aspect ratio based, I would guess it is to do with aerodynamic twist caused by tip vortex resulting in a spanwise variation in Cl and Cm. If that where the case, I'd expect plan form to be a factor as well.
I would have thought wind Cm could be estimated by dividing the span into strips, calculating the moments of each strip. Summing the strip moments about wing AC and reducing the overall moment back to a Cmac for the wing using Cm = 2 * M/( p * V^2 * S * C ).
Does a calculous solution applied to this approach sound likely?
I'm only guessing at the derivation though.