On Fri, Mar 27, 2020 at 10:51 AM Ondřej Čertík <ond...@certik.us> wrote:
>
> Hi Jackson and Oscar,
>
> Indeed, fixing this would be the main goal of the project. Let's brainstorm 
> the possible approaches.
>
> 1) One is to work on the integrate() function, and make it return 
> distributions (delta functions) where appropriate. One way to do that is 
> using pattern matching, similar to Rubi. One would match the typical 
> integrals that occur, and return the correct answer. One would probably write 
> a dedicated function for that, say, integrate_distributions, and then somehow 
> hook it up into integrate.

I think this is the right approach. We already have a pattern matching
integrator called manualintegrate that this can be added to. We can
also investigate if the meijerg algorithm can be improved to work in
these cases. If it can, then that will enable a lot more than we could
get by naive pattern matching. In each case, I would investigate
meijerg first. If it can be improved (and is fast), then that is
enough. It is only if it can't that we should add a table lookup. In
some cases, meijerg can work but it needs some better pre-processing
(like calling apart() first so it can operate on a partial fraction
decomposition).

The benefit of improving integrate is that things will work regardless
of whether they call fourier_transform or just create the integral of
a Fourier transform. As you probably know, integrals that look like
common transforms appear all the time even when you aren't necessarily
thinking in terms of that transform.

By the way, since you mentioned RUBI, I don't think even it would help
here, since, unless I am mistaken, it doesn't deal with definite
integrals.

Aaron Meurer

>
> 2) The other approach is to tie it specifically into the fourier_transform() 
> function.
>
> I was hoping we could write general enough integrate_distributions function, 
> so that when it is called from inside Fourier, Laplace and other transforms, 
> it would return the correct answer.
>
> Finally, cos(x) is just one simple example. It needs to be extended to work 
> correctly with piecewise functions and other. I can provide such examples 
> from a person who reported this issue to me yesterday.
>
> For example, if it could do majority of these transforms correctly, that 
> would be ideal:
>
> https://en.wikipedia.org/wiki/Fourier_transform#Tables_of_important_Fourier_transforms
>
> There will be always corner cases, but getting 90% of them correctly would go 
> a long way.
>
> Ondrej
>
> On Thu, Mar 26, 2020, at 4:59 PM, Jackson Morris wrote:
> > Hello there,
> >
> > I just commented on the issue, but I figure that this is a better way
> > to communicate. Here is my comment from the issue: I would certainly be
> > interested in working on this for GSoC. I am still getting familiar
> > with the internals of sympy, but I think that this would be right up my
> > alley. Would getting this fixed be the main component of the project?
> >
> > Best,
> > Jackson
> >
> > On Thursday, March 26, 2020 at 2:38:50 PM UTC-7, ondrej wrote:Hi,
> > >
> > > Here is a great idea for a GSoC project:
> > >
> > > https://github.com/sympy/sympy/issues/2803#issuecomment-604697523
> > >
> > > Would any student be interested? I know at least one user who couldn't 
> > > use SymPy because of that. So fixing it would be very useful to a lot of 
> > > people. The scope of the GSoC project could be to get SymPy working with 
> > > Fourier transforms of many such functions including Piecewise and adding 
> > > a nice page to SymPy's documentation with examples.
> > >
> > > I'll be happy to mentor such a project.
> > >
> > > Ondrej
> >
> >  --
> >  You received this message because you are subscribed to the Google
> > Groups "sympy" group.
> >  To unsubscribe from this group and stop receiving emails from it, send
> > an email to sympy+unsubscr...@googlegroups.com.
> >  To view this discussion on the web visit
> > https://groups.google.com/d/msgid/sympy/a51452c8-bb74-4fa2-b2ac-04c66e7e9199%40googlegroups.com
> >  
> > <https://groups.google.com/d/msgid/sympy/a51452c8-bb74-4fa2-b2ac-04c66e7e9199%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/ec797a11-e354-48a5-9ce9-f0b5617d7099%40www.fastmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6LDgF3i9Z1M70AB9qnqF_FMUHkVj%2B4zAHeSBKf0ipsi3w%40mail.gmail.com.

Reply via email to