# Revision history [back]

### def f(x): evaluvates individually but not inside plot

Hi, I am stuck with a curious error. The code to reproduce error is given below. The function T basically integrates the function with a given value of L.

def T(L): return n(integral(4/sqrt(pi)*exp(-L)*(x^2)*exp(-x^2/4)/cosh(sqrt(L)*x),x,0,+Infinity))
plot(T,5,7)


The function T works fine if I ask

print T(5)


But it gives error, when i give the above mentioned plot command. What might be going wrong here?

 2 retagged tmonteil 27383 ●31 ●203 ●517 http://wiki.sagemath.o...

### def f(x): evaluvates individually but not inside plot

Hi, I am stuck with a curious error. The code to reproduce error is given below. The function T basically integrates the function with a given value of L.

def T(L): return n(integral(4/sqrt(pi)*exp(-L)*(x^2)*exp(-x^2/4)/cosh(sqrt(L)*x),x,0,+Infinity))
plot(T,5,7)


The function T works fine if I ask

print T(5)


But it gives error, when i give the above mentioned plot command. What might be going wrong here?

 3 retagged tmonteil 27383 ●31 ●203 ●517 http://wiki.sagemath.o...

### def f(x): evaluvates individually but not inside plot

Hi, I am stuck with a curious error. The code to reproduce error is given below. The function T basically integrates the function with a given value of L.

def T(L): return n(integral(4/sqrt(pi)*exp(-L)*(x^2)*exp(-x^2/4)/cosh(sqrt(L)*x),x,0,+Infinity))
plot(T,5,7)


The function T works fine if I ask

print T(5)


But it gives error, when i give the above mentioned plot command. What might be going wrong here?