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. 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. 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. > of self what to do. limit requires "x=x0" as second argument, and not "x==x0" > as would be natural for an equation. The syntax for lambda is completely > different to usual function definition - no parens for example. sage just > eats > all cpu time when I call contour_plot with an equation as self by mistake. In > general, it seems that functions are "dangerous", i.e., do little to no type > checking, but it's not at all clear when a method does the same thing as the > function, and when it is available at all (eg. contour_plot is not a method, > while plot is.) A general rule would be extremely helpful here. > > Sorry for the rant. I think it is useful having such comments from an experience CAS user, personally. > > More questions: > > 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. > > Many thanks, > > Martin > > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---