Mathematics is supposed to abstract the essential features of a situation. I have yet to see this done for the common task of answering a question about mathematics posted to the forum. For questions of the form: "How do I do ... X ...?", I offer the following general general patterns. Pattern 1: Re-direction You don't want to do X. Whay you really should do is Y. Y is a lot simpler. Y is what a smart person like myself would do. Pattern 2: Googleation The wikippedia article on Z explains X. Or just Google on the words "Z X", you'll find thousands of references. That's what I did. (Of course I didn't read any of them to see if they actually answered your question.) Pattern 3: Disambiguation What you mean by "X"? Are your talking about "X1" or "X2" or some other kind of "X". You need to become an expert in order to ask a mathematical questions clearly. Why don't you study this awhile on your own? Pattern 4: Suspicion Is this a homework problem? What ways have you tried to do X. Show us your work. Sure it might take an hour or two to get all that typed up and submitted, but I have the time to wait. Pattern 5: Let the computer do it You might be able to do X, but I think it's very complicated and if I tried to do it, I'd probably make a mistake and look like an idiot. Why don't your try a Monte-Carlo simulation or put into Mathematica?