First time here? Check out the FAQ!

Ask Your Question
1

Solve with the assumption z!=0

asked 3 years ago

ddd gravatar image

When I try to solve the following with the assumption z is nonzero solve still outputs the solution with z=0:

assume(z!=0)
solve([x,y*z],x,y,z,solution_dict=True)

Output:

[{x: 0, y: r79, z: 0}, {x: 0, y: 0, z: r80}]
Preview: (hide)

Comments

1

Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 3 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 3 years ago

ddd gravatar image

updated 3 years ago

I fixed this by adding an additional variable:

solve([x,y*z,a*z-1],x,y,z,a,solution_dict=True)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 3 years ago

Seen: 219 times

Last updated: Feb 18 '22