How would I plot the following equation in maple?
$$f(x) = \begin{cases} 1, & \text{if } x\in\mathbb{Q}, \\ 0, & \text{if } x\notin \mathbb{Q}. \end{cases}$$
How would I plot the following equation in maple?
$$f(x) = \begin{cases} 1, & \text{if } x\in\mathbb{Q}, \\ 0, & \text{if } x\notin \mathbb{Q}. \end{cases}$$
Copyright © 2021 JogjaFile Inc.
You can't really, as the commenters said. The graph of this function exists in the Platonic universe of ideas, but it cannot exist in our physical Universe. As a corollary, Maple is unable to show it to you.
Here is something you can do to catch the passing shadow of this function on the wall of our cave. The function $f$ is the pointwise limit of the following kind: $$f(x) = \lim_{n\to\infty} \lim_{m\to\infty} (\cos(2\pi n! x))^{2m}$$
Take large $n,m$ and increase
numpointsin theplotcommand: