Google Summer of Code 2009

6 views
Skip to first unread message

asmeurer

unread,
Mar 13, 2009, 11:03:30 PM3/13/09
to sympy
Hello. My name is Aaron Meurer, and I would be interested in applying
to work with sympy under the Google Summer of Code 2009. I am
currently a student at New Mexico Tech and am doubling majoring in
Mathematics and Computer Science, and, as such, sympy looked like it
would be a good project for me. Of the project ideas that are listed
for sympy, the one that looked the most interesting to me was the
differential equations project. I am currently taking Math 335
Ordinary Differential Equations.

I looked at the section of the sympy source that deals with solving
differential equations and I must say that there is much potential
work. So far it only solves first order linear equations and
equations of the type a*y''+b*y+c=0. It doesn't even support simple
separable equations! And not to mention Bernoulli, nth order
homogeneous, homogeneous (the other meaning), exact... The list goes
on. This would be a good project because I could implement a little
or a lot and it would still be complete (e.g., I could implement all
of those things or just end up implementing separable and
homogeneous), allowing for it to be difficult or easy for me.

I have never developed for open source before, but I think that this
would be a great opportunity to learn what it is like.

Ondrej Certik

unread,
Mar 16, 2009, 9:08:48 PM3/16/09
to sy...@googlegroups.com
Hi Aaron!

On Fri, Mar 13, 2009 at 8:03 PM, asmeurer <asme...@gmail.com> wrote:
>
> Hello.  My name is Aaron Meurer, and I would be interested in applying
> to work with sympy under the Google Summer of Code 2009.  I am
> currently a student at New Mexico Tech and am doubling majoring in
> Mathematics and Computer Science, and, as such, sympy looked like it
> would be a good project for me.  Of the project ideas that are listed
> for sympy, the one that looked the most interesting to me was the
> differential equations project.  I am currently taking Math 335
> Ordinary Differential Equations.

Thanks for your interest and sorry for my late reply. We just spent 3
full days hacking on sympy with Luke, I'll post a blog about it soon.

>
> I looked at the section of the sympy source that deals with solving
> differential equations and I must say that there is much potential
> work.  So far it only solves first order linear equations and

Indeed.

> equations of the type a*y''+b*y+c=0.  It doesn't even support simple
> separable equations! And not to mention Bernoulli, nth order
> homogeneous, homogeneous (the other meaning), exact... The list goes

Yes, it's very embarrassing. :)

> on.  This would be a good project because I could implement a little
> or a lot and it would still be complete (e.g., I could implement all
> of those things or just end up implementing separable and
> homogeneous), allowing for it to be difficult or easy for me.

That'd be really great. My roommate is also teaching differential
equations, so I know that it would be handy to be able to solve any
equation from the book.

>
> I have never developed for open source before, but I think that this
> would be a great opportunity to learn what it is like.

Absolutely! SymPy contains lots of contributions from people that have
never contributed to any opensource project before. All code has to be
reviewed, so we'll help you prepare the patches in the way, so that it
could be pushed in.

Looking forward,
Ondrej

asmeurer

unread,
Mar 16, 2009, 10:15:28 PM3/16/09
to sympy
Great! Is there anything that I should do before the 18th when the
mentoring organizations are accepted (assuming you get to reply by
then :) ). Google does not have the information on applying up yet,
so I am not exactly sure what I will need. From what I've read an
various websites linked to on the main gsoc page, I will need some
kind of application for the idea, as well as some kind of a résumé.

Also, some sites that I have looked at recommend proposing a couple of
ideas. Would you recommend that? There is little on the ideas page
that I would feel qualified doing, as most of it involves higher math
than I have taken yet. There are some that I could do (such as Maple
integration, as I own Maple and am somewhat decent with it), but the
differential equation one looks the most interesting and fun to me by
far. I am also currently taking Basic Concepts of Math (352),
Discrete Math and Formal Logic (221), and Vector Analysis (332), and
have taken up to Calc. 3, if you think I missed something.

Lastly, some sites mentioned that some mentoring organizations require
a timeline. Will you be wanting that? Like I said, with this
project, I could do a lot or a little and still add useful code to the
project, and I really have no idea how long any of this will take for
me to code. And depending on how I do it, I could complete different
amounts of things. For example, I could focus on different methods of
substitution that convert a differential equation into a type that can
be solved, or I could focus on implementing as many different distinct
types of differential equations as possible.

Oh, and I seem to have made a typo in my last post. I meant to type
a*y''+b*y'+c*y=0 (although technically the kind I typed in should be
currently solvable, assuming the sympy expression matcher recognizes
it as -a/c*y''+0*y'-b/c*y=0. )

Ondrej Certik

unread,
Mar 16, 2009, 10:43:00 PM3/16/09
to sy...@googlegroups.com
On Mon, Mar 16, 2009 at 7:15 PM, asmeurer <asme...@gmail.com> wrote:
>
> Great!  Is there anything that I should do before the 18th when the
> mentoring organizations are accepted (assuming you get to reply by

You can get involved more with the sympy project, more below.

> then :) ).  Google does not have the information on applying up yet,
> so I am not exactly sure what I will need.  From what I've read an
> various websites linked to on the main gsoc page, I will need some
> kind of application for the idea, as well as some kind of a résumé.

Yes, you will be writing an application. Search archives of this list
to find examples of applications from 2008 and 2007.

>
> Also, some sites that I have looked at recommend proposing a couple of
> ideas.  Would you recommend that?  There is little on the ideas page
> that I would feel qualified doing, as most of it involves higher math
> than I have taken yet.  There are some that I could do (such as Maple
> integration, as I own Maple and am somewhat decent with it), but the
> differential equation one looks the most interesting and fun to me by
> far.  I am also currently taking Basic Concepts of Math (352),
> Discrete Math and Formal Logic (221), and Vector Analysis (332), and
> have taken up to Calc. 3, if you think I missed something.

There are lots of things that you can do with your level of math that
are very needed. For example code generation to C needs improvements
and testing.

Or just search through our issues:

http://code.google.com/p/sympy/issues/list

and easy to fix issues:

http://code.google.com/p/sympy/issues/list?q=label:EasyToFix

to get an idea which areas of sympy need improvements.

>
> Lastly, some sites mentioned that some mentoring organizations require
> a timeline.  Will you be wanting that?  Like I said, with this
> project, I could do a lot or a little and still add useful code to the
> project, and I really have no idea how long any of this will take for
> me to code.  And depending on how I do it, I could complete different
> amounts of things.  For example, I could focus on different methods of
> substitution that convert a differential equation into a type that can
> be solved, or I could focus on implementing as many different distinct
> types of differential equations as possible.

Yes, we do. We also require each applicant to post at least one patch
to sympy, that gets reviewed and accepted, so that we can see that you
will be able to learn how to contribute.

I suggest you pick some differential equation that sympy cannot solve
and send us a patch fixing it (you will have to do it anyway). That
way you will see first hand how much work it is and then you can
estimate how much time you need for the whole project.

As to the project, I suggest you pick some algorithm (that could be
used to solve lots of differential equations) that you could implement
and test. One example is variation of constants:

http://en.wikipedia.org/wiki/Method_of_variation_of_parameters

And there are others. Then you would build your project around such
algorithm, e.g. it would be the core part of it and you would make
sure it works and then implement some special cases.

Another approach is to go through your differential equations textbook
and think what algorithms you need to implement to be able to solve
all equations.

In general, you are given a free hand at what to propose. We (not just
sympy but I think gsoc in general) are looking for projects that we
can see that you will be able to finish in the summer, e.g. that it is
not just words, but you can actually deliver the result. Some working
prototype is a big plus.

So my suggestion is -- dive in right now and try to implement some solvers.

Ondrej

Robert Kern

unread,
Mar 16, 2009, 11:02:20 PM3/16/09
to sy...@googlegroups.com
On Mon, Mar 16, 2009 at 21:43, Ondrej Certik <ond...@certik.cz> wrote:

> As to the project, I suggest you pick some algorithm (that could be
> used to solve lots of differential equations) that you could implement
> and test. One example is variation of constants:
>
> http://en.wikipedia.org/wiki/Method_of_variation_of_parameters
>
> And there are others. Then you would build your project around such
> algorithm, e.g. it would be the core part of it and you would make
> sure it works and then implement some special cases.

Joel S. Cohen's _Computer Algebra and Symbolic Computation: Elementary
Algorithms_ describes an algorithm along these lines and gives
references which should help implement the special cases:

http://web.cs.du.edu/~jscohen/ElementaryAlgorithms/

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco

asmeurer

unread,
Mar 16, 2009, 11:10:52 PM3/16/09
to sympy


On Mar 16, 8:43 pm, Ondrej Certik <ond...@certik.cz> wrote:
> On Mon, Mar 16, 2009 at 7:15 PM, asmeurer <asmeu...@gmail.com> wrote:
>
> > Great!  Is there anything that I should do before the 18th when the
> > mentoring organizations are accepted (assuming you get to reply by
>
> You can get involved more with the sympy project, more below.
>
> > then :) ).  

I guess you will be replying before then!


> Yes, you will be writing an application. Search archives of this list
> to find examples of applications from 2008 and 2007.
>
OK, I will do that.

>
> There are lots of things that you can do with your level of math that
> are very needed. For example code generation to C needs improvements
> and testing.

This is one of the ones I glossed over because I didn't know what it
was. Could you explain what this means.
>
> Or just search through our issues:
>
> http://code.google.com/p/sympy/issues/list
>
> and easy to fix issues:
>
> http://code.google.com/p/sympy/issues/list?q=label:EasyToFix
>
> to get an idea which areas of sympy need improvements.
>
>
I will look there too.
>
> Yes, we do. We also require each applicant to post at least one patch
> to sympy, that gets reviewed and accepted, so that we can see that you
> will be able to learn how to contribute.
>
> I suggest you pick some differential equation that sympy cannot solve
> and send us a patch fixing it (you will have to do it anyway). That
> way you will see first hand how much work it is and then you can
> estimate how much time you need for the whole project.
>

I think that I could try Bernoulli for a start, since it is can be
solved generally much like linear can be (see the sympy code for
linear equations to see what I am talking about). Hopefully I can
figure out the matcher and solver functions.
However, as you could probably tell from the classes I am taking
(those in addition to my computer science class), I will have limited
time to work on sympy before the summer time. Nonetheless, I will try
to do some of what you have said.


> As to the project, I suggest you pick some algorithm (that could be
> used to solve lots of differential equations) that you could implement
> and test. One example is variation of constants:
>
> http://en.wikipedia.org/wiki/Method_of_variation_of_parameters
>
> And there are others. Then you would build your project around such
> algorithm, e.g. it would be the core part of it and you would make
> sure it works and then implement some special cases.
>
> Another approach is to go through your differential equations textbook
> and think what algorithms you need to implement to be able to solve
> all equations.

I will have to think about this. As I have said, I am only half way
through the class, but from what I can tell, most of what I have yet
to learn requires transformations (which according to your ideas list
aren't implemented yet), are numerical solution techniques, or relate
to solving systems of differential equations (I think I should focus
on solving just one differential equation, since it hardly makes since
to try solving systems if the engine cannot even solve single
equations anyway).

By the way, if you are interested, this is the website of my ODE
class: http://infohost.nmt.edu/~jstarret/TeachingSpring2009/335/335Spring2009.html

My professor teaches the class in Maple. There is also a link to the
textbook that I own there too.

Ondrej Certik

unread,
Mar 16, 2009, 11:49:51 PM3/16/09
to sy...@googlegroups.com
On Mon, Mar 16, 2009 at 8:10 PM, asmeurer <asme...@gmail.com> wrote:
>
>
>
> On Mar 16, 8:43 pm, Ondrej Certik <ond...@certik.cz> wrote:
>> On Mon, Mar 16, 2009 at 7:15 PM, asmeurer <asmeu...@gmail.com> wrote:
>>
>> > Great!  Is there anything that I should do before the 18th when the
>> > mentoring organizations are accepted (assuming you get to reply by
>>
>> You can get involved more with the sympy project, more below.
>>
>> > then :) ).
>
> I guess you will be replying before then!
>
>
>> Yes, you will be writing an application. Search archives of this list
>> to find examples of applications from 2008 and 2007.
>>
> OK, I will do that.
>
>>
>> There are lots of things that you can do with your level of math that
>> are very needed. For example code generation to C needs improvements
>> and testing.
>
> This is one of the ones I glossed over because I didn't know what it
> was.  Could you explain what this means.

In [1]: ccode?
Type: function
Base Class: <type 'function'>
String Form: <function ccode at 0x9182c6c>
Namespace: Interactive
File: /home/ondra/repos/sympy/sympy/printing/ccode.py
Definition: ccode(expr)
Docstring:
Converts an expr to a string of c code

Works for simple expressions using math.h functions.

>>> from sympy import *
>>> from sympy.abc import *

>>> ccode((2*tau)**Rational(7,2))
'8*pow(2,(1/2))*pow(tau,(7/2))'


>>
>> Or just search through our issues:
>>
>> http://code.google.com/p/sympy/issues/list
>>
>> and easy to fix issues:
>>
>> http://code.google.com/p/sympy/issues/list?q=label:EasyToFix
>>
>> to get an idea which areas of sympy need improvements.
>>
>>
> I will look there too.
>>
>> Yes, we do. We also require each applicant to post at least one patch
>> to sympy, that gets reviewed and accepted, so that we can see that you
>> will be able to learn how to contribute.
>>
>> I suggest you pick some differential equation that sympy cannot solve
>> and send us a patch fixing it (you will have to do it anyway). That
>> way you will see first hand how much work it is and then you can
>> estimate how much time you need for the whole project.
>>
>
> I think that I could try Bernoulli for a start, since it is can be
> solved generally much like linear can be (see the sympy code for
> linear equations to see what I am talking about).  Hopefully I can
> figure out the matcher and solver functions.

That's a good idea to try to figure it out, because this is what you
will be doing the whole summer. :)

> However, as you could probably tell from the classes I am taking
> (those in addition to my computer science class), I will have limited
> time to work on sympy before the summer time.  Nonetheless, I will try
> to do some of what you have said.
>
>
>> As to the project, I suggest you pick some algorithm (that could be
>> used to solve lots of differential equations) that you could implement
>> and test. One example is variation of constants:
>>
>> http://en.wikipedia.org/wiki/Method_of_variation_of_parameters
>>
>> And there are others. Then you would build your project around such
>> algorithm, e.g. it would be the core part of it and you would make
>> sure it works and then implement some special cases.
>>
>> Another approach is to go through your differential equations textbook
>> and think what algorithms you need to implement to be able to solve
>> all equations.
>
> I will have to think about this.  As I have said, I am only half way
> through the class, but from what I can tell, most of what I have yet
> to learn requires transformations (which according to your ideas list
> aren't implemented yet),

Not sure what you mean here, but transformations are easy to
implement, just take an expression and differentiate it.

> are numerical solution techniques, or relate
> to solving systems of differential equations (I think I should focus
> on solving just one differential equation, since it hardly makes since
> to try solving systems if the engine cannot even solve single
> equations anyway).

Btw, this reminds me that recently we implemented a finite element
method solver for 1D equations in my group at UNR:

http://groups.google.com/group/hpfem/browse_thread/thread/d132ba50fe2a7e08

What's different to regular FEM solvers is that it allows to assign
the initial conditions at the beginning of the interval, e.g. like the
rk4 method. When we polish it more and implement hp-FEM adaptivity, I
am very curious how it's going to perform with comparison to regular
adaptive ode solvers, like the one in scipy.

So if you are interested in numerical solvers, we are always looking
for new collaborators, our page is: hpfem.org

>
> By the way, if you are interested, this is the website of my ODE
> class:  http://infohost.nmt.edu/~jstarret/TeachingSpring2009/335/335Spring2009.html
>
> My professor teaches the class in Maple.  There is also a link to the
> textbook that I own there too.

Ondrej

asmeurer

unread,
Mar 17, 2009, 12:14:49 AM3/17/09
to sympy
Laplace transforms are on your ideas list. Pardon me if I am slightly
ignorant, as we have just started learning about these, but part the
thing that makes Laplace transforms so great for solving ODEs is that
taking the Laplacian of a differential gives you back the initial
conditions of the function (assuming the solution doesn't grow faster
than e^x). So far, dsolve doesn't even include a way to include
initial conditions (another thing to implement). But yes, taking the
Laplacian of a regular function should be as simple as plugging it
into the definition, assuming sympy's integration engine can support
it (which it usually should, as most are just integration by parts
with simple improper limits).

But never mind that. I think that I could fill a whole summer just
implementing what I have already learned, especially considering
things like variation of parameters and substitutions.

I tried implementing that patch, but so far I am having a couple of
stumbling blocks. Pardon me again if I sound ignorant, but as I have
said, I have never worked with an open source project before. I have
also had very little experience with modules (basically, I was taught
them, but I have never tried to make any, and so I have forgotten how
they work).

My problem is this: how do I edit the source so I can test it. So
far, the only way I can see to do this is to reinstall with setup.py
each time I make an edit, then reload python. Aside from having many
steps, this forces me to overwrite my released version of sympy with
the version that I am working on, which I don't necessarily want to
do. Is there a way I can test this from a separate directory. By the
way, I am running Mac OS X 10.5.

Also, as I predicted, I am having difficulties understanding the match
function that the ODE solving functions use. How exactly does this
work? As far as I can tell, it returns a dictionary of the variables
of the function, but what are these set to. I probably could figure
this one out, but as I said above, I currently don't know how to test
this very efficiently.

And of course, if I actually manage to churn out something that works,
I have no idea how to submit it.

Sorry about all that.

Aaron

Ondrej Certik

unread,
Mar 17, 2009, 12:33:18 AM3/17/09
to sy...@googlegroups.com

You can either install all the time and there are some convenience
tools for that, e.g. setuptools inplace. I myself just develop in the
tree, e.g. just download the git version of sympy and "import sympy".

You execute tests using

bin/test sympy

>
> Also, as I predicted, I am having difficulties understanding the match
> function that the ODE solving functions use.  How exactly does this
> work?  As far as I can tell, it returns a dictionary of the variables
> of the function, but what are these set to.  I probably could figure
> this one out, but as I said above, I currently don't know how to test
> this very efficiently.

Just create a simple python script that imports sympy, put it into the
sympy root directory and you can experiment. Or use ipython.

>
> And of course, if I actually manage to churn out something that works,
> I have no idea how to submit it.

http://docs.sympy.org/sympy-patches-tutorial.html#quick-start

O.

asmeurer

unread,
Mar 18, 2009, 9:12:04 PM3/18/09
to sympy
I saw that sympy did not make it as a mentoring organization for
Google Summer of Code 2009 and I will have to apply under the auspices
of Python. Will this change any of the requirements that you mentioned
above?

By the way, I am coming along fine with that Bernoulli patch although
it is going slow because I am learning the system (sympy, python
modules, get) and because I am busy with homework. I currently have
the code written, I just need to figure out how to use git so I can
upload it.

Ondrej Certik

unread,
Mar 18, 2009, 9:25:05 PM3/18/09
to sy...@googlegroups.com
On Wed, Mar 18, 2009 at 6:12 PM, asmeurer <asme...@gmail.com> wrote:
>
> I saw that sympy did not make it as a mentoring organization for
> Google Summer of Code 2009 and I will have to apply under the auspices
> of Python. Will this change any of the requirements that you mentioned
> above?

No, it doesn't change anything. Everything that I wrote stays.

>
> By the way, I am coming along fine with that Bernoulli patch although
> it is going slow because I am learning the system (sympy, python
> modules, get) and because I am busy with homework.  I currently have
> the code written, I just need to figure out how to use git so I can
> upload it.

Excellent, great job. Follow the link I posted to learn git.

Ondrej

asmeurer

unread,
Mar 18, 2009, 10:18:54 PM3/18/09
to sympy
OK, if it did it correctly, I sent a patch via git with Bernoulli
equations added to the source. By the way, I must say that that guide
to git was well written. Good job with that.

I was wondering, should the test file be updated with tests for the
new types of ODE's that I implement or should that wait until the
patch is accepted?

For now, I will be focusing on my application (as well as my school
work), but now that I know how to patch the system, I might fix a few
of those easy bugs you linked to.

Ondrej Certik

unread,
Mar 18, 2009, 10:54:59 PM3/18/09
to sy...@googlegroups.com
On Wed, Mar 18, 2009 at 7:18 PM, asmeurer <asme...@gmail.com> wrote:
>
> OK, if it did it correctly, I sent a patch via git with Bernoulli
> equations added to the source.  By the way, I must say that that guide
> to git was well written.  Good job with that.

Thanks!

>
> I was wondering, should the test file be updated with tests for the
> new types of ODE's that I implement or should that wait until the
> patch is accepted?

The patch will not be accepted without tests, so yes, the tests should
be updated.

You should see your mail in sympy-patches. If you don't, your mail
client may not work. In this case, just attach the files generated
with "git format-patch" to some issue in our bug tracker.

>
> For now, I will be focusing on my application (as well as my school
> work), but now that I know how to patch the system, I might fix a few
> of those easy bugs you linked to.

Excellent!

Ondrej

asmeurer

unread,
Mar 18, 2009, 11:03:04 PM3/18/09
to sympy
> The patch will not be accepted without tests, so yes, the tests should
> be updated.

OK. Is there a way to edit my patch somehow or should I just
resubmit? And if resubmit, should I resubmit the whole thing, or just
the test?

Also, are there any guidelines on tests that I should know about?
Obviously, the test should work, but other than that? I was just going
to just find a sample Bernoulli equation from my text and add it in
the same way that the other tests are implemented.

> You should see your mail in sympy-patches. If you don't, your mail
> client may not work. In this case, just attach the files generated
> with "git format-patch" to some issue in our bug tracker.

I see it now. My mail client was marking it as junk.

Ondrej Certik

unread,
Mar 18, 2009, 11:58:54 PM3/18/09
to sy...@googlegroups.com
On Wed, Mar 18, 2009 at 8:03 PM, asmeurer <asme...@gmail.com> wrote:
>
>> The patch will not be accepted without tests, so yes, the tests should
>> be updated.
>
> OK.  Is there a way to edit my patch somehow or should I just
> resubmit? And if resubmit, should I resubmit the whole thing, or just
> the test?
>
> Also, are there any guidelines on tests that I should know about?
> Obviously, the test should work, but other than that? I was just going
> to just find a sample Bernoulli equation from my text and add it in
> the same way that the other tests are implemented.

Just resubmit the patch. You can use

git rebase -i

to merge/squash patches. I'll help you with the rest once I can see the patch.

>
>> You should see your mail in sympy-patches. If you don't, your mail
>> client may not work. In this case, just attach the files generated
>> with "git format-patch" to some issue in our bug tracker.
>
> I see it now.  My mail client was marking it as junk.

Could you please post a link to the message in the sympy-patches list:

http://groups.google.com/group/sympy-patches

I can't see it.

Ondrej

asmeurer

unread,
Mar 19, 2009, 12:40:55 AM3/19/09
to sympy
> Just resubmit the patch. You can use
>
> git rebase -i
>
> to merge/squash patches. I'll help you with the rest once I can see the patch.

I couldn't figure out how to use that command.

> Could you please post a link to the message in the sympy-patches list:

I don't know how to post a link, but I will post a copy of the patch
there.

Ondrej Certik

unread,
Mar 19, 2009, 1:02:35 AM3/19/09
to sy...@googlegroups.com
On Wed, Mar 18, 2009 at 9:40 PM, asmeurer <asme...@gmail.com> wrote:
>
>> Just resubmit the patch. You can use
>>
>> git rebase -i
>>
>> to merge/squash patches. I'll help you with the rest once I can see the patch.
>
> I couldn't figure out how to use that command.

googling a bit revealed:

http://blog.madism.org/index.php/2007/09/09/138-git-awsome-ness-git-rebase-interactive

http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html

try to follow those tutorials.

>
>> Could you please post a link to the message in the sympy-patches list:
>
> I don't know how to post a link, but I will post a copy of the patch
> there.

You go here:

http://groups.google.com/group/sympy-patches

click on the first link:

http://groups.google.com/group/sympy-patches/browse_thread/thread/e11b2244ced4709e

and do copy and paste of that link. That's what I meant.

Ondrej

asmeurer

unread,
Mar 19, 2009, 1:08:28 AM3/19/09
to sympy
> You go here:
>
> http://groups.google.com/group/sympy-patches
>
> click on the first link:
>
> http://groups.google.com/group/sympy-patches/browse_thread/thread/e11...
>
> and do copy and paste of that link. That's what I meant.

Oop! I thought you meant I could post a link of the patch itself
somehow (are the unreviewed patches listed online somewhere?). Sorry
about that! Of course I know how to copy and paste the message post
link.

Ondrej Certik

unread,
Mar 19, 2009, 1:17:18 AM3/19/09
to sy...@googlegroups.com
On Wed, Mar 18, 2009 at 10:08 PM, asmeurer <asme...@gmail.com> wrote:
>
>> You go here:
>>
>> http://groups.google.com/group/sympy-patches
>>
>> click on the first link:
>>
>> http://groups.google.com/group/sympy-patches/browse_thread/thread/e11...
>>
>> and do copy and paste of that link. That's what I meant.
>
> Oop! I thought you meant I could post a link of the patch itself
> somehow (are the unreviewed patches listed online somewhere?).  Sorry

Not currently, but if you want to help out, here is the issue for it:

http://code.google.com/p/sympy/issues/detail?id=1256

> about that!  Of course I know how to copy and paste the message post
> link.

Sure, I was a bit joking. :)

