Properties
Category
English
Similar Topics
Statistics
Comments
6
Participants
2
Subscribers
27
Votes
1
Views
1121
Share
Intersection Point between Functions at Intervalboundary missed
Not a Problem
I have 2 functions:
g(x) = If(0 ≤ x ≤ 1, 0.1x³ + 0.2x) and
h(x) = x  a ( a is a slider)
S=Intersect(g, h, 0, 1) fails for a=0 (S obviously should be (0,0)) and a=0.7 > S(1,0.3)  even if I increase the "searchinterval" this doen't help.
Files:
funcintersect.ggb
 GeoGebra
 Help
 Partners

Contact us
 Feedback & Questions
 This email address is being protected from spambots. You need JavaScript enabled to view it.
 +43 677 6137 2693
© 2020 International GeoGebra Institute
Hi Angsüsser! :)
The cause of the problem is the definition of g(x) or rather the boundaries.
The Intersectcommand with boundaries needs an Intervall that is a little bit greater and it seems to be a connection between the increment of your slider and the boundary.
The Intersectcommand without boundaries works fine (in this case).
Look at the modified file  I hope it explains it.
kind regards
mire2
The Intersectcommand without boundaries works fine (in this case) > my problem arises from a branched function
(If(condition1, f1, cond2,f2, .....) so the "normal" intersectcmd does not work  so this is no option here  as Isee!
Stays the problem: Intersection point MUST be an inner point.
The connection to the increment of the slider? Sorry I found no clue for it. Experimented with different increments vs. different intervalcecrements!
Conclusion: S must be an inner point  workaround: increment the interval boundaries by some epsilon!
But it's a warkaround and not consistent!
Hi Angsüsser!
I think that the problems are caused by the method of finding intersectionpoints (and roots).
Both commands are "equal"  Finding the intersectionpoint of two functions f and g is solving the equation fg=0.
The difference of both commands is only the second coordinate.
Only in some "trivial" cases the equation can be solved algebraically.
Assumption:
Finding roots, and so finding intersectionpoints, uses a numerical method and these method presume an open interval or rather finding solutions in an open interval.
In addition to you have also to check the boundaries.
It is like finding extremums of a piecewise given function  you have to check the boundaries additionally.
In ugly informal code:
Best regards
mire2
OK  this explains a lot ( root vs. intersection point)  I supposed that there is some algorithm behind, that assumes open intervals. But wouldn't it be better to code this (check for boundary solution in geogebra) instead that the user himself has to check?
OK  when I know, I have to do this  then I do it. But I believe that's a hidden information  should be documented!
Thank you nevertheless for thinking over it
regards Hans
You can see the difference in the attached file and I hope it solves your problem.Best regardsmire2
Thank for the warning (==) and for the detailed guidance. So this problem can be tagged as solved!
Thank you mire2!
Comments have been locked on this page!