[sage-support] Re: Numerical integration and parametic curves

2014-09-14 Thread Emmanuel Charpentier
Huh... cos(pi/u^2/2), first expression of your problem, has not, indeed, an explicit solution that sage is able to find. but, on your following attempts, you reach for the integral of cos(pi*x^2/2), a horse of a different color (which is the one racing in Wikipedia pages on Euler spiral) :

[sage-support] Re: Numerical integration and parametic curves

2014-09-10 Thread Volker Braun
The s = var('s') is not necessary (the argument s inside the functions shadows it). As for the original question, IMHO there is a learning opportunity here. Numerical integration is powerful, but it doesn't give you symbolic answers. Even if you make the integration bound a symbolic variable.

[sage-support] Re: Numerical integration and parametic curves

2014-09-10 Thread Hal Snyder
Appreciate the pointers. Plot statement in prior posting could also be parametric_plot((g,h),(-pi,pi)) which has a nicer default aspect ratio. BTW there is sage code for Cornu spiral in the wikipedia article, Euler spiral http://en.wikipedia.org/wiki/Euler_spiral. On Wednesday, September

[sage-support] Re: Numerical integration and parametic curves

2014-09-09 Thread Hal Snyder
This works on my sage-6.1.1: s = var('s') def g(s): return numerical_integral(cos(pi*x^2/2), 0, s, max_points=100)[0] def h(s): return numerical_integral(sin(pi*x^2/2), 0, s, max_points=100)[0] p = plot((g,h),(-pi,pi),parametric=True) show(p) On Tuesday, September 9, 2014 5:17:14 PM