Question

I'm given the instruction:

Create a dynamic 2-D plot of:

e^(-a x) where 0<=x<=1 With a continuous slider for a where 0<=a<=10

So I enter:

Manipulate[
  Plot[e^(-ax), {x,0,1}],
  {a,0,10}
]

but the result is an empty graph. However,

Plot[e^(-x), {x,0,1}]

works just fine. Can someone help me understand what I'm doing wrong? I believe I'm using the manipulate function according to the documentation.

Was it helpful?

Solution

I haven't tested this but your expression e^(-ax) looks to me as if it ought to be e^(-a*x) -- ax is a two-letter name, you need either a multiplication sign or a space to tell Mathematica that you mean -a*x.

Close inspection of your instruction shows a space between -a and x.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top