Trace of FullSimplify



I have a symbolic function and I used FullSimplify command to simplify the equation given below. I am calculating it by hand but I couldn't reach the same solution. I used Trace command to observe the intermediate steps but trace only gives the expression before FullSimplify. Are there any possible methods that I can observe the steps of simplification?

    Trace[FullSimplify[2 b (-(1/(1 - fd)) + 1/fd) + 
   (2 a (1 - (b (1 - 1/fd + 1/(fd t)))/(a + b)) t)/
   (1 - (1 - fd) t - (b fd (1 - 1/fd + 1/(fd t)) t)/(a + b)) == 0]]


Posted 2013-06-22T15:11:38.040

Reputation: 119


a little bit related

– Kuba – 2013-06-22T15:18:16.063

In general, the simplification methods internally used by Mathematica do not necessarily correspond to how one might simplify by hand; remember that a method that is simple for computers to do is not necessarily simple for humans, and vice-versa. – J. M.'s ennui – 2013-06-22T15:26:51.397

@Kuba thanks I'll check. – HarveyMudd – 2013-06-22T15:29:52.670

@J. M. that is true. What I computed by hand doesn't have any similarities with the Mathematica solution. But I wonder if it is possible for Mathematica to show the steps? Or any alternative calculation method? – HarveyMudd – 2013-06-22T15:32:15.197

"if it is possible for Mathematica to show the steps" - not in this case, I believe. – J. M.'s ennui – 2013-06-22T15:33:22.763

What did you get manually? – Fred Kline – 2013-06-22T15:49:16.540

I tried calculating again and I think I am getting closer to the same solution. Now, at a point: [(b-2fdb)((tfd-t)+1) -[(a+b)tfd(fd-1) - b(fd-1)]] \ (-fdt(fd-1)^2-fd(fd-1)) – HarveyMudd – 2013-06-22T15:53:03.397

The reason I asked, is that I broke it down into smaller chunks to try the simplify and got a different answer. (I was treating the entire thing as a fraction, which is not how it is stated.) – Fred Kline – 2013-06-22T15:56:13.600

@FredKline no there is two fractions one which starts with 2b and the other starting with 2a. – HarveyMudd – 2013-06-22T15:58:43.767

I put a ( before the 2b and a ) before the / on the second line, which made only one fraction. – Fred Kline – 2013-06-22T16:01:36.920



To see the full details of what FullSimplify is doing you can use the option TraceInternal -> True in Trace. It probably won't help much though, as it will generate pages and pages of inscrutable output.

One thing I have done in the past is to add Sow as a TransformationFunction. This shows the intermediate expressions that Simplify encounters as it works. It's far from being a step-by-step walkthrough, but you can sometimes get a few clues.

FullSimplify[expr, TransformationFunctions -> {Sow, Automatic}] // Reap

Simon Woods

Posted 2013-06-22T15:11:38.040

Reputation: 81 905

Thanks this was really helpful. I actually solved it by hand. – HarveyMudd – 2013-06-22T21:05:11.113

1Nice answer! Great tools for learning more. It seems that some caching is going on by the way, if you don't get the output you expect, give it a good ol' ClearSystemCache[]. – Jacob Akkerboom – 2013-06-23T10:31:22.470