0
$\begingroup$

I have this expression

$a^4 Sin[\phi/2]^4 + 1/2 a^2 b^2 Sin[\phi]^2 + b^4 Cos[\phi/2]^4$.

I expect to get a simple form

$(a^2 Sin[\phi/2]^2 + b^2 Cos[\phi/2]^2)^2$.

However mathematica obtain following expression

short1 = FullSimplify[ a^4 Sin[\[Phi]/2]^4 + 1/2 a^2 b^2 Sin[\[Phi]]^2 + b^4 Cos[\[Phi]/2]^4]

1/4 (a^2 + b^2 + (-a^2 + b^2) Cos[\[Phi]])^2.

Anyone know how to solve this problem?

$\endgroup$
5
  • $\begingroup$ you can obtain the desired output with FullSimplify[ a^4 Sin[\[Phi]/2]^4 + 1/2 a^2 b^2 Sin[\[Phi]]^2 + b^4 Cos[\[Phi]/2]^4 /. \[Phi] -> 2 \[Phi] // TrigFactor] /. \[Phi] -> \[Phi]/2. $\endgroup$
    – Andreas
    Commented May 25, 2021 at 9:30
  • $\begingroup$ Thanks, it works. But why we have to transform $\phi/2$ to $\phi$ first? $\endgroup$
    – Saber Tifa
    Commented May 25, 2021 at 9:58
  • $\begingroup$ Perhaps the accepted answer here mathematica.stackexchange.com/questions/23484/… is useful $\endgroup$
    – user49048
    Commented May 25, 2021 at 10:04
  • $\begingroup$ Maybe the Simplify tries to expand Phi/2...Another way without angle replacement is a^4 Sin[\[Phi]/2]^4 + 1/2 a^2 b^2 Sin[\[Phi]]^2 + b^4 Cos[\[Phi]/2]^4 // TrigFactor // Expand // Factor $\endgroup$
    – Andreas
    Commented May 25, 2021 at 11:04
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bbgodfrey
    Commented May 25, 2021 at 13:43

1 Answer 1

1
$\begingroup$
expr = a^4 Sin[\[Phi]/2]^4 + 1/2 a^2 b^2 Sin[\[Phi]]^2 + 
  b^4 Cos[\[Phi]/2]^4;

Try this:

Factor[expr /. Sin[\[Phi]] -> 2 Sin[\[Phi]/2]*Cos[\[Phi]/2]]

(*  (b^2 Cos[\[Phi]/2]^2 + a^2 Sin[\[Phi]/2]^2)^2   *)

Done. Have fun!

$\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.