2
$\begingroup$

There's an option for FullSimplify, which is Trig, and with it I could prevent a trigonometric identities from being used.

I'm looking for a similar option that would prevent FullSimplify from using the Euler formula

Sin[x] -> 1/2/I (Exp[x] - Exp[-x])
Cos[x] -> 1/2   (Exp[x] + Exp[-x])

So I want FullSimplify to retain Sin and Cos functions and to use trig identities, but no conversions to Exp.

Edit

Example as requested from a comment:

Cos[2 B g t] Sin[u]^2 - I Sin[2 B g t] Sin[u]^2

In this formula, I want FullSimplify not to convert Cos[2 B g t] - I Sin[2 B g t] to Exp[-2IBgT].

$\endgroup$
  • 1
    $\begingroup$ A small example that shows the problem you have? $\endgroup$ – Nasser Feb 22 '14 at 11:40
  • $\begingroup$ @Nasser example given. $\endgroup$ – The Quantum Physicist Feb 22 '14 at 12:19
  • $\begingroup$ Simplify[TrigReduce[s]] gives (Cos[2 B g t] - I Sin[2 B g t]) Sin[u]^2 but this might not generalize without more testing... $\endgroup$ – Nasser Feb 22 '14 at 12:25
  • $\begingroup$ @Nasser This occurred to me actually, but is this as powerful as FullSimplify[] in everything? I mean I could probably need more functions that are not available in Simplify[]. $\endgroup$ – The Quantum Physicist Feb 22 '14 at 12:27
1
$\begingroup$

Given:

 expr = Cos[2 B g t] Sin[u]^2 - I Sin[2 B g t] Sin[u]^2

... one approach is:

 FullSimplify[expr, ExcludedForms -> {Cos[_], Sin[_]}]

(Cos[2 B g t] - I Sin[2 B g t]) Sin[u]^2


Another approach worth exploring is to use a custom ComplexityFunction, as per:

FF[ee_] := 1000 Count[ee, _Exp, {0, Infinity}] + LeafCount[ee] 

FullSimplify[expr, ComplexityFunction -> FF]

Alas, the latter is not working as I might have expected, which is perhaps of interest in its own right.

$\endgroup$

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.