In addition to nice answer by @DankMasterDan (+1), I would like to share further information on the topic. It seems that an approach that you're looking for is symbolic regression. It seems to be closely associated with and usually is implemented via evolutionary algorithms, such as the most popular genetic programming (GP). However, other approaches are also proposed, especially in relation to analytical models of physical systems. For example, see a paper by Shmidt and Lipson (2009), published in Science. By the way, this small open source Java-based project presents an implementation of the above-mentioned approach.
In terms of software, available for symbolic regression, before I concentrate on my favorite open source solutions, I'd like to mention that Eureqa is definitely an interesting product, which has grown from an open source project. However it is quite expensive, as many commercial statistical or machine learning solutions, available on the market today.
I will start a brief review of open source solutions with a hybrid solution GPTIPS, which is an open source plug-in software for commercial MATLAB. It is referred to by authors as a "symbolic data mining platform for MATLAB".
Now, turning to a full open source software, we can find several IMHO very interesting solutions. A well-known language-agnostic (but still Python-based) system SageMath offers symbolic regression functionality via SymPy Python library, which can also be used independently as well. Another very interesting comprehensive open source software system is .NET-based HeuristicLab. While HeuristicLab is labeled "a framework for heuristic and evolutionary algorithms", it offers a much wider range of functionality beyond symbolic computations and evolutionary/GP solutions.
In addition to already-mentioned SymPy libarary, Python ecosystem offers DEAP open source project, where DEAP abbreviation refers to Distributed Evolutionary Algorithms in Python.
My brief analysis of open source software for symbolic regression and related solutions would be incomplete without mentioning what my favorite R ecosystem offers in that regard. An interesting R package for GP and symbolic regression is rgp
(available on CRAN), which is referred to as "R genetic programming framework" (RGP). The RGP package is a part of a larger set of open source tools for symbolic computation in R, developed under the umbrella of a larger Rsymbolic project. There are also several optimization-focused GP packages (http://cran.r-project.org/web/views/Optimization.html), however it is highly unlikely that they offer symbolic regression functionality out-of-the-box, as RGP package does.
References
Schmidt, M., & Lipson, H. (2009). Distilling free-form natural laws from experimental data. Science, 324(5923), 81–85. doi:10.1126/science.1165893 Retrieved from http://creativemachines.cornell.edu/sites/default/files/Science09_Schmidt.pdf