# Weird output for differential of a non-analytic complex function.

The following code,

var('z')
f = z*z.conjugate()
f.derivative(z)


produces

z*D[0](conjugate)(z) + conjugate(z)


Now I undestand where the problem might be, $z$ and $z^*$ are usually treated as independent variables thus. But does sage mean by this output?

edit retag close merge delete

Sort by ยป oldest newest most voted

The capital D is notation for the partial derivative; D[i] means partial derivative with respect to the ith variable of the function (where indexing starts at 0). So D[0](conjugate)(z) means take the partial derivative of the congugate function with respect to variable number 0 (i.e. z), and evaluate that derivative at z.

This notation is not universally loved, but was chosen deliberately after some long discussion. An explanation is given at this blog post. Note also that there is a Trac ticket 6344 which aims to change this notation, but it is now almost two years without an update.

more

@niles that was a nice answer!! thanks!

( 2012-04-18 20:44:44 -0500 )edit