1
$\begingroup$

How to convert sine and cosine into each other?

Using the relationship between sine and cosine for mutual transformation:

enter image description here

Such as:

Sqrt[3] Sin[π/6 - (π x)/4]

Convert the sine above to cosine as:

Sqrt[3] Cos[π/3 + (π x)/4]

Also,Convert the cosine above to sine as:

Sqrt[3] Sin[π/6 - (π x)/4]

And so on

$\endgroup$
1
  • 2
    $\begingroup$ r1 = Sin[θ_] -> Inactive[Cos][π/2 - θ // Expand]; and Sqrt[3] Sin[π/6 - (π x)/4] /. r1. You can add //Activate if you wish to let Mathematica finish the evaluation. $\endgroup$
    – Syed
    Jan 31 at 1:29

1 Answer 1

2
$\begingroup$

Perhaps:

coswitch = {
   Sin -> (Cos[Pi/2 - # // Simplify] &), 
   Cos -> (Sin[Pi/2 - # // Simplify] &)};
expr = Sqrt[3]  Sin[\[Pi]/6 - (\[Pi]  x)/4];
expr /. coswitch

(* Sqrt[3] Cos[1/12 \[Pi] (4 + 3 x)] *)

% /. coswitch

(* Sqrt[3] Sin[1/12 \[Pi] (2 - 3 x)] *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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