ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 19 Apr 2012 03:44:44 +0200Weird output for differential of a non-analytic complex function.https://ask.sagemath.org/question/8899/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?Wed, 18 Apr 2012 09:38:46 +0200https://ask.sagemath.org/question/8899/weird-output-for-differential-of-a-non-analytic-complex-function/Answer by niles for <p>The following code, </p>
<pre><code>var('z')
f = z*z.conjugate()
f.derivative(z)
</code></pre>
<p>produces </p>
<pre><code>z*D[0](conjugate)(z) + conjugate(z)
</code></pre>
<p>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?</p>
https://ask.sagemath.org/question/8899/weird-output-for-differential-of-a-non-analytic-complex-function/?answer=13472#post-id-13472The capital `D` is notation for the partial derivative; `D[i]` means partial derivative with respect to the `i`th 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](http://www.shocksolution.com/2012/03/partial-derivative-notation-in-sage/). 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.Wed, 18 Apr 2012 10:07:36 +0200https://ask.sagemath.org/question/8899/weird-output-for-differential-of-a-non-analytic-complex-function/?answer=13472#post-id-13472Comment by d3banjan for <p>The capital <code>D</code> is notation for the partial derivative; <code>D[i]</code> means partial derivative with respect to the <code>i</code>th variable of the function (where indexing starts at 0). So <code>D[0](conjugate)(z)</code> means take the partial derivative of the <code>congugate</code> function with respect to variable number 0 (i.e. <code>z</code>), and evaluate that derivative at <code>z</code>.</p>
<p>This notation is not universally loved, but was chosen deliberately after some long discussion. An explanation is given at <a href="http://www.shocksolution.com/2012/03/partial-derivative-notation-in-sage/">this blog post</a>. 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.</p>
https://ask.sagemath.org/question/8899/weird-output-for-differential-of-a-non-analytic-complex-function/?comment=19893#post-id-19893@niles that was a nice answer!! thanks!Thu, 19 Apr 2012 03:44:44 +0200https://ask.sagemath.org/question/8899/weird-output-for-differential-of-a-non-analytic-complex-function/?comment=19893#post-id-19893