Greetings,
I am in the process of converting calculus 3 assignments from
Mathematica to Sage and came upon an error I can't figure out.
Trying to find the mass of a region bounded by two functions(g1,g2)
with a given density. Below is the code,
x, y = var('x ,y')
density=e^(sqrt(x))+e^(y^2/2)
g1=e^(2*x)-1
g2=5-5*(x-1)^2
p=plot(g1,0,1)
p+=plot(g2,0,1,color='red')
show(p)
b=(g2-g1).find_root(.7,1.0,x)
a=(g2-g1).find_root(-.1,.2,x)
f=integral(density,y,g1,g2)
numerical_integral(f, a, b)
This results in a TypeError: float() argument must be a string or a
number
I have tried various changes and still the same error. My thought is
the error is due the error function that results from the first
integration. Am I missing something?
Mathematica gives 3954.63 using the NIntegrate command.
Thanks,
Jared
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
To unsubscribe from this group, send email to
sage-support+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.