[sage-support] Re: Solving a function with a lower floor

2016-04-23 Thread Massimo D'Antoni
> > Hi, you cannot mix python syntax with building a symbolic expression when > solving ... the root problem is, that expressions are "built up" and not > evaluated, while python functions are evaluated from the inside. > Thank you. Where can I find some more documentation on this? Try: g

[sage-support] Re: Solving a function with a lower floor

2016-04-23 Thread Massimo D'Antoni
Thank you for your help With g(x) = heaviside(f(x)) * f(x) plotting seems to work correctly in all cases. However solve([g(x)==y,y==4],[x,y]) still does not work. Of course I could simply do g(4), but I'm providing a simplified exemple of a more general and complicated case. My point is: i

[sage-support] Re: Solving a function with a lower floor

2016-04-23 Thread Harald Schilly
On Saturday, April 23, 2016 at 11:29:07 AM UTC+2, Massimo D'Antoni wrote: > > I need to define a function like the following (the function cannot assume > negative values): > > y = 5 - 2x if f(x)>0 > 0 otherwise > > Hi, you cannot mix python syntax with building a symbolic exp