1 | initial version |
Here is an example you can look at.
http://www.sagenb.org/home/pub/1927/
2 | No.2 Revision |
Here is an example you can look at.
http://www.sagenb.org/home/pub/1927/
Edit: If you need to preload the function use the following link
http://ask.sagemath.org/question/1072/preload-defined-functions-for-later-use
3 | No.3 Revision |
Here is an example you can look at.
http://www.sagenb.org/home/pub/1927/
Edit: If you need to preload the function use the following link
http://ask.sagemath.org/question/1072/preload-defined-functions-for-later-use
Edit2:
Sorry for the delay. Here is the full solution to your question
def changevar(f, eqn, newvar):
dx = diff(eqn.rhs(),newvar)
return f.substitute(eqn)*dx
var('u')
assume(x>0)
xmin=0
xmax=2
eqn=sqrt(u-1)
limits(x)=solve(eqn==x,u)[0].rhs()
limits(2)
ans=changevar(x*cos(x^2+1), x==eqn, u)
integrate(ans,(u,limits(xmin),limits(xmax))).n()