On Oct 27, 2008, at 1:02 PM, Martin Rubey wrote:
> "David Joyner" <[EMAIL PROTECTED]> writes:
>
>> On Mon, Oct 27, 2008 at 1:59 PM, Martin Rubey
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Dear William,
>>>
>>> thanks for your quick answer, even though it doesn't make me too
>>> happy. I'm
>>> having a hard time here, I must admit.
One thing to keep in mind is that Sage is not just a CAS. In fact,
this is one of the areas that needs the most work, so thanks for your
feedback in making things better.
>>> So far I thought that sage would do
>>> most things out of the box, and it's only inconsistent (eg.,
>>> arguments to plot,
>>> plot3d and integrate vary wildly. There are several functions
>>> plot, plot3d,
>>> contour_plot, parametric_plot, etc. and not only one that decides
>>> on the type
>>
>>
>> I don't see the problem in having more than one function name for
>> plotting.
>
> Well, the problem is namespace pollution. Already now, if I hit
> tab after x, I
> get roughly 100 possible completions. In a strongly typed
> environment, this is
> unnecessary. I do not see any benefit in having more than one name
> to do one
> thing. Of course, if the argument types are the same you will
> probably need to
> have several functions.
>
>> Actually I think I agree with you about one (easily fixed)
>> problem, since the
>> various plot functions might be hard to find. It would be nice for
>> all
>> plotting functions to start with plot (eg, plot_parametric could
>> be an alias
>> for parametric_plot), so the variations can be found by tab
>> completion.
>
> Oh no, more namespace pollution :-)
I think that namespace pollution is an issue, but having the plot_xxx
options actually helps. It's a question of how easily one can use the
tab key to get the command one wants.
>
>>> Is there a way to obtain a power series solution to a
>>> differential equation?
>>
>> David Harvey implemented something for 1st order linear DEs of the
>> form
>> y'=ay+b:
>>
>> sage: R.<t> = PowerSeriesRing(QQ, default_prec=10)
>> sage: a = 2 - 3*t + 4*t^2 + O(t^10)
>> sage: b = 3 - 4*t^2 + O(t^7)
>> sage: a.solve_linear_de(prec=5, b=b, f0=3/5)
>> 3/5 + 21/5*t + 33/10*t^2 - 38/15*t^3 + 11/24*t^4 + O(t^5)
>
>>> Is there a way to solve an ODE?
>>>
>>> (ideally, without resorting to maxima or fricas syntax...)
>>
>> Yes, in the 1st or 2nd order linear cases, but the methods call
>> Maxima:
>>
>> sage: x = var('x')
>> sage: y = function('y', x)
>> sage: desolve(diff(y,x) + y - 1, y)
>> e^(-x)*(e^x + c)
>> sage: f = desolve(diff(y,x) + y - 1, y, ics=[10,2]); f
>> e^(-x)*(e^x + e^10)
>> sage: plot(f)
>>
>> See calculus/desolvers for more details/examples. Hats off to
>> Robert Bradshaw for this.
>
> Ah, great. That's exactly what I was looking for (except, why is
> it called
> desolve and not solve, so I can find it...?) And why is it a
> function?
Solve means something different. It would be odd to change the
behavior of solve to be "solve this diff eq" rather than "solve for
this variable" whenever a derivative is present.
We should probably make this a method as well. The desolve would
check to see if such method exists on its first argument. Sometimes,
especially for calculus-like applications, functional notation is
more natural.
- Robert
--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---