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

2018-10-31 Thread Dima Pasechnik
On Wed, Oct 31, 2018 at 9:11 AM Francesco wrote: > > 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: > return x^3 > > but, when I try to

[sage-support] Derivative of functions ...

2018-10-31 Thread Francesco
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: return x^3 but, when I try to calculate diff(funz(x),x) I obtain only 3x^2 and this is wrong !

[sage-support] derivative of conjugate of function

2014-09-13 Thread Ralf Stephan
>From searching the net (1), I gather that log(x).conjugate(x).diff(x) should yield (log(x)/x).conjugate() but Sage cannot evaluate such differentiated conjugates of functions: sage: ex=log(x).conjugate() sage: ex=log(x).conjugate(); ex conjugate(log(x)) sage: ex.diff(x) D[0](conjugate)(log(x))/

[sage-support] derivative solution within an interval

2013-02-27 Thread Jose Guzman
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 to that maximum and obtain the algebraic. For that: sage: diff(g,t)==0,t) But sage returns

Re: [sage-support] Derivative of error function

2010-08-16 Thread Burcin Erocal
On Sun, 15 Aug 2010 08:37:10 -0700 (PDT) Paul Rombouts wrote: > Hi, > > I can integrate the function exp(-x^2) to get the error function like > this: > > sage: F=integral(exp(-x^2),x); F > 1/2*sqrt(pi)*erf(x) > > But when I try to differentiate the answer, sage does not seem to know > the deri

[sage-support] Derivative of error function

2010-08-15 Thread Paul Rombouts
Hi, I can integrate the function exp(-x^2) to get the error function like this: sage: F=integral(exp(-x^2),x); F 1/2*sqrt(pi)*erf(x) But when I try to differentiate the answer, sage does not seem to know the derivative of erf: sage: F.diff(x) 1/2*sqrt(pi)*D[0](erf)(x) I am assuming that the su

[sage-support] derivative instance

2010-04-03 Thread pallab
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. -- To post to this group, send email to sage-support@googlegroups.com To

[sage-support] derivative of cotangent

2009-09-18 Thread Jason Grout
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 just being silly? Jason --~--~-~--~~~---~--~~ To post to t

[sage-support] derivative function

2009-09-17 Thread Dan Aldrich
y=|x| 1st derivative should be +1 x>0 and -1,X<0 f(x) = abs(x) Dx = x.derivative() p1 = plot (f(x),(-5,5),color='black') p2 = plot (Dx, (0,5),color = 'red') p3 = plot (Dx, (-5,0),color = 'blue') show (p1+p2+p3) -d --~--~-~--~~~---~--~~ To post to this group, se

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

2009-06-07 Thread Alex Raichev
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? Alex -- | Sage Version 4.0, Release Date: 2009-05-29 | | Type not

[sage-support] derivative of a composition

2009-04-22 Thread Alex Raichev
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's an example with one callable symbolic function. -- | Sage Vers

[sage-support] derivative

2009-02-28 Thread Loïc
Hello Another problem: I want the derivative for the function arccos((1-x^2)/(1+x^2)) I wrote: f=arccos((1-x^2)/(1+x^2)) f.diff(x) -(-2*x/(x^2 + 1) - 2*x*(1 - x^2)/(x^2 + 1)^2)/sqrt(1 - (1 - x^2)^2/ (x^2 + 1)^2) The best answer would be: 2/(1+x^2)*sign(x) How can I simplify this expression to

[sage-support] derivative of a funtion with respect to derivative

2008-10-17 Thread scott
I want to accomplish the following: Mathematica syntax: x=q[t]; z=1/2 *x^2; x'=D[x,t]; z'=D[z,t]; D[z*z',x'] out: 1/2 q[t]^3 When I try this in sage : t=variable('t') x=function('q',t) x_dot=diff(x,t) z_dot=diff(z,t) diff(z_dot *z,x_dot) fails because x_dot is a derivative and not a symbol