MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Trig Substitution


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


  • Prev by Date: Re: Bug in DateString with TimeZone?
  • Next by Date: Re: Trig Substitution
  • Previous by thread: Trig Substitution
  • Next by thread: Re: Trig Substitution