>>>>> "Pol" == Pol <linux_milano at yahoo.it> writes:
Pol> I would like to transform trigonometric expressions
Pol> according to my preferred routes.
Pol> E.g.:
Pol> a: 2*sin(x)^2-3*cos(x);
Pol> to be tranformed by applying the rule cos(x)^2 = 1 - sin(x)^2
Pol> I have unsuccessfully tried trigrat, trigexpand, trigsimp
Pol> Any hints?
Don't forget trigreduce, although I think this won't help you in this
case.
You can define your own simplification rules and apply them. Look up
tellsimp and friends. (I'm not very good with user-defined rules and
such.)
Pol> I would also like to solve that equation, by applying given rules.
Presumably you wanted to convert this into a polynomial in cos(x) and
then solve it. Something like the following might work:
2
(%o10) 2 sin (x) - 3 cos(x)
(%i11) subst(1-cos(x)^2,sin(x)^2,%o10);
2
(%o11) 2 (1 - cos (x)) - 3 cos(x)
(%i12) expand(%);
2
(%o12) - 2 cos (x) - 3 cos(x) + 2
(%i13) solve(%,x);
`solve' is using arc-trig functions to get a solution.
Some solutions will be lost.
%pi
(%o13) [x = %pi - acos(2), x = ---]
3
As you can see, some solutions are lost.
Ray