# How to search for a formula/expression

Suppose I want to search for instances where an expression similar to $x_n^2-x_{n-1}x_{n+1}$ shows up. How would I do that?

I suppose the question goes beyond searching MSE. Are there search engines which handle math formulas in a particularly effective way?

Edit: I am listing some leads in the comments which I found useful:

Uniquation, a mathematical formula search engine. And here is the response to my query above. Perhaps this can be an option on MSE.

• Jul 4, 2013 at 14:42
• symbolab.com is another one. Jul 5, 2013 at 17:29
• @PeterKrautzberger Thanks, but when I tried above query on it I could not see a connection between reply and query. Also it is not LaTeX based. Perhaps I am mistaken. Symbolab Jul 6, 2013 at 0:16
• Doesn't the math.se search engine match against the raw latex in the posts? Jul 9, 2013 at 16:12
• @JackM if you are searching for $a^2+b^2=c^2$ the Uniquation seems to also get you $x^2+y^2=z^2$ and the equivalents. So searching a formula becomes a tricky search for a concept. Jul 9, 2013 at 21:18
• Another related question at MO: mathoverflow.net/questions/162487/… Apr 6, 2014 at 6:45
• It seems that uniquation has been down for some time: Where did uniquation go? Some other search engines are mentioned in the FAQ post: How to search on this site? May 2, 2021 at 9:10

See my side-project, it is an open-source math-aware similarity search engine.

http://approach0.xyz

I am hoping someone interested can join and form a community to push this project forward, this is the reason I am posting here.

• Wow, looks super interesting. I'll try and get involved! I mean I gotta make sure you don't focus too much on formula simularity ;-) (i.e. treating f(x^2) = xy as g(a^2)=ab). That seems to be what every math search engine does, but, in reality mathematicians encode plenty of info in which of those symbols we pick (e.g. n is often an integer etc..) and the math i search for usually has a few preferred variable name choices that should be used to guide search. May 26, 2022 at 6:51
• @PeterGerdes Thanks for your input. In the current system, it actually prioritizes exact symbol match, the tolerance for substituted symbols is done as a fallback. Additionally, you can also specify an \exact match in the query TeX for a particular symbol expeclicitly. May 26, 2022 at 18:14
• Ohh, wonderful! I misunderstood because I was just going off what I read in your great papers but I should have realized they focus on the hard part (FYI the links to them are broken on some of your pages...not hard to search but thought you might want to know). As an aside, it might be interesting to know if an LDA style approach could be used to group related symbols into topics but that's just musing. Anyway, if you still need help where should I go to offer some coding assistance/see what needs doing? May 27, 2022 at 20:33
• Ohh, I see why I was confused. I'd read the part about tokenized OPT lists and hadn't gotten to the part in the 2020 paper where you talk about distingushing E=mc^2 from a=bd^2 (nor realized that leaf nodes were the operands rather than leaf nodes of the tree with only operators. My bad. May 27, 2022 at 23:38
• @PeterGerdes Thanks for reminding me the links are broken, I think there are more broken links elsewhere. In fact, the whole doc is not maintained because the search engine core is not open right now, I can consider re-open it once I finish my academic program... but for now, I am too busy to update them since they are so out-of-date. May 29, 2022 at 5:23
• For LDA, what do you eventually want after clustering? The end goal is retrieval, if you are talking about using machine learning to get some "dense representation" for retrieval, we have done something in that direction, but using Transformers. May 29, 2022 at 5:25
• Yup, thanks for your interest. For now, since the core engine is closed, and my degree kinda depends on it (shamelessly speaking), I would not invite someone to this project unless there are absolutely certain needs. I am not familiar with your bkgd, so go to the MSE chatroom or just email me for a further chat if you wish. May 29, 2022 at 5:31

searchOnMath looks interesting too. I think you can do what you want

Feb. 2019 Update from one the developers Flavio Gonzaga:

Recently our tool has indexed both: Mathematics and MathOverflow.

Currently, SearchOnMath is the mathematical search engine with the largest number of indexed sites (including Wikipedia, Wolfram MathWorld, among others ...).

P.S.: please, enclose formulas between \${}\$. e.g. \${x+y}\$.

The following Youtube video illustrates how it works: SearchOnMath - a brief guide

We’d love to hear your feedback.

• Is there a search that when you look for $x^y=y^x$ it provides articles with equivalent equations that can be obtained by simple substitutions, such as $a^b=b^a$. That is a search engine that understands the concept of equation beyond just appearance of letters. SearchOnMath is a valuable tool but I do not think it searches for equivalent equations. May 30, 2015 at 21:07
• According to a recent announcement on Mathematics Meta, SearchOnMath now indexes MathOverflow and Mathematics Stack Exchange. Feb 1, 2019 at 5:10