|
From: Henry B. <hb...@pi...> - 2021-03-11 01:11:40
|
Over the past 10 years, I've done a *lot* of manipulations with sin/cos/tan and trigexpand,trigreduce,exponentialize,rectform, etc. 1. Although I'm not doing integration, I generally agree with Richard that sin/cos/tan are mostly what you want. The problem with sec/cot/csc is that they generally involve the *denominators* of hairy expressions. Any time you can, you want to avoid dealing with denominators -- e.g., I go to the trouble of keeping the numerators and denominators separate until the very end. Thus, I do things like: tempexp:[num(%),denom(%)]; tempexp:tempexp,trigexpand,factor; /* Perhaps some sort of substitution here. */ tempexp:tempexp,trigreduce,factor; finalresult:tempexp[1]/tempexp[2],factor; 2. tan usually shows up as the ratio of sin/cos, so I often do some trigexpands/trigreduces, and finally: tempexp:tempexp,sin(x)=tan(x)*cos(x),factor; /* cos(x) hopefully factors out at this point. */ 3. tan is often a 'shorthand' for a ratio of non-normalized sin's & cos's. If by converting to tan's, you can get rid of *all* of the trig subexpressions, then you can hopefully do the rest of the solution with polynomials or rational expression in tan's. 4. Although they teach you in high school to always have normalized expressions, I find normalization to be extremely inconvenient and introduces messy sqrt's all over the place. Much better to deal with x^4,x^6,x^8, etc., than even one sqrt. At 01:45 PM 3/10/2021, Richard Fateman wrote: >In general there is a tension between finding the smallest conventional representation, and ease of >manipulation -- where you would prefer to have the fewest number of essentially interchangeable >functions hanging around. People are usually happy with sin and cos. Even tan is an extra since >sin/cos is already there. Sometimes people would prefer sec. thought: how would you prefer >to represent sec, cot, etc if you were writing a program to do symbolic integration? > >On 3/10/21 1:22 PM, Stavros Macrakis wrote: >>trigreduce >> >>On Wed, Mar 10, 2021 at 4:19 PM Robert Dodier <rob...@gm...> wrote: >>I'm looking at this item >>https://stackoverflow.com/questions/66537116/wxmaxima-return-expressions-using-sec-csc-and-cot-instead-of-reciprocal >> >>I've looked for flags or functions to convert 1/cos, 1/sin, 1/tan to >>sec, csc, cot, respectively, but I didn't find anything. It's not hard >>to roll one's own for this, but I wonder if I'm overlooking something. >> >>best >> >>Robert Dodier |