Ondrej

asmeurer

unread,
Mar 20, 2009, 4:17:56 PM3/20/09
to sympy
So far, Python is being a little slow in putting up their application
template (http://socghop.appspot.com/org_app/show/google/gsoc2009/
python). Should I just start with what is here (http://wiki.sympy.org/
wiki/GSoC2009_Application_Template)? Do you know perhaps where I can
find last year's template? I would like to get started on this this
weekend.

Ondrej Certik

unread,
Mar 20, 2009, 4:41:13 PM3/20/09
to sy...@googlegroups.com

Yes, just search this list for examples of applications. Definitely
start on this as soon as possible and prepare a schedule etc. You can
then easily fit it on the template that PSF will put up.

Ondrej

asmeurer

unread,
Mar 22, 2009, 12:02:02 AM3/22/09
to sympy
On Mar 20, 2:41 pm, Ondrej Certik <ond...@certik.cz> wrote:
> Yes, just search this list for examples of applications. Definitely
> start on this as soon as possible and prepare a schedule etc. You can
> then easily fit it on the template that PSF will put up.
>
> Ondrej

Well, Python posted their template, and there's not much to it (see
link above).

The other page says that I should create a page on the wiki. Does
that still apply?

So far, I have this list of things that I would like to do. I am
still not sure how they will fit into a timeline:

• Implement Issue 1336: I actually posted this. The idea is to
create a arbitrary constant type that will aid with the simplification
of ODE solutions. See the issue page (http://code.google.com/p/sympy/
issues/detail?id=1336) to see why this is important. I am not sure
where this should fit in my timeline. On the one hand, it would make
sense to implement this first so that I won't have to modify my code
later on. On the other hand, it should be modular enough that this
won't be an issue. But more importantly, I think that implementing it
later on might be a better idea because this will require a stronger
understanding of the sympy code base than the other items, which I
should have more of later on in the summer.

• Add the ability to solve for initial conditions: This should be
straightforward. The solver engine is already there, I just have to
modify the dsolve function to accept initial conditions arguments.
This shouldn't take very long at all.

• Add the ability to solve differential equations of the following
forms/methods:
- Separable
- n-order linear homogeneous with constant coefficients.
- Exact differential equation.
- Some special cases of exact differential equations that aren't exact
but can be made exact with a simple substitution.
- Homogeneous differential equations (by this I mean equations that
can be written in the form dy/dx=f(y/x) or dy/dx=f(x/y)).
- n-Order non-homogeneous linear with constant coefficients via
undetermined coefficients or variation of parameters: This should
take longer than any other of the methods, as the solution is more
algorithmic and less straight forward.
- non-homogeneous linear with non-constant coefficients via reduction
of order: perhaps this should go in the list below.

• If I have time, add these lesser used types/methods:
- Differential equations of the type dy/dx=p(x,y)/q(x,y) where p(x,y)
and q(x,y) are linear functions, both of coincident and non-coincident
lines.

These are take straight from my ODE text. Am I missing anything
important? I don't think I will have the time to do series ,
transformation, or numerical methods.

• Clean up bugs (obviously): Should this fit into my timeline? I
know that it will take up a significant amount of my time, but it
doesn't seem like that would be continuous to me (e.g., "Weeks 5-6:
fix bugs" would be kind of silly).

• Format: In what order should the ODE engine try solution methods?
Will some methods fail if they are tried before others are? Will
some methods fail if the matcher catches them but they really can't be
solved? I already have an example of this. The Bernoulli method I
implemented, dsolve(f(x).diff(x)+x*f(x)-f(x),f(x)) catches f(x)^n with
n=1, but the solution involves the power of 1/(1-n), so it returns the
C1**(oo) in regular python and
0 ⎽⎽⎽⎽
╲╱ C₁
in isympy (is this a bug or intentional?). I will submit a patch that
checks to make sure that n≠1, but even then, it should be recognized
as linear (f(x).diff(x)+x*f(x)-f(x)==f(x).diff(x)+(x-1)*f(x)). Also,
speed and final format of the answer are considerations here.

• Am I missing anything important here?

Fredrik Johansson

