[sage-support] Re: Derivative of functions ...

2018-11-02 Thread Matthias Koeppe
On Friday, November 2, 2018 at 5:44:34 PM UTC-7, Emmanuel Charpentier wrote: > > One way to define (something almost the same as) what you want is : > sage: f=piecewise([((-oo,0),x^3),((0,oo),x^2)],var=x) > sage: f > piecewise(x|-->x^3 on (-oo, 0), x|-->x^2 on (0, +oo); x) > [...] Except for the po

[sage-support] Re: Derivative of functions ...

2018-11-02 Thread Emmanuel Charpentier
One way to define (something almost the same as) what you want is : sage: f=piecewise([((-oo,0),x^3),((0,oo),x^2)],var=x) sage: f piecewise(x|-->x^3 on (-oo, 0), x|-->x^2 on (0, +oo); x) An indeed; you can do sage: plot(f(x),(x,-1,1), figsize=3) which seems correct. Except for the point 0, for wh

[sage-support] Re: Derivative of functions ...

2018-10-31 Thread Francesco
Il giorno mercoledì 31 ottobre 2018 10:11:34 UTC+1, Francesco ha scritto: > > Hello; I have installed sage 8.4 and I have problem with the derivatives > ... > I have defined a function in sage of this type: > > x=var('x') > def funz(x): >if x >= 0: > return x^2 >else: > retu

Re: [sage-support] Re: derivative of conjugate of function

2014-09-13 Thread Ralf Stephan
I'm really naive on this one: the problem I'm trying to solve is to write a recurrence for the Legendre Q(n,x) polynomials / Q(n,m,x) functions. Numeric results can be easily conjugated but a symbolic expression with conjugated log functions is tedious to use and, as it seems, impossible to dfiffer

[sage-support] Re: derivative of conjugate of function

