Hello.

I would like to define a function which is given by the evaluation of an 
integral.

More precisely, I want f(x) to be the integral between 0 and x of 
exp(t**2)dt

My first attempt is to create a function in the "python" sense of the term :

---------------------------
var('x,t')
def f(x):
     return numerical_integral( exp(t**2),0,x )[0]
numerical_approx(f(1))
---------------------------
That works, no problems


The problem is when I want to have a function in the "Sage" sense of the 
term
---------------------------
g(x)=numerical_integral( exp(t**2),0,x )[0]
---------------------------

I got the following error message.
Traceback (click to the left for traceback)
...
TypeError: float() argument must be a string or a number

My aim is to do
solve(g(x)=0.5)
for example.

Any ideas ?
Have a good night
Laurent

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to