1
$\begingroup$

I have a very long expression with trigonometric functions:

n (2 a - h - 2 z) (-Sin[p (β - δ + t ω)] + Sin[p (β + δ + t ω)])

I would like to simplify the term (-Sin[p (β - δ + t ω)] + Sin[p (β + δ + t ω) to 2 Sinδ Cos (ωt + β).

Any suggestions? Just using Simplify does not work on this case. Thank you for your help.

$\endgroup$
2
$\begingroup$

I would like to simplify the term (-Sin[p (β - δ + t ω)] + Sin[p (β + δ + t ω) to 2 Sinδ Cos (ωt + β).

ClearAll[p , β, δ, t, ω]
expr = -Sin[p (β - δ + t ω)] +  Sin[p (β + δ + t ω)];
expr = TrigFactor[expr];
Simplify[#] & /@ expr

$$ 2 \sin (\delta p) \cos (p (\beta +t \omega )) $$

| improve this answer | |
$\endgroup$
  • $\begingroup$ I appreciate your help. Could you kindly elaborate on why you used the line Simplify[#] & /@ expr? I thought it would return the same value if I just typed expr = Simplify[TrigFactor[expr]]; but the result was different. $\endgroup$ – Guilherme Rubio Apr 2 at 5:55
  • 1
    $\begingroup$ If you supply the whole expression, then simplify tries to reduce the leaf size and will return back the original expression since that is "smaller" in size (smaller leaf size). To prevent this, then we tell it to simplify each factor at a time only and not the whole thing at once. $\endgroup$ – Nasser Apr 2 at 5:57

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.