I am programming with python3. I imported the sympy module and used the solve function to output multiple inequality solutions. I want to find and output the common range of multiple solutions. Specifically, I want to find the common range of the Solved1 variable and Solved2 variable in the source code.
Error messageThe inequality solution is an Or variable. However, even if I looked up the methods and functions for retrieving or rewriting the value of the Or type variable, I could not understand it at all.
Applicable source codeimport sympy as sp
x = sp.Symbol ('x')
Solved1 = sp.solve ([x ** 2 + x-6>0], [x])
Solved2 = sp.solve ([x ** 2 + x-12<0], [x])
I couldn't find any information that could be searched on the Internet, whether it was badly checked.
Supplemental information (FW/tool version etc.)If there is no way to extract or rewrite it, it would be a bit impolite to think that you must create a program that solves the inequality from scratch without using the solve function. I would be happy if you could give me advice. Thank you.
Jupyter Notebook 6.0.1
-
Answer # 1
Related articles
- python - i can't send multiple images with the line api
- i want to perform multiple processes with else in python list comprehension notation
- python - about multiple processing and loop processing in discordpy
- python 3x - multiple outputs from a list of tuples
- python - cannot inherit a class with multiple arguments
- python - how to load multiple time formats with pandas
- python multiple regression analysis statsmodelsformula
- python - randomly extract data from multiple data frames (no between data frames is the same)
- i want to extract only those that have common items in the dataset [python]
- javascript - i want to get the value of a key that is common to multiple objects
- (python) i want to convert multiple json files with different columns into one csv format
- python 3x - how to specify multiple conditions with a regular expression
- python - [tkinter] multiple selectable combobox
- python - i want to make a total value of channels with multiple images
- python opencv face recognition multiple person image
- python - if you create multiple signup screens with django, you want to change the redirect destination in case of an error
- [python] [tkinter] i want to get multiple checkbox values
- i want to output multiple lines of html code using python
- python - i want to make the header one row after pivoting with multiple columns in pandas
- python - read multiple audio files (wav files)
When you search for "real interval intersection set", there are two ways to calculate the intersection of real interval with sympy. (There may be other
Set interval type with Interval and take intersection with&
Use intersection as coordinates (not tried)
Here's what I wrote in1. I feel a bit overwhelming, so it's just a reference level ...