Antti Ruokanen
Antti Ruokanen

Reputation: 49

How to solve set theory in wolfram alpha?

A={1,2,3} B={1,2,3,4,5}, C={0,2,4,6} is 0 in (B union C)

How can I solve that does 0 is part of B union C?

Upvotes: 1

Views: 1427

Answers (1)

Bill
Bill

Reputation: 3977

This

intersection[{0},union[{1,2,3,4,5},{0,2,4,6}]]

gives you

{0}

and so zero is in that union while this

intersection[{8},union[{1,2,3,4,5},{0,2,4,6}]]

gives you

{}

and so 8 is not in that union.

WA link

There may be other ways of accomplishing this with WA, but as always the question is how can you find a way to coax WA into understanding what you want it to do.

Upvotes: 2

Related Questions