HP Forums

You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

In a calculation (working through a Laplace Transform problem in a circuits book), I get a result "cos ((3/4)*pi - 2*x)", but I would much prefer something with a positive value for the variable and the phase constant, preferably with the phase to the right instead of the left, like "cos(2*x + BLAH)".

Is there a flag or a trig symbolic rewrite to make this happen?

I tried using "trigcos()" on it but it doesn't change it.

I am using the 2018-07-xx firmware.

(Also "trigcos(cos(-x+pi/2))", just playing around, yields "sin(x)" which seems like the wrong rewrite for the command. Just saying.)

Thanks for the help!
There is no way for the CAS to guess that cos(2x-3/4*pi) is better than cos(3/4*pi-2x). If you want to negate all cos arguments in an expression, you can run subst(expression,cos,x->cos(-x)).
cos(-x+pi/2) is auto-simplified to sin(x), then trigcos will not do anything, because trigcos applies the relation sin(x)^2+cos(x)^2=1 and nothing else (if you run trigcos(cos(-x+pi/2)^2), you will get 1-cos(x)^2).
(08-19-2018 02:18 PM)parisse Wrote: [ -> ]There is no way for the CAS to guess that cos(2x-3/4*pi) is better than cos(3/4*pi-2x). If you want to negate all cos arguments in an expression, you can run subst(expression,cos,x->cos(-x)).
cos(-x+pi/2) is auto-simplified to sin(x), then trigcos will not do anything, because trigcos applies the relation sin(x)^2+cos(x)^2=1 and nothing else (if you run trigcos(cos(-x+pi/2)^2), you will get 1-cos(x)^2).

Pr Parisse -- that is a big help, thank you.

I will keep working on getting *all* sin and cos results to be represented as an equivalent "cos(gamma*t + phi)", but I think that is in the homework stage for me, getting to know the subst() transformation better.
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :