0

I have the following Mathematica notebook on this link notebook link

1.First, I would like to generate in an automatically way this notebook to a Wolfram script that I can make run directly from terminal.

2.The main request of this post : I would like to print or show in a simple format the different steps in the calculus by executing directly from terminal with wolframscript binary, i.e outside Mathematica.

It seems that function Trace doesn't display well the steps of the demonstration, I mean in a human readable format.

For example, the only display that I get is :

not pretty display

What I would like is to improve the display by make rendering better user friendly and understand in on instant the system of equations to solve.

For example, I don't know what DisplayForm and SubscriptBox mean ?

EDIT :

I tried the small code snippet called BD_equations_solve.m

nb = NotebookOpen["./BD_equations_solve.nb"];
NotebookFind[EvaluationNotebook[nb], "Input", All, CellStyle];
Quit[];

But after a command line "$ wolframscript -f BD_equations_solve.m", I get the following errors :

FrontEndObject::notavail: A front end is not available; certain operations require a front end.

EvaluationNotebook::argr: EvaluationNotebook called with 1 argument; 0 arguments are expected.

I am beginning with Mathematica. Any help is welcome.

  • Re "I would like to print or show in a simple format the different steps in the calculus," are you programming each step or are you wanting to show the steps Mathematica takes? [BTW, some people, maybe quite a few, are not going to click on your notebook link. Maybe if it were at pastebin.com or some other public repository. Notebooks are in ASCII, so they're quite easy to transfer as text files. See for instance the Get command here: https://mathematica.stackexchange.com/a/64514.] – Michael E2 Apr 09 '22 at 18:52
  • 1
    stefan, no chance. Mathematica does not work as human and therefore cannot provide logical steps of a solution. It is like a TV: this device works perfectly in showing motion pictures, but it does not give lectures on electrical engineering to explain the transformation of signals that takes place inside. Or look at a car. You would never come to the idea to talk to a car and ask him, how is your engine functioning. – yarchik Apr 09 '22 at 18:52
  • 1
    Related: https://mathematica.stackexchange.com/questions/148/get-a-step-by-step-evaluation-in-mathematica – Michael E2 Apr 09 '22 at 18:56
  • The Getcommand from here: https://mathematica.stackexchange.com/a/64514.] gives a 404 error. To answer to your question, Indeed, I would like to show the steps Mathematica takes. Regards – youpilat13 Apr 10 '22 at 09:20
  • To show the steps Mathematica takes, the best you can do is TracePrint[command, TraceInternal -> True]. It gives a lot of information, and it's arguable whether it's human-readable or not. Technically speaking, it is. Practically, it often isn't. Sometimes steps are missing because it traces only Mathematica steps, not what goes on in library function calls (to functions written in C). The steps taken are often not the ones humans take, because the algorithm takes advantage of the computer's strengths. – Michael E2 Apr 12 '22 at 03:42

0 Answers0