Post Reply 
Trigonometric reduction formulas
03-21-2020, 02:45 PM (This post was last modified: 03-21-2020 04:22 PM by Jan 11.)
Post: #1
Trigonometric reduction formulas
I wonder why HP PRIME does not implement the full list of trigonometric reduction formulas. This applies to the basic trigonometric functions: SIN, COS, TAN, COT for two angle measures (degrees and radians). If we set the calculator in radians, most of the reduction formulas are made. The exception is the TAN function. For example: he will make such a reduction: TAN (π-x) = - TAN (x) or TAN (π +x) = TAN (x). However, it will not do others, e.g. TAN (π / 2-x) or TAN (π / 2 + x) or TAN (3 * π / 2 + x) etc.
If the calculator is set in degrees, it will not perform any trigonometric reduction (see this in the attached screenshots). All competition calculators (TI-Nspire CX-II-T CAS, CASIO CLASSPAD CP-400) have been using these formulas for many years. I think HP PRIME should also have it.

           
Find all posts by this user
Quote this message in a reply
03-22-2020, 01:48 PM
Post: #2
RE: Trigonometric reduction formulas
There is almost no support for degree in the CAS, you should always do *exact* trigonometric computations in radians. There are good reasons for that: radians is intrinsic (it's related to the length of the arc) and can be used inside complex exponentials ; derivation, integration, limits and series expansion are too much complicated in degrees.
Find all posts by this user
Quote this message in a reply
03-23-2020, 04:53 AM
Post: #3
RE: Trigonometric reduction formulas
If this is the case then complete the missing reduction formulas for the TAN function (in radians). The list of trigonometric reduction formulas should be complete.
Find all posts by this user
Quote this message in a reply
03-23-2020, 03:46 PM
Post: #4
RE: Trigonometric reduction formulas
If you ask the Prime to simplify \[\tan\left({\pi\over 2}-x\right)-{1\over \tan(x)}\] it returns zero, so it knows that the two expressions are equal. However, it won't simplify either one to the other. A possible reason is that it has no way of knowing which form you consider to be simpler.

If I ask the Prime to expand \(\tan(a+b)\) with the texpand command, it does so. However, if \(a=\pi/2\) it returns undef. I guess that this is because \(\tan(\pi/2)\) is indeed undefined, although the Prime does correctly return \[\lim_{a\to\pi/2}
\Bigl({\rm texpand\,}\left(\tan\left(a-x\right)\right)\Bigr)\] as \(\cos(x)/\sin(x)\). Maybe the CAS could be given a new rule to allow it to expand \(\tan(a+b)\) when either \(a\) or \(b\) is an odd half-multiple of \(\pi\)?

Nigel (UK)
Find all posts by this user
Quote this message in a reply
03-23-2020, 03:47 PM (This post was last modified: 03-23-2020 03:48 PM by parisse.)
Post: #5
RE: Trigonometric reduction formulas
cot is not a fundemental trigonometric function inside the CAS, it will always be rewritten with sin and cos.
You can run e.g. sincos(tan(pi/2-x)) if you want to remove a pi/2-multiple phase shift in a tan function.
Find all posts by this user
Quote this message in a reply
03-24-2020, 04:30 PM
Post: #6
RE: Trigonometric reduction formulas
(03-23-2020 03:47 PM)parisse Wrote:  cot is not a fundemental trigonometric function inside the CAS, it will always be rewritten with sin and cos.
You can run e.g. sincos(tan(pi/2-x)) if you want to remove a pi/2-multiple phase shift in a tan function.

I'm not asking for cot to be given as an answer. It just seems strange that texpand acting on \(\tan(a-b)\) returns \((\tan a -\tan b)/(1+\tan a\tan b)\), but acting on \(\tan((\pi/2)-b)\) texpand returns "undef". This expression is perfectly well-defined. Returning either \(\cos x/\sin x\), \(1/\tan x\), or even the original expression unchanged would be better than "undef".

I appreciate that it is not possible for a CAS - especially on a calculator - to consider every special case in every situation, so I do understand if things are left as they are.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
03-24-2020, 07:13 PM
Post: #7
RE: Trigonometric reduction formulas
tan(pi/2-b) is well defined, but if you apply the formula that texpands apply, it will involve tan(pi/2) and that's infinity...
Of course it's possible to add a special check for pi/2-b, but that's not so easy if you want to handle all multiples of pi/2, like tan(3*pi/2-b) and of course also tan(b+pi/2), etc.
Unfortunately, I do not have infinite time ressources, I must make choices...
Find all posts by this user
Quote this message in a reply
03-25-2020, 07:39 AM (This post was last modified: 03-25-2020 07:40 AM by parisse.)
Post: #8
RE: Trigonometric reduction formulas
Update: I have found an easy way to handle tan(pi/2-x) and variants, it should be available in a future firmware update.
Find all posts by this user
Quote this message in a reply
03-25-2020, 08:07 AM
Post: #9
RE: Trigonometric reduction formulas
Parisse, thank you very much.
Find all posts by this user
Quote this message in a reply
03-25-2020, 04:03 PM (This post was last modified: 03-25-2020 04:07 PM by CyberAngel.)
Post: #10
RE: Trigonometric reduction formulas
(03-25-2020 07:39 AM)parisse Wrote:  Update: I have found an easy way to handle tan(pi/2-x) and variants, it should be available in a future firmware update.

Cyrille? Tim W?
Could we have a new (virus-free) Beta soon (4 the Real calculatrice G1), please!?
This could be a sort of a Crown jewel!
- -
VPN
Find all posts by this user
Quote this message in a reply
Post Reply 




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