# HP Forums

Full Version: Simplifying trig expressions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.)
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?
(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()
(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.
(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.
(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.
(04-28-2022 03:42 AM)csplinter Wrote: [ -> ]For future readers, I finally got something legible using CAS toolbox, 4, 8, 1: trigsin()

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 ...'
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
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :