I think whatever smart parsing we implement should be implemented  
right in sympify, that way we can benefit from it in regular SymPy  
too.  Maybe we could add a flag to sympify to only work strictly to  
convert stuff to sympy expressions with python syntax like it does now  
and another option to be smart enough to handle implied multiply,  
implied function calls (like integrate x dx or sinx), the ability to  
recognize that something is a matrix (like [[1, 0], [0, 1]]), and so on.

As for showing steps for integration and so on, does anyone know if  
there are any general purpose algorithms for this?  It might make a  
good Google Summer of Code project.

Ondrej's idea for rewriting is the best.  Just call expand with the  
various options turned on or off and all of the functions in  
simplify.py and see if they change the expression.  If they do, show  
the result, otherwise, don't bother the user with them.

Aaron Meurer
On Oct 22, 2009, at 4:02 PM, Ondrej Certik wrote:

>
> On Thu, Oct 22, 2009 at 1:50 PM, Freddie Witherden
> <fred...@witherden.org> wrote:
>>
>> On Thursday 22 October 2009 01:34:24 Ondrej Certik wrote:
>>> I would like SymPy Gamma to be a really easy way to start playing  
>>> with
>>> sympy, first by typing some expression, get lots of info about it
>>> (e.g. some nice "input cells" ready to be modified), with links to
>>> documentation and possibly other sites on the internet etc. Also I
>>> would like it to be smoothly integrated with the web notebooks (e.g.
>>> the Sage notebook/codenode/ maybe our own stuff, we'll see -- I  
>>> don't
>>> want to implement everything that Sage already has, like code
>>> inspection etc., on the other hand I really like this essentially  
>>> zero
>>> barrier to start computing with sympy, or any other python library)
>>
>> I *really* like the idea. I think it will be both a good way to  
>> show off the
>> functionality of SymPy and also to help in getting useful feedback.
>
> Thanks for the feedback.
>
>>
>> A couple of random thought-chunks:
>>  * Wolfram Alpha can handle "integrate x dx" and examples where the  
>> explicit
>> variable to solve for is not present. Usually it is quite good at  
>> inferring
>> what one wants. Shall we look into writing a wrapper around Sympify  
>> for this
>> purpose?
>
> Yes, we should definitely do that. I think it will be quite hard to
> interpret the whole sentences, like wolfram alpha does, but at least
> things like "integrate sin(x) dx" and similar wouldn't not be that
> hard to parse, so we should do that for sure.
>
>>
>> * Alpha can often show steps for most calculations. This is  
>> sometimes useful
>> for integration and equation solving. However, it is incompatible  
>> with a lot
>> of the 'behind the scenes' stuff. Should we be interested in  
>> providing this
>> 'education style' functionality? (Interestingly, before Alpha the  
>> Ti-89/91
>> series of calculators offered this functionality.) With Alpha it  
>> works for some
>> very complicated integrals.
>
> Several people have asked about this, but I think the way sympy does
> things is not suited for a paper and pencil, e.g. it is very different
> to what one learns in the calculus class (e.g. both limits and
> integration are done differently). So this would be quite some work to
> implement.
>
>>
>> * On a similar theme it can also show alternative forms of trig  
>> expressions. I
>> find this *so* useful, as some of the transformations are often non- 
>> intuitive.
>> What would, API wise, be the best way of asking SymPy functions for
>> alternative forms.
>
> I think by calling rewrite with all kinds of different arguments.
> Essentially sympy gamma should try lots of different sympy functions
> and the expression and if it works (e.g. finishes and doesn't raise an
> exception), it should show it to the user.
>
>>
>> * I am not totally sure about notebook integration -- at least not  
>> directly. I
>> believe it would be great if this drives us to implement  
>> functionality needed
>> by notebooks, but most people use these kind of services for throw- 
>> away
>> calculations.
>
> The notebook integration would be optional, e.g. when you click on the
> input cell. If you don't need it, it should not obstruct in any way.
>
> My idea is that you throw some expression or calculation in, sympy
> gamma does it's best, then you refine it using the notebook (if you
> want) and then it should allow you to easily copy the resulting python
> script, so that you can continue in your terminal (or some web
> notebook). E.g. let's say you throw in a matrix, but you don't
> remember how to invert it. So you just copy what sympy gamma does and
> it will get you started quickly. It's like the mpl gallery
> (http://matplotlib.sourceforge.net/gallery.html), except that it would
> be interactive (thanks to the interactive cells).
>
> Ondrej
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to