I have a function f defined by points:
finput = {{0, 1/5}, {1/5, 1/5}, {1/2, 1}, {1, 0}};
ListLinePlot[finput, PlotRange -> {{0, 1}, {0, 1}}]
Then I create a piecewise linear function from it
pcw[pts_, otherwise_: - 1] :=
Module[{ptsPairs, line, x},
line[p_] :=
Module[{p1 = p[1], p2 = p[[2]], m, b},
m = (p2[[2]] - p1[[2]])/(p2[1] - p1[1]);
b = p1[[2]] - p1[1] m;
{mx + b, p1[1] <= x <= p2[1]}];
ptsPairs = Partition[pts, 2, 1];
ptsPairs = Select[ptsPairs, #[1][1] != #[[2]][1]&];
Piecewise[line /@ ptsPairs /. x -> #, otherwise]&]
f = pcw[finput];
Now I would like to find patterns of the function, but the problem is to find patterns of the part, where the function is constant.
Normally I use Solve to get the set of points. But it doesn't work for this case so I am trying to use Reduce
Reduce[f[x] == 1/5, x]
But I get as result this inequality:
0 <= x <= 1/5 || x == 9/10
My question is, is there any possibility to get set of points containing these points from inequalities? It means to get as result:
{0,1/5,9/10}