ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 10 Jul 2014 07:42:14 -0500Plotting an integral with a variable as a limithttp://ask.sagemath.org/question/8820/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.tom12519Wed, 28 Mar 2012 10:52:02 -0500http://ask.sagemath.org/question/8820/Replace a variable with a functionhttp://ask.sagemath.org/question/23340/replace-a-variable-with-a-function/ Hello i hope anyone can help me with the following problem.
i have the following code
T_w,y,T_m,k_f,rho_f,U_0,h_mstar,R, alpha, delta, Phi = var('T_w y T_m k_f rho_f U_0 h_mstar R alpha delta Phi')
T=T_w+y*(-2*(T_w-T_m)/delta+rho_f*U_0*h_mstar*cos(Phi)/k_f)+y^2*((T_w-T_m)/delta^2-rho_f*U_0*h_mstar*cos(Phi)/(k_f*delta))
u=-6*U_0*R*y*(y-delta)*sin(Phi)/delta^3
integralTu=integrate(T*u,y,0,delta)
now i would like to differentiate integralTu with respect to x (diff(integralTu,x)), but delta must be a function of x (i first defined it as a variable because of the integration).tetraederThu, 10 Jul 2014 07:42:14 -0500http://ask.sagemath.org/question/23340/Turn off convergence checking - "formal" integrationhttp://ask.sagemath.org/question/9332/turn-off-convergence-checking-formal-integration/Apologies if something like this has been posted already - I have not found it.
I would like to be able to compute "formal integrals" of functions f(t,x) with respect to x, without having to use assume() to put restrictions on x. In particular, I want to compute `integral(e^(-t)*f,t,0,infinity)`. For example, right now if I try
`integrate(e^(-t)*e^(x*t),t,0,infinity)`
I need to `assume(x < 1)` for it to work. This is fine for simple integrals, but if the function f is more complicated, using `assume()` becomes annoying. I'd like to be able to use a formal integral so that `integrate(e^(-t)*e^(t*f),t,0,infinity)` returns `1/(1 - f)` whenever `f` is a function only of x, without needing to use `assume()` - or an equivalent function.
Thanks!
Edit: It occurred to me that just using integrate(f,t).subs(t=0) seems to work some of the time. I'd still like a better way, though
lordpoochieThu, 20 Sep 2012 07:05:44 -0500http://ask.sagemath.org/question/9332/