Post Reply 
Question for Trig Gurus
12-01-2014, 07:49 PM
Post: #1
Question for Trig Gurus
I recently bought a vintage Casio fx-10 calculator. The machine has trigonometric functions but not their inverse counterpart. Other than trial and error (like Newton's method), is there a secret formula to calculate or estimate the inverse trig functions from one of the trig functions??

Namir
Find all posts by this user
Quote this message in a reply
12-01-2014, 08:08 PM
Post: #2
RE: Question for Trig Gurus
(12-01-2014 07:49 PM)Namir Wrote:  I recently bought a vintage Casio fx-10 calculator. The machine has trigonometric functions but not their inverse counterpart. Other than trial and error (like Newton's method), is there a secret formula to calculate or estimate the inverse trig functions from one of the trig functions??

Namir

The FX-10 has Arcsine, Arccosine, Arctangent built in. Which functions are you looking for?

Tom L

Tom L

My father was a man of the cloth. He was a tailor.
Find all posts by this user
Quote this message in a reply
12-01-2014, 08:46 PM
Post: #3
RE: Question for Trig Gurus
(12-01-2014 08:08 PM)toml_12953 Wrote:  The FX-10 has Arcsine, Arccosine, Arctangent built in.

Tom L

The Casio fx-10 from 1974 does not seem to have Arc functions built in, at least has no keys for it.

Bernhard
Find all posts by this user
Quote this message in a reply
12-01-2014, 10:54 PM (This post was last modified: 12-01-2014 11:00 PM by Namir.)
Post: #4
RE: Question for Trig Gurus
(12-01-2014 08:46 PM)PANAMATIK Wrote:  
(12-01-2014 08:08 PM)toml_12953 Wrote:  The FX-10 has Arcsine, Arccosine, Arctangent built in.

Tom L

The Casio fx-10 from 1974 does not seem to have Arc functions built in, at least has no keys for it.

Bernhard

How does one invoke the inverse trig functions? I don't see a shift key. This review confirms the absence of inverse trig functions.

Namir
Find all posts by this user
Quote this message in a reply
12-01-2014, 11:00 PM (This post was last modified: 12-02-2014 02:01 AM by Mark Hardman.)
Post: #5
RE: Question for Trig Gurus
(12-01-2014 07:49 PM)Namir Wrote:  I recently bought a vintage Casio fx-10 calculator. The machine has trigonometric functions but not their inverse counterpart. Other than trial and error (like Newton's method), is there a secret formula to calculate or estimate the inverse trig functions from one of the trig functions??

Namir

This is an odd one. It has trig functions but not their inverse.

Casio fx-10

Interesting how it displays zeros as well.

Ceci n'est pas une signature.
Find all posts by this user
Quote this message in a reply
12-02-2014, 12:09 AM (This post was last modified: 12-02-2014 12:14 AM by Thomas Klemm.)
Post: #6
RE: Question for Trig Gurus
(12-01-2014 07:49 PM)Namir Wrote:  is there a secret formula to calculate or estimate the inverse trig functions from one of the trig functions??

You could use these trigonometric identities to calculate \(\tan \frac{x}{4}\) from \(\cos x\):
\[
\begin{align}
\cos \frac{x}{2} &= \sqrt{\frac{1+\cos x}{2}} \\
\tan \frac{x}{2} &= \sqrt{\frac{1-\cos x}{1+\cos x}} \\
\end{align}
\]

From this you could use the Taylor series of \(\arctan x \approx x-\frac{x^3}{3}+\frac{x^5}{5}+\dots\) to estimate \(x\). Thus we can calculate \(\arccos x\).

Example:
\(\cos x = 0.5\)
\(\cos \frac{x}{2} = \sqrt{\frac{1.5}{2}} = \sqrt{0.75} \approx 0.866025\)
\(\tan \frac{x}{4} = \sqrt{\frac{1-0.866025}{1+0.866025}} = \sqrt{\frac{0.133975}{1.866025}} \approx 0.267949\)

We slightly rewrite the Taylor series using Horner's method: \(((\frac{x^2}{5}-\frac{1}{3}) x^2+1) x\).
Just keep in mind that we already calculated \(x^2 = \frac{0.133975}{1.866025} \approx 0.071797\).

This is how you could calculate it:
0.071797
÷ 5
− 3 [1/x]
× 0.071797
+ 1
× 0.267949
=
0.261813

The correct value is:
0.261799


We can use these two identities to calculate \(\arcsin x\) or \(\arctan x\):
\[
\begin{align}
\cos x &= \sqrt{1-\sin^2 x} \\
\cos x &= \frac{1}{\sqrt{1+\tan^2 x}} \\
\end{align}
\]

Example:
\(\tan x = \frac{1}{\sqrt{3}}\)
\(\cos x = \frac{1}{\sqrt{1+\frac{1}{3}}} \approx 0.866025\)
\(\cos \frac{x}{2} = \sqrt{\frac{1.866025}{2}} \approx 0.965926\)
\(\tan \frac{x}{4} = \sqrt{\frac{1-0.965926}{1+0.965926}} = \sqrt{\frac{0.034074}{1.965926}} \approx 0.131652\)

Here we end up with:
0.523598

The correct value is:
0.523599

Kind regards
Thomas


PS: From John Wolff's Web Museum:
Quote:
  • Trig functions operate in degrees, but there are no inverses.
  • Other keys give reciprocals, square roots, pi, and degree-minute-second conversions.
  • There are no memory functions.
  • The calculator does not use scientific notation, but operates with a floating decimal point within the 8-digit range of the display.
  • The trig functions return only five figures, and take about two seconds.
Thus we're not too bad with our results.
Find all posts by this user
Quote this message in a reply
12-02-2014, 12:16 AM
Post: #7
RE: Question for Trig Gurus
Thanks Thomas for the trigonometric identities. I am looking for some identities between the inverse trigonometric functions and the regular trigonometric functions, since the calculator has sin, cos, and tan functions but not their inverses. So for example what is f() and g() that define for example the arcsine as a function of the sine and a function of the angle:

arcsin(x) = f(sin(g(x)))

Namir
Find all posts by this user
Quote this message in a reply
12-02-2014, 01:12 AM
Post: #8
RE: Question for Trig Gurus
(12-02-2014 12:16 AM)Namir Wrote:  So for example what is f() and g() that define for example the arcsine as a function of the sine and a function of the angle:

arcsin(x) = f(sin(g(x)))

f(x)=arcsin(g-1(arcsin(x)))

But that's probably not what you are looking for. I assume that f and g should be "simple" functions that are available on this calculator or at least a simple combination of them. However I doubt that there are any.

You could try and set up f and g as power series and then try to figure out their coefficients. But the composition of functions is used twice. Good luck!

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
12-02-2014, 01:30 AM (This post was last modified: 12-02-2014 01:32 AM by Gerson W. Barbosa.)
Post: #9
RE: Question for Trig Gurus
(12-02-2014 01:12 AM)Thomas Klemm Wrote:  
(12-02-2014 12:16 AM)Namir Wrote:  So for example what is f() and g() that define for example the arcsine as a function of the sine and a function of the angle:

arcsin(x) = f(sin(g(x)))

f(x)=arcsin(g-1(arcsin(x)))

But that's probably not what you are looking for. I assume that f and g should be "simple" functions that are available on this calculator or at least a simple combination of them. However I doubt that there are any.

W|A finds relationships in the complex domain, but they're useless for his purposes.

http://www.wolframalpha.com/input/?i=asi...+relations

Cheers,

Gerson.
Find all posts by this user
Quote this message in a reply
12-02-2014, 01:49 AM
Post: #10
RE: Question for Trig Gurus
(12-02-2014 01:12 AM)Thomas Klemm Wrote:  
(12-02-2014 12:16 AM)Namir Wrote:  So for example what is f() and g() that define for example the arcsine as a function of the sine and a function of the angle:

arcsin(x) = f(sin(g(x)))

f(x)=arcsin(g-1(arcsin(x)))

But that's probably not what you are looking for. I assume that f and g should be "simple" functions that are available on this calculator or at least a simple combination of them. However I doubt that there are any.

You could try and set up f and g as power series and then try to figure out their coefficients. But the composition of functions is used twice. Good luck!

Cheers
Thomas

Thomas,

The calculator has no inverse trig functions. I am trying to see if there is a math trick to calculate the inverse trig functions using the trig functions (without using an iterative method like Newton's method).

What I am looking for is hard to find if it exists at all. I am looking for a math trick to do the job.

Namir
Find all posts by this user
Quote this message in a reply
12-02-2014, 01:50 AM
Post: #11
RE: Question for Trig Gurus
(12-02-2014 01:30 AM)Gerson W. Barbosa Wrote:  
(12-02-2014 01:12 AM)Thomas Klemm Wrote:  f(x)=arcsin(g-1(arcsin(x)))

But that's probably not what you are looking for. I assume that f and g should be "simple" functions that are available on this calculator or at least a simple combination of them. However I doubt that there are any.

W|A finds relationships in the complex domain, but they're useless for his purposes.

http://www.wolframalpha.com/input/?i=asi...+relations

Cheers,

Gerson.

Gerson,

I think you are right. However for a simple calculator like the Casio fx-10 imaginary numbers are not supported :-(.

Namir
Find all posts by this user
Quote this message in a reply
12-02-2014, 02:30 AM (This post was last modified: 12-02-2014 02:32 AM by toml_12953.)
Post: #12
RE: Question for Trig Gurus
(12-01-2014 10:54 PM)Namir Wrote:  [quote='PANAMATIK' pid='22183' dateline='1417466789']

The Casio fx-10 from 1974 does not seem to have Arc functions built in, at least has no keys for it.

Bernhard

The manual I found was for both the FX-10 and FX-50. It doesn't say there's a difference between the keyboards so I figured both had all the functions. Here's a BASIC subroutine to calculate ATN(X):

30000 REM ARCTANGENT: A9=ATN(X9)
30300 REM VARIABLES USED: A9,B9,C9,T9,X9
30310 T9=SGN(X9): X9=ABS(X9): C9=0 : IF X9>1 THEN C9=1 : X9=1/X9
30330 A9=X9*X9 : B9=((2.86623E-3*A9-1.61657E-2)*A9+4.29096E-2)*A9
30330 B9=((((B9-7.5289E-2)* A9+.106563)* A9-.142089)*A9+.199936)*A9
30340 A9=((B9-.333332)*A9+1)*X9 : IF C9=1 THEN A9=1.5708-A9
30350 A9=T9*A9 : RETURN

Tom L

My father was a man of the cloth. He was a tailor.
Find all posts by this user
Quote this message in a reply
12-02-2014, 09:21 AM
Post: #13
RE: Question for Trig Gurus
(12-02-2014 02:30 AM)toml_12953 Wrote:  
(12-01-2014 10:54 PM)Namir Wrote:  [quote='PANAMATIK' pid='22183' dateline='1417466789']

The Casio fx-10 from 1974 does not seem to have Arc functions built in, at least has no keys for it.

Bernhard

The manual I found was for both the FX-10 and FX-50. It doesn't say there's a difference between the keyboards so I figured both had all the functions. Here's a BASIC subroutine to calculate ATN(X):

30000 REM ARCTANGENT: A9=ATN(X9)
30300 REM VARIABLES USED: A9,B9,C9,T9,X9
30310 T9=SGN(X9): X9=ABS(X9): C9=0 : IF X9>1 THEN C9=1 : X9=1/X9
30330 A9=X9*X9 : B9=((2.86623E-3*A9-1.61657E-2)*A9+4.29096E-2)*A9
30330 B9=((((B9-7.5289E-2)* A9+.106563)* A9-.142089)*A9+.199936)*A9
30340 A9=((B9-.333332)*A9+1)*X9 : IF C9=1 THEN A9=1.5708-A9
30350 A9=T9*A9 : RETURN

Do you have a link to the fx-10 manual?
Find all posts by this user
Quote this message in a reply
12-02-2014, 10:14 AM
Post: #14
RE: Question for Trig Gurus
(12-02-2014 09:21 AM)Namir Wrote:  Do you have a link to the fx-10 manual?
http://lmgtfy.com/?q=casio+fx10+manual Wink
Find all posts by this user
Quote this message in a reply
12-02-2014, 04:57 PM
Post: #15
RE: Question for Trig Gurus
(12-02-2014 10:14 AM)Didier Lachieze Wrote:  
(12-02-2014 09:21 AM)Namir Wrote:  Do you have a link to the fx-10 manual?
http://lmgtfy.com/?q=casio+fx10+manual Wink

Thanks Didier. As I suspected, the FX-10 has NO inverse trigonometric functions. The manual casually mentions how to calculate inverse hyperbolic sine and cosine, but that's not what I am looking for.

As I said in my last post, it looks like Newton's method is the best way, if I can live with the simple iterations.

:-(

Namir
Find all posts by this user
Quote this message in a reply
12-02-2014, 07:34 PM
Post: #16
RE: Question for Trig Gurus
(12-02-2014 04:57 PM)Namir Wrote:  
(12-02-2014 10:14 AM)Didier Lachieze Wrote:  http://lmgtfy.com/?q=casio+fx10+manual Wink

Thanks Didier. As I suspected, the FX-10 has NO inverse trigonometric functions. The manual casually mentions how to calculate inverse hyperbolic sine and cosine, but that's not what I am looking for.

As I said in my last post, it looks like Newton's method is the best way, if I can live with the simple iterations.

:-(

Namir

This should be good enough for practical purposes:

asin(x) ~ (1/2*e^(-x)*(e^(2*x)-1)+e^(-e^(2.700492094-1.821362659*x)))*180/pi

or

asin(x) ~ 90*(2*e^(-14.88705575*e^(-1.821362659*x)) + e^(x) - e^(-x))/pi


http://www.wolframalpha.com/input/?i=plo...x%3D0..0.5

http://www.wolframalpha.com/input/?i=plo...x%3D0..0.5

Examples:

asin(0.5) ~ 30.000 degrees

asin(0.4) ~ 23.578 degrees

asin(0.2) ~ 11,538 degrees


-------------------------------

Idea:

Let's start with the expression for asinh(x):

y = ln(x + sqrt(x^2 + 1))

A plotting shows this function and y = asin(x) match at y = 0, but the curves soon bend themselves to opposite directions. But visually it appear that the inverse function of y = ln(x + sqrt(x^2 +1)), equivalent to y = asinh(x), would follow y = asin(x) a bit further.

Then we invert the function so it gets closer to y = asin(x), at least in the 0..1/2 range:

solve y == ln(x+sqrt(x^2+1)) for x

--> x = 1/2*e^(-y)*(e^(2*y) - 1)

--> y = 1/2*e^(-x)*(e^(2*x) - 1)


By comparing the latter with y = asin(x), we find the greatest difference to be 0.00250347010455165, at x = 0.5. Then some curve fitting to improve the approximation (the second part of the first equation). For the range 1/2..1, we use simmetry. Or you can use the first part as a first guess for the solve, if you want full accuracy.
Find all posts by this user
Quote this message in a reply
12-04-2014, 02:36 AM (This post was last modified: 12-05-2014 01:07 AM by Gerson W. Barbosa.)
Post: #17
RE: Question for Trig Gurus
[Image: Trigguru_zps230f40d1.png]


(12-02-2014 07:34 PM)Gerson W. Barbosa Wrote:  For the range 1/2..1, we use simmetry.

This is completely wrong (including spelling), sorry! Desirable accuracy should be granted in the range [0..sqrt(2)/2], then for the range [sqrt(2)/2..1] we use the formula

asin(x) = 90° - asin(sqrt(1 - x^2))

So the previous approximation has been adjusted for a wider range. It's somewhat less accurate, but still good for practical purposes:

asin(x) ~ 90*(2*e^(-16.01031715*e^(-1.950569752*x)) + e^(x) - e^(-x))/pi

Examples:

x asin(x)

0.00 00.00
0.05 02.87
0.10 05.74
0.15 08.63
0.20 11.54
0.25 14.48
0.30 17.46
0.35 20.48
0.40 23.57
0.45 26.74
0.50 29.99 (30.00)
0.55 33.37
0.60 36.88
0.65 40.55
0.70 44.43
0.71 45.23

http://www.wolframalpha.com/input/?i=plo...282%29%2F2

-------------------------------

Somewhat better:

asin(x) ~ 180/pi*(0.000005592*(x + 1)^15.096 + sinh(x))

or

asin(x) ~ 90/pi*e^(-x)*(0.000011184*e^x*(x + 1)^15.096 + e^(2*x) - 1)

Examples:

x asin(x)

0.00 00.000
0.05 02.867 (02.866)
0.10 05.740 (05.739)
0.15 08.629 (08.627)
0.20 11.541 (11.537)
0.25 14.483 (14.478)
0.30 17.465 (17.458)
0.35 20.495 (20.487)
0.40 23.586 (23.578)
0.45 26.750 (26.744)
0.50 30.002 (30.000)
0.55 33.365 (33.367)
0.60 36.864 (36.870)
0.65 40.536 (40.542)
0.70 44.429 (44.427)
0.71 45.239 (45.235)

http://www.wolframalpha.com/input/?i=plo...282%29%2F2

---------------

Less accurate, but more simple:

asin(x) ~ sinh(x)*(2 - (1 - x^6)^(1/6))*180/pi
Find all posts by this user
Quote this message in a reply
12-05-2014, 02:48 AM
Post: #18
RE: Question for Trig Gurus
Thank you for all these approximations and the work you put in showing the tables of results and errors!

Namir
Find all posts by this user
Quote this message in a reply
12-05-2014, 02:44 PM (This post was last modified: 12-05-2014 06:57 PM by Gerson W. Barbosa.)
Post: #19
RE: Question for Trig Gurus
(12-05-2014 02:48 AM)Namir Wrote:  Thank you for all these approximations and the work you put in showing the tables of results and errors!

Not so much work, just copied & pasted from Excel :-)

I had never heard of a calculator which offered sin, cos and tan but not their inverses. Thanks for sharing this information with us!
If that were my only calculator, I'd use the simplest approximation as a basis for the others (perhaps there are even more simple approximations for acos or atan, but I haven't investigated yet). As we can see in the plot, it's good enough for practical purposes. No cumbersome constants to enter (no numerical curve fitting used to obtain it, only three or four plottings). If slightly more accure results are required, just replace the 6's in formula with 5.8:

180/pi*(sinh(x)*(2 - (1 - x^5.8)^(5/29))

x asin(x)

0.00 00.00
0.05 02.87
0.10 05.74
0.15 08.63
0.20 11.54
0.25 14.47 (11.48)
0.30 17.45 (17.46)
0.35 20.47 (20.49)
0.40 23.55 (23.58)
0.45 26.71 (26.74)
0.50 29.95 (30.00)
0.55 33.31 (33.37)
0.60 36.81 (33.87)
0.65 40.51 (23.58)
0.70 44.46 (44.43)
√2/2 45.05 (45.00)

max abs error: ~ 6/100 degrees

Gerson.


[Image: Asin_Approximation_zps2020bb4e.png]


---------------------

P.S.:

The maximum absolute error of the latter in the range [0..√2/2] compares to that in

asin(x) ~ (sinh(x) + (689*x^9 + 1008*x^7 + 1512*x^5)/22680)*180/pi,


which can be obtained on the HP-49G/50G this way:

'ASIN(X)'
'X'
9
TAYLR
'SINH(X)'
'X'
9
TAYLR
-
EXPAND
Find all posts by this user
Quote this message in a reply
12-09-2014, 02:19 PM (This post was last modified: 12-10-2014 07:41 PM by Namir.)
Post: #20
RE: Question for Trig Gurus
Based on Gerson's fine comments and math work, I did some curve fitting for asin(x), sinh(x), and the error between the two for 0.5<= x <= 0.9 and I found:

asin(x) = sinh(x) for 0 <= x <= 0.5

The first error correction formula (based on log10(error) vs x:

asin(x) = sinh(x) + 10^(-4.48918286080606 + 3.8564664209301*x)

And a somewhat less accurate formula (based on log10(error) vs log10(x)):

asin(x) = sinh(x) + 10^(-0.770263767622744 + 6.27135730622513*log10(x))

I guess you can use the first approximation even up to x=1.

Also,

acos(x) = pi/2 - asin(x)

and,

atan(x) = tanh(x) for 0 <= x <= 1

Since the Casio FX-10 has the e^x function, I can calculate hyperbolic functions with some reasonable ease.


:-)

Namir
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)