Flags for trig representation (positive frequency*t+phase)?

08192018, 05:22 AM
Post: #1




Flags for trig representation (positive frequency*t+phase)?
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 201807xx 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! 

08192018, 02:18 PM
Post: #2




RE: Flags for trig representation (positive frequency*t+phase)?
There is no way for the CAS to guess that cos(2x3/4*pi) is better than cos(3/4*pi2x). 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 autosimplified 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 1cos(x)^2). 

08202018, 03:32 AM
Post: #3




RE: Flags for trig representation (positive frequency*t+phase)?
(08192018 02:18 PM)parisse Wrote: There is no way for the CAS to guess that cos(2x3/4*pi) is better than cos(3/4*pi2x). If you want to negate all cos arguments in an expression, you can run subst(expression,cos,x>cos(x)). 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. 

« Next Oldest  Next Newest »

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