1
$\begingroup$

I am trying to simplify a simple expression,

(1/2)*((-Pi)*Abs[Sin[t]] - 
   Pi*Abs[Sin[t - 2*Pi]] - 
   2*Pi*Abs[Sin[t - Pi]] + 4)

i.e $$ \frac{1}{2} (-2 \pi \left| \sin (t-\pi )\right| -\pi \left| \sin (t-2 \pi )\right| -\pi \left| \sin t\right| +4) $$ for $0<t<\pi$, which should be $$ \frac{1}{2} (1 -4\pi |\sin(t)|)$$. I have tried various methods, like ComplexExpand and then FullSimplify[] which gives me,

  (1/2)*Pi*Sqrt[Sin[t - 2*Pi]^
     2] - Pi*Sqrt[Sin[t - Pi]^
     2] + 2

i.e $$ -\pi \sqrt{((t-\pi ) \sin )^2}-\frac{1}{2} \pi \sqrt{((t-2 \pi ) \sin )^2}-\frac{1}{2} \pi \sqrt{(t \sin )^2}+2 $$ which I understand shouldn't further simplify as square-root brings in an ambiguity, somehow ComplexExpand is making the expression complicated.

$\endgroup$
  • $\begingroup$ "I have tried various methods, like ComplexExpand and then FullSimplify[]" Then please show exactly what you did. $\endgroup$ – Henrik Schumacher Apr 11 at 14:14
  • $\begingroup$ Assuming[0 < t < Pi, (1/2)*((-Pi)*Abs[Sin[t]] - Pi*Abs[Sin[t - 2*Pi]] - 2*Pi*Abs[Sin[t - Pi]] + 4) // Simplify] evaluates to 2 - 2 Pi Sin[t] $\endgroup$ – Bob Hanlon Apr 11 at 15:02
0
$\begingroup$

What's wrong with

Simplify[
 (1/2)*((-Pi)*Abs[Sin[t]] - Pi*Abs[Sin[t - 2*Pi]] - 2*Pi*Abs[Sin[t - Pi]] + 4)
 ]

2 - 2 π Abs[Sin[t]]

?

At least, that's what version 11.3 returns to me.

$\endgroup$
  • $\begingroup$ Ok let me download the latest Mathematica and try. $\endgroup$ – Jaswin Apr 11 at 15:14

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.