Derivative of conjugated is conjugated of derivative.
Dear All, Further to my previous patch on functions derivatives, this small patch adds the rule conjugate(f)'=conjugate(f') to the GiNaC. The change can be seen here: cout << conjugate(log(z)).diff(z) << endl; // (before) -> z^(-1)*D[0](conjugate)(log(z)) // (now) -> conjugate(z)^(-1) Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835
Hi Vladimir, On 11/05/2013 08:11 AM, Vladimir V. Kisil wrote:
Further to my previous patch on functions derivatives, this small patch adds the rule
conjugate(f)'=conjugate(f')
This patch is inconsistent with the rest of inifcns_trans.cpp. Please search for "branch cut" inside that file. Now, subs(log(conjugate(x))-conjugate(log(x)), x==-1) evaluates to 2*I*Pi. With your patch, it would evaluate to 0. -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Dear Richard,
On Tue, 05 Nov 2013 09:02:12 +0100, "Richard B. Kreckel" <kreckel@ginac.de> said:
RK> Hi Vladimir, On 11/05/2013 08:11 AM, Vladimir V. Kisil wrote: >> Further to my previous patch on functions derivatives, this small >> patch adds the rule >> >> conjugate(f)'=conjugate(f') RK> This patch is inconsistent with the rest of RK> inifcns_trans.cpp. Please search for "branch cut" inside that RK> file. RK> Now, subs(log(conjugate(x))-conjugate(log(x)), x==-1) evaluates RK> to 2*I*Pi. With your patch, it would evaluate to 0. I could not see how this expression is connected to derivative. It does evaluates to (2*I)*Pi with the proposed patch. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835
Dear Alexei, On 11/05/2013 09:52 AM, Vladimir V. Kisil wrote:
Dear Richard,
On Tue, 05 Nov 2013 09:02:12 +0100, "Richard B. Kreckel" <kreckel@ginac.de> said:
RK> Hi Vladimir, On 11/05/2013 08:11 AM, Vladimir V. Kisil wrote: >> Further to my previous patch on functions derivatives, this small >> patch adds the rule >> >> conjugate(f)'=conjugate(f')
RK> This patch is inconsistent with the rest of RK> inifcns_trans.cpp. Please search for "branch cut" inside that RK> file.
RK> Now, subs(log(conjugate(x))-conjugate(log(x)), x==-1) evaluates RK> to 2*I*Pi. With your patch, it would evaluate to 0.
I could not see how this expression is connected to derivative. It does evaluates to (2*I)*Pi with the proposed patch.
You are right. Sorry for misinterpreting your patch. Still, I'm not convinced that the general transformation conjugate(f)' -> conjugate(f') is generally correct. Is it correct even on branch cuts? If you have a prove, please try writing it in your patch so this will be clear to people reading this section later on. Best wishes -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Dear Richard,
On Wed, 06 Nov 2013 00:36:01 +0100, "Richard B. Kreckel" <kreckel@ginac.de> said: RK> Still, I'm not convinced that the general transformation RK> conjugate(f)' -> conjugate(f') is generally correct. Is it correct even on branch RK> cuts? If you have a prove, please try writing it in your patch RK> so this will be clear to people reading this section later on.
Thanks, for pointing this out. Indeed, U'-I*V' is the value for both conjugate(U+I*V)' and conjugate( (U+I*V)') iff we differentiate with respect to a *real* variable. So, this check shall be added to the patch. For a complex variable z the correct substitution would be: conjugate(f).diff(z) -> conjugate(f.diff(z.conjugate())) But there are two problems here: * (minor) presently GiNaC does not allow diff() for anything but symbols and z.conjugate() is not a symbol. Shall we allow such derivatives? *(major) presently GiNaC for e=z.conjugate(); cout << e.diff(z) << endl; returns D[0](conjugate)(z) and the correct answer IMHO is 0. Shall this be amended? Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835
Hi Richard, Vladilmir, f(z) = conjugate(z) is non-holomorphic (on the whole C-plane) and so, its derivative ill-defined. Don't you think so ? Luis ----- On 11/06/2013 03:52 AM, Vladimir V. Kisil wrote:
Dear Richard,
On Wed, 06 Nov 2013 00:36:01 +0100, "Richard B. Kreckel"<kreckel@ginac.de> said: RK> Still, I'm not convinced that the general transformation RK> conjugate(f)' -> conjugate(f') is generally correct. Is it correct even on branch RK> cuts? If you have a prove, please try writing it in your patch RK> so this will be clear to people reading this section later on.
Thanks, for pointing this out. Indeed, U'-I*V' is the value for both conjugate(U+I*V)' and conjugate( (U+I*V)') iff we differentiate with respect to a *real* variable. So, this check shall be added to the patch.
For a complex variable z the correct substitution would be:
conjugate(f).diff(z) -> conjugate(f.diff(z.conjugate()))
But there are two problems here:
* (minor) presently GiNaC does not allow diff() for anything but symbols and z.conjugate() is not a symbol. Shall we allow such derivatives?
*(major) presently GiNaC for e=z.conjugate(); cout<< e.diff(z)<< endl; returns D[0](conjugate)(z) and the correct answer IMHO is 0. Shall this be amended?
Best wishes, Vladimir
Dear Luis,
On Wed, 06 Nov 2013 05:26:58 -0800, Luis Rivera <luis.rivera@laposte.net> said:
LR> Hi Richard, Vladilmir, f(z) = conjugate(z) is non-holomorphic LR> (on the whole C-plane) and so, its derivative ill-defined. LR> Don't you think so ? If you mean "differentiable with respect to the complex variable z", then this indeed is related (but not identical) to the holomorphic property and f(z)=conjugate(z) is not holomorphic. However, GiNaC diff() seems to be like a partial derivative, then the common definition is partial_z=1/2(partial_x-I*partial_y) partial_conjugate(z)=1/2(partial_x+I*partial_y) make it well-defined for any real-differentiable function of z=(x,y). Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835
Dear Vladimir, Yes, I see. In that context z and conjugate(z) are treated as independent variables. But then, concerning the second problem you mentioned before, should be it enough to define z.conjugate().diff(z) = 0 ? Best, Luis ----------------- On 11/06/2013 05:55 AM, Vladimir V. Kisil wrote:
Dear Luis,
On Wed, 06 Nov 2013 05:26:58 -0800, Luis Rivera<luis.rivera@laposte.net> said:
LR> Hi Richard, Vladilmir, f(z) = conjugate(z) is non-holomorphic LR> (on the whole C-plane) and so, its derivative ill-defined. LR> Don't you think so ?
If you mean "differentiable with respect to the complex variable z", then this indeed is related (but not identical) to the holomorphic property and f(z)=conjugate(z) is not holomorphic.
However, GiNaC diff() seems to be like a partial derivative, then the common definition is
partial_z=1/2(partial_x-I*partial_y) partial_conjugate(z)=1/2(partial_x+I*partial_y)
make it well-defined for any real-differentiable function of z=(x,y).
Best wishes, Vladimir
Dear All,
On Wed, 06 Nov 2013 11:52:02 +0000, "Vladimir V. Kisil" <kisilv@maths.leeds.ac.uk> said: VK> * (minor) presently GiNaC does not allow diff() for anything VK> but symbols and z.conjugate() is not a symbol. Shall we allow VK> such derivatives?
Considering this opportunity, the most straightforward solution would be to add more diff() methods, which will allow cojugate(GiNaC::symbol) squeeze through them. However, there is another proposition. I can derive new class GiNaC::complexsymbol out of GiNaC::symbol. GiNaC::complexsymbol shall have a member-pointer to its conjugated complexsymbol. Constructor will create such complexsymbols in conjugated pairs with cross-linked pointers. Conjugate_function will act on GiNaC::complexsymbol by replacing symbol with its conjugated from the pointer. Then diff() of GiNaC::complexsymbol by its conjugated will be 0 out of the box. Does this look reasonable? Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835
participants (3)
-
Luis Rivera
-
Richard B. Kreckel
-
Vladimir V. Kisil