Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement an IEvalStepListener to show steps on how to solve equations? #1024

Open
OmidNejadabbasi opened this issue Jul 13, 2024 · 2 comments

Comments

@OmidNejadabbasi
Copy link

OmidNejadabbasi commented Jul 13, 2024

How should implement the IEvalStepListener to show the steps on how to solve a (for example) polynomial equation of degree 2.

Can you provide a simple implementation for it so that I can implement cases of my need ?

Here is a simple 2-degree equation : Solve((x^2 - 4x == -4), x)

A desired output could be like :

{{ (x-2)^2 = 0, x}, {x->2}}

We can maybe even put messages like "Square factorization" to the steps.

@axkr
Copy link
Owner

axkr commented Jul 13, 2024

Why using the "special case" of "square factorization" and not using a quadratic solve as a more general example:

See

@OmidNejadabbasi
Copy link
Author

@axkr
I just wanted to give an example of what I mean "show the steps". And also I don't if we should implement a class separately for each factorization methods or not.

axkr added a commit that referenced this issue Jul 14, 2024
- see QuadraticSolveTest.java for the JSON output which could be
rendered in a browser
- the JSON output contains TeX formulas enclosed in $...$
- testTraceRewrite001 also creates "nested substeps" from the Rubi
integration rules.
- ToggleFeature.SHOW_STEPS = false can disable the steps creation
-  Config.TRACE_REWRITE_RULE = false can disable the general
"RewriteRule"
- the QuarticSolve step hints now need some fine-tuning to be really
helpful
axkr added a commit that referenced this issue Jul 14, 2024
- see QuadraticSolveTest.java for the JSON output which could be
rendered in a browser
- the JSON output contains TeX formulas enclosed in $...$
- testTraceRewrite001 also creates "nested substeps" from the Rubi
integration rules.
- ToggleFeature.SHOW_STEPS = false can disable the steps creation
-  Config.TRACE_REWRITE_RULE = false can disable the general
"RewriteRule"
- the QuarticSolve step hints now need some fine-tuning to be really
helpful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants