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

linsolve now able to solve unsimplified equations having const variable. #10575

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@Shekharrajak
Copy link
Member

Shekharrajak commented Feb 12, 2016

Fixes #10568 One testcase
Now it is able to solve

>>> e = [z-1 , m*(x+3*y)+8*z-3 , y-5]
>>> linsolve(e, x,y,z)
`{(-15 - 5/m, 5, 1)

But still problem in this case

>>> e = [z-1 , m*(x+3*y)+8*z-3 , y-5]
>>> print linsolve(e, x,y)
EmptySet()
@@ -1061,6 +1062,7 @@ def linear_eq_to_matrix(equations, *symbols):
row_no = 1

for equation in equations:
equation = ratsimp(equation)
f = sympify(equation)

This comment has been minimized.

Copy link
@smichr

smichr Feb 12, 2016

Member

There is no need for sympify after ratsimp -- the return value will be sympified. so f = ratsimp(equation) would be fine (provided equation is not referrenced again; and if it is, then f = equation = ratsimp(equation) would suffice).

This comment has been minimized.

Copy link
@Shekharrajak

Shekharrajak Feb 12, 2016

Author Member

Yeah done. Thanks.

@Shekharrajak Shekharrajak force-pushed the Shekharrajak:10568_solveset_linsolve branch 3 times, most recently from 688edf3 to 39fe1f0 Feb 23, 2016

Revert "Revert "resolving my mistakenly commit""
This reverts commit 6a69c38.

This reverts commit 14c12d2.

@Shekharrajak Shekharrajak force-pushed the Shekharrajak:10568_solveset_linsolve branch from 2f06388 to e162bd0 Feb 24, 2016

@Shekharrajak

This comment has been minimized.

Copy link
Member Author

Shekharrajak commented Feb 24, 2016

@@ -894,7 +895,7 @@ def linear_eq_to_matrix(equations, *symbols):
row_no = 1

for equation in equations:
f = sympify(equation)
f = collect(equation.expand() ,symbols)

This comment has been minimized.

Copy link
@Shekharrajak

Shekharrajak Jun 10, 2016

Author Member

To collect coefficients of symbols.

@Shekharrajak

This comment has been minimized.

Copy link
Member Author

Shekharrajak commented Jun 10, 2016

Ping @hargup

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