I use mathematica to confirm a result from a paper ("Unsteady unidirectional flow of Bingham fluid between parallel plates with different given volume flow rate conditions") which should be simplified to a real expression. However, I have tried many many times but all failed. The following code showed my efforts:

Γ[s_] := Module[{m, delta, ee},
m = Sqrt[s]/Sqrt[ν];

delta = Sinh[m h] Sinh[m h0] - Cosh[m h] Cosh[m h0];

ee = Cosh[m h0] (Sinh[m h] - Sinh[m h0]) - 
Sinh[m h0] (Cosh[m h] - Cosh[m h0]);

(m h  delta)/(
m h delta + m h0 (Cosh[m h0]^2 - Sinh[m h0]^2) + ee) ];

E^( I ω t) Γ[I ω] + 
E^(- I ω t) Γ[-I ω] // ComplexExpand],
TimeConstraint -> Infinity]

Actually, the complex expression in the above code is the first term of dp/dx as shown in the following picture, and dp/dx is a pressure gradient which should be a expression of real values. So the image part of this expression should vanish, but the above code gives no result after a hour.


enter image description here

enter image description here

Edit 1: -----------------------------------

As suggested by @Bob Hanlon, I tried to include all the variable constraints in Simplify, but still failed to get a real-valued expression.

expr = E^(I \[Omega] t) \[CapitalGamma][I \[Omega]] + E^(- I \[Omega] t) \[CapitalGamma][-I \[Omega]]

Simplify[ComplexExpand[expr], {h > h0 > 0,t > 0, \[Omega] > 0, \[Nu] > 0}]
  • $\begingroup$ Other than all the variables/constants -- other than I -- being real (implied by your use of ComplexExpand), are there any additional known constraints? For example, are any of the variables/constants positive or at least nonnegative? Any known constraints should be included in the Simplify or wrap the Simplify with Assuming. $\endgroup$
    – Bob Hanlon
    Commented Jun 15, 2016 at 4:55
  • $\begingroup$ Why not trying a simpler case of t=0 ? $\endgroup$
    – yarchik
    Commented Jun 15, 2016 at 8:07
  • $\begingroup$ The result should be zero. As your function Gamma[s] is a real function of s for all parameters being real the expression which you wish to simplify (with t and omega real as well) is the real part of some quantity. This is of course a real quantity, hence its imaginary part is zero. $\endgroup$ Commented Jun 15, 2016 at 8:54
  • $\begingroup$ @Bob Hanlon, thanks for the kind response. Including additional constraints seems to not work, as shown in my edit above. $\endgroup$
    – xinxin guo
    Commented Jun 16, 2016 at 6:38
  • $\begingroup$ @yachik, thanks, I guess maybe the only way to obtain the real valued expression is to replace variables with their numeric values, and a full symbolic real valued expression may not be achieved. $\endgroup$
    – xinxin guo
    Commented Jun 16, 2016 at 6:42

1 Answer 1


The key idea of this solution is to partly simplify the expression by direct substitution of some known terms rather than using functions for simplification like Simplify.

First, take out the imaginary part of the expression and observe:

impart = E^(I ω t) Γ[I ω] + E^(-I ω t) Γ[-I ω] // Im // ComplexExpand

enter image description here

Hmm… seems that there're many Arg terms in impart. It's natural to guess these terms will slow down the simplification process of Simplify. Let's check what kind of Arg term is contained in impart further:

cons = {h > h0 > 0, t > 0, ω > 0, ν > 0};
Cases[impart, Arg[_], Infinity] // Union
(* {Arg[ν], Arg[-I ω], Arg[I ω]} *)
imrule = # -> Simplify[#, cons] &@% // Thread
(* {Arg[ν] -> 0, Arg[-I ω] -> -(π/2), Arg[I ω] -> π/2} *)

There're 3 different Arg terms, whose values are known under the constraints. Plug them back to impart:

immid = impart /. imrule;

and simplify:

Simplify[immid, cons]
(* 0 *)

OK, the minimum goal is achieved, and with the same method, the final goal i.e. find the free-of-I form of the expression can be achieved, too:

repart = E^(I ω t) Γ[I ω] + E^(-I ω t) Γ[-I ω] // Re // ComplexExpand;

Cases[repart, Arg[_], Infinity] // Union
(* {Arg[ν], Arg[-I ω], Arg[I ω]} *)
rerule = # -> Simplify[#, cons] &@% // Thread
(* {Arg[ν] -> 0, Arg[-I ω] -> -(π/2), Arg[I ω] -> π/2} *)

remid = repart /. rerule;

Simplify[remid, cons] // AbsoluteTiming
(* {16.001111, …… *)

The result is a little long so I'd like to omit it here.

  • $\begingroup$ what can I say. Perfect!!! Especially the detailed process to attack the problem, very valuable.Before saw your solution, I started to thinking quit eveytime I met a very long out in Mathematica. I really appreciate your time! $\endgroup$
    – xinxin guo
    Commented Jun 16, 2016 at 9:37

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.