Hi,
I'm having problem with the code below,
var('x t'); k=1.38*(10**-23) ; e1=0 ; e2 =170*k ; na=6.02*(10**23)
a=0.1
assume(x>a)
u=1
n=1 + floor(u)
def DaRL(y,u):
return (1/gamma(n-u))*diff(integral(y/((x-t)**(u-n+1)),t,a,x),x,n)
z=exp(-e1/(k*t)) + 3*exp(-e2/(k*t))
f=-t*k*log(z)
s=-diff(f,t)
somat=sum( (((t-a)**k)/factorial(k))*((derivative(s,t,k)).limit(t=a)) for k in [0..(u-1)])
Dcaputo=DaRL((s-somat),u) ; Dcaputo
Which, in this case, is the same as
var('x t'); k=1.38*(10**-23) ; e1=0 ; e2 =170*k ; na=6.02*(10**23)
z=exp(-e1/(k*t)) + 3*exp(-e2/(k*t))
f=-t*k*log(z)
s=-diff(f,t)
Dcaputo=Diff(s,t) ; Dcaputo , changing the variable 't' to 'x'. If we put s=sin(t);cos(t); t; 1; or any function with a known derivative it works.
But it's not working the way it should and I don't understand. When I ask Sage to do the code, Sage gives me this
Traceback (most recent call last): def DaRL(y,u):
File "", line 1, in <module>
File "/tmp/tmpQtIbpd/___code___.py", line 18, in <module>
exec compile(u'Dcaputo=DaRL((s-somat),u) ; Dcaputo
File "", line 1, in <module>
File "/tmp/tmpQtIbpd/___code___.py", line 10, in DaRL
return (_sage_const_1 /gamma(n-u))*diff(integral(y/((x-t)**(u-n+_sage_const_1 )),t,a,x),x,n)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/misc/functional.py", line 740, in integral
return x.integral(*args, **kwds)
File "expression.pyx", line 9302, in sage.symbolic.expression.Expression.integral (sage/symbolic/expression.cpp:38413)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 688, in integrate
return definite_integral(expression, v, a, b)
File "function.pyx", line 429, in sage.symbolic.function.Function.__call__ (sage/symbolic/function.cpp:5064)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 173, in _eval_
return integrator(*args)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py", line 21, in maxima_integrator
result = maxima.sr_integral(expression, v, a, b)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 746, in sr_integral
raise error
RuntimeError: ECL says: In function GCD, the value of the second argument is
1.0
which is not of the expected type INTEGER
I don't know what this means. Can anyone give me a clue?
Thanks.