tao , (edited )
@tao@mathstodon.xyz avatar

The laws of algebra, when applied randomly, will often make an expression more complicated to handle, rather than simpler to handle. This is because most of these laws are reversible: if a law allows you to reduce a complicated identity 𝐴=𝐵 into a simpler identity 𝐶=𝐷, it will also often allow you to expand the simpler identity 𝐶=𝐷 back into the complicated one 𝐴=𝐵.

So one has to apply the laws of algebra strategically. In high school one is taught some general principles for doing this, such as gathering like terms, eliminating variables, or factoring out (or cancelling) common factors, but in general strategy is not emphasized in most math courses.

A lot of mileage can be gained by performing local "gradient flow" on the complexity of the expressions at hand. For instance, all other things being equal, one would rather work with quotients with a complicated numerator and simple denominator than the other way around, because we have many more techniques to deal with messy numerators than messy denominators: for instance, (𝐴+𝐵)/𝐶 can be easily split into the sum of 𝐴/𝐶 and 𝐵/𝐶, but it is much less convenient to split 𝐴/(𝐵+𝐶) as the harmonic sum of 𝐴/𝐵 and 𝐴/𝐶, as we have so few laws for harmonic summation. This explains why it is often good to rationalize the denominator, but the trick is more general; for instance I recently was studying an expression involving the quantity 1/lcm(𝑛,𝑚) and I immediately knew to convert this to gcd(𝑛,𝑚)/𝑛𝑚 as there were many further manipulations I could make with the latter expression (in this case, the next step was to write ( \mathrm{gcd}(n,m) = \sum_{d|n,m} \phi(d)
) to begin decoupling the variables 𝑛 and 𝑚.)(1/3)

vez ,
@vez@mathstodon.xyz avatar

@tao I have some naive questions: is there a field of math that studies applying calculus-based methods to expressions like you describe (gradient flow on expression complexity)? I guess this would fall under algorithms for symbolic equation solving.

Do people study spaces of expressions equipped with equational rewrites as geometric spaces?

Is there a study of the extent that the sort of strategies you described can be formalized and automatically applied? Why are humans seemingly still much more effective at solving equations than computers?

tao OP ,
@tao@mathstodon.xyz avatar

@vez There is the dream that modern AI techniques may be able to eventually resolve this problem for fairly general classes of algebraic problems. (Of course, we have special-purpose algorithms already for specific classes of problems, e.g., Gaussian elimination for systems of linear equations.) For instance the AlphaGo model, in which a neural network learns to "score" the favorability of Go positions for the AI player, and then selects moves accordingly, could be potentially adaptable to algebraic simplification problems.

Perhaps one major bottleneck, though, is the insufficient amount of curated datasets of algebraic expressions (ideally labeled with some sort of difficulty level) that would allow current-technology AIs to train to figure out which expressions look easier to solve and which ones look complex..

tao OP , (edited )
@tao@mathstodon.xyz avatar

In fact denominators are often unpleasant to work with in general (especially if they can vanish or at least become small), which is why it is often a good idea to clear denominators (though this can be a tradeoff, as it can make the resulting expressions far longer, if there are many different denominators that need to be cleared).

One particular trick for eliminating denominators that is perhaps not as well known is to apply the fundamental theorem of calculus: for a differentiable function 𝑓, the Newton quotient ( \frac{f(x+h)-f(x)}{h} ) can be rewritten as ( \int_0^1 f'(x+th)\ dt ). Another way of thinking about this is: in expressions with a small denominator h, one now gains the freedom to modify any term 𝑓(𝑥) in the numerator with a perturbed term 𝑓(𝑥+h) (or more generally 𝑓(𝑥+𝑎h) for some 𝑎), at the cost of introducing some auxiliary expression such as ( \int_0^1 f'(x+th)\ dt ) that has no denominator and is thus presumably easier to work with. (2/3)

tao OP ,
@tao@mathstodon.xyz avatar

Many years ago I managed to complete my undergraduate calculus syllabus (mostly on integration methods) one lecture ahead of schedule, resulting in the need to give a additional lecture. As a consequence, I improvised a lecture on integration strategy as opposed to integration technique. Regarding integration by parts, for instance, I mentioned that some functions "like" to be differentiated, such as polynomials or (particularly) logarithms, some are "indifferent" to differentiation, such as exponentials, and some functions "prefer" to be integrated, such as total derivatives like ( 2x e^{x^2} ). The strategy of integration by parts is then to "move" the derivatives from functions that like to be integrated (or are at least indifferent) to those that like to be differentiated. Thus, for instance, if trying to use integration by parts to integrate 𝑥²log𝑥, it would make sense to integrate the 𝑥² factor to move a derivative onto the log𝑥 factor. (In analysis (particularly in PDE), there is a similar strategy of integrating oscillatory or rough factors to move derivatives onto smooth factors.) I had several students come up to me afterwards to tell me that this ad hoc lecture was the most useful one of the entire class... (3/3)

ajsoley ,
@ajsoley@mastodon.social avatar

@tao This is basically the LIATE guideline, right?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines