I don't know why you would expect Mathematica to understand that this is a real expression when you have I
, (-1)^(1/4)
and (-1)^(3/4)
at various places in the expression.
(-1)^(1/4) // N
(* Out[1]= 0.707107 + 0.707107 I *)
(-1)^(3/4) // N
(* Out[2]= -0.707107 + 0.707107 I *)
In this particular instance, the denominator is pretty obviously real.
Simplify[Sign@Denominator[finalnew],
Assumptions -> {ka > 0, kd > 0, L > 0, ω > 0, d > 0}]
(*
Out[3]= Sign[(ka^4 ω^2 + d^2 (kd^2 + ω^2)^2 - 4 d ka^2 ω (kd^2 - kd ω + ω^2))
Cos[ Sqrt[2] L Sqrt[ω/d]] - (ka^4 ω^2 + d^2 (kd^2 + ω^2)^2 + 4 d ka^2 ω (kd^2 + kd ω + ω^2))
Cosh[Sqrt[2] L Sqrt[ω/d]] - 2 Sqrt[2] ka ((d^(3/2) (kd - ω) ω^(5/2) -
kd^2 (d ω)^(3/2) + kd^3 Sqrt[d^3 ω] - ka^2 kd Sqrt[d ω^3] + ka^2 Sqrt[d ω^5])
Sin[Sqrt[2] L Sqrt[ω/d]] + (kd^2 (d ω)^(3/2) + kd^3 Sqrt[d^3 ω] + ka^2 kd Sqrt[d ω^3] +
ka^2 Sqrt[d ω^5] + d^(3/2) ω^(5/2) (kd + ω))
Sinh[ Sqrt[2] L Sqrt[ω/d]])
]
*)
Simplify[Im@Denominator[finalnew], Assumptions -> {ka > 0, kd > 0, L > 0, ω > 0, d > 0, u > 0}]
(* Out[4]= 0 *)
So concentrate on refining the numerator. The equivalent
Simplify[Im@Numerator[finalnew],
Assumptions -> {ka > 0, kd > 0, L > 0, ω > 0, d > 0, u > 0}]
does not simplify to zero. For example:
Expand@Im@Numerator[finalnew] /. {ka -> 1, kd -> 1, L -> 1, ω -> 1, d -> 1, u -> 1}
(*
Out[5]= 6 Im[(-24 - 168 I) Cos[(-1)^(1/4)] - (24 - 168 I) Cosh[(-1)^(1/4)] -
(78 - 102 I) (-1)^(1/4) Sin[(-1)^(1/4)] + (42 + 24 I) (-1)^(3/4) Sin[(-1)^(1/4)] +
(108 + 144 I) (-1)^(1/4) Sinh[(-1)^(1/4)] + 6 (-1)^(3/4) Sinh[(-1)^(3/4)]]
*)
You can confirm the numerator is also real for specific values of the parameters:
FullSimplify@ Im[Numerator[finalnew] /. {ka -> 1, kd -> 1, L -> 1, ω -> 1, d -> 1, u -> 1}]
(* result is zero *)
But this takes an inordinate amount of time and the result is a long complex expression.
FullSimplify[Im[Numerator[finalnew]], Assumptions -> {ka > 0, kd > 0, L > 0, ω > 0, d > 0, u > 0}]
As for general strategies, FullSimplify
with as many variables in the Assumptions
option is a good bet in most cases, as is separately simplifying numerators and denominators. I don't know if there are best-practice strategies, though. I would expect it would depend on the kind of expression, for example, whether it is a polynomial or contains trigonometric expressions.
Factor@FullSimplify[finalnew /. {d -> 1, kd -> 1, ka -> 1, L -> 1, \[Omega] -> 1, u -> 1}]
does not simplify a lot. I’d advise to go back and try separating that expression into individual parts that make sense (mathematically or physically), and then try to simplify each part… $\endgroup$