4
$\begingroup$

I have trouble with the following apparent contradiction:

In[1]:= FullSimplify[Cos[Sqrt[-a]] == Cosh[Sqrt[a]]]
Out[1]= True

In[2]:= FullSimplify[Cos[Sqrt[-(b + c)]] == Cosh[Sqrt[(b + c)]]]
Out[2]= Cos[Sqrt[-b - c]] == Cosh[Sqrt[b + c]]

I also tried...

In[3]:= FullSimplify[ Cos[Sqrt[-(b + c)]] == Cosh[Sqrt[(b + c)]] /. {b -> a - c}]
Out[3]= True

In[4]:= FullSimplify[Cos[Sqrt[-(b + c)]] == Cosh[Sqrt[(b + c)]], b \[Element] Reals && c \[Element] Reals]
Out[4]= Cos[Sqrt[-b - c]] == Cosh[Sqrt[b + c]]

In[5]:= FullSimplify[Cos[Sqrt[-(b + c)]] == Cosh[Sqrt[(b + c)]], b > 0 && c > 0]
Out[5]= True

...but is there a way so resolve this without an explicit substitution or without making assumptions (which weren't necessary for a in the first place)?

(running Mathematica 12.0.0.0 on MS Windows (64-bit))

$\endgroup$
6
  • 1
    $\begingroup$ g[Power[x_, 1/2]] := -I*Power[-x, 1/2]; Simplify[TrigToExp[Cos[Sqrt[-(b + c)]] == Cosh[Sqrt[(b + c)]]], TransformationFunctions -> {Automatic, g}] $\endgroup$
    – Acus
    Nov 17 '21 at 7:40
  • $\begingroup$ Works very fast, thank you! Is there a way to modify this for arguments in the form (Sqrt[-a^2 + b^2 + Sqrt[c]] d)/e or in general arbitrary arguments? $\endgroup$
    – faber
    Nov 17 '21 at 9:21
  • $\begingroup$ Not quite clear what your mean. Added g[ ] rule is rather general (do not restrict structure of argument of Sqrt[ ], the FullForm of which is Power[_,1/2 ]). You can keep adding as many rules as your want on your own risk. Another very useful option to Simplify family is ComplexityFunction (read in doc). $\endgroup$
    – Acus
    Nov 17 '21 at 9:44
  • $\begingroup$ For example g[Power[x_, 1/2]] := -I*Power[-x, 1/2]; Simplify[TrigToExp[Cos[Sqrt[-a^2 + b^2 + Sqrt[c]] ] == Cosh[Sqrt[a^2 - b^2 - Sqrt[c]]]], TransformationFunctions -> {Automatic, g}] does not work. $\endgroup$
    – faber
    Nov 17 '21 at 10:32
  • 1
    $\begingroup$ sqrtRule = Power[x_, 1/2] :> RuleCondition[-I*Power[-x, 1/2], LeafCount[x] > LeafCount[Expand[-x]]]; Cos[Sqrt[-a^2 + b^2 + Sqrt[c]]] == Cosh[Sqrt[a^2 - b^2 - Sqrt[c]]] /. sqrtRule $\endgroup$
    – Acus
    Nov 17 '21 at 11:40
2
$\begingroup$

Edit ... (Contrary to first result, true without conditions)

Splitting b and c into real and imaginary part together with Reduce helps to show second equation beeing True.

red2 = Reduce[
b1 \[Element] Reals && b2 \[Element] Reals && c1 \[Element] Reals &&
 c2 \[Element] Reals && 
Cos[Sqrt[-(b + c)]] == Cosh[Sqrt[(b + c)]] /. {b -> b1 + I b2, 
c -> c1 + I c2}, {b1, b2, c1, c2}, GeneratedParameters -> d]

(*   ((b1 | b2 | c1 | c2) \[Element] Reals && 
     b2 + c2 != 0) || ((b1 | b2) \[Element] 
Reals && ((c1 > -b1 && c2 == -b2) || (c1 == -b1 && 
   c2 == -b2) || (c1 < -b1 && c2 == -b2))) || (d[1] \[Element] 
Integers && (b1 | b2) \[Element] 
Reals && ((d[1] >= 1 && c1 == -b1 - 4 \[Pi]^2 d[1]^2 && 
   c2 == -b2) || (d[1] >= 0 && 
   c1 == -b1 - \[Pi]^2 - 4 \[Pi]^2 d[1] - 4 \[Pi]^2 d[1]^2 && 
   c2 == -b2)))   *)

FullSimplify[red2, 
b1 \[Element] Reals && b2 \[Element] Reals && c1 \[Element] Reals && 
c2 \[Element] Reals]

(*   True   *)

The same can be done for the first equation.

$\endgroup$
3
  • $\begingroup$ The output of Reduce[Cos[Sqrt[-a]] == Cosh[Sqrt[a]], a, Complexes] is simply wrong. Cos[Sqrt[-a]] and Cosh[Sqrt[a]] are identical entire functions (see Order 1/2 in that Wiki article). Their power expansions are identical: execute Series[Cos[Sqrt[-a]] {a, 0, n}] and Series[ Cosh[Sqrt[a]], {a, 0, n}] with any n. $\endgroup$
    – user64494
    Nov 16 '21 at 19:42
  • $\begingroup$ Of course, positive integer. $\endgroup$
    – user64494
    Nov 16 '21 at 20:01
  • $\begingroup$ Thank you for this clarification! Using Reduce is a bit slow, though, so I guess I'll go with the series expansion suggested by user64494 and Acus $\endgroup$
    – faber
    Nov 17 '21 at 9:22

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.