unread,
Mar 22, 2009, 5:55:41 AM3/22/09
to sy...@googlegroups.com
On Sun, Mar 22, 2009 at 5:02 AM, asmeurer <asme...@gmail.com> wrote:

This is a great project; I hope this gets accepted.

> • Am I missing anything important here?

* Implement the (generalized) hypergeometric differential equation and
add hypergeometric functions like Bessel and Airy functions to SymPy
(these functions are needed to solve many important ODEs from physics
and elsewhere)

* Identification of singular points of linear ODEs. Series expansions
for linear ODEs with unknown solution (see for example "Advanced
Mathematical Methods for Scientists and Engineers" by Bender &
Orszag). Possibly difficult, especially since the series code in SymPy
has some problems.

* Symbolic FEM code, e.g. for approximating ODE solutions by
polynomials (see e.g.
http://fredrik-j.blogspot.com/2009/02/galerkins-method-in-sympy.html),
or by trigonometric polynomials (Fourier series).

* Implement automatic transformation of high-order ODEs to systems of
first-order ODEs. Write wrappers for numerical ODE solvers in mpmath
and/or SciPy so that numerical solutions can be obtained conveniently
in SymPy.

Though I will not be mentoring, I will be happy to provide guidance
about any of the above if necessary.

Fredrik

asmeurer

unread,
Mar 22, 2009, 12:13:24 PM3/22/09
to sympy
On Mar 22, 3:55 am, Fredrik Johansson <fredrik.johans...@gmail.com>
wrote:
>This is a great project; I hope this gets accepted.
Does sympy review the applications relating to it directly, or does
python choose for it. Perhaps I should go introduce myself on the
python-gsoc mailing list.
> * Implement the (generalized) hypergeometric differential equation and
> add hypergeometric functions like Bessel and Airy functions to SymPy
> (these functions are needed to solve many important ODEs from physics
> and elsewhere)
We haven't learned about these yet (remember that I am presently only
half way through the semester in my ODE's class), but from what I can
tell, they involve series solutions. I only have three months to do
this. If I have time to do series, then I will go ahead and to it,
but for my applications, I think it might hurt it if I make my project
impossible. One of the nice things about implementing ODEs is that I
can shoot for a realistic goal and if I achieve it faster than I
thought I would, then I could easily logically continue the project
from there by implementing more advanced types of solutions, i.e.,
series, numerical, systems of ODEs, etc.
> * Identification of singular points of linear ODEs. Series expansions
> for linear ODEs with unknown solution (see for example "Advanced
> Mathematical Methods for Scientists and Engineers" by Bender &
> Orszag). Possibly difficult, especially since the series code in SymPy
> has some problems.
I also haven't learned about this yet, but the same if it involves
series.
> * Symbolic FEM code, e.g. for approximating ODE solutions by
> polynomials (see e.g.http://fredrik-j.blogspot.com/2009/02/galerkins-method-in-sympy.html),
> or by trigonometric polynomials (Fourier series).
See above.
> * Implement automatic transformation of high-order ODEs to systems of
> first-order ODEs. Write wrappers for numerical ODE solvers in mpmath
> and/or SciPy  so that numerical solutions can be obtained conveniently
> in SymPy.
Writing wrappers might no be as difficult. Is there already a
standard for wrappers in sympy?
> Though I will not be mentoring, I will be happy to provide guidance
> about any of the above if necessary.
I see from your blog that you participated in gsoc last year. Do you
perhaps have any advice for me, especially with regards to the
application process?
> Fredrik

Ondrej Certik

unread,
Mar 22, 2009, 3:00:21 PM3/22/09
to sy...@googlegroups.com
On Sun, Mar 22, 2009 at 9:13 AM, asmeurer <asme...@gmail.com> wrote:
>
> On Mar 22, 3:55 am, Fredrik Johansson <fredrik.johans...@gmail.com>
> wrote:
>>This is a great project; I hope this gets accepted.
> Does sympy review the applications relating to it directly, or does
> python choose for it.  Perhaps I should go introduce myself on the
> python-gsoc mailing list.


Python does, but we have a word in it. It's a good idea to introduce
yourself in the python-gsoc list.


Ondrej

asmeurer

unread,
Mar 23, 2009, 9:42:43 PM3/23/09
to sympy
On Mar 22, 1:00 pm, Ondrej Certik <ond...@certik.cz> wrote
> Python does, but we have a word in it. It's a good idea to introduce
> yourself in the python-gsoc list.
I went ahead and introduced myself there.

I copied what I have above and added some notes to myself on the wiki
at http://wiki.sympy.org/wiki/GSoC2009_Application_Template/Aaron_Meurer
. I hope this is an acceptable namespace. I wasn't sure. I can move
it to user space if you like.

There isn't much to it now, but after I edit it some, could you maybe
look it over a bit.

Also, I had another question. I had heard mentions that a résumé
would be needed from other projects, but I haven't seen any explicit
mention of it on sympy or python's template pages. Will you or python
be wanting any kind of formal or informal résumé from me? I don't
think I would have anything interesting to put on it, except for the
relevant classes that I have taken so far, as I have never had any
kind of computer science related job or internship or anything like
that.

Ondrej Certik

unread,
Mar 24, 2009, 1:10:05 AM3/24/09
to sy...@googlegroups.com
On Mon, Mar 23, 2009 at 6:42 PM, asmeurer <asme...@gmail.com> wrote:
>
> On Mar 22, 1:00 pm, Ondrej Certik <ond...@certik.cz> wrote
>> Python does, but we have a word in it. It's a good idea to introduce
>> yourself in the python-gsoc list.
> I went ahead and introduced myself there.
>
> I copied what I have above and added some notes to myself on the wiki
> at http://wiki.sympy.org/wiki/GSoC2009_Application_Template/Aaron_Meurer
> .  I hope this is an acceptable namespace.  I wasn't sure. I can move
> it to user space if you like.
>
> There isn't much to it now, but after I edit it some, could you maybe
> look it over a bit.

Thanks, I look at it. Some suggestions ---

try to create more specific timeline, e.g. first week I'll do this,
next 3 weeks I'll do this, I will have this before the midterm, etc.

could you ellaborat a bit more on which exact equations you are going to solve?

Btw, have you looked at the link posted by Robert Kern on this list
recently? What is your opinion about it?

>
> Also, I had another question.  I had heard mentions that a résumé
> would be needed from other projects, but I haven't seen any explicit
> mention of it on sympy or python's template pages.  Will you or python
> be wanting any kind of formal or informal résumé from me?  I don't

I don't think you need a resume for PSF. Could last GSoC students
clarify this please?

> think I would have anything interesting to put on it, except for the
> relevant classes that I have taken so far, as I have never had any
> kind of computer science related job or internship or anything like
> that.

Ondrej

Fredrik Johansson

unread,
Mar 24, 2009, 6:44:19 AM3/24/09
to sy...@googlegroups.com
On Sun, Mar 22, 2009 at 5:13 PM, asmeurer <asme...@gmail.com> wrote:
>> * Implement the (generalized) hypergeometric differential equation and
>> add hypergeometric functions like Bessel and Airy functions to SymPy
>> (these functions are needed to solve many important ODEs from physics
>> and elsewhere)
> We haven't learned about these yet (remember that I am presently only
> half way through the semester in my ODE's class), but from what I can
> tell, they involve series solutions.  I only have three months to do
> this.  If I have time to do series, then I will go ahead and to it,
> but for my applications, I think it might hurt it if I make my project
> impossible.

I think this is fairly straightforward work; the solutions have
standardized forms
and don't require implementing any series. If you're not sure if
you'll have time,
it can be good to include it in the application anyway, but state clearly
that you'll do it only if you have time. Assuming you are interested in the
task, that is.

> One of the nice things about implementing ODEs is that I
> can shoot for a realistic goal and if I achieve it faster than I
> thought I would, then I could easily logically continue the project
> from there by implementing more advanced types of solutions, i.e.,
> series, numerical, systems of ODEs, etc.

Of course.

>> * Implement automatic transformation of high-order ODEs to systems of
>> first-order ODEs. Write wrappers for numerical ODE solvers in mpmath
>> and/or SciPy  so that numerical solutions can be obtained conveniently
>> in SymPy.
> Writing wrappers might no be as difficult.  Is there already a
> standard for wrappers in sympy?

There are existing wrappers to look at, but not exactly any standard.

>> Though I will not be mentoring, I will be happy to provide guidance
>> about any of the above if necessary.
> I see from your blog that you participated in gsoc last year.  Do you
> perhaps have any advice for me, especially with regards to the
> application process?

The best advice is probably to discuss your application with the
developers, as you're already doing. Include a schedule plan
in your application.

Fredrik

Fredrik Johansson

unread,
Mar 24, 2009, 6:47:05 AM3/24/09
to sy...@googlegroups.com
On Tue, Mar 24, 2009 at 6:10 AM, Ondrej Certik <ond...@certik.cz> wrote:
>
> On Mon, Mar 23, 2009 at 6:42 PM, asmeurer <asme...@gmail.com> wrote:

>> Also, I had another question.  I had heard mentions that a résumé
>> would be needed from other projects, but I haven't seen any explicit
>> mention of it on sympy or python's template pages.  Will you or python
>> be wanting any kind of formal or informal résumé from me?  I don't
>
> I don't think you need a resume for PSF. Could last GSoC students
> clarify this please?

You should write in the application why you're the right person to do this
project. At least last year, a formal resume wasn't required.

Fredrik

asmeurer

unread,
Mar 24, 2009, 11:07:00 AM3/24/09
to sympy
On Mar 23, 11:10 pm, Ondrej Certik <ond...@certik.cz> wrote:
> On Mon, Mar 23, 2009 at 6:42 PM, asmeurer <asmeu...@gmail.com> wrote:
> Thanks, I look at it. Some suggestions ---
>
> try to create more specific timeline, e.g. first week I'll do this,
> next 3 weeks I'll do this, I will have this before the midterm, etc.
That's coming, when I have more time.
> could you ellaborat a bit more on which exact equations you are going to solve?
OK. I'll include some examples, and maybe some definitions.
> Btw, have you looked at the link posted by Robert Kern on this list
> recently? What is your opinion about it?
I saw it. It looks like it would be a useful guide, but of course it
is a book I would have to buy. On the other hand, it might be better
than trying to implement it aimlessly. If I do end up getting it, it
wouldn't be until after I am accepted.

On Mar 24, 4:44 am, Fredrik Johansson <fredrik.johans...@gmail.com>
wrote:
> I think this is fairly straightforward work; the solutions have
> standardized forms
> and don't require implementing any series. If you're not sure if
> you'll have time,
> it can be good to include it in the application anyway, but state clearly
> that you'll do it only if you have time. Assuming you are interested in the
> task, that is.
Ok. I was under the impression from some sites I was reading that
gave hints on GSoC applications that trying to do to much would be bad
for my applicaion, but if you think it would be better to include
this, I will go ahead. I also kind of left it out because I haven't
really learned it yet, so I have no idea how hard it is :)
> There are existing wrappers to look at, but not exactly any standard.
I think I'll just put something along the lines of "Implement
numerical solutions, potentially by using a wrapper to another open
source project such as mpmath or scipy."
> The best advice is probably to discuss your application with the
> developers, as you're already doing. Include a schedule plan
> in your application.
>
> Fredrik
Thanks for your advice by the way.
On Mar 24, 4:47 am, Fredrik Johansson <fredrik.johans...@gmail.com>
wrote:
> You should write in the application why you're the right person to do this
> project. At least last year, a formal resume wasn't required.
>
> Fredrik
The fact that I am a Math/CS major is already part of the
application. I will go ahead and make a note that I am fluent in
python and that I am taking 335 ODE's this semester.

Aaron

asmeurer

unread,
Mar 27, 2009, 9:44:17 PM3/27/09
to sympy
OK. I have finished up the first draft of the application (except for
the abstract, which I will do after I have finalized the main parts).
If you all could look at it, that would be great. Feel free to
annotate right on it. It is a wiki after all.

Some particular questions about it:
Length. Is this too short? too long? I have no idea how long a good
application should be.
Sectioning. The way I have it now, the crux of my application is
under "Summary". Is this supposed to be somewhere else, with only a
summary under "Summary"? That wouldn't make any sense, because
"Abstract" is supposed to summarize the application.
Content. Mainly, how well is this written? Would you accept me based
on the application as it is now written?
Spelling and grammar. You don't need to do a check for me, but if you
see something blatantly obvious, let me know or go ahead and fix it.

Also, does anyone know: why does python have a section for final
evaluation? It would seem that they want me to divide my time line
into the period before the midterm evaluation and the period after.
But they also have a section for the final evaluation, which doesn't
make any sense, as all of the coding should be done by then. Am I
misinterpreting this somehow?

Here is the link to my application on the wiki:
http://wiki.sympy.org/wiki/GSoC2009_Application_Template/Aaron_Meurer

asmeurer

unread,
Mar 30, 2009, 12:57:04 AM3/30/09
to sympy
Hey! I just noticed that my name made it to the AUTHORS file.
Cool.

Aaron

Ondrej Certik

unread,
Mar 30, 2009, 1:05:11 AM3/30/09
to sy...@googlegroups.com
On Sun, Mar 29, 2009 at 9:57 PM, asmeurer <asme...@gmail.com> wrote:
>
> Hey!  I just noticed that my name made it to the AUTHORS file.
> Cool.

Yes and welcome to SymPy! :)

I'll send you a feedback to your application later tonight, was quite
busy with fixing bugs..

Ondrej

Ondrej Certik

unread,
Mar 30, 2009, 1:54:02 PM3/30/09
to sy...@googlegroups.com
On Fri, Mar 27, 2009 at 6:44 PM, asmeurer <asme...@gmail.com> wrote:
>
> OK.  I have finished up the first draft of the application (except for
> the abstract, which I will do after I have finalized the main parts).
> If you all could look at it, that would be great.  Feel free to
> annotate right on it.  It is a wiki after all.

Change:

http://code.google.com/p/SymPy/issues/detail?id=1336

to:

http://code.google.com/p/sympy/issues/detail?id=1336

Also find a good name for the whole application, so that people find
it interesting among the others. e.g.

SymPy: differential equations solvers ...

maybe you can find something better.

>
> Some particular questions about it:
> Length.  Is this too short? too long? I have no idea how long a good
> application should be.

I think it's good. I suggest to refactor the Notes and Other Notes and
make it part of the application.

If you have time, one idea for improvement is to be more specific
about what and how you implement things in each week. E.g. take your
Notes and Other notes and make the paragraphs about each week more
detailed.

> Sectioning.  The way I have it now, the crux of my application is
> under "Summary".  Is this supposed to be somewhere else, with only a
> summary under "Summary"?  That wouldn't make any sense, because
> "Abstract" is supposed to summarize the application.

Yes, Abstract is the thing that will be visible to others if your app
is selected and that is the thing that people will read the most. E.g.
if there are ~70+ applications at PSF, some mentors will only read the
abstract. Or less. :)

> Content.  Mainly, how well is this written?  Would you accept me based
> on the application as it is now written?

This very much depends on how many slots we get for SymPy and about
the other applications. E.g. it's relative.

But I think it has a great chance of being accepted.

> Spelling and grammar. You don't need to do a check for me, but if you
> see something blatantly obvious, let me know or go ahead and fix it.
>
> Also, does anyone know: why does python have a section for final
> evaluation?  It would seem that they want me to divide my time line
> into the period before the midterm evaluation and the period after.
> But they also have a section for the final evaluation, which doesn't
> make any sense, as all of the coding should be done by then.  Am I
> misinterpreting this somehow?

The template is here:

http://socghop.appspot.com/org/show/google/gsoc2009/python

I think it means what work you do before the program starts, what work
you do before the midterm and what work you do before the final
evaluation.

Thanks for writing it up and I promise I will be now more responsive.
The deadline is on Friday.

Ondrej

Aaron S. Meurer

unread,
Mar 30, 2009, 4:09:44 PM3/30/09
to sy...@googlegroups.com

On Mar 30, 2009, at 11:54 AM, Ondrej Certik wrote:
>
> Change:
>
> http://code.google.com/p/SymPy/issues/detail?id=1336
>
> to:
>
> http://code.google.com/p/sympy/issues/detail?id=1336
Yeah. I was changing all of my sympy's to SymPy and I must have
accidently changed the link.
>
> Also find a good name for the whole application, so that people find
> it interesting among the others. e.g.
>
> SymPy: differential equations solvers ...
> maybe you can find something better.
>
I'll see what I can come up with.
>
>
> I think it's good. I suggest to refactor the Notes and Other Notes and
> make it part of the application.
>
Notes should all included in the Application, except for the
ramblings. Other notes is just notes to myself to make sure I don't
forget anything
> If you have time, one idea for improvement is to be more specific
> about what and how you implement things in each week. E.g. take your
> Notes and Other notes and make the paragraphs about each week more
> detailed.
OK. I can't do this so well for the series and numerical solutions
parts because I am just learning series and haven't learned numerical
solutions yet.
> Yes, Abstract is the thing that will be visible to others if your app
> is selected and that is the thing that people will read the most. E.g.
> if there are ~70+ applications at PSF, some mentors will only read the
> abstract. Or less. :)
I'll keep that in mind.
> This very much depends on how many slots we get for SymPy and about
> the other applications. E.g. it's relative.
>
> But I think it has a great chance of being accepted.
>
> The template is here:
>
> http://socghop.appspot.com/org/show/google/gsoc2009/python
>
> I think it means what work you do before the program starts, what work
> you do before the midterm and what work you do before the final
> evaluation.
>
Oh. You think it means before those dates. I will rewrite those
sections to mean that.
> Thanks for writing it up and I promise I will be now more responsive.
> The deadline is on Friday.
Yeah, I probably should have written it sooner myself. And, believe
me, I am well aware that the deadline is Friday :)
> Ondrej
Thanks for looking at this.

Aaron
>
> >

Reply all
Reply to author
Forward
0 new messages