Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

While there is this question with a very similar title, it does not answer my question, which is:

I have part of an input, in my case

Re[Exp[I*x]]

which Mathematica "simplifies" to

Cos[Re[x]]/E^Im[x]

So I am wondering how to tell Mathematica to leave this expression, whether it's alone or part of a longer formula, in its previous form rather than to change it as shown here.

Update

I should probably add I am still running version 6, hoping this is not causing the issue.

share|improve this question
    
I can not reproduce your problem. Re[Exp[I*x]] does not automatically simplify to anything. Evaluating it leaves it unchanged. Evaluating Re[Exp[I*x]] // Simplify doesn't change it either. –  m_goldberg Jul 15 '13 at 12:47
    
Maybe this is because I am still running Mathematica v6? But should it behave differently in such a way? If I evaluate Re[Exp[I*x]] in a new notebook, I get the above expression. –  Bernd Jul 15 '13 at 12:51
    
i agree with @m_goldberg, but if you want to suppress on the fly simplification from Mathematica enclose it in a HoldForm expression. Is that what you're asking for? –  Stefan Jul 15 '13 at 12:51
    
@Stefan, HoldForm might work but it seems be a little tricky to use in this case if I want to use the expression in a longer formula e.g. involving slots (#) where the evaluation must not be stopped. I was hoping there would be some solution of the form expression //SomeForm? –  Bernd Jul 15 '13 at 12:58
    
@Bernd what about Defer@Integrate[x^# Exp[-x], {x, 0, 1}]&/@Range[2] ? –  Stefan Jul 15 '13 at 13:07
show 3 more comments

1 Answer

up vote 1 down vote accepted

In case you want Mathematica to suppress on the fly simplification and having slots (#) involved, you might consider using Defer:

Defer@Integrate[x^# Exp[-x], {x, 0, 1}]&/@Range[2] 

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.