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.

I'm trying to plot the output of an integral, but the plot does not show. The axes show, but not the plot itself. I have tried what I felt was a reasonable range of axes values, but the result is the same. The following is what I'm working with:

function = Exp[I k x] C Exp[-a x^2];

Integrate[function, {x, -\[Infinity], \[Infinity]}]

ConditionalExpression[(C E^(-(k^2/(4 a))) Sqrt[\[Pi]])/Sqrt[a], 
 Re[a] > 0]

output = %;

Plot[output, {k, -10, 10}]

enter image description here

What is wrong here? Anyone have some suggestions on how to obtain the plot? I'm compelled to think there is some kind of 'automatic' range parameters that can be used with general plots, but I have not found anything in the Documentation center of Mathematica, nor have I found any FAQs here that I've found helpful either.

share|improve this question

closed as off-topic by Mr.Wizard Jan 10 at 10:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

2  
I'm almost sure I've seen several questions like these, but can't find them at the moment. –  Sjoerd C. de Vries Sep 27 '12 at 19:11
add comment

1 Answer 1

up vote 9 down vote accepted

It is because C and a are undefined; if they are set to something, a plot is obtained, e.g.

function = Exp[I k x] C Exp[-a x^2];
Integrate[function, {x, -\[Infinity], \[Infinity]}]
% /. {a -> 3, C -> 5}
Plot[%, {k, -10, 10}]

gives

Mathematica graphics

share|improve this answer
    
Thanks Renan... I wondered if that's what it was about, but I guess I assumed Mathematica would 'choose' generic values such that a basic plot would show within the parameters I gave to it. Thank You! –  fiz Sep 27 '12 at 19:06
    
@fiz you're welcome; if this solved the problem, please accept this answer. –  Renan Sep 27 '12 at 20:02
    
Hi Renan....Maybe this sounds dumb...I'm fine with your answer....but how do I 'Accept" your answer? Is that something specific? This is NOT a uer-friendly site to navigate in my opinion. I'm new....don't get to spend a lot of time here. –  fiz Sep 28 '12 at 0:39
    
@fiz read the FAQ: mathematica.stackexchange.com/faq#howtoask –  Renan Sep 28 '12 at 1:29
    
Thanks...got it. I'm a work in progress, now I need to go back to other questions I've asked and do this too. I was not aware and missed it in reading thru the site. –  fiz Sep 28 '12 at 12:26
add comment

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