# Best tool for verifying algebraic manipulations

Can anyone advise a tool that is very convenient for verifying algebraic manipulations step by step as I work. I too often waste hours dealing with a wrong formula because I missed a sign somewhere. I use Mathematica for this by doing things as follow... but have found it awkward.

eq3 := 2 E^((b - d) t) (b - d) == b*E^((b - d) t) - d

eq4 := eq3[]/E^((b - d) t) == eq3[]/E^((b - d) t)

The basic requirement of the tool is to catch trivial mistakes immediately.

Just to make sure I was clear on this, I'm looking for a tool to verify after the fact that steps I took are accurate, not to show me steps for solving something.

I'm actually quite familiar with Mathematica and use it a lot, I'm just looking for something that is oriented more towards convenience for verification rather than solving.

What I really want is something to increase my efficiency when I'm "exploring" on my own, so I don't have to spend so much time double and triple checking my work for trivial errors.

• Often useful is just to check some values. Either clearly important ones or "random" ones. – Ross Millikan Jun 13 '11 at 3:06
• Can you give an example of something you want to verify? The one you have isn't very clear. (For "2 E^((b - d) t) (b - d) == b*E^((b - d) t) - d" to be true, we'd need that bE^((b-d)t) -2dE^((b-d)t) = -d, and it's not at all clear why this should be the case. Or is this what you're trying to solve? – ShreevatsaR Jun 13 '11 at 7:38
• I didn't mean to imply that you were looking for a tool to show you how to solve problems; you were clear about hoping to find a way to verify your work... I'm sorry if my answer came across as suggesting otherwise. I was speaking, in part, from experience; I tend to be a perfectionist, and check/double check before, during, after solving problems...But in terms of testing situations, one needs to be able to solve problems/provide solutions in a limited timeframe, without the "luxury" of always being able to "verify". Hence my suggestion to work (even if occasionally) w/o a "safety net." – Namaste Jun 14 '11 at 22:17
• We physicists also find dimensional analysis to be a good error check. If you are solving a quadratic, $ax^2+bx+c=0$, give $x$ units of length. Then $a$ has units of inverse length^2, etc. Your expression should be consistent at every step, as the final formula is. If you have two variables, give one length and the other time. It doesn't catch sign errors, but it catches many errors in distributing products, substitution, etc. – Ross Millikan Jun 15 '11 at 0:26
• ShreevatsaR, what the above allows me to do is see what Mathematica gives me when both sides of eq3 are divided by E^((b - d) t) so I can check my own result. This is a very trivial example, but a real one. When doing the work of which this was a part with paper and pencil I missed something which got me off on a wrong track and caused me to waste a bunch of time playing with equations that were completely wrong. – Gerber Jun 24 '11 at 5:01

## 4 Answers

Are you familiar with Sage Notebook, online? It's also available as a download (online use and download both free). I don't know that it is easier to use than Mathematica, but I believe it has less steep of a learning curve compared to Mathematica. You can learn more about Sage here (documentation, manual, reference, etc.). When you register with Sage Notebook on-line, you create an account that allows you to save all your work online allowing you access to it anywhere you can get internet access.
More about Sage at Wikipedia.

Also, have you worked with WolframAlpha? Access site here. Good for quick checks!

I qualify the above with a word of caution, however. I encourage you to develop some comfort and confidence solving problems without computing assistance to check your work along the way; after all, you won't always have access to a computer program (e.g. on TESTS!)...And sometimes we really do learn best from our mistakes and by developing the capacity to assess our own work ("debugging", e.g.!)

I think I understand your thinking/approach; I'm just adding a word of caution so you do not to become too "dependent" on computer programs to verify your work!

EDIT

It occurred to me that evaluating equalities (e.g. step1 = step2) as boolean expressions might be one way to go? You could save time and effort, e.g. by evaluating step1 = step5, (or even "stepStart" = "stepFinish") and if false, back-tracking to to smaller intervals to find where you may have erred. (And if true, yay!) I'm guessing that could be done (evaluating boolean expressions: equalities, inequalities, etc.) with Mathematica. (Perhaps that's exactly what you were trying to convey in your post!) I know that I've used GAP (which is in Sage) in a similar manner: e.g. rather than relying too much on GAP (part of sage), I use boolean expressions to evaluate whether my conclusions are correct (true)...

• I felt Sage had a steeper learning curve, but maybe that was because I knew no python. Anyhow, +1 for mentioning sage. – kuch nahi Jun 13 '11 at 0:32
• Yes, to the evaluating boolean expressions comment in the edit. That is exactly what I'm trying to do. However, I have not been able to find a way to do that in Mathematica that didn't seem clunky. Instead what I wind up doing is applying my transformation to different parts of equations so I can see step by step as in the example above. – Gerber Jun 24 '11 at 4:54

Is this any help? http://www.mathomatic.org The Mathomatic computer algebra system. It is strictly for pretty and proven algebra manipulations and calculations and can accurately verify solve manipulations with the "solve verify" command, and show all steps done when solving.

Email me if you would like any help using Mathomatic. I intend to add symbolic logarithms someday to its list of supported operators, too. Comparing expressions by simply setting them equal is a convenient way of checking validity, too. You just solve for any variable to see if it is an identity, or solve for zero. There is also an equation comparison command called "compare".

Regards,
George Gesslein II
gesslein@linux.com
Author of Mathomatic

I have found MATLAB's "Symbolic Toolbox" very helpful for this purpose and it is simple to use, with a very well written "Help".

You can try to use 'Trace'. Sometimes Wolfram Alpha has a button "Show steps" which shows the working. In general though, the answer is no as the algorithms used by computer algebra systems to evaluate expressions are usually different than the ones we use (in the case of Mathematica, they're also protected)