Solve and checkLesson 14 of 48 · 7 min

State the solution domain

Use solveset to distinguish real and complex solution sets.

Maths refresher: Real and complex numbers

Real numbers lie on a number line. Complex numbers include the imaginary unit i with i2=−1i^2=-1.

x2+1=0⇒x=±i over Cx^2+1=0\quad\Rightarrow\quad x=\pm i\ \text{over }\mathbb C
Worked example

Every real square is nonnegative, so x2=−1x^2=-1 has no real solution. The values i and -i both square to -1.

Maths prerequisite map ↗

A solving question includes its domain: the set of permitted values. A polynomial can have no real solutions but still have complex ones. State the domain explicitly instead of inferring it from how a symbol is printed.

See the mathematics
ReImi−i
ReImi−i
x2+1=0⟹x=±ix^2+1=0\quad\Longrightarrow\quad x=\pm i
Starter reference. The roots lie on the imaginary axis, not the real number line. An empty real solution set is consistent with two complex solutions.

solveset returns a mathematical set, such as FiniteSet, EmptySet or a more general set description. An empty real solution set means no real value satisfies the equation; it does not mean that the equation is meaningless or that no other domain has solutions.

Solve x squared plus one equal to zero over both reals and complexes. The imaginary unit I satisfies I squared equal to minus one. Future solvers can return ConditionSet when a general symbolic answer is unresolved; that is not the same as EmptySet.

Will x2+1=0x^2+1=0 have the same solution set over reals and complexes?

Write a prediction (optional)

Exact symbolic investigation

Select Run Python with the code unchanged.

Tools
About Python

Python and the course packages can load while you read. Each run starts with fresh user variables; imported modules stay loaded. Stop replaces the worker. Runtime details ↗

Ctrl+Enter or ⌘+Enter runs Python.

Compare with the worked example

Executed from the published Python during the site build. Your own run appears above. Build environment ↗

Real solutions
∅\emptyset
Complex solutions
{−i,i}\left\{- i, i\right\}
Complex candidate residuals
[0, 0]\left[ 0, \ 0\right]
Worked text output
Real solutions: EmptySet
Complex solutions: {-I, I}
Complex candidate residuals: [0, 0]

Read the starter result

Compare Real solutions with Complex solutions. The solver reads the supplied expression as equal to zero in each chosen domain. The Complex candidate residuals evaluate the original expression.

Edit and compare

Replace expression = x**2+1 with expression = x**2-1. Select Run Python. Compare the Real solutions and Complex solutions sets and use Complex candidate residuals to check the revised roots.

Return to the editor

Scope. Symbolic solvers do not have closed-form answers for every equation; inspect the returned set and verify its interpretation.

Try a fresh case

What does EmptySet from a real-domain solve establish?

Choose an answer
Need a hint?
Hint 1

Read the domain argument alongside the answer.

Hint 2

Restrict the conclusion to the set you asked about.

Your notesNotes save in this browser when storage is available.