Re: Trig Substitution
- To: mathgroup at smc.vnet.net
- Subject: [mg93458] Re: [mg93434] Trig Substitution
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 9 Nov 2008 05:25:26 -0500 (EST)
- References: <200811080857.DAA14180@smc.vnet.net> <9517FF96-AEDF-42F5-8F88-84C70505D5EC@mimuw.edu.pl>
On 8 Nov 2008, at 21:45, Andrzej Kozlowski wrote: > > On 8 Nov 2008, at 17:57, Bruce Colletti wrote: > >> Re Mathematica 6.0.3 under WinXP. >> >> >> >> Given a sum of (positive integer) powers of sin(t), I wish to cast >> (as much >> as possible) the sum in terms of cos t, chiefly by substituting 1 - >> (cos >> t)^2 for (sin t)^2 throughout. The code below does this. >> >> >> >> X=Sin[t]+Sin[t]^2+Sin[t]^3; >> >> >> >> Y=Apply[List,X]/.{Sin[t]^n_?EvenQ:>Expand[(1-Cos[t]^2)^(n/ >> 2)],Sin[t]^n_:>Exp >> and[(1-Cos[t]^2)^Quotient[n,2] Sin[t]]}; >> >> >> >> Apply[Plus,Y] >> >> >> >> What is an easier way? Thankx. >> >> >> >> Bruce >> > > Obviously this depends on the definition of "easier". If by "easier" > you mean a method that is shorter then yes: > > gs = GroebnerBasis[{x - (Sin[t] + Sin[t]^2 + Sin[t]^3), > Sin[t]^2 + Cos[t]^2 - 1}, {x, Sin[t], Cos[t]}] > {Cos[t]^2 + Sin[t]^2 - 1, Sin[t]*Cos[t]^2 + Cos[t]^2 + x - 2*Sin[t] > - 1} > > Solve[Last[gs] == 0, x] > {{x -> (-Sin[t])*Cos[t]^2 - Cos[t]^2 + 2*Sin[t] + 1}} > > If however, by "easier" means that it also should be easy to see why > it works, then this method probably does not quality. > > Andrzej Kozlowski Actually, from the point of view of purely "mathematical elegance" it might be better to do it without using Solve: gb = GroebnerBasis[{x - (Sin[t] + Sin[t]^2 + Sin[t]^3), Sin[t]^2 + Cos[t]^2 - 1}, {x, Sin[t], Cos[t]}]; Last[PolynomialReduce[x, gb, {x, Sin[t], Cos[t]}]] (-Sin[t])*Cos[t]^2 - Cos[t]^2 + 2*Sin[t] + 1 But I suspect this does not make really any "easier" in the latter sense above. Andrzej Kozlowski
- References:
- Trig Substitution
- From: "Bruce Colletti" <bwcolletti@verizon.net>
- Trig Substitution