Dear webmaster Ivan,
I am terribly sorry for making you spend so much time on showing the inverse function. That was never my intention.
I was simply asking "my maths being weak" could I side step generating the inverse function by simply swapping the x and Y columns?
Before I enter into detail I must apologize for indiscriminate mixing of e and E.
As I said above , I was just asking why a set of real points produce a good fit third order equation.
But, If we interchange the data points columns making the y column become the x column and making the x column become the y column.
Then there is no equation for a good fit...?
None of the 6 basic function type offer a good approximation to the data points.
X Y L<->R X Y
0 1402 1402 0
5 1426 1426 5
10 1447 1447 10
15 1465 1465 15
20 1482 1482 20
25 1496 1496 25
30 1509 1509 30
35 1519 1519 35
40 1528 1528 40
45 1536 1536 45
50 1543 1543 50
55 1548 1548 55
60 1550 1550 60
65 1553 1553 65
70 1554 1554 70
75 1555 1555 75
80 1554 1554 80
85 1552 1552 85
90 1550 1550 90
95 1547 1547 95
100 1543 1543 100
So using these two sets of data points, now free from my E = e error
As before ( two left hand data points columns ) produce a very good fit cubic equation.
So good that my confidence level is very high to be able to use the cubic equation to get a good accuracy speed of sound at any temperature in the 0 - 100ºC range.
I can also, using the two Right hand data points columns, get a curve which doubles back on itself.
As webmaster Ivan demonstrated in Fred.grf this curve can be synthesised using three sub-curves joining at the appropriate coordinates.
Chapeau Ivan.
From the programming point of view my mind boggles or as you neatly summed up....
"Yes, this gets very complicated. It may be possible to simplify it, but I have not found out how."
Well after looking at the available literature such as wikipedia where they list attempts to solve from Babylonia
through Arab times and up to the renaissance Italians and Descartes, they had fun.
Today it looks as if for a simple program using the listed steps it is no-no.
Getting back to making the inverse function by swapping the x and y columns, I just note the dots double back on
themselves offering two temperatures for a given speed
I personally being of a cowardly nature (lazy? ) avoid this by interpolating the temperature from two know points of speed value.
Much quicker and hugely less number crunching.
From all of the above the answers to my two original questions are:-
a) this is not possible? ....... well yes but for the average mortal no !
b) I did this wrong ? ........ yes definitely
So dear webmaster my humble apologies for having put you to such creative effort and using so much time.
I will drop out of the thread.... but maybe a Pandoras box has been opened. Who knows?
Bye and many thanks
Fred
Madrid