Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?

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?

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?