I used this partisan mathematical formula with positive results. The documentation he provided is very useful for download.
http://www.codeproject.com/KB/recipes/MathieuMathParser.aspx?display=Print
Then your application can place special equations that the library will analyze into its component parts. Then you can specify the values for the required variables and evaluate the result.
(, , , , ..) .