Exponentiation makes a formula go crazy?
Hi guys,
I'm new to Sage, so I hope that somebody will help me, because I've been wasting a whole day tring to fix a (relatively) simple plot that just won't work. Here's the code:
k = var('k')
f(x) = (1 - e ^ (- (k *33 * x) / 1024)) ^ k
g(y) = sum(f(x),x,y,15)
h(z) = f(z) - g(z+1)
plot([h(l) for l in range(1,15)], (k,10,15))
It fails saying (after a lot of other things): ValueError: Variable 'x' not found
Now, I believe the error is in the f(x) formula, because if I cahge it to something simpler, but still with x and k I get the correct result and it plots. But why is the one above not working? Does it have something to do with the exponentiation?
Thank you so much for any clue on what's wrong!