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

[Don't Merge][Prototype] Adding abs while converting equation to log form to get solved by _lambert #16960

Open
wants to merge 1 commit into
base: master
from

Conversation

@jmig5776
Copy link
Member

commented Jun 4, 2019

References to other Issues or PRs

Brief description of what is fixed or changed

This PR involves another method to fix the problem of bivariate.
This method involves:

  • To take care of the missing logarithmic equations from the original equation.
  • Then try to add proper solving method to handle the resulting abs included logarithmic equations after discussing with mentors.

Other comments

@Yathartha22 @aktech @Shekharrajak

Release Notes

NO ENTRY

@sympy-bot

This comment has been minimized.

Copy link

commented Jun 4, 2019

Hi, I am the SymPy bot (v147). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

  • No release notes entry will be added for this pull request.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests . Please also
write a comment on that issue linking back to this pull request once it is
open. -->


#### Brief description of what is fixed or changed
This PR involves another method to fix the problem of bivariate.
This method involves:
- To take care of the missing logarithmic equations from the original equation.
- Then try to add proper solving method to handle the resulting abs included logarithmic equations after discussing with mentors. 

#### Other comments
@Yathartha22 @aktech @Shekharrajak 

#### Release Notes
<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
NO ENTRY
<!-- END RELEASE NOTES -->

@jmig5776

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2019

Motivation behind this method

Earlier some of the logarithmic equations were missed while converting the equations For eg :
While solving this equation (a/x + exp(x/2)).diff(x) = 0.

2*log(x) + x/2 - log(a) = 0 --> converted by sympy
2*log(-x) + x/2 - log(a) = 0 --> missed by sympy

Now in this PR it considers both of the equation as

2*log(x) + x/2 - log(a) = 0 + 2*log(-x) + x/2 - log(a) = 0
                      \      /
                       \    /
                        \  /
          2*log(abs(x)) + x/2 - log(a) = 0  

So by this all the logarithmic forms of original equations will be involved while solving.

Problem with this method

Look at these following test cases failed and the equations involving in them.

>>>solve(x*log(x) + 3*x + 1, x)
NotImplementedError: multiple generators [x, log(x)]
No algorithms are implemented to solve equation x*log(x) + 3*x + 1
# equation invoded in _lambert -> -log(_u) + log(_x*Abs(log(_x) + 3)) = 0
# clearly its very hard to solve this equation involving abs.

>>>solve(5*x - 1 + 3*exp(2 - 7*x), x)
NotImplementedError: multiple generators [x, exp(-x)]
No algorithms are implemented to solve equation 5*x + 3*exp(2 - 7*x) - 1
# equation involved in _lambert -> 7*_x + log(Abs(5*_x - 1)) - log(3*exp(2)) = 0

>>> solve((1/x + exp(x/2)).diff(x, 2), x)
[]
# equations involved log(exp(re(x)/2)*Abs(x**3)) - 3*log(2) = 0

and many more examples with different errors.
Thats why I think #16890 is better beacuse at the end of both methods we had to consider every possible solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.