Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Plotting an integral with a variable as a limit

I want to plot a function with a variable as a limit, e.g. look at \int_0^x f(y) d y, but this seems to throw an error when Sage can't analytically integrate the function.

x,y,=var('x y')
f(y)=integrate(x^x,x,1,y)
plot(f,2,10)

Returns

Traceback (click to the left of this block for traceback)
...
AttributeError: 'float' object has no attribute 'variables'

Can anybody help with this, please? Many thanks.

Plotting an integral with a variable as a limit

I want to plot a function with a variable as a limit, e.g. look at \int_0^x f(y) d y, but this seems to throw an error when Sage can't analytically integrate the function.

x,y,=var('x x,y=var('x y')
f(y)=integrate(x^x,x,1,y)
plot(f,2,10)

Returns

Traceback (click to the left of this block for traceback)
...
AttributeError: 'float' object has no attribute 'variables'
ValueError: free variable: x

Can anybody help with this, please? Many thanks.

Plotting an integral with a variable as a limit

I want to plot a function with a variable as a limit, e.g. look at \int_0^x f(y) d y, but this seems to throw an error when Sage can't analytically integrate the function.

x,y=var('x y')
f(y)=integrate(x^x,x,1,y)
plot(f,2,10)

Returns

Traceback (click to the left of this block for traceback)
...
ValueError: free variable: x

Can anybody help with this, please? Many thanks.

Plotting an integral with a variable as a limit

I want to plot a function with a variable as a limit, e.g. look at \int_0^x f(y) d y, but this seems to throw an error when Sage can't analytically integrate the function.

x,y=var('x y')
f(y)=integrate(x^x,x,1,y)
plot(f,2,10)

Returns

Traceback (click to the left of this block for traceback)
...
ValueError: free variable: x

Can anybody help with this, please? Many thanks.