2
$\begingroup$

Is it possible to replace sine and cosine in terms of tangent half-angles and again the tangent half-angles by a variable say t?

$\endgroup$
1
  • $\begingroup$ The answer to this question is based on tangent half-angle substitutions. $\endgroup$
    – Simon
    May 19, 2016 at 4:39

2 Answers 2

5
$\begingroup$

Define your rules:

rule = {Cos[_] :> (1 - t^2)/(1 + t^2), Sin[_] :> 2*t/(1 + t^2)};
Sin[x] /. rule
Sin[x] /. rule /. t -> Tan[x/2] // Simplify

$\dfrac{2 t}{t^2+1}$

$\sin(x)$

$\endgroup$
0
2
$\begingroup$

I'd suggest something like this

 rule = {
     Cos[x_] :> (1 - tan[x/2]^2)/(1 + tan[x/2]^2),
     Sin[x_] :> 2 tan[x/2]/(1 + tan[x/2]^2)};

 Sin[x]/.rule -> (2 tan[x/2])/(1 + tan[x/2]^2)

Note the lowercase tan. This will not simplify to other trig functions on you unless you replace with the real Tan:

  Sin[x]/.rule /. tan[x_]:>Tan[x] //fullSimplify -> Sin[x]

This way you carry around the original argument:

otherwise you get behavior like this:

   Sin[x]-Sin[y] /. Sin[_] :> 2*t/(1 + t^2)

0

$\endgroup$
2
  • $\begingroup$ you'd get the same result with Öska's answer. Try his Sin[x] - Sin[y] /. rule. $\endgroup$
    – eldo
    Jun 20, 2014 at 20:19
  • $\begingroup$ that was my point, that answer is potentially dangerous unless obviously you take care all your Sin,Cos's have the same argument. (in which case you may as well do `rule=Sin(x)-> ... ). $\endgroup$
    – george2079
    Jun 22, 2014 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.