Post Reply 
Simplifying trig expressions
04-26-2022, 07:05 PM
Post: #1
Simplifying trig expressions
This has long been one of my biggest issues using the HP Prime. I'll start with an example.

I do several calculations and end up with something like

81*sqrt(cos(v)^2 *sin(u)^4 +(cos(v)^2 -sin(v)^2)^2 *cos(u)^2 *sin(v)^2 +(cos(v)^2 -sin(v)^2)^2 *sin(u)^2

I know that this should simplify to 81*sin(u) or something like this.

I've tried simplify(), tcollect(), trigsin(), factor() and all kinds of random functions, but can't seem to get anything more readable. Why can't the HP Prime seem to recognize cos(x)^2+sin(x)^2 = 1?

I can manually make these observations if you could lead me in a direction that would eliminate the sqrt() and expand things such as (cos(v)^2 -sin(v)^2)^2 without messing things up further by adding a denominator or something.

Of course, if you can lead me to a solution that reduces the expression to something like 81*sin(u) I'll be your best friend. 3rd party apps and programs are fine, if need be.
Find all posts by this user
Quote this message in a reply
04-27-2022, 06:59 AM (This post was last modified: 04-27-2022 07:16 AM by trojdor.)
Post: #2
RE: Simplifying trig expressions
You may just not have the CAS Simplification level set to your liking.
(You ARE trying to do this in CAS mode, correct?)

Go to CAS Settings.
Look at current setting for simplification.
(It's probably set to minimum, or off.)
Change it to Maximum.

Try it by typing in your example COS(x)^2 + SIN(x)^2 and press Enter.
Observe the 1.

I would have tried your full example for you, but if it's really a legitimate problem, you've got a missing/mismatched parenthesis somewhere. (Probably the right paren for the sqrt.)

ENTER > =
Find all posts by this user
Quote this message in a reply
04-28-2022, 12:30 AM
Post: #3
RE: Simplifying trig expressions
What are the upsides and downsides to each of the choices of simplification (none, minimum, maximum)…there must be a reason that these choices are offered?
Find all posts by this user
Quote this message in a reply
04-28-2022, 03:42 AM
Post: #4
RE: Simplifying trig expressions
(04-27-2022 06:59 AM)trojdor Wrote:  You may just not have the CAS Simplification level set to your liking.
(You ARE trying to do this in CAS mode, correct?)

Go to CAS Settings.
Look at current setting for simplification.
(It's probably set to minimum, or off.)
Change it to Maximum.

Try it by typing in your example COS(x)^2 + SIN(x)^2 and press Enter.
Observe the 1.

I would have tried your full example for you, but if it's really a legitimate problem, you've got a missing/mismatched parenthesis somewhere. (Probably the right paren for the sqrt.)

I assure you that I have not mismatched a parenthesis, and the simplify() output is super garbage. The simplify() function is the equivalent of setting that setting to maximum.

For future readers, I finally got something legible using CAS toolbox, 4, 8, 1: trigsin()
Find all posts by this user
Quote this message in a reply
04-28-2022, 03:44 AM
Post: #5
RE: Simplifying trig expressions
(04-28-2022 12:30 AM)lrdheat Wrote:  What are the upsides and downsides to each of the choices of simplification (none, minimum, maximum)…there must be a reason that these choices are offered?

The default is minimum. This offers are reasonable balance between making logical simplifications, and massacring the result which is often the case using maximum.
Find all posts by this user
Quote this message in a reply
04-28-2022, 05:45 PM
Post: #6
RE: Simplifying trig expressions
(04-26-2022 07:05 PM)csplinter Wrote:  This has long been one of my biggest issues using the HP Prime. I'll start with an example.

I do several calculations and end up with something like

81*sqrt(cos(v)^2 *sin(u)^4 +(cos(v)^2 -sin(v)^2)^2 *cos(u)^2 *sin(v)^2 +(cos(v)^2 -sin(v)^2)^2 *sin(u)^2

I know that this should simplify to 81*sin(u) or something like this.
I doubt this simplifies to something simple. Perhaps you made an error before entering the computation, or there is a relationship between u and v.

Quote:I've tried simplify(), tcollect(), trigsin(), factor() and all kinds of random functions, but can't seem to get anything more readable. Why can't the HP Prime seem to recognize cos(x)^2+sin(x)^2 = 1?

trigsin/trigcos/trigtan just do that and return an expression that favor respectively sin/cos/tan.
Find all posts by this user
Quote this message in a reply
04-28-2022, 10:07 PM (This post was last modified: 04-28-2022 10:08 PM by trojdor.)
Post: #7
RE: Simplifying trig expressions
(04-28-2022 03:42 AM)csplinter Wrote:  I assure you that I have not mismatched a parenthesis, and the simplify() output is super garbage. The simplify() function is the equivalent of setting that setting to maximum.
For future readers, I finally got something legible using CAS toolbox, 4, 8, 1: trigsin()

Count them. There are 23 parenthesis. By definition, your're either missing one or there's one extra.

ENTER > =
Find all posts by this user
Quote this message in a reply
04-29-2022, 04:52 PM
Post: #8
RE: Simplifying trig expressions
(04-28-2022 03:42 AM)csplinter Wrote:  For future readers, I finally got something legible using CAS toolbox, 4, 8, 1: trigsin()

[Image: wisdom_of_the_ancients.png]

Quote:All long help threads should have a sticky globally-editable post at the top saying 'DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far ...'
Find all posts by this user
Quote this message in a reply
05-01-2022, 02:01 PM
Post: #9
RE: Simplifying trig expressions
I may be blind, but ... where the radicand ends up (the right bracket) ?
Beyond that, arguments ("u" and "v") are to be considered different, is there any kind of "connection" between the two ?
Is it possible to get a screenshot (a text or something) of the expression ?
Best,

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




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