Considering I have three functions
f1 = -x + 1;
f2 = x - 1;
f3 = x + 3;
How can I find the intersection points of this functions? Thanks.
This didn't work
t = Solve[{k \[Element] f1, k \[Element] f2}, {k}]
Considering I have three functions
f1 = -x + 1;
f2 = x - 1;
f3 = x + 3;
How can I find the intersection points of this functions? Thanks.
This didn't work
t = Solve[{k \[Element] f1, k \[Element] f2}, {k}]
Here it is an overkill but maybe for general context it is worth to say this.
It does not work because fs are not regions:
f1 = ImplicitRegion[{y == -x + 1}, {x, y}]
f2 = ImplicitRegion[{y == x - 1}, {x, y}]
Solve[{k \[Element] f1, k \[Element] f2}, {k}]
{{k -> {1, 0}}}
I said an overkill because people usually do something like:
Solve[{y == -x + 1, y == x - 1}, {x, y}]
{{x -> 1, y -> 0}}
Solve[{y == 1 - x, y == x - 1}, {x, y}]
Solve[{y == 1 - x, y == x + 3}, {x, y}]
seems the simplest approach. Another "overkill" region approach:
l1 = InfiniteLine[{{0, 1}, {1, 0}}];
l2 = InfiniteLine[{{0, -1}, {1, 0}}];
l3 = InfiniteLine[{{0, 3}, {1, 4}}];
ri1 = RegionIntersection[l1, l2];
ri2 = RegionIntersection[l1, l3];
Reduce[RegionMember[ri1, {x, y}]]
Reduce[RegionMember[ri2, {x, y}]]
yield y == 0 && x == 1 and y == 2 && x == -1 respectively