HP Forums

Full Version: Function intersection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the Function application I drew two elementary functions: y = x ^ 2-2 and y = LN (x ^ 2-1). I wanted to find the intersection of these functions.
Unfortunately, this application will not do this. I do not know why. However, the places where these functions intersect without any problems are found by the Advanced Graphing and Geometry applications.

[attachment=8204][attachment=8205][attachment=8206][attachment=8207]
I’m thinking this has been addressed by a firmware update (involving conversion from PPL to CAS). Has anyone observed this with the current firmware?

There could be a labeling issue here too, as what is actually being found (within the Function app, using the current firmware) is a local extremum (of the difference of the two functions).
Same problem on my physical G2 with 12 02 2021 dated firmware…
Thanks for trying, and reporting back!

I’ve tried it again on a G2 Prime here and … lo and behold … my G2 here also failed to find an intersection between the two. (Although it did report an intersection when I tried earlier… Confused)

I’ve just now created a ticket for this in the bug tracker.
It is Not a bug, two floating point numbers gotten from square and log algorithms with a finite precision digits will be never exactly the same... compare with == always fails (99.99%)
RobbiOne wrote:
Quote:It is Not a bug, two floating point numbers gotten from square and log algorithms with a finite precision digits will be never exactly the same... compare with == always fails (99.99%)

Despite this is formally correct I do not think that this is a convincing argument. With the same argument most equations could not be solved numerically because - just for example - there is no floating point number with a finite precision which solves exactly SQRT(2)-X=0.

One problem for those two functions is that the curves do not intersect but touch each other.
The Prime indeed does not find the touch point. It not even finds the zero point of the combined function x^2-2-ln(x^2-1) which touches the x-axis.

Compared to this other calculators find the solutions. The TI N'spire CXII CAS finds the touch points as well as the zero points of the combined function. As well the much older TI-89 Titanium finds the touch points of the two curves and the zero point of the combined function. And even the DM 42 finds the zero point of the combined function.

So it seems that this indeed is a weakness of the HP Prime. It would be interesting whether this is with other functions that touch each other as well.
Well, I tried with solve in CAS, there were some messages shown in Terminal and was provided with the numercal approximation of sqrt(2) on my G1, my G2, the Android App and the virtual Prime.
Arno
The HP Prime finds touchpoints for most functions. I checked it out. The exception is the logarithmic functions of the LN and LOG types. I will give examples: y = LN (x) and y = 0.2x + 0.61, then y = log 3 (x) and y = 0.46x -0.28. The Function application will not find these places. And that needs to be corrected.
A calculator is not able do do things like humans can, i.e. read "solutions" from a graph, the function y=0.2*x+0.61 is no tangent to the function y=ln(x).
A not too difficult calculation shows that x=5, then y=ln(5) and the equation of the tangent-line then is y=0.2*x+ln(5)-1. The latter rounded is 0.61, but exactly that makes the difference.
Arno
Yes, Arno is right. Calculated values cannot be rounded. In the Symb window, enter the tangent equation, which is calculated according to the formula: y - y1 = m (x - x1). Below I am attaching screenshots of the second logarithmic function LOGB (x, 3) and its tangent at x = 2.
Sorry.
(01-23-2022 05:33 PM)rawi Wrote: [ -> ]One problem for those two functions is that the curves do not intersect but touch each other.
The Prime indeed does not find the touch point. It not even finds the zero point of the combined function x^2-2-ln(x^2-1) which touches the x-axis.
interesting function.
On DM15L (15C clone), results may vary depending the way the function is programmed.
Function definition works well when written from right to left, beginning inside LN.
When written from left to right I get always an ERROR 8. tricky.
SOLVE-ing this equation can return an error or a root, but it is not exact : starting from [2,3], given root is 1.414213604 (not exactly sqrt(2)=real root).
For most starting values, I get an ERROR 8 , it means "no root found".

On 50G, EQ written between quotes, given root is correct. On the graphic, solving it returns an 'extremum' and it's also a root. Good old 50G ;-)
I checked on several functions that the HP Prime finds places where two different functions f (x) meet. If we have two functions: f (x) and g (x) and we create one function from them: f (x) - g (x) = 0 or g (x) - f (x) = 0, then it also finds the zeros of such functions. In the case of the analyzed functions, y = LN (x ^ 2-1) and y = x ^ 2-2, unfortunately, it does not define the contact points of both functions. This is an exceptional case. But when we create a function, e.g. y = x ^ 2-2-LN (x ^ 2-1) or y = LN (x ^ 2-1) -x ^ 2 + 2, then the calculator will find the zeros or extremum (because in in such cases, the null sites are also the extreme sites of function). See the screenshots.

[attachment=10332][attachment=10333][attachment=10334][attachment=10335][attachment=10336]
Reference URL's