2014-09-13 Thread maldun
Hi! Be careful! conjugate(·) is not complex differentiable! The Example you gave in your link had not conjugate(log(x)) as function but conjugate(log(conjugate(x)). Which exists. You can alos show it easily by using the facts, if log(·) is differentialbe in an neighbourhood of x, it has a seri

[sage-support] Re: derivative solution within an interval

2013-03-04 Thread Emmanuel Charpentier
Le samedi 2 mars 2013 17:00:15 UTC+1, Emmanuel Charpentier a écrit : [ An idiocy ... ] [ Snip... ] > Since s1 is  irst-degree equation in t, this is the only real > nonnegative maximum (it is easy to show that there is no negative > maximum). > Now, try brute force via the to_poly_solve solver

[sage-support] Re: derivative solution within an interval

2013-03-02 Thread Emmanuel Charpentier
Dear Jose, Le mercredi 27 février 2013 14:18:45 UTC+1, Jose Guzman a écrit : > > I am trying to find the maximun of an exponential expression of the form: > > sage: t=var('t') > sage: g(t) = e**(-t/10)-e^(-t/2) > > between 0 and say 50. My idea is to get the maximun to normalize the > function

[sage-support] Re: derivative instance

2010-04-05 Thread Alec Mihailovs
A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For mo

[sage-support] Re: derivative instance

2010-04-04 Thread pallab
Thanks. Will do. On Apr 3, 12:19 pm, Alec Mihailovs wrote: > On Apr 3, 2:32 pm, pallab wrote: > > > Is there any way to check whether a symbolic expression is a > > derivative. Like, > > > isinstance(diff(f(x),x),"what to put?") > > > gives "True" > > > and > > > isinstance(f(x),"what to put?")

[sage-support] Re: derivative instance

2010-04-03 Thread Alec Mihailovs
On Apr 3, 2:32 pm, pallab wrote: > Is there any way to check whether a symbolic expression is a > derivative. Like, > > isinstance(diff(f(x),x),"what to put?") > > gives "True" > > and > > isinstance(f(x),"what to put?") > > gives false, assuming f is not a derivative itself. One can do the follo

[sage-support] Re: derivative instance

2010-04-03 Thread pallab
I mean... I do not know. If it is already evaluated to cos(x) then it should be false (not *true*). current "sympy" gives false, I think I would go with it. On Apr 3, 11:51 am, pallab wrote: > > > On Apr 3, 11:36 am, "ma...@mendelu.cz" wrote: > > > What kind of behavior do you expect from the

[sage-support] Re: derivative instance

2010-04-03 Thread pallab
I do not know. If it is already evaluated to cos(x) then it should be true. current "sympy" gives false, I think I would go with it. On Apr 3, 11:36 am, "ma...@mendelu.cz" wrote: > What kind of behavior do you expect from the following command? > > isinstance(diff(sin(x),x),"what to put?") > > Ro

[sage-support] Re: derivative instance

2010-04-03 Thread ma...@mendelu.cz
What kind of behavior do you expect from the following command? isinstance(diff(sin(x),x),"what to put?") Robert On 3 dub, 20:32, pallab wrote: > Is there any way to check whether a symbolic expression is a > derivative. Like, > > isinstance(diff(f(x),x),"what to put?") > > gives "True" > > and

[sage-support] Re: derivative of cotangent

2009-09-18 Thread Burcin Erocal
Hi Jason, On Fri, 18 Sep 2009 13:15:46 -0500 Jason Grout wrote: > > On alpha.sagenb.org, I get the following: > > sage: t=var('t') > sage: diff(cot(t),t) > D[0](cot)(t) > sage: diff(cos(t)/sin(t),t) > -cos(t)^2/sin(t)^2 - 1 > > > Does Sage not know that cot(t) is cos(t)/sin(t)? Or am I jus

[sage-support] Re: derivative function

2009-09-17 Thread Burcin Erocal
On Thu, 17 Sep 2009 13:29:01 -0400 Dan Aldrich wrote: > y=|x| > 1st derivative should be +1 x>0 and -1,X<0 > > f(x) = abs(x) > Dx = x.derivative() This should be Dx = f.derivative(x) In your example Dx is 1, and the graph is correct. > p1 = plot (f(x),(-5,5),color='black') > p2 = plot (Dx,

[sage-support] Re: derivative bug in Sage 4.0 symbolics?

2009-08-30 Thread Alex Raichev
Hi all: Thanks to those who worked on closing ticket 6243 regarding derivatives as dictionary keys. It appears that there are still some bugs, though (see below). Alex -- | Sage Version 4.1.1, Release Date: 2009-08-14

[sage-support] Re: derivative bug in Sage 4.0 symbolics?

2009-07-14 Thread Alex Raichev
Hi Burcin: When using Sage for my work i makes heavy use of dictionaries to substitute values for derivatives of symbolic functions. Thanks for your help on fixing this bug for Sage 4.1.1. Alex On Jun 8, 7:12 am, Burcin Erocal wrote: > Hi Alex, > > On Sun, 7 Jun 2009 11:31:26 -0700 (PDT) > >

[sage-support] Re: derivative bug in Sage 4.0 symbolics?

2009-06-07 Thread Burcin Erocal
Hi Alex, On Sun, 7 Jun 2009 11:31:26 -0700 (PDT) Alex Raichev wrote: > > Hi all: > > Upon upgrading to Sage 4.0, i can no longer make a dictionary with > derivatives as keys (see below). Can someone please fix this? > -- >

[sage-support] Re: derivative of a composition

2009-04-23 Thread Alex Raichev
Thanks for the news, William. I will hold off on this chain rule business till the new symbolics arrive. Alex On Apr 24, 3:43 pm, William Stein wrote: > On Thu, Apr 23, 2009 at 7:18 PM, Alex Raichev wrote: > > > Hmm, implementing the chain rule is trickier than i thought.  My > > straightforw

[sage-support] Re: derivative of a composition

2009-04-23 Thread William Stein
On Thu, Apr 23, 2009 at 7:18 PM, Alex Raichev wrote: > > Hmm, implementing the chain rule is trickier than i thought.  My > straightforward plan of attack was to write a function that > differentiates a symbolic expression as usual but when it comes to a > composition f o g, it uses the chain rul

[sage-support] Re: derivative of a composition

2009-04-23 Thread Alex Raichev
Hmm, implementing the chain rule is trickier than i thought. My straightforward plan of attack was to write a function that differentiates a symbolic expression as usual but when it comes to a composition f o g, it uses the chain rule and returns the appropriate entry of the matrix (Df o g)Dg. P

[sage-support] Re: derivative of a composition

2009-04-22 Thread Alex Raichev
Woops, that ain't right: 'write'. On Apr 23, 1:43 pm, Alex Raichev wrote: > Never mind.  I'll just right a short recursive function.  It's easy > enough. > > Alex > > On Apr 23, 11:10 am, Alex Raichev wrote: > > > Hi all: > > > Do any of you know how to get Sage to use the chain rule and expand

[sage-support] Re: derivative of a composition

2009-04-22 Thread Alex Raichev
Never mind. I'll just right a short recursive function. It's easy enough. Alex On Apr 23, 11:10 am, Alex Raichev wrote: > Hi all: > > Do any of you know how to get Sage to use the chain rule and expand > the derivative of a composition involving one or two callable symbolic > functions?  Here

[sage-support] Re: derivative

2009-02-28 Thread Loïc
Thank you very much ! Loïc Le samedi 28 février 2009 à 02:37 -0800, Rolandb a écrit : > This works: > > f=arccos((1-x^2)/(1+x^2)) > g=f.diff(x) > g.simplify_full() > 2*x/((x^2 + 1)*abs(x)) > > In general: type g. TAB and you will find all kind of handy functions. > > Roland > > On 28 feb, 10

[sage-support] Re: derivative

2009-02-28 Thread Rolandb
This works: f=arccos((1-x^2)/(1+x^2)) g=f.diff(x) g.simplify_full() 2*x/((x^2 + 1)*abs(x)) In general: type g. TAB and you will find all kind of handy functions. Roland On 28 feb, 10:58, Loïc wrote: > Hello > > Another problem: > I want the derivative for the function arccos((1-x^2)/(1+x^2))