On Wednesday, June 7, 2017 at 5:49:34 PM UTC-4, Aaron Meurer wrote:
>
>
>
> > 
> > My thoughts on Piecewise is that it's trying to do too many things. 
>  There's 
> > a difference between representing a function whose form changes 
> depending on 
> > the value of its argument (in my case, t) and an answer that depends on 
> > parameter values (a and b).  The latter distinction is best described 
> with a 
> > cases statement.  I.e., t is different from a and b. 
>
> I'm not sure I follow here. Are you suggesting to use a separate 
> object. What would it look like? 
>
> I'm thinking of a "range" object (I wish the name "Piecewise" was still 
available). Something like this:

f = range_function([(f1,t1,t2),(f2,t3,t4),...],t)

The first argument is a list of functions with the range of the arguments 
for that function. The final argument is the variable.  The notation mimics 
the integrate function. 

I've written a partially completed convolution function for these range 
functions.  Convolution requires knowing the range of each function.  But I 
got stuck when I ran the example before whose answer depends on parameter 
values.  That the answer depends on parameter values is the job for a 
"cases" function (like the Latex cases function).

The last step (which I haven't finished, but it's straightforward) is to 
combine the outputs of the various convolutions into a range function.

I haven't given much thought how to extend the range function to multiple 
variables.  It's probably straightforward when the ranges are rectangles, 
but maybe less for other shapes (e.g., circles).

 

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/6a70355a-b330-4b1e-a5f6-e288d1135e1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to