Mathematica Asked on May 6, 2021
How to ask Mathematica to give NumberLinePlot
of $sin x$ on domain $xin(0,30)notinmathbb{N}$. I need solution for non-integer $x$
NumberLinePlot[{Sin[x] < 0, Sin[x] >= 0}, {x, 0, 30}]
You could include an additional predicate:
NumberLinePlot[
{
Sin[x] < 0 && Mod[x, 1] != 0,
Sin[x] >= 0 && Mod[x, 1] != 0
},
{x, 0, 30}
]
Correct answer by Carl Woll on May 6, 2021
positiveSol =
x /. Solve[
Sin[x] > 0 && 0 < x < 30 && x ∈ PositiveIntegers]
negativeSol =
x /. Solve[
Sin[x] < 0 && 0 < x < 30 && x ∈ PositiveIntegers]
NumberLinePlot[! AnyTrue[positiveSol, EqualTo[x]], {x, 0, 30}]
NumberLinePlot[! AnyTrue[negativeSol, EqualTo[x]], {x, 0, 30}]
Answered by cvgmt on May 6